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
Takes uploaded file, stores it in the local storage and saves image in the database
public function storeForProjectFeatured(UploadedFile $file, Project $project){ //TODO write image to the local storage }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n Image::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->path\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload()\n\t{\n\t if (null === $this->getFile()) {\n\t return;\n\t }\n\t\n\t // use the original file name here but you should\n\t // sanitize it at least to avoid any security issues\n\t\n\t // move takes the target directory and then the\n\t // target filename to move to\n\t \n\t $this->getFile()->move($this->getWebPath(),$this->imagen);\n\t \n\t \n\t // set the path property to the filename where you've saved the file\n\t $this->path = $this->getFile()->getClientOriginalName();\n\t\t//$this->temp = \n\t // clean up the file property as you won't need it anymore\n\t $this->file = null;\n\t}", "public function upload() {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->avatar)\n {\n return;\n }\n\n //Lastname du fichier\n $file = $this->id_user.'.'.$this->avatar->guessExtension();\n // move takes the target directory and then the target filename to move to\n $this->avatar->move($this->getUploadRootDir(), $file);\n //Suppression des thumbnail déjà en cache\n @unlink(__DIR__.'/../../../../../web/imagine/thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/avatar_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/moyen_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/mini_thumbnail/avatars/'.$file);\n\n // set the path property to the filename where you'ved saved the file\n $this->avatar = $file;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // if there is an error when moving the file, an exception will\n // be automatically thrown by move(). This will properly prevent\n // the entity from being persisted to the database on error\n $this->getFile()->move($this->getUploadRootDir(), $this->fileName);\n\n // check if we have an old image\n if (isset($this->temp)) {\n // delete the old image\n unlink($this->getUploadRootDir().'/'.$this->temp);\n // clear the temp image path\n $this->temp = null;\n }\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getImg()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getImg()->move(\n self::SERVER_PATH_TO_PRESS_IMAGE_FOLDER,\n $this->getImg()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->imageUrl = $this->getImg()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setImg(null);\n }", "public function upload()\n {\n if (null === $this->image) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the target filename to move to\n $this->file->move($this->getUploadRootDir(), $this->image->getClientOriginalName());\n\n // set the path property to the filename where you'ved saved the file\n $this->path = $this->image->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->backgroundImage = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function savetheuploadedfile() {\n\t\t$public_dir = 'public/images/';\n\t\t$baseurl = base_url();\n\t\tif ($_FILES['file']['name']) {\n\t\t\t\tif (!$_FILES['file']['error']) {\n\t\t\t\t\t\t$name = md5(rand(100, 200));\n\t\t\t\t\t\t$ext = explode('.', $_FILES['file']['name']);\n\t\t\t\t\t\t$filename = $name . '.' . $ext[1];\n\t\t\t\t\t\t$destination = $public_dir . $filename; //change path of the folder...\n\t\t\t\t\t\t$location = $_FILES[\"file\"][\"tmp_name\"];\n\t\t\t\t\t\tmove_uploaded_file($location, $destination);\n\t\t\t\t\t\t// echo $destination;\n\n\t\t\t\t\t\techo $baseurl.'/public/images/' . $filename;\n\t\t\t\t} else {\n\t\t\t\t\t\techo $message = 'The following error occured: ' . $_FILES['file']['error'];\n\t\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function upload(){\n if( NULL === $this->getFile()){\n return;\n }\n $filename= $this->getFile()->getClientOriginalName();\n\n // Move to the target directory\n \n $this->getFile()->move(\n $this->getAbsolutePath(), \n $filename);\n\n //Set the logo\n $this->setFilename($filename);\n\n $this->setFile();\n\n }", "public function upload(): void\n {\n // check if we have an old image\n if ($this->oldFileName !== null) {\n $this->removeOldFile();\n }\n\n if (!$this->hasFile()) {\n return;\n }\n\n $this->writeFileToDisk();\n\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n $this->picture = file_get_contents($this->getFile());\n\n if (isset($this->temp)) {\n $this->temp = null;\n }\n\n $this->file = null;\n }", "public function upload(): void\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload()\n{\n if(null === $this->getFile())\n {\n return;\n }\n\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n $this->filename =$this->getFile()->getClientOriginalName();\n\n $this->setFile(null);\n}", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->id . '.' .$this->ext\n );\n\n // set the ext property to the filename where you've saved the file\n //$this->ext = $this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(){\n $url_path = 'assets/imgs/' . $_FILES['file']['name'];\n move_uploaded_file($_FILES['file']['tmp_name'], $url_path);\n $_POST['url_image'] = $url_path;\n echo parent::register($_POST) ? header('location: ?controller=admin') : 'Error en el registro';\n }", "public function save()\n {\n $this->validate();\n $this->validate(['image' => 'required|image']);\n\n // try to upload image and resize by ImageSaverController config\n try {\n $imageSaver = new ImageSaverController();\n $this->imagePath = $imageSaver->loadImage($this->image->getRealPath())->saveAllSizes();\n }catch (\\RuntimeException $exception){\n dd($exception);\n }\n\n $this->PostSaver();\n\n $this->resetAll();\n $this->ChangeCreatedMode();\n $this->swAlert([\n 'title' => 'Good job',\n 'text' => 'successfully added',\n 'icon' => 'success'\n ]);\n $this->render();\n }", "public function store(Request $request)\n {\n //\n\n $user_id = Auth::id();\n $request->validate([\n\n 'image' => 'required|image|mimes:jpeg,png,jpg,webp|max:2048 '\n ]);\n $directory = public_path('images').'/'.$user_id;\n $imageName = time().'.'.$request->image->extension();\n\n //move the uploaded file to a directory named as user_id\n $saved = $request->image->move($directory, $imageName);\n $imagePath= \"$user_id/$imageName\";\n\n $imageUpload = new imageUpload;\n $imageUpload->name=$imageName;\n $imageUpload->path = \"images/$user_id/$imageName\";\n $imageUpload->user_id= $user_id;\n $imageUpload->save();\n\n return redirect()->route('getajaxupdate',['id' => $user_id])\n ->with('success','You have successfully uploaded image.')\n ->with('image',$imageName)\n ->with('id',$user_id);\n\n\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->setImageName($this->getFile()->getClientOriginalName());\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function storeimage(Request $request)\n {\n $this->authorize('isAdmin');\n if($request->file('file'))\n {\n $image = $request->file('file');\n $name = \"ortm_\".time().'.'.$image->getClientOriginalExtension();\n\n $thumbnailImage = Images::make($image)->resize(200, 200)->save(public_path('/img/ourteam/thumbs/' . $name));\n\n $watermark = Images::make(public_path('/img/watermark.png'));\n $Image = Images::make($image)->insert($watermark, 'bottom-right', 10, 10)->save(public_path('/img/ourteam/' . $name));\n\n //$image->move(public_path().'/img/social/', $name);\n }\n\n $image= new Image();\n $image->image_name = $name;\n $image->save();\n\n return response()->json([\n 'data' => $name\n ], 200);\n }", "public function insertImageToDb() \n {\n }", "public function upload() {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(), $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->photo = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n// use the original file name here but you should\n// sanitize it at least to avoid any security issues\n// move takes the target directory and then the\n// target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n// set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n// clean up the file property as you won't need it anymore\n $this->file = null;\n\n\n }", "public function storeForArticleGallery(UploadedFile $file, Article $project){\n //TODO write image to the local storage\n }", "public function store(Request $request)\n {\n \n $file = $request->file('file');\n\n\n $name = time() . $file->getClientOriginalName();\n\n $file->move('images', $name);\n\n\n\n Photo::create(['file'=>$name]);\n\n Session::flash('message', 'Photo added!');\n Session::flash('status', 'success');\n\n }", "public function upload(){\n if (null === $this->getProductsFileImage()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getProductsFileImage()->move(\n $this->getUploadRootDir(),\n $this->getProductsFileImage()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getProductsFileImage()->getClientOriginalName();\n $this->productsImage = $this->getProductsFileImage()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->productsFileImage = null;\n }", "public function storeImage(UploadedFile $file)\n {\n $filename = md5(time().$file->getClientOriginalName()).'.'.$file->getClientOriginalExtension();\n $file->move(Config::get('assets.images'),$filename);\n\n $i = new ImageEntry();\n $i->path = $filename;\n $i->uploader = LoginController::currentUser()->id;\n $i->save();\n return $i;\n }", "public function StoreSlider(Request $request)\n {\n\n $slider_image = $request->file('image');\n\n $name_gen = hexdec(uniqid()).'.'.$slider_image->getClientOriginalExtension();\n Image::make($slider_image)->resize(1920,1088)->save('image/slider/'.$name_gen );\n\n $last_img ='image/slider/'.$name_gen;\n\n\n //end upload image\n\n\n Slider::insert([\n 'title' => $request->title,\n 'description' => $request->description,\n 'image'=> $last_img,\n 'created_at'=>Carbon::now(),\n ]);\n\n return redirect()->route('home.slider')->with('success','Slider Inserted successfully');\n }", "public function postUpload()\n\t{\n\t\t$validator = Validator::make(Input::all(), array(\n\t\t\t'file' => 'image'\n\t\t));\n\t\t//kalo ada url make yang url, kalo ngga yang file\n\t\tif ($validator->fails()) {\n\t\t\treturn Redirect::to('/teaser/upload');\n\t\t}\n\n\t\tif (Input::hasFile('file'))\n {\n \t$folder = '/teaser_photo/';\n $path = public_path() . $folder;\n $filename = $original = Input::file('file')->getClientOriginalName();\n $extension = Input::file('file')->getClientOriginalExtension();\n if (File::exists($path . $filename))\n {\n $filename = time() . '_' . $original;\n }\n $file = Input::file('file')->move($path, $filename);\n\t\t\t\n\n\t\t\t$teaser = new Teaser;\n $teaser->teaser = $folder . $filename;\n $teaser->status = 1;\n $teaser->save();\n return Redirect::to('teaser');\n }\n\t}", "public function upload(Request $request){\n if($request->hasFile('image')){\n $resorce = $request->file('image');\n $name = $resorce->getClientOriginalName();\n $resorce->move(\\base_path() .\"/public/images\", $name);\n $save = DB::table('images')->insert(['image' => $name]);\n echo \"Gambar berhasil di upload\";\n }else{\n echo \"Error to upload this file\";\n }\n }", "public function uploadImage() \n {\n if (is_null($this->image)) {\n return;\n }\n \n // move image from temp directory to destination one\n $this->image->move(\n $this->getUploadRootDir(),\n $this->image->getClientOriginalName()\n );\n\n $this->path = $this->image->getClientOriginalName();\n $this->image = null;\n }", "public function store(Request $request)\n {\n\n $fileName = Storage::disk('public')->put('',$request->file('file_name'));\n\n $thumbPath = storage_path('app/public/thumb/').$fileName;\n\n $manager = new ImageManager(array('driver' => 'gd'));\n\n\n $img = $manager->make($request->file_name)->resize(100, 100)->save($thumbPath);\n\n\n\n $file = new File();\n $file->file_name = $fileName;\n $file->save();\n\n return redirect(route('files.index'));\n }", "public function upload(){\n $file = array('image' => Input::file('avatar'));\n // setting up rules\n $rules = array('image' => 'required',); //mimes:jpeg,bmp,png and for max size max:10000\n // doing the validation, passing post data, rules and the messages\n $validator = Validator::make($file, $rules);\n if ($validator->fails()) {\n return redirect()->route('myprofile')->with(['errors' => $validator->errors()]);\n }else{\n // checking file is valid.\n if (Input::file('avatar')->isValid()) {\n $path = 'public/uploads/users/'.Auth::User()->id.'/avatar/';\n Storage::makeDirectory($path, $mode = 0777, true);\n Storage::disk('local')->put($path, Input::file('avatar'));\n $user = Users::find(Auth::User()->id);\n $createdFileName = Storage::files($path);\n $pathFile = str_replace('public/','',$createdFileName[0]);\n $user->avatar = '/storage/'.$pathFile;\n if ($user->save()){\n return redirect()->route('myprofile')->with(['msg' => 'Image was uploaded with success']);\n }\n }else{\n exit('error');\n }\n }\n }", "private function saveImage()\n {\n $name = $_FILES['image']['name'];\n $tmp_name = $_FILES['image']['tmp_name'];\n\n return move_uploaded_file($tmp_name, 'images/' . $name);\n }", "public function store() {\n\n\t\t$file = array('image' => Input::file('image'));\n\t\t// setting up rules\n\t\t$rules = array('image' => 'required|image'); //mimes:jpeg,bmp,png and for max size max:10000\n\t\t// doing the validation, passing post data, rules and the messages\n\t\t$validator = Validator::make($file, $rules);\n\t\tif ($validator->fails()) {\n\t\t\t// send back to the page with the input data and errors\n\t\t\treturn Redirect::to('posts/create')->withInput()->withErrors($validator);\n\t\t} else {\n\t\t\t// checking file is valid.\n\t\t\tif (Input::file('image')->isValid()) {\n\t\t\t\t$destinationPath = 'uploads'; // upload path\n\t\t\t\t$extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n\t\t\t\t$fileName = rand(11111, 99999) . '.' . $extension; // renameing image\n\t\t\t\tInput::file('image')->move($destinationPath, $fileName); // uploading file to given path\n\t\t\t\t// sending back with message\n\t\t\t\tSession::flash('success', 'Upload successfully');\n\t\t\t\treturn Redirect::to('posts/create');\n\n\t\t\t} else {\n\t\t\t\t// sending back with error message.\n\t\t\t\tSession::flash('error', 'uploaded file is not valid');\n\t\t\t\treturn Redirect::to('posts/create');\n\t\t\t}\n\t\t}\n\t}", "public function store(Request $request)\n { \n \n $data=request()->validate([\n 'caption'=>'required',\n 'file'=>'required | image'\n ]);\n\n $imagePath=request('file')->store('uploads','public');\n\n $image=Image::make(public_path(\"storage/$imagePath\"))->fit(1200,1200);\n $image->save();\n\n try{\n auth()->user()->posts()->create([\n 'caption'=>$data['caption'],\n 'image'=>$imagePath\n ]);\n return $this->responseSuccess('Upload Post successfully');\n }catch(Exception $e){\n return $this->responseServerError(\"Server Error.\");\n }\n\n }", "function uploadFile($name)\n{\n // Gets the paths, full and local directory\n global $image_dir, $image_dir_path;\n if (isset($_FILES[$name])) {\n // Gets the actual file name\n $filename = $_FILES[$name]['name'];\n if (empty($filename)) {\n return;\n }\n // Get the file from the temp folder on the server\n $source = $_FILES[$name]['tmp_name'];\n // Sets the new path - images folder in this directory\n $target = $image_dir_path . '/' . $filename;\n // Moves the file to the target folder\n move_uploaded_file($source, $target);\n // Send file for further processing\n processImage($image_dir_path, $filename);\n // Sets the path for the image for Database storage\n $filepath = $image_dir . '/' . $filename;\n // Returns the path where the file is stored\n return $filepath;\n }\n}", "function upload(){\r\n\t\r\n\tvar_dump($_FILES);\r\n\tif(isset($_FILES[\"fileToUpload\"]) && !empty($_FILES[\"fileToUpload\"][\"name\"])){\r\n\t\t$target_dir = \"../pildid/\";\r\n\t\t$target_file = $target_dir . basename($_FILES[\"fileToUpload\"][\"name\"]);\r\n\t\t$uploadOk = 1;\r\n\t\t$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);\r\n\t\t// Check if image file is a actual image or fake image\r\n\t\tif(isset($_POST[\"submit\"])) {\r\n\t\t\t$check = getimagesize($_FILES[\"fileToUpload\"][\"tmp_name\"]);\r\n\t\t\tif($check !== false) {\r\n\t\t\t\t//echo \"File is an image - \" . $check[\"mime\"] . \".\";\r\n\t\t\t\t$uploadOk = 1;\r\n\t\t\t} else {\r\n\t\t\t\techo \"File is not an image.\";\r\n\t\t\t\t$uploadOk = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Check if file already exists\r\n\t\tif (file_exists($target_file)) {\r\n\t\t\techo \"Sorry, file already exists.\";\r\n\t\t\t$uploadOk = 0;\r\n\t\t}\r\n\t\t// Check file size\r\n\t\tif ($_FILES[\"fileToUpload\"][\"size\"] > 500000) {\r\n\t\t\techo \"Sorry, your file is too large.\";\r\n\t\t\t$uploadOk = 0;\r\n\t\t}\r\n\t\t// Allow certain file formats\r\n\t\tif($imageFileType != \"jpg\" && $imageFileType != \"png\" && $imageFileType != \"jpeg\"\r\n\t\t&& $imageFileType != \"gif\" ) {\r\n\t\t\techo \"Sorry, only JPG, JPEG, PNG & GIF files are allowed.\";\r\n\t\t\t$uploadOk = 0;\r\n\t\t}\r\n\t\t// Check if $uploadOk is set to 0 by an error\r\n\t\tif ($uploadOk == 0) {\r\n\t\t\techo \"Sorry, your file was not uploaded.\";\r\n\t\t// if everything is ok, try to upload file\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$target_file = $target_dir.uniqid().\".\".$imageFileType;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (move_uploaded_file($_FILES[\"fileToUpload\"][\"tmp_name\"], $target_file)) {\r\n\t\t\t\t//echo \"The file \". basename( $_FILES[\"fileToUpload\"][\"name\"]). \" has been uploaded.\";\r\n\t\t\t\t\r\n\t\t\t\t// save file name to DB here\r\n\t\t\t\t$a = new StdClass();\r\n\t\t\t\t$a->name = $target_file;\r\n\t\t\t\treturn $a;\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\treturn \"Sorry, there was an error uploading your file.\";\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\treturn \"Please select the file that you want to upload!\";\r\n\t}\r\n\t\r\n}", "public function upload();", "public function save($value){\n $target_path = IMG_PATH.DS.$this->file_name;\n try {\n //move the uploaded file to target path\n move_uploaded_file($value, $target_path);\n return $this->_add_photo();\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function save()\n {\n\n $photo = $this->flyer->addPhoto($this->makePhoto());\n\n\n // move the photo to the images folder\n $this->file->move($photo->baseDir(), $photo->name);\n\n\n// Image::make($this->path)\n// ->fit(200)\n// ->save($this->thumbnail_path);\n\n // generate a thumbnail\n $this->thumbnail->make($photo->path, $photo->thumbnail_path);\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'image' => 'image|mimes:jpeg,png,jpg,gif|max:2048',\n ]);\n \n if ($request->hasFile('news_image')){\n\n $news_id=$request->news_id;\n $file = $request->file('news_image');\n $extension = $file->getClientOriginalExtension();\n $new_filename = rand(1,100).time().'.'. $extension;\n $location=\"images/news/\";\n //Storage::disk('public')->put($location.$new_filename, File::get($file));\n\n if (!file_exists(public_path($location))) \n File::makeDirectory(public_path($location));\n\n Image::make($file)->save(public_path($location.$new_filename));\n\n\n $newsImage = new Photo;\n $newsImage->filename=$location.$new_filename;\n $newsImage->mime=$file->getClientMimeType();\n $newsImage->original_filename=$file->getClientOriginalName();\n \n $newsImage->save();\n\n $news=News::find($news_id);\n $news->Photos()->attach($newsImage->id);\n return redirect(route('news.show',$news_id))->with('success','Image uploaded successfully!');\n }\n else\n return back();\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $partes_ruta = pathinfo($this->getFile()->getClientOriginalName());\n $this->nombre = md5(uniqid()) . '.' . $partes_ruta['extension'];\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->nombre\n );\n\n $this->url = $this->getWebPath();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function save(){\n\t\t\tif(isset($this->id)){\n\t\t\t\t$this->update();\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//checking for errors\n\t\t\t\t//Can't save if there are pre=existing errors.\n\t\t\t\tif(!empty($this->errors)){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Can't save without filename and temp location on server.\n\t\t\t\tif(empty($this->filename) || empty($this->temp_path)){\n\t\t\t\t\t$this->errors[]=\"The file location is not available!\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Determine the target path\n\t\t\t\t$upload_dir=\"images\";\n\t\t\t\t$target_path=\"../../public/\".$upload_dir.\"/\".$this->filename;\n\t\t\t\t//$target_path=$this->filename;\n\t\t\t\tif(file_exists($target_path)){\n\t\t\t\t\t$this->errors[]=\"The file {$this->filename} already exists!\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Attempt to move the file.\n\t\t\t\tif(move_uploaded_file($this->temp_path, $target_path)){\n\t\t\t\t\t//success\n\t\t\t\t\t//save corresponding entry into database.\n\t\t\t\t\tif($this->create()){\n\t\t\t\t\t\t//we are done with temp_path.\n\t\t\t\t\t\tunset($this->temp_path);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//file not moved.\n\t\t\t\t\t\t$this->error[]=\"file can't be uploaded because of some denied permissions.\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // si on avait un ancien fichier on le supprime\n if (null !== $this->tempFilename) {\n $oldFile = $this->getUploadRootDir().'/'.$this->id.'.'.$this->tempFilename;\n if (file_exists($oldFile)) {\n unlink($oldFile);\n }\n }\n\n // déplace le fichier envoyé dans le répertoire de notre choix\n $this->file->move(\n $this->getUploadRootDir(), // répertoire de destination\n $this->id.'.'.$this->url // nom du fichier à créer \"id.extension\"\n );\n\n }", "public function storeForProjectGallery(UploadedFile $file, Project $project){\n //TODO write image to the local storage\n }", "public function storeForArticleFeatured(UploadedFile $file, Article $project){\n //TODO write image to the local storage\n }", "public function save(Request $request){\n $file = $request->file('file');\n \n //obtenemos el nombre del archivo\n $nombre = $file->getClientOriginalName();\n //print_r($nombre);\n \n \n Storage::disk('local')->put('logo.PNG', \\File::get($file));\n \t\t\n \t\t return Response::json(['response' => 'Actualizado correctamente'],200);\n\t}", "public function store(Request $request)\n {\n\n $file = $request->file('file');\n $path = $request->file->store('the/path');\n\n// $imageName = request()->file->getClientOriginalName();\n// request()->file->move(public_path('upload'), $imageName);\n//\n//\n// return response()->json(['uploaded' => '/upload/'.$imageName]);\n\n\n// $this->validate($request, [\n//\n// 'media' => 'required',\n// 'media.*' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048'\n//\n// ]);\n//\n// if($request->hasfile('media'))\n// {\n//\n// foreach($request->file('media') as $image)\n// {\n// $name=$image->getClientOriginalName();\n// $image->move(public_path().'/images/', $name);\n// $data[] = $name;\n// }\n// }\n//\n// $form= new Media();\n// $form->user_id = Auth::user()->id;\n// $form->name =json_encode($data);\n//\n//\n// $form->save();\n//\n// return back()->with('success', 'Your images has been successfully');\n }", "public function uploadImage()\n {\n $file = array('image' => \\Input::file('image'));\n // setting up rules\n $rules = array('image' => 'required',); //mimes:jpeg,bmp,png and for max size max:10000\n // doing the validation, passing post data, rules and the messages\n $validator = Validator::make($file, $rules);\n if ($validator->fails()) {\n // send back to the page with the input data and errors\n return Redirect::back()->withInput()->withErrors($validator);\n }\n else {\n // checking file is valid.\n if (Input::file('image')->isValid()) {\n $destinationPath = 'temp'; // upload path\n $extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n $fileName = rand(11111, 99999) . '.' . $extension; // renaming image\n Input::file('image')->move($destinationPath, $fileName); // uploading file to given path\n // sending back with message\n Session::flash('success', 'Upload successfully');\n return Redirect::to('upload');\n } else {\n // sending back with error message.\n Session::flash('error', 'uploaded file is not valid');\n return Redirect::to('upload');\n }\n }\n }", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n if(!is_dir($this->getTargetUploadRootDir())){\n mkdir($this->getTargetUploadRootDir(), 0777, true);\n }\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getTargetUploadRootDir(),\n $this->file->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = date('Y-m-d').DIRECTORY_SEPARATOR.$this->id.DIRECTORY_SEPARATOR.$this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n //\nif ($request->hasFile('photo')) {\n $originalname = $request->file('photo')->getClientOriginalName(); \n $extension = Input::file('photo')->getClientOriginalExtension();\n $oldnamewithoutext = substr($originalname, 0, strlen($originalname) - 4); \n $dbimgname = $oldnamewithoutext . '-'. time() . '.' . $extension; \n $newname = iconv(\"utf-8\", \"TIS-620\", $dbimgname);\n $moveImage = $request->file('photo')->move('images', $newname);\n\n} else {\n $dbimgname = \"\";\n} \n //\n $employees = new Employee;\n $employees->title = $request->title;\n $employees->firstname = $request->firstname;\n $employees->lastname = $request->lastname;\n $employees->photo = $dbimgname;\n $employees->status = $request->status;\n $employees->priority = $request->priority;\n \n\n // $this->validate($request, [\n // 'fistname' => 'required|unique:employee|max:255',\n \n // ]);\n\n \n $employees->save();\n $request->session()->flash('status', 'บันทึกข้อมูลเรียบร้อย');\n return back(); \n }", "public function uploadImage()\n {\n if (null === $this->fileimage) {\n return;\n }\n\n $upload = new Upload();\n $this->image = $upload->createName(\n $this->fileimage->getClientOriginalName(),\n $this->getUploadRootDir().'/',\n array('tmp/','miniature/')\n );\n\n $imagine = new Imagine();\n\n /* Tmp */\n $size = new Box(1920,1080);\n $imagine->open($this->fileimage)\n ->thumbnail($size, 'inset')\n ->save($this->getUploadRootDir().'tmp/'.$this->image);\n\n /* Miniature */\n $size = new Box(300,300);\n $imagine->open($this->fileimage)\n ->thumbnail($size, 'outbound')\n ->save($this->getUploadRootDir().'miniature/'.$this->image);\n\n }", "public function upload()\n {\n // The file property can be empty if the field is not required\n if (null === $this->file) {\n return;\n }\n\n // Use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->path\n );\n\n // Set the path property to the filename where you've saved the file\n $this->path = $this->file->getClientOriginalName();\n\n // Clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n\n if(Input::file('imagem')){\n $imagem = Input::file('imagem');\n $extensao = $imagem->getClientOriginalExtension();\n\n if($extensao != 'jpg' && $extensao != 'png' && $extensao != 'jpeg' && $extensao != 'JPG' && $extensao != 'PNG' && $extensao != 'JPEG'){\n return back()->with('erro','Erro: Este arquivo não é imagem');\n }\n }\n\n $perfil = new Perfil;\n $perfil->nome = $request->input('nome');\n $perfil->biografia = $request->input('biografia');\n $perfil->numero = $request->input('numero');\n $perfil->imagem = \"\";\n $perfil->user_id = auth()->user()->id;\n\n $perfil->save();\n\n if(Input::file('imagem')){\n File::move($imagem,public_path().'\\imagem-perfil\\perfil-id_'.$perfil->id.'.'.$extensao);\n $perfil->imagem = public_path().'\\imagem-perfil\\perfil-id_'.$perfil->id.'.'.$extensao;\n $perfil->save();\n }\n\n return redirect('home');\n }", "public function store(Request $request)\n {\n $personal=new Personal();\n\n $file = $request->file('file');\n //extraccion de los datos del archivo\n $extension = $file->getClientOriginalExtension();\n $name='personal_'.date('Ymd').time();\n $fileName = $name.'.'.$extension;\n\n $img = Storage::disk('imgDisk')->put($fileName,\\File::get($file)); \n\n $personal->file_name=$name;\n $personal->file_ext=$extension;\n\n $personal->nombres=$request->nombres;\n $personal->apellidos=$request->apellidos;\n $personal->cedula=$request->cedula;\n $personal->titulo=$request->titulo;\n $personal->cargo=$request->cargo;\n $personal->telefono=$request->telefono;\n $personal->estado_del=\"A\";\n $personal->save();\n return redirect('/personal_form');\n }", "public function store()\n {\n $data = request()->validate([\n 'caption' => 'required',\n 'price' => 'required',\n 'image' => ['required', 'image','mimes:jpeg,png,jpg,gif,svg', 'max:500000'],\n ]);\n\n $imagePath = request('image')->store('uploads', 'public');\n\n $image = Image::make(public_path(\"storage/{$imagePath}\"))->fit(1200, 1200);\n $image->save();\n $city = Auth::user()->city;\n\n auth()->user()->posts()->create([\n 'caption' => $data['caption'],\n 'image' => $imagePath,\n 'price' => $data['price'],\n 'city' => $city,\n ]);\n\n //user is redirected to their profile\n return redirect('/profile/' . auth()->user()->id);\n }", "public function upload()\n\t{\n\t\t$field \t\t = $this->getUploadField();\n\t\t$newName \t = $this->getUploadNewName();\n\t\t//$destination = 'assets/images/location';\t\n\t\t$destination = $this->getUploadDestination();\n\n\t\tif (\\Input::hasFile($field))\n\t\t{\n\t\t \\Input::file($field)->move($destination, $newName);\n\t\t}\n\t\t\n\t\t$this->entity->fill([$field => $newName]);\n\t\t$this->entity->save();\n\n\t\treturn true;\n\t}", "public function store(SliderPostRequest $request)\n {\n if($request->status){\n $this->status = 1;\n }\n try{\n if ($request->hasFile('img_url')) {\n\n $fileName =$request->img_url->store('/images');\n\n $slider = new Slider();\n\n $slider->name = $request->name;\n $slider->img_url = $fileName;\n $slider->status =$this->status ;\n /* $slider->created_by = Sentinel::getUser()->id;\n $slider->updated_by= Sentinel::getUser()->id;*/\n $slider->created_by =95;\n $slider->updated_by=95;\n $slider->saveOrFail();\n\n Input::file('img_url')->move('images/', $fileName); // uploading file to given path\n Session::flash('info', 'Upload successfully');\n return Redirect::back();\n\n }else{\n Session::flash('danger', 'uploaded file is not valid');\n return Redirect::back();\n }\n }catch (Exception $e){\n // sending back with error message.\n Session::flash('danger', $e);\n return Redirect::back();\n\n }\n\n }", "public function store(Request $request)\n {\n if ($request->hasFile('file_name')) {\n if ($request->file('file_name')->isValid()) {\n \n\n \n $filename=$request->file('file_name')->getClientOriginalName();\n $filesize=$request->file('file_name')->getClientSize();\n $request->file_name->storeAs('public/images',$filename);\n\n/* $path = $request->file_name->path();*/\n\n/*$extension = $request->file_name->extension();*/\n/*$path = $request->file_name->storeAs('public/images','sunil.jpg');*/\n//$request->session()->flash('message', 'Thanks for uploading');\n/*return back();//->with('message', 'Thanks for uploading');*/\n $file =new Fileupload();\n $file->file_name=$filename;\n $file->file_size=$filesize;\n $file->save();\n $request->session()->flash('message', 'Thanks for uploading');\n return back();//->with('message', 'Thanks for uploading');\n\n}\n \n}\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $filename = substr( md5(rand()), 0, 15).'.'.$this->getFile()->guessExtension();\n // move takes the target directory and then the\n // target filename to move to\n\n\n\t\t\t\tif(!file_exists($this->getUploadRootDir())) mkdir($this->getUploadRootDir(), 0777, true);\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n\n $image = time().'.'.$request->img->extension();\n\n $request->img->move(public_path('images'), $image);\n\n\n Image::create([\n 'title'=>$request['title'],\n 'desc'=>$request['desc'],\n 'img'=>$image,\n\n\n ]);\n\n return redirect()->route('image.index')->with('success','successfully done');\n\n }", "public function uploads() {\n $this->Authorization->authorize($this->Settings->newEmptyEntity(), 'create');\n if ($this->request->is(\"Ajax\")) {\n $is_dest = \"img/tmp/\";\n if (!file_exists($is_dest)) {\n //mkdir($is_dest, 0777, true);\n $dir = new Folder(WWW_ROOT . 'img/tmp/', true, 0755);\n $is_dest = $dir->path;\n }\n $fileData = $this->request->getData('file');\n if (strlen($fileData->getClientFilename()) > 1) {\n $ext = pathinfo($fileData->getClientFilename(), PATHINFO_EXTENSION);\n $allowedExt = array('gif', 'jpeg', 'png', 'jpg', 'tif', 'bmp', 'ico');\n if ($this->request->getData('allow_ext')) {\n $allowedExt = explode(\",\", $this->request->getData('allow_ext'));\n }\n if (in_array(strtolower($ext), $allowedExt)) {\n $upload_img = $fileData->getClientFilename();\n $ran = time();\n $upload_img = $ran . \"_\" . $fileData->getClientFilename();\n if (strlen($upload_img) > 100) {\n $upload_img = $ran . \"_\" . rand() . \".\" . $ext;\n }\n $upload_img = str_replace(' ', '_', $upload_img);\n $fileData->moveTo($is_dest . $upload_img);\n $data['filename'] = $upload_img;\n $data['image_path'] = $this->request->getAttribute(\"webroot\") . \"img/tmp/\" . $upload_img;\n $data['success'] = true;\n $data['message'] = \"file successfully uploaded!\";\n } else {\n $data['success'] = false;\n $data['message'] = \"invalid file type!\";\n }\n } else {\n $data['success'] = false;\n $data['message'] = \"invalid file!\";\n }\n }\n $this->set($data);\n $this->viewBuilder()->setOption('serialize', ['filename', 'image_path','success', 'message']);\n }", "public function store(Request $request)\n {\n //validator//\n $validation = Validator::make($request->all(), [\n 'userfile' => 'required|image|mimes:jpeg,png|min:1|max:250'\n ]);\n\n //check if it fail//\n if ($validation->fails()){\n return redirect()->back()->withInput()->with('errors', $validation->errors());\n }\n\n $image = new Image;\n\n //upload image//\n $file = $request->file('userfile');\n $destination_path = 'uploads/';\n $filename = str_random(6).'_'.$file->getClientOriginalName();\n $file->move($destination_path, $filename);\n\n //save path image to db//\n $image->file = $destination_path . $filename;\n $image->caption = $request->input('caption');\n $image->save();\n\n return Redirect::to('articles/'.$request->article_id)->with('message','You just uploaded an image !');\n }", "public function store(Request $request){\n \n if ($request->hasFile('image')){\n\n $filenamewithextension = $request->image->getClientOriginalName();\n $filename = pathinfo($filenamewithextension, PATHINFO_FILENAME);\n $extension = $request->image->getClientOriginalExtension();\n $filenametostore = $filename.'_'.time().'.'.$extension;\n $request->image->storeAs('public/img/', $filenametostore);\n //$smallthumbnail = \"_small_\".$filename.'_'.time().'.'.$extension;\n //$smallthumbnailpath = public_path('storage/img/'.$smallthumbnail);\n //$this->createThumbnail($smallthumbnailpath,150,93);\n //$request->image->storeAs('storage/img/', $smallthumbnail);\n\n return response()->json(array('nomeArquivo'=>$filenametostore));\n\n } else{\n //return response()->json(array('nomeArquivo' => 'arquivo não recebido'));\n } \n\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'uploadedFile' => 'required|mimes:jpeg,png,jpg'\n ]);\n \n $file = $request->file('uploadedFile');\n \n if (!$file->isValid()) {\n return JsonService::jsonError('Sorry! The file was not uploadded!');\n }\n\n $filePath = $file->store('/files/images', 'public');\n $this->imageService->createThumbnails($filePath, [200, 500, 800]);\n $fileId = File::create([\n 'originalName' => $file->getClientOriginalName(),\n 'pathToFile' => $filePath,\n 'mimeType' => $file->getClientMimeType(),\n 'user_id' => auth()->id(),\n ])->id;\n \n return JsonService::jsonSuccess(\n 'File was uploaded successfully',\n $this->imageService->getInfoForImage(File::findOrFail($fileId))\n );\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required|string',\n 'sub_title' => 'required|string', \n 'description' => 'required|string', \n 'big_img' => 'required|image', \n 'sm_img' => 'required|image', \n 'client' => 'required|string', \n 'category' => 'required|string' \n ]);\n\n $protfolios= new Protfolio;\n $protfolios->title=$request->title;\n $protfolios->sub_title=$request->sub_title;\n $protfolios->description=$request->description;\n $protfolios->client=$request->client;\n $protfolios->category=$request->category;\n\n $big_file = $request->file('big_img');\n Storage::putFile('public/img/', $big_file);\n $protfolios->big_img =\"storage/img/\".$big_file->hashName();\n\n $sm_file = $request->file('sm_img');\n Storage::putFile('public/img/', $sm_file);\n $protfolios->sm_img =\"storage/img/\".$sm_file->hashName();\n\n $protfolios->save();\n return redirect()->route('admin.protfolios.create')->with('success', \"New Protfolio Create successfully\");\n\n\n\n }", "public function store(CarruselRequest $request)\n {\n $carrusel = new Carrusel;\n\n $carrusel->file = $request->file;\n $carrusel->title = $request->title;\n $carrusel->description = $request->description;\n \n\n $carrusel->save();\n\n\n //IMAGE\n if($request->file('file')){\n $path = Storage::disk('public')->put('image', $request->file('file'));\n $carrusel->fill(['file' => asset($path)])->save();\n }\n\n return redirect()->route('carrusels.index')->with('info', 'La imagen fue guardada en el carrusel.');\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\n\t\t$image = new Photo();\n\t\t$image->user_id \t= $input['user_id'];\n\t\t$image->fileName \t= $input['fileName']->getClientOriginalName();\n\t\t$image->title \t\t= $input['title'];\n\t\t\n\t\tif($image->save()){\n\t\t\t\n\t\t\t$path = user_photos_path();\n\n\t\t\t$move_image = Image::make($input['fileName']->getRealPath());\n\n\t\t\tFile::exists($path) or File::makeDirectory($path);\n\n\t\t\t$move_image->save($path.$image->fileName)\n\t\t\t\t\t->resize(200,200)\n\t\t\t\t\t->greyscale()\n\t\t\t\t\t->save($path. 'tn-'.$image->fileName);\n\n\t\t\treturn Redirect::to('photos');\t\n\t\t}else{\n\t\t\treturn Ridirect::to('photos.create');\n\t\t}\n\t\n\t}", "public function publicUpload()\n {\n $this->request->validate([\n $this->inputName => $this->extensions,\n ]);\n\n if ($uploadedFile = $this->request->file($this->inputName))\n {\n $fileName = time() . $uploadedFile->getClientOriginalName();\n $uploadedFile->move(uploadedImagePath() . DIRECTORY_SEPARATOR . $this->path, $fileName);\n $filePath = uploadedImagePath() . DIRECTORY_SEPARATOR . $this->path . DIRECTORY_SEPARATOR .$fileName;\n $image = $this->modelName::create(['name' => $fileName, 'path' => $filePath]);\n return $image->id;\n }\n\n }", "public function store(Request $request)\n {\n $validated = $request->validate([\n 'name' => 'required',\n 'designation' => 'required',\n 'description' => 'required',\n 'image' => 'required',\n \n ]);\n $testimonial = $request->file('image');\n $name_gen = hexdec(uniqid()).'.'.$testimonial->getClientOriginalExtension();\n Image::make($testimonial)->resize(1920,1088)->save('image/testimonial/'.$name_gen);\n $last_img = 'image/testimonial/'.$name_gen;\n\n \n Testimonial::insert([\n 'name' => $request->name,\n 'designation' => $request->designation,\n 'description' => $request->description,\n 'image' => $last_img,\n 'created_at' => Carbon::now()\n ]);\n toast(' Successfully','success');\n return redirect()->route('testimonial.index');\n }", "public function store(ImageRequest $request)\n {\n $img = new Image();\n $img->title = $request->title;\n $img->album_id = $request->album_id;\n if (request()->hasFile('image')) {\n $file = request()->file('image');\n $extension =$file->getClientOriginalExtension();\n }\n\n\n\n if($request->hasFile('image'))\n {\n $files = $request->file('image');\n foreach ($files as $file) {\n $file->store('users/' . $this->user->id . '/messages');\n\n\n $fileName = $file->store('image', ['disk' => 'uploads']);\n $img->path = $fileName;\n }\n }\n\n\n\n\n\n\n\n \n $img->save();\n return redirect()->route('image.index')->with(['success' => 'Image added successfully.']);\n }", "public function store(Request $request)\n {\n //\n $title = $request->input('title');\n $author = $request->input('author');\n $price = $request->input('price');\n $publisher = $request->input('publisher');\n $file = $request->file('image');\n $image = $file->getClientOriginalName();\n\n $destinationPath = 'uploads';\n \n\n $book = new Library();\n\n $book->title = $title;\n $book->author = $author;\n $book->price = $price;\n $book->publisher = $publisher;\n $book->image = $file;\n\n $book->save();\n $id = $book->id;\n $filename = \"image\".$id.\".jpeg\";\n // echo $filename;\n //rename($image,$filename);\n $file->move($destinationPath,$filename);\n $book->image = $filename;\n $book->save();\n return Redirect::to('library');\n }", "public function store(Request $request)\n {\n\n //dd($request);\n\n if(Auth::check()){\n\n $categorias= DB::table('categorias')->select('nome_categoria', 'id_categoria')->get();\n\n $validatedData = $request->validate([\n 'title'=> 'bail|required|max:40',\n 'select_categoria' => 'bail|required',\n 'descricao' => 'required|max:255',\n 'select_dificuldade'=>'required',\n 'content' => 'required',\n 'file'=>'required'\n\n ]);\n $user = Auth::user();\n\n $min =0;\n $max =99999;\n $random=rand ( $min , $max );\n\n $fileOriginalName= $request->file('file')->getClientOriginalName();\n\n\n $img_capa =$random.\"_Tutorial_\".$user->id.\".\".File::extension($fileOriginalName);\n\n $filecontents= file_get_contents($validatedData[\"file\"]);\n\n $file=Storage::disk('public')->put('Tutoriais_img_capa/'.$img_capa, $filecontents);\n $path = storage_path();\n\n //not working\n //$filemove=File::move($path.\"/Tutoriais_img_capa/\".$fileOriginalName, $path.\"/Fotos_utilizadores/\".$img_capa);\n\n\n //percisa de um try catch\n\n\n $tutorial = new Tutorial();\n\n $tutorial->titulo =$validatedData[\"title\"];\n $tutorial->id_categoria =$validatedData[\"select_categoria\"];\n $tutorial->id_utilizador = $user->id;\n $tutorial->descricao =$validatedData[\"descricao\"];\n $tutorial->content =$validatedData[\"content\"];\n $tutorial->img_capa =$img_capa;\n $tutorial->dificuldade =$validatedData[\"select_dificuldade\"];\n\n $inserted= $tutorial->save();\n//\n// $inserted= DB::table('tutorials')->insert(\n// ['id_categoria' => $validatedData[\"select_categoria\"],\n// 'titulo'=>$validatedData[\"title\"],\n// 'id_utilizador'=>$user->id,\n// 'descricao' => $validatedData[\"descricao\"],\n// 'img_capa'=>$img_capa\n// ,'content'=>$validatedData[\"content\"]]\n// );\n// $inserted->save();\n\n\n Session::flash(\"message\",\"Tutorial Novo Adicionado!!\");\n return view(\"tutoriais.templateInserirTutorial\",\n [\"inserted\"=> $inserted,\"categorias\" => $categorias]);\n\n\n\n }\n return view(\"pages.error\");\n }", "public function store()\n {\n $file = ['slider_name' => Input::file('slider_name')];\n $rules = array(\n 'slider_name'=>'required|mimes:jpg,jpeg,png'\n );\n $validator = Validator::make($file, $rules);\n if($validator->fails()){\n $messages = $validator->messages();\n return redirect('slider/create')->withErrors($validator);\n }else{\n $destinationPath = public_path().'/images/slider';\n $extension = Input::file('slider_name')->getClientOriginalExtension();\n $fileName = Carbon::now()->format('Y-m-d').rand(11111,99999).'.'.$extension;\n Input::file('slider_name')->move($destinationPath, $fileName);\n $file = ['slider_name' => $fileName];\n Slider::create($file);\n return redirect('slider/index');\n }\n }", "public function uploadAction()\n {\n $logedUser = $this->getServiceLocator()\n ->get('user')\n ->getUserSession();\n $permission = $this->getServiceLocator()\n ->get('permissions')\n ->havePermission($logedUser[\"idUser\"], $logedUser[\"idWebsite\"], $this->moduleId);\n if ($this->getServiceLocator()\n ->get('user')\n ->checkPermission($permission, \"edit\")) {\n $request = $this->getRequest();\n if ($request->isPost()) {\n // Get Message Service\n $message = $this->getServiceLocator()->get('systemMessages');\n \n $files = $request->getFiles()->toArray();\n $temp = explode(\".\", $files[\"file\"][\"name\"]);\n $newName = round(microtime(true));\n $newfilename = $newName . '.' . end($temp);\n $image = new Image();\n $image->exchangeArray(array(\n \"website_id\" => $logedUser[\"idWebsite\"],\n \"name\" => $newName,\n \"extension\" => end($temp)\n ));\n if ($image->validation()) {\n if (move_uploaded_file($_FILES[\"file\"][\"tmp_name\"], \"public/files_database/\" . $logedUser[\"idWebsite\"] . \"/\" . $newfilename)) {\n $result = $this->getImageTable()->saveImage($image);\n $message->setCode($result);\n // Log\n $this->getServiceLocator()\n ->get('systemLog')\n ->addLog(0, $message->getMessage(), $message->getLogPriority());\n die('uploadSucess');\n } else {\n die('uploadError');\n }\n } else {\n die('Invalid extension');\n }\n }\n die(\"forbiden\");\n } else {\n die(\"forbiden - without permission\");\n }\n }", "public function upload()\n {\n\n if (null == $this->fichier)\n {\n return;\n }\n\n if ($this->oldFichier)\n {\n // suppression de l'ancienne image\n if (file_exists($this->getUploadRootDir() . '/' . $this->oldFichier))\n {\n unlink($this->getUploadRootDir() . '/' . $this->oldFichier);\n }\n\n\n // suppression des anciens thumbnails\n foreach ($this->thumbnails as $key => $thumbnail)\n {\n if (file_exists($this->getUploadRootDir() . '/' . $key . '-' . $this->oldFichier))\n {\n unlink($this->getUploadRootDir() . '/' . $key . '-' . $this->oldFichier);\n }\n\n }\n }\n\n //$date = new \\DateTime('now');\n\n //$nameImage = $date->format('YmdHis') . '-' . $this->fichier->getClientOriginalName();\n //$extension = $this->fichier->guessExtension();\n //$nameImage = str_replace(' ', '-', $this->alt) . uniqid();\n\n // move (param 1 chemin vers dossier, param 2 nom image)\n\n //$this->name = $nameImage . \".\" . $extension;\n\n $this->fichier->move(\n $this->getUploadRootDir(),\n $this->name\n //$nameImage . \".\" . $extension\n );\n\n //$imagine = new \\Imagine\\Gd\\Imagine();\n\n /*$imagine\n ->open($this->getAbsolutePath())\n ->thumbnail(new \\Imagine\\Image\\Box(350, 160))\n ->save(\n $this->getUploadRootDir().'/' .\n $nameImage . '-thumb-small.' . $extension);*/\n\n $imagine = new \\Imagine\\Gd\\Imagine();\n $imagineOpen = $imagine->open($this->getAbsolutePath());\n\n foreach ($this->thumbnails as $key => $thumbnail)\n {\n $size = new \\Imagine\\Image\\Box($thumbnail[0], $thumbnail[1]);\n $mode = \\Imagine\\Image\\ImageInterface::THUMBNAIL_INSET;\n \n $imagineOpen->thumbnail($size, $mode)\n ->save($this->getUploadRootDir() . '/' . $key . '-' . $this->name);\n }\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n \n\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n $filename = time().'_'.$this->getFile()->getClientOriginalName();\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::$SERVER_PATH_TO_VIDEO_FOLDER,\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function store()\n\t{\n $file = Request::file('file');\n if($file) {\n $name = $file->getClientOriginalName();\n Request::file('file')->move('images/lenses', $name);\n return 'true';\n }else{\n $input = Request::all();\n $input['image'] = '/images/lenses/'.$input['file'];\n return Lense::create($input);\n }\n\t}", "public function upload($file, $local_file);", "public function storeImage($request, $fileKey, $fileName, $path) {\n\n if($request->hasFile($fileKey)){\n\n //get the file from the profile_image request...\n $image = $request->file($fileKey);\n\n //move the file to correct location\n $image->move($path, $fileName);\n\n }\n\n else {\n return false;\n }\n\n\n\n }", "public function store(Request $request) {\n \n // file validation\n $validator = Validator::make($request->all(),\n ['filename' => 'required|mimes:jpeg,png,jpg,bmp|max:2048']);\n \n // if validation fails\n if($validator->fails()) {\n return Alert::info('Imagen', 'Fallo en validacion de imagen');\n }\n \n // if validation success\n if($file = $request->file('filename')) {\n\n $name = $file->getClientOriginalName();\n \n $target_path = public_path('../resources/img/cartas/');\n \n if($file->move($target_path, $name)) { \n return Alert::info('Imagen', 'Imagen subida correctamente');\n }\n }\n /*\n $name = $request->file('filename')->getClientOriginalName();\n //$extension = $request->file('filename')->extension();\n\n //Storage::putFileAs('filename', new File('./../resources/img/cartas'), $name);\n\n //Storage::disk('local')->put($name, 'Contents');\n\n //$path = Storage::putFile('./resources/img/cartas', $request->file('filename'));\n //$path = Storage::putFileAs('./resources/img/cartas', $request->file('filename'), $name);\n //$path = $request->file('filename')->store('./resources/img/cartas');\n $target_path = public_path('../resources/img/cartas/');\n\n $request->file('filename')->move($target_path, $name);\n\n echo('imagen subida corectamente');\n */\n\n /**\n * $fileName = $request->file->getClientOriginalName();\n * $request->file->move(public_path('../resources/img/cartas'), $fileName);\n */\n\n /**\n * $data = request()->validate([\n * 'name' => 'required',\n * 'email' => 'required|email',\n * 'message' => 'required',\n * ]);\n */\n }", "public function store(Request $request)\n {\n $this->validate($request,[\n 'title'=>'required|string',\n 'sub_title'=>'required|string',\n 'big_image'=>'required|image',\n 'small_image'=>'required|image',\n 'description'=>'required|string',\n 'client'=>'required|string',\n 'category'=>'required|string',\n\n\n ]);\n $portfolios=new Portfolio;\n $portfolios->title=$request->title;\n $portfolios->sub_title=$request->sub_title;\n $portfolios->description=$request->description;\n $portfolios->client=$request->client;\n $portfolios->category=$request->category;\n\n $big_file=$request->file('big_image');\n Storage::putFile('public/img/',$big_file);\n $portfolios->big_image=\"storage/img/\".$big_file->hashName();\n\n\n $small_file=$request->file('small_image');\n Storage::putFile('public/img/',$small_file);\n $portfolios->small_image=\"storage/img/\".$small_file->hashName();\n\n\n\n $portfolios->save();\n return redirect()->route('admin.portfolios.create')->with('success','New portfolio created successfully');\n }", "public static function addImg($myId){\n if ($_FILES[\"pic\"][\"error\"] > 0) {\n echo \"Return Code: \" . $_FILES[\"pic\"][\"error\"] . \"<br>\";\n } else {\n$conn = init_db();\n$url = uniqid();\n$sql='insert into images (u_id, url, ups) values ('.$myId.', \\''.$url.'.jpg\\', 0)';\n$res = mysqli_query($conn,$sql) or die(mysqli_error($conn).'failed query:'.__LINE__);\n$dest = __DIR__.\"/../img/usr/\" . $url.'.jpg';\necho 'moved to '.$dest;\nmove_uploaded_file($_FILES[\"pic\"][\"tmp_name\"],\n $dest);\n}\n}", "public function store(Request $request)\n {\n\n \n $team = $request->file('image');\n $name_gen = hexdec(uniqid()).'.'.$team->getClientOriginalExtension();\n Image::make($team)->resize(1920,1088)->save('image/team/'.$name_gen);\n $last_img = 'image/team/'.$name_gen;\n\n \n Team::insert([\n 'name' => $request->name,\n 'designation' => $request->designation,\n 'image' => $last_img,\n 'created_at' => Carbon::now()\n ]);\n toast(' Successfully','success');\n return redirect()->route('team.index');\n }", "public function store(Request $request)\n {\n $lastinsertedid=logo::insertGetId([\n 'image' => 'default.php',\n 'created_at'=>Carbon::now()\n ]);\n\n \n if ($request->hasFile('image')) {\n $main_photo=$request->image;\n $imagename=$lastinsertedid.\".\".$main_photo->getClientOriginalExtension();\n \n // $ami = app_path('store.gochange-tech.com/uploads/products_images/'.$imagename);\n // dd($ami);\n Image::make($main_photo)->resize(400, 450)->save(base_path('public/upload/logo/'.$imagename));\n\n logo::find($lastinsertedid)->update([\n 'image'=>$imagename\n ]);\n }\n\n return back();\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n $post = new Post();\n $post->title = $request->title;\n if($request->get('image'))\n {\n $file = $request->get('image');\n $name = time().'.' . explode('/', explode(':', substr($file, 0, strpos($file, ';')))[1])[1];\n \\Image::make($request->get('image'))->save(public_path('images/').$name); \n $post->image = $name;\n }\n\n //$post->save();\n\n // return response()->json(['success' => 'You have successfully uploaded an image'], 200); \n }", "public function store(Request $request)\n {\n if ($request->hasFile('image')) {\n // Let's do everything here\n if ($request->file('image')->isValid()) {\n //\n $validated = $request->validate([\n 'name' => 'string|max:40',\n 'image' => 'mimes:jpeg,png|max:1014',\n ]);\n $extension = $request->image->extension();\n $request->image->storeAs('/public', $validated['name'].\".\".$extension);\n $url = Storage::url($validated['name'].\".\".$extension);\n $file = File::create([\n 'name' => $validated['name'],\n 'url' => $url,\n ]);\n Session::flash('success', \"Success!\");\n return Redirect::back();\n }\n }\n abort(500, 'Could not upload image :(');\n }", "public function store(Request $request)\n { \n \n\n if($request->hasFile('image') && $request->file('image')->isValid()){\n\n $requestImage = $request->image;\n\n $extencao = $requestImage->extension();\n\n $imageName = md5($requestImage.strtotime(\"now\"));\n\n $requestImage->move(public_path('img/teste'), $imageName);\n \n Movel::create([\n 'tipo' => $request->tipo,\n 'descricao' => $request->descricao,\n 'foto' => $imageName,\n 'user_id'=>Auth::user()->id,\n ]);\n // var_dump($request->tipo,$request->descricao,$imageName);\n }\n return redirect('dashboard');\n }", "public function store(Request $request)\n {\n\n $file = $request->file('image');\n $imginame = 'category_' . time() . '.' .$file->getClientOriginalExtension();\n //El public_path nos ubica en la carpeta public del proyecto\n $path = public_path() . '/img/categories/';\n //La funcion move nos los guarda en la carpeta declarada en el path\n $file->move($path,$imginame);\n\n\n $category = new category($request->all());\n $category->image = $imginame;\n $category->save();\n return redirect()->route('categories.index')-> with('mensaje',\"Se ha registrado la categoria $category->name correctamente \");\n }", "public function save2(Request $request){\n $file = $request->file('file2');\n \n //obtenemos el nombre del archivo\n $nombre = $file->getClientOriginalName();\n //print_r($nombre);\n \n \n Storage::disk('local')->put('logo2.PNG', \\File::get($file));\n \n return Response::json(['response' => 'Actualizado correctamente'],200);\n }", "function uploadFile($name) {\r\n // Gets the paths, full and local directory\r\n global $image_dir, $image_dir_path;\r\n if (isset($_FILES[$name])) {\r\n // Gets the actual file name\r\n $filename = $_FILES[$name]['name'];\r\n if (empty($filename)) {\r\n return;\r\n }\r\n // Get the file from the temp folder on the server\r\n $source = $_FILES[$name]['tmp_name'];\r\n // Sets the new path - images folder in this directory\r\n $target = $image_dir_path . '/' . $filename;\r\n // Moves the file to the target folder\r\n move_uploaded_file($source, $target);\r\n // Send file for further processing\r\n processImage($image_dir_path, $filename);\r\n // Sets the path for the image for Database storage\r\n $filepath = $image_dir . '/' . $filename;\r\n // Returns the path where the file is stored\r\n return $filepath;\r\n }\r\n }", "public function create(Request $request)\n {\n \n $file_name = $this->saveImage($request->file,'gallery');\n\n $gallery = new gallery();\n \n $gallery->url = $file_name;\n \n $gallery->save();\n \n return redirect()->back()->with(['sucess'=>'image successfully added']); \n\n \n }", "public function store(Request $request)\n {\n $name=$request['name'];\n $testimonial=$request['testimonial'];\n $type=$request['media_type'];\n if($request->hasFile('img_name'))\n { \n $file=$request->file('img_name'); \n $imagename=$file->getClientOriginalName();\n $path_img=$file->storeAs('public/','img'.time().$imagename);\n $img_name=str_replace('public/', '', $path_img);\n $testimonial1= Testimonial::testimonial_create($name,$testimonial,$img_name,$type);\n return redirect('/admin/testimonial/index');\n } \n\n return redirect('/admin/testimonial/index');\n }", "function save(Request $req)\n {\n //print_r($req->input());\n $user = new werkboninfo;\n $user->name = $req->name;\n $user->description = $req->description;\n $user->finishDate = $req->finishDate;\n $user->image = $req->image;\n $user->material1 = $req->material1;\n $user->material2 = $req->material2;\n $user->material3 = $req->material3;\n $user->material4 = $req->material4;\n $user->status = 'Niet Afgerond';\n $filename = time().'.'.request()->image->getClientOriginalExtension();\nrequest()->image->move(public_path('images'), $filename);\n\n$user->image=$filename;\n $user->save();\n \n return redirect()->route('home');\n }" ]
[ "0.72086495", "0.7145394", "0.7100422", "0.7038655", "0.7014189", "0.7011132", "0.6907209", "0.6880561", "0.6874778", "0.68504906", "0.6828092", "0.6810487", "0.6793921", "0.6754874", "0.6753324", "0.674023", "0.6738595", "0.6737032", "0.67244184", "0.6704676", "0.67007524", "0.6694411", "0.6682302", "0.6681492", "0.6673531", "0.6661759", "0.664984", "0.66336286", "0.66296047", "0.66276807", "0.66268426", "0.6619582", "0.66191113", "0.66140145", "0.6609255", "0.6604619", "0.6592575", "0.6551173", "0.6539964", "0.65379626", "0.6534785", "0.65312546", "0.6530054", "0.65257204", "0.6521818", "0.651587", "0.65139264", "0.65119207", "0.65035206", "0.6489923", "0.6478473", "0.6476084", "0.64695853", "0.646565", "0.64617515", "0.6461519", "0.6461213", "0.6456028", "0.64555293", "0.6455169", "0.6453101", "0.64528406", "0.64491564", "0.6441519", "0.6438116", "0.64374864", "0.6426741", "0.64207596", "0.6418076", "0.6418072", "0.6417942", "0.6411504", "0.6393944", "0.6391081", "0.63902354", "0.63858783", "0.63852775", "0.6381287", "0.63745797", "0.63731515", "0.6372347", "0.6370016", "0.6368487", "0.63645804", "0.6363039", "0.6361954", "0.63602835", "0.6350176", "0.6350176", "0.6350176", "0.6350176", "0.63490707", "0.63422096", "0.63418925", "0.63411593", "0.6340581", "0.63402754", "0.6336973", "0.6336257", "0.63302326" ]
0.6481675
50
Takes uploaded file, stores it in the local storage and saves image in the database
public function storeForProjectGallery(UploadedFile $file, Project $project){ //TODO write image to the local storage }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n Image::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->path\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload()\n\t{\n\t if (null === $this->getFile()) {\n\t return;\n\t }\n\t\n\t // use the original file name here but you should\n\t // sanitize it at least to avoid any security issues\n\t\n\t // move takes the target directory and then the\n\t // target filename to move to\n\t \n\t $this->getFile()->move($this->getWebPath(),$this->imagen);\n\t \n\t \n\t // set the path property to the filename where you've saved the file\n\t $this->path = $this->getFile()->getClientOriginalName();\n\t\t//$this->temp = \n\t // clean up the file property as you won't need it anymore\n\t $this->file = null;\n\t}", "public function upload() {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->avatar)\n {\n return;\n }\n\n //Lastname du fichier\n $file = $this->id_user.'.'.$this->avatar->guessExtension();\n // move takes the target directory and then the target filename to move to\n $this->avatar->move($this->getUploadRootDir(), $file);\n //Suppression des thumbnail déjà en cache\n @unlink(__DIR__.'/../../../../../web/imagine/thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/avatar_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/moyen_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/mini_thumbnail/avatars/'.$file);\n\n // set the path property to the filename where you'ved saved the file\n $this->avatar = $file;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // if there is an error when moving the file, an exception will\n // be automatically thrown by move(). This will properly prevent\n // the entity from being persisted to the database on error\n $this->getFile()->move($this->getUploadRootDir(), $this->fileName);\n\n // check if we have an old image\n if (isset($this->temp)) {\n // delete the old image\n unlink($this->getUploadRootDir().'/'.$this->temp);\n // clear the temp image path\n $this->temp = null;\n }\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getImg()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getImg()->move(\n self::SERVER_PATH_TO_PRESS_IMAGE_FOLDER,\n $this->getImg()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->imageUrl = $this->getImg()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setImg(null);\n }", "public function upload()\n {\n if (null === $this->image) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the target filename to move to\n $this->file->move($this->getUploadRootDir(), $this->image->getClientOriginalName());\n\n // set the path property to the filename where you'ved saved the file\n $this->path = $this->image->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->backgroundImage = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function savetheuploadedfile() {\n\t\t$public_dir = 'public/images/';\n\t\t$baseurl = base_url();\n\t\tif ($_FILES['file']['name']) {\n\t\t\t\tif (!$_FILES['file']['error']) {\n\t\t\t\t\t\t$name = md5(rand(100, 200));\n\t\t\t\t\t\t$ext = explode('.', $_FILES['file']['name']);\n\t\t\t\t\t\t$filename = $name . '.' . $ext[1];\n\t\t\t\t\t\t$destination = $public_dir . $filename; //change path of the folder...\n\t\t\t\t\t\t$location = $_FILES[\"file\"][\"tmp_name\"];\n\t\t\t\t\t\tmove_uploaded_file($location, $destination);\n\t\t\t\t\t\t// echo $destination;\n\n\t\t\t\t\t\techo $baseurl.'/public/images/' . $filename;\n\t\t\t\t} else {\n\t\t\t\t\t\techo $message = 'The following error occured: ' . $_FILES['file']['error'];\n\t\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function upload(){\n if( NULL === $this->getFile()){\n return;\n }\n $filename= $this->getFile()->getClientOriginalName();\n\n // Move to the target directory\n \n $this->getFile()->move(\n $this->getAbsolutePath(), \n $filename);\n\n //Set the logo\n $this->setFilename($filename);\n\n $this->setFile();\n\n }", "public function upload(): void\n {\n // check if we have an old image\n if ($this->oldFileName !== null) {\n $this->removeOldFile();\n }\n\n if (!$this->hasFile()) {\n return;\n }\n\n $this->writeFileToDisk();\n\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n $this->picture = file_get_contents($this->getFile());\n\n if (isset($this->temp)) {\n $this->temp = null;\n }\n\n $this->file = null;\n }", "public function upload(): void\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload()\n{\n if(null === $this->getFile())\n {\n return;\n }\n\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n $this->filename =$this->getFile()->getClientOriginalName();\n\n $this->setFile(null);\n}", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->id . '.' .$this->ext\n );\n\n // set the ext property to the filename where you've saved the file\n //$this->ext = $this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(){\n $url_path = 'assets/imgs/' . $_FILES['file']['name'];\n move_uploaded_file($_FILES['file']['tmp_name'], $url_path);\n $_POST['url_image'] = $url_path;\n echo parent::register($_POST) ? header('location: ?controller=admin') : 'Error en el registro';\n }", "public function save()\n {\n $this->validate();\n $this->validate(['image' => 'required|image']);\n\n // try to upload image and resize by ImageSaverController config\n try {\n $imageSaver = new ImageSaverController();\n $this->imagePath = $imageSaver->loadImage($this->image->getRealPath())->saveAllSizes();\n }catch (\\RuntimeException $exception){\n dd($exception);\n }\n\n $this->PostSaver();\n\n $this->resetAll();\n $this->ChangeCreatedMode();\n $this->swAlert([\n 'title' => 'Good job',\n 'text' => 'successfully added',\n 'icon' => 'success'\n ]);\n $this->render();\n }", "public function store(Request $request)\n {\n //\n\n $user_id = Auth::id();\n $request->validate([\n\n 'image' => 'required|image|mimes:jpeg,png,jpg,webp|max:2048 '\n ]);\n $directory = public_path('images').'/'.$user_id;\n $imageName = time().'.'.$request->image->extension();\n\n //move the uploaded file to a directory named as user_id\n $saved = $request->image->move($directory, $imageName);\n $imagePath= \"$user_id/$imageName\";\n\n $imageUpload = new imageUpload;\n $imageUpload->name=$imageName;\n $imageUpload->path = \"images/$user_id/$imageName\";\n $imageUpload->user_id= $user_id;\n $imageUpload->save();\n\n return redirect()->route('getajaxupdate',['id' => $user_id])\n ->with('success','You have successfully uploaded image.')\n ->with('image',$imageName)\n ->with('id',$user_id);\n\n\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->setImageName($this->getFile()->getClientOriginalName());\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function storeimage(Request $request)\n {\n $this->authorize('isAdmin');\n if($request->file('file'))\n {\n $image = $request->file('file');\n $name = \"ortm_\".time().'.'.$image->getClientOriginalExtension();\n\n $thumbnailImage = Images::make($image)->resize(200, 200)->save(public_path('/img/ourteam/thumbs/' . $name));\n\n $watermark = Images::make(public_path('/img/watermark.png'));\n $Image = Images::make($image)->insert($watermark, 'bottom-right', 10, 10)->save(public_path('/img/ourteam/' . $name));\n\n //$image->move(public_path().'/img/social/', $name);\n }\n\n $image= new Image();\n $image->image_name = $name;\n $image->save();\n\n return response()->json([\n 'data' => $name\n ], 200);\n }", "public function insertImageToDb() \n {\n }", "public function upload() {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(), $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->photo = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n// use the original file name here but you should\n// sanitize it at least to avoid any security issues\n// move takes the target directory and then the\n// target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n// set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n// clean up the file property as you won't need it anymore\n $this->file = null;\n\n\n }", "public function storeForArticleGallery(UploadedFile $file, Article $project){\n //TODO write image to the local storage\n }", "public function store(Request $request)\n {\n \n $file = $request->file('file');\n\n\n $name = time() . $file->getClientOriginalName();\n\n $file->move('images', $name);\n\n\n\n Photo::create(['file'=>$name]);\n\n Session::flash('message', 'Photo added!');\n Session::flash('status', 'success');\n\n }", "public function upload(){\n if (null === $this->getProductsFileImage()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getProductsFileImage()->move(\n $this->getUploadRootDir(),\n $this->getProductsFileImage()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getProductsFileImage()->getClientOriginalName();\n $this->productsImage = $this->getProductsFileImage()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->productsFileImage = null;\n }", "public function storeImage(UploadedFile $file)\n {\n $filename = md5(time().$file->getClientOriginalName()).'.'.$file->getClientOriginalExtension();\n $file->move(Config::get('assets.images'),$filename);\n\n $i = new ImageEntry();\n $i->path = $filename;\n $i->uploader = LoginController::currentUser()->id;\n $i->save();\n return $i;\n }", "public function StoreSlider(Request $request)\n {\n\n $slider_image = $request->file('image');\n\n $name_gen = hexdec(uniqid()).'.'.$slider_image->getClientOriginalExtension();\n Image::make($slider_image)->resize(1920,1088)->save('image/slider/'.$name_gen );\n\n $last_img ='image/slider/'.$name_gen;\n\n\n //end upload image\n\n\n Slider::insert([\n 'title' => $request->title,\n 'description' => $request->description,\n 'image'=> $last_img,\n 'created_at'=>Carbon::now(),\n ]);\n\n return redirect()->route('home.slider')->with('success','Slider Inserted successfully');\n }", "public function postUpload()\n\t{\n\t\t$validator = Validator::make(Input::all(), array(\n\t\t\t'file' => 'image'\n\t\t));\n\t\t//kalo ada url make yang url, kalo ngga yang file\n\t\tif ($validator->fails()) {\n\t\t\treturn Redirect::to('/teaser/upload');\n\t\t}\n\n\t\tif (Input::hasFile('file'))\n {\n \t$folder = '/teaser_photo/';\n $path = public_path() . $folder;\n $filename = $original = Input::file('file')->getClientOriginalName();\n $extension = Input::file('file')->getClientOriginalExtension();\n if (File::exists($path . $filename))\n {\n $filename = time() . '_' . $original;\n }\n $file = Input::file('file')->move($path, $filename);\n\t\t\t\n\n\t\t\t$teaser = new Teaser;\n $teaser->teaser = $folder . $filename;\n $teaser->status = 1;\n $teaser->save();\n return Redirect::to('teaser');\n }\n\t}", "public function uploadImage() \n {\n if (is_null($this->image)) {\n return;\n }\n \n // move image from temp directory to destination one\n $this->image->move(\n $this->getUploadRootDir(),\n $this->image->getClientOriginalName()\n );\n\n $this->path = $this->image->getClientOriginalName();\n $this->image = null;\n }", "public function upload(Request $request){\n if($request->hasFile('image')){\n $resorce = $request->file('image');\n $name = $resorce->getClientOriginalName();\n $resorce->move(\\base_path() .\"/public/images\", $name);\n $save = DB::table('images')->insert(['image' => $name]);\n echo \"Gambar berhasil di upload\";\n }else{\n echo \"Error to upload this file\";\n }\n }", "public function store(Request $request)\n {\n\n $fileName = Storage::disk('public')->put('',$request->file('file_name'));\n\n $thumbPath = storage_path('app/public/thumb/').$fileName;\n\n $manager = new ImageManager(array('driver' => 'gd'));\n\n\n $img = $manager->make($request->file_name)->resize(100, 100)->save($thumbPath);\n\n\n\n $file = new File();\n $file->file_name = $fileName;\n $file->save();\n\n return redirect(route('files.index'));\n }", "public function upload(){\n $file = array('image' => Input::file('avatar'));\n // setting up rules\n $rules = array('image' => 'required',); //mimes:jpeg,bmp,png and for max size max:10000\n // doing the validation, passing post data, rules and the messages\n $validator = Validator::make($file, $rules);\n if ($validator->fails()) {\n return redirect()->route('myprofile')->with(['errors' => $validator->errors()]);\n }else{\n // checking file is valid.\n if (Input::file('avatar')->isValid()) {\n $path = 'public/uploads/users/'.Auth::User()->id.'/avatar/';\n Storage::makeDirectory($path, $mode = 0777, true);\n Storage::disk('local')->put($path, Input::file('avatar'));\n $user = Users::find(Auth::User()->id);\n $createdFileName = Storage::files($path);\n $pathFile = str_replace('public/','',$createdFileName[0]);\n $user->avatar = '/storage/'.$pathFile;\n if ($user->save()){\n return redirect()->route('myprofile')->with(['msg' => 'Image was uploaded with success']);\n }\n }else{\n exit('error');\n }\n }\n }", "private function saveImage()\n {\n $name = $_FILES['image']['name'];\n $tmp_name = $_FILES['image']['tmp_name'];\n\n return move_uploaded_file($tmp_name, 'images/' . $name);\n }", "public function store() {\n\n\t\t$file = array('image' => Input::file('image'));\n\t\t// setting up rules\n\t\t$rules = array('image' => 'required|image'); //mimes:jpeg,bmp,png and for max size max:10000\n\t\t// doing the validation, passing post data, rules and the messages\n\t\t$validator = Validator::make($file, $rules);\n\t\tif ($validator->fails()) {\n\t\t\t// send back to the page with the input data and errors\n\t\t\treturn Redirect::to('posts/create')->withInput()->withErrors($validator);\n\t\t} else {\n\t\t\t// checking file is valid.\n\t\t\tif (Input::file('image')->isValid()) {\n\t\t\t\t$destinationPath = 'uploads'; // upload path\n\t\t\t\t$extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n\t\t\t\t$fileName = rand(11111, 99999) . '.' . $extension; // renameing image\n\t\t\t\tInput::file('image')->move($destinationPath, $fileName); // uploading file to given path\n\t\t\t\t// sending back with message\n\t\t\t\tSession::flash('success', 'Upload successfully');\n\t\t\t\treturn Redirect::to('posts/create');\n\n\t\t\t} else {\n\t\t\t\t// sending back with error message.\n\t\t\t\tSession::flash('error', 'uploaded file is not valid');\n\t\t\t\treturn Redirect::to('posts/create');\n\t\t\t}\n\t\t}\n\t}", "public function store(Request $request)\n { \n \n $data=request()->validate([\n 'caption'=>'required',\n 'file'=>'required | image'\n ]);\n\n $imagePath=request('file')->store('uploads','public');\n\n $image=Image::make(public_path(\"storage/$imagePath\"))->fit(1200,1200);\n $image->save();\n\n try{\n auth()->user()->posts()->create([\n 'caption'=>$data['caption'],\n 'image'=>$imagePath\n ]);\n return $this->responseSuccess('Upload Post successfully');\n }catch(Exception $e){\n return $this->responseServerError(\"Server Error.\");\n }\n\n }", "function uploadFile($name)\n{\n // Gets the paths, full and local directory\n global $image_dir, $image_dir_path;\n if (isset($_FILES[$name])) {\n // Gets the actual file name\n $filename = $_FILES[$name]['name'];\n if (empty($filename)) {\n return;\n }\n // Get the file from the temp folder on the server\n $source = $_FILES[$name]['tmp_name'];\n // Sets the new path - images folder in this directory\n $target = $image_dir_path . '/' . $filename;\n // Moves the file to the target folder\n move_uploaded_file($source, $target);\n // Send file for further processing\n processImage($image_dir_path, $filename);\n // Sets the path for the image for Database storage\n $filepath = $image_dir . '/' . $filename;\n // Returns the path where the file is stored\n return $filepath;\n }\n}", "function upload(){\r\n\t\r\n\tvar_dump($_FILES);\r\n\tif(isset($_FILES[\"fileToUpload\"]) && !empty($_FILES[\"fileToUpload\"][\"name\"])){\r\n\t\t$target_dir = \"../pildid/\";\r\n\t\t$target_file = $target_dir . basename($_FILES[\"fileToUpload\"][\"name\"]);\r\n\t\t$uploadOk = 1;\r\n\t\t$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);\r\n\t\t// Check if image file is a actual image or fake image\r\n\t\tif(isset($_POST[\"submit\"])) {\r\n\t\t\t$check = getimagesize($_FILES[\"fileToUpload\"][\"tmp_name\"]);\r\n\t\t\tif($check !== false) {\r\n\t\t\t\t//echo \"File is an image - \" . $check[\"mime\"] . \".\";\r\n\t\t\t\t$uploadOk = 1;\r\n\t\t\t} else {\r\n\t\t\t\techo \"File is not an image.\";\r\n\t\t\t\t$uploadOk = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Check if file already exists\r\n\t\tif (file_exists($target_file)) {\r\n\t\t\techo \"Sorry, file already exists.\";\r\n\t\t\t$uploadOk = 0;\r\n\t\t}\r\n\t\t// Check file size\r\n\t\tif ($_FILES[\"fileToUpload\"][\"size\"] > 500000) {\r\n\t\t\techo \"Sorry, your file is too large.\";\r\n\t\t\t$uploadOk = 0;\r\n\t\t}\r\n\t\t// Allow certain file formats\r\n\t\tif($imageFileType != \"jpg\" && $imageFileType != \"png\" && $imageFileType != \"jpeg\"\r\n\t\t&& $imageFileType != \"gif\" ) {\r\n\t\t\techo \"Sorry, only JPG, JPEG, PNG & GIF files are allowed.\";\r\n\t\t\t$uploadOk = 0;\r\n\t\t}\r\n\t\t// Check if $uploadOk is set to 0 by an error\r\n\t\tif ($uploadOk == 0) {\r\n\t\t\techo \"Sorry, your file was not uploaded.\";\r\n\t\t// if everything is ok, try to upload file\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$target_file = $target_dir.uniqid().\".\".$imageFileType;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (move_uploaded_file($_FILES[\"fileToUpload\"][\"tmp_name\"], $target_file)) {\r\n\t\t\t\t//echo \"The file \". basename( $_FILES[\"fileToUpload\"][\"name\"]). \" has been uploaded.\";\r\n\t\t\t\t\r\n\t\t\t\t// save file name to DB here\r\n\t\t\t\t$a = new StdClass();\r\n\t\t\t\t$a->name = $target_file;\r\n\t\t\t\treturn $a;\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\treturn \"Sorry, there was an error uploading your file.\";\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\treturn \"Please select the file that you want to upload!\";\r\n\t}\r\n\t\r\n}", "public function upload();", "public function save($value){\n $target_path = IMG_PATH.DS.$this->file_name;\n try {\n //move the uploaded file to target path\n move_uploaded_file($value, $target_path);\n return $this->_add_photo();\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function save()\n {\n\n $photo = $this->flyer->addPhoto($this->makePhoto());\n\n\n // move the photo to the images folder\n $this->file->move($photo->baseDir(), $photo->name);\n\n\n// Image::make($this->path)\n// ->fit(200)\n// ->save($this->thumbnail_path);\n\n // generate a thumbnail\n $this->thumbnail->make($photo->path, $photo->thumbnail_path);\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'image' => 'image|mimes:jpeg,png,jpg,gif|max:2048',\n ]);\n \n if ($request->hasFile('news_image')){\n\n $news_id=$request->news_id;\n $file = $request->file('news_image');\n $extension = $file->getClientOriginalExtension();\n $new_filename = rand(1,100).time().'.'. $extension;\n $location=\"images/news/\";\n //Storage::disk('public')->put($location.$new_filename, File::get($file));\n\n if (!file_exists(public_path($location))) \n File::makeDirectory(public_path($location));\n\n Image::make($file)->save(public_path($location.$new_filename));\n\n\n $newsImage = new Photo;\n $newsImage->filename=$location.$new_filename;\n $newsImage->mime=$file->getClientMimeType();\n $newsImage->original_filename=$file->getClientOriginalName();\n \n $newsImage->save();\n\n $news=News::find($news_id);\n $news->Photos()->attach($newsImage->id);\n return redirect(route('news.show',$news_id))->with('success','Image uploaded successfully!');\n }\n else\n return back();\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $partes_ruta = pathinfo($this->getFile()->getClientOriginalName());\n $this->nombre = md5(uniqid()) . '.' . $partes_ruta['extension'];\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->nombre\n );\n\n $this->url = $this->getWebPath();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function save(){\n\t\t\tif(isset($this->id)){\n\t\t\t\t$this->update();\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//checking for errors\n\t\t\t\t//Can't save if there are pre=existing errors.\n\t\t\t\tif(!empty($this->errors)){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Can't save without filename and temp location on server.\n\t\t\t\tif(empty($this->filename) || empty($this->temp_path)){\n\t\t\t\t\t$this->errors[]=\"The file location is not available!\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Determine the target path\n\t\t\t\t$upload_dir=\"images\";\n\t\t\t\t$target_path=\"../../public/\".$upload_dir.\"/\".$this->filename;\n\t\t\t\t//$target_path=$this->filename;\n\t\t\t\tif(file_exists($target_path)){\n\t\t\t\t\t$this->errors[]=\"The file {$this->filename} already exists!\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Attempt to move the file.\n\t\t\t\tif(move_uploaded_file($this->temp_path, $target_path)){\n\t\t\t\t\t//success\n\t\t\t\t\t//save corresponding entry into database.\n\t\t\t\t\tif($this->create()){\n\t\t\t\t\t\t//we are done with temp_path.\n\t\t\t\t\t\tunset($this->temp_path);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//file not moved.\n\t\t\t\t\t\t$this->error[]=\"file can't be uploaded because of some denied permissions.\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // si on avait un ancien fichier on le supprime\n if (null !== $this->tempFilename) {\n $oldFile = $this->getUploadRootDir().'/'.$this->id.'.'.$this->tempFilename;\n if (file_exists($oldFile)) {\n unlink($oldFile);\n }\n }\n\n // déplace le fichier envoyé dans le répertoire de notre choix\n $this->file->move(\n $this->getUploadRootDir(), // répertoire de destination\n $this->id.'.'.$this->url // nom du fichier à créer \"id.extension\"\n );\n\n }", "public function storeForArticleFeatured(UploadedFile $file, Article $project){\n //TODO write image to the local storage\n }", "public function save(Request $request){\n $file = $request->file('file');\n \n //obtenemos el nombre del archivo\n $nombre = $file->getClientOriginalName();\n //print_r($nombre);\n \n \n Storage::disk('local')->put('logo.PNG', \\File::get($file));\n \t\t\n \t\t return Response::json(['response' => 'Actualizado correctamente'],200);\n\t}", "public function store(Request $request)\n {\n\n $file = $request->file('file');\n $path = $request->file->store('the/path');\n\n// $imageName = request()->file->getClientOriginalName();\n// request()->file->move(public_path('upload'), $imageName);\n//\n//\n// return response()->json(['uploaded' => '/upload/'.$imageName]);\n\n\n// $this->validate($request, [\n//\n// 'media' => 'required',\n// 'media.*' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048'\n//\n// ]);\n//\n// if($request->hasfile('media'))\n// {\n//\n// foreach($request->file('media') as $image)\n// {\n// $name=$image->getClientOriginalName();\n// $image->move(public_path().'/images/', $name);\n// $data[] = $name;\n// }\n// }\n//\n// $form= new Media();\n// $form->user_id = Auth::user()->id;\n// $form->name =json_encode($data);\n//\n//\n// $form->save();\n//\n// return back()->with('success', 'Your images has been successfully');\n }", "public function uploadImage()\n {\n $file = array('image' => \\Input::file('image'));\n // setting up rules\n $rules = array('image' => 'required',); //mimes:jpeg,bmp,png and for max size max:10000\n // doing the validation, passing post data, rules and the messages\n $validator = Validator::make($file, $rules);\n if ($validator->fails()) {\n // send back to the page with the input data and errors\n return Redirect::back()->withInput()->withErrors($validator);\n }\n else {\n // checking file is valid.\n if (Input::file('image')->isValid()) {\n $destinationPath = 'temp'; // upload path\n $extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n $fileName = rand(11111, 99999) . '.' . $extension; // renaming image\n Input::file('image')->move($destinationPath, $fileName); // uploading file to given path\n // sending back with message\n Session::flash('success', 'Upload successfully');\n return Redirect::to('upload');\n } else {\n // sending back with error message.\n Session::flash('error', 'uploaded file is not valid');\n return Redirect::to('upload');\n }\n }\n }", "public function storeForProjectFeatured(UploadedFile $file, Project $project){\n //TODO write image to the local storage\n }", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n if(!is_dir($this->getTargetUploadRootDir())){\n mkdir($this->getTargetUploadRootDir(), 0777, true);\n }\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getTargetUploadRootDir(),\n $this->file->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = date('Y-m-d').DIRECTORY_SEPARATOR.$this->id.DIRECTORY_SEPARATOR.$this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n //\nif ($request->hasFile('photo')) {\n $originalname = $request->file('photo')->getClientOriginalName(); \n $extension = Input::file('photo')->getClientOriginalExtension();\n $oldnamewithoutext = substr($originalname, 0, strlen($originalname) - 4); \n $dbimgname = $oldnamewithoutext . '-'. time() . '.' . $extension; \n $newname = iconv(\"utf-8\", \"TIS-620\", $dbimgname);\n $moveImage = $request->file('photo')->move('images', $newname);\n\n} else {\n $dbimgname = \"\";\n} \n //\n $employees = new Employee;\n $employees->title = $request->title;\n $employees->firstname = $request->firstname;\n $employees->lastname = $request->lastname;\n $employees->photo = $dbimgname;\n $employees->status = $request->status;\n $employees->priority = $request->priority;\n \n\n // $this->validate($request, [\n // 'fistname' => 'required|unique:employee|max:255',\n \n // ]);\n\n \n $employees->save();\n $request->session()->flash('status', 'บันทึกข้อมูลเรียบร้อย');\n return back(); \n }", "public function uploadImage()\n {\n if (null === $this->fileimage) {\n return;\n }\n\n $upload = new Upload();\n $this->image = $upload->createName(\n $this->fileimage->getClientOriginalName(),\n $this->getUploadRootDir().'/',\n array('tmp/','miniature/')\n );\n\n $imagine = new Imagine();\n\n /* Tmp */\n $size = new Box(1920,1080);\n $imagine->open($this->fileimage)\n ->thumbnail($size, 'inset')\n ->save($this->getUploadRootDir().'tmp/'.$this->image);\n\n /* Miniature */\n $size = new Box(300,300);\n $imagine->open($this->fileimage)\n ->thumbnail($size, 'outbound')\n ->save($this->getUploadRootDir().'miniature/'.$this->image);\n\n }", "public function upload()\n {\n // The file property can be empty if the field is not required\n if (null === $this->file) {\n return;\n }\n\n // Use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->path\n );\n\n // Set the path property to the filename where you've saved the file\n $this->path = $this->file->getClientOriginalName();\n\n // Clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n\n if(Input::file('imagem')){\n $imagem = Input::file('imagem');\n $extensao = $imagem->getClientOriginalExtension();\n\n if($extensao != 'jpg' && $extensao != 'png' && $extensao != 'jpeg' && $extensao != 'JPG' && $extensao != 'PNG' && $extensao != 'JPEG'){\n return back()->with('erro','Erro: Este arquivo não é imagem');\n }\n }\n\n $perfil = new Perfil;\n $perfil->nome = $request->input('nome');\n $perfil->biografia = $request->input('biografia');\n $perfil->numero = $request->input('numero');\n $perfil->imagem = \"\";\n $perfil->user_id = auth()->user()->id;\n\n $perfil->save();\n\n if(Input::file('imagem')){\n File::move($imagem,public_path().'\\imagem-perfil\\perfil-id_'.$perfil->id.'.'.$extensao);\n $perfil->imagem = public_path().'\\imagem-perfil\\perfil-id_'.$perfil->id.'.'.$extensao;\n $perfil->save();\n }\n\n return redirect('home');\n }", "public function store()\n {\n $data = request()->validate([\n 'caption' => 'required',\n 'price' => 'required',\n 'image' => ['required', 'image','mimes:jpeg,png,jpg,gif,svg', 'max:500000'],\n ]);\n\n $imagePath = request('image')->store('uploads', 'public');\n\n $image = Image::make(public_path(\"storage/{$imagePath}\"))->fit(1200, 1200);\n $image->save();\n $city = Auth::user()->city;\n\n auth()->user()->posts()->create([\n 'caption' => $data['caption'],\n 'image' => $imagePath,\n 'price' => $data['price'],\n 'city' => $city,\n ]);\n\n //user is redirected to their profile\n return redirect('/profile/' . auth()->user()->id);\n }", "public function store(Request $request)\n {\n $personal=new Personal();\n\n $file = $request->file('file');\n //extraccion de los datos del archivo\n $extension = $file->getClientOriginalExtension();\n $name='personal_'.date('Ymd').time();\n $fileName = $name.'.'.$extension;\n\n $img = Storage::disk('imgDisk')->put($fileName,\\File::get($file)); \n\n $personal->file_name=$name;\n $personal->file_ext=$extension;\n\n $personal->nombres=$request->nombres;\n $personal->apellidos=$request->apellidos;\n $personal->cedula=$request->cedula;\n $personal->titulo=$request->titulo;\n $personal->cargo=$request->cargo;\n $personal->telefono=$request->telefono;\n $personal->estado_del=\"A\";\n $personal->save();\n return redirect('/personal_form');\n }", "public function upload()\n\t{\n\t\t$field \t\t = $this->getUploadField();\n\t\t$newName \t = $this->getUploadNewName();\n\t\t//$destination = 'assets/images/location';\t\n\t\t$destination = $this->getUploadDestination();\n\n\t\tif (\\Input::hasFile($field))\n\t\t{\n\t\t \\Input::file($field)->move($destination, $newName);\n\t\t}\n\t\t\n\t\t$this->entity->fill([$field => $newName]);\n\t\t$this->entity->save();\n\n\t\treturn true;\n\t}", "public function store(Request $request)\n {\n if ($request->hasFile('file_name')) {\n if ($request->file('file_name')->isValid()) {\n \n\n \n $filename=$request->file('file_name')->getClientOriginalName();\n $filesize=$request->file('file_name')->getClientSize();\n $request->file_name->storeAs('public/images',$filename);\n\n/* $path = $request->file_name->path();*/\n\n/*$extension = $request->file_name->extension();*/\n/*$path = $request->file_name->storeAs('public/images','sunil.jpg');*/\n//$request->session()->flash('message', 'Thanks for uploading');\n/*return back();//->with('message', 'Thanks for uploading');*/\n $file =new Fileupload();\n $file->file_name=$filename;\n $file->file_size=$filesize;\n $file->save();\n $request->session()->flash('message', 'Thanks for uploading');\n return back();//->with('message', 'Thanks for uploading');\n\n}\n \n}\n }", "public function store(SliderPostRequest $request)\n {\n if($request->status){\n $this->status = 1;\n }\n try{\n if ($request->hasFile('img_url')) {\n\n $fileName =$request->img_url->store('/images');\n\n $slider = new Slider();\n\n $slider->name = $request->name;\n $slider->img_url = $fileName;\n $slider->status =$this->status ;\n /* $slider->created_by = Sentinel::getUser()->id;\n $slider->updated_by= Sentinel::getUser()->id;*/\n $slider->created_by =95;\n $slider->updated_by=95;\n $slider->saveOrFail();\n\n Input::file('img_url')->move('images/', $fileName); // uploading file to given path\n Session::flash('info', 'Upload successfully');\n return Redirect::back();\n\n }else{\n Session::flash('danger', 'uploaded file is not valid');\n return Redirect::back();\n }\n }catch (Exception $e){\n // sending back with error message.\n Session::flash('danger', $e);\n return Redirect::back();\n\n }\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $filename = substr( md5(rand()), 0, 15).'.'.$this->getFile()->guessExtension();\n // move takes the target directory and then the\n // target filename to move to\n\n\n\t\t\t\tif(!file_exists($this->getUploadRootDir())) mkdir($this->getUploadRootDir(), 0777, true);\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n\n $image = time().'.'.$request->img->extension();\n\n $request->img->move(public_path('images'), $image);\n\n\n Image::create([\n 'title'=>$request['title'],\n 'desc'=>$request['desc'],\n 'img'=>$image,\n\n\n ]);\n\n return redirect()->route('image.index')->with('success','successfully done');\n\n }", "public function uploads() {\n $this->Authorization->authorize($this->Settings->newEmptyEntity(), 'create');\n if ($this->request->is(\"Ajax\")) {\n $is_dest = \"img/tmp/\";\n if (!file_exists($is_dest)) {\n //mkdir($is_dest, 0777, true);\n $dir = new Folder(WWW_ROOT . 'img/tmp/', true, 0755);\n $is_dest = $dir->path;\n }\n $fileData = $this->request->getData('file');\n if (strlen($fileData->getClientFilename()) > 1) {\n $ext = pathinfo($fileData->getClientFilename(), PATHINFO_EXTENSION);\n $allowedExt = array('gif', 'jpeg', 'png', 'jpg', 'tif', 'bmp', 'ico');\n if ($this->request->getData('allow_ext')) {\n $allowedExt = explode(\",\", $this->request->getData('allow_ext'));\n }\n if (in_array(strtolower($ext), $allowedExt)) {\n $upload_img = $fileData->getClientFilename();\n $ran = time();\n $upload_img = $ran . \"_\" . $fileData->getClientFilename();\n if (strlen($upload_img) > 100) {\n $upload_img = $ran . \"_\" . rand() . \".\" . $ext;\n }\n $upload_img = str_replace(' ', '_', $upload_img);\n $fileData->moveTo($is_dest . $upload_img);\n $data['filename'] = $upload_img;\n $data['image_path'] = $this->request->getAttribute(\"webroot\") . \"img/tmp/\" . $upload_img;\n $data['success'] = true;\n $data['message'] = \"file successfully uploaded!\";\n } else {\n $data['success'] = false;\n $data['message'] = \"invalid file type!\";\n }\n } else {\n $data['success'] = false;\n $data['message'] = \"invalid file!\";\n }\n }\n $this->set($data);\n $this->viewBuilder()->setOption('serialize', ['filename', 'image_path','success', 'message']);\n }", "public function store(Request $request)\n {\n //validator//\n $validation = Validator::make($request->all(), [\n 'userfile' => 'required|image|mimes:jpeg,png|min:1|max:250'\n ]);\n\n //check if it fail//\n if ($validation->fails()){\n return redirect()->back()->withInput()->with('errors', $validation->errors());\n }\n\n $image = new Image;\n\n //upload image//\n $file = $request->file('userfile');\n $destination_path = 'uploads/';\n $filename = str_random(6).'_'.$file->getClientOriginalName();\n $file->move($destination_path, $filename);\n\n //save path image to db//\n $image->file = $destination_path . $filename;\n $image->caption = $request->input('caption');\n $image->save();\n\n return Redirect::to('articles/'.$request->article_id)->with('message','You just uploaded an image !');\n }", "public function store(Request $request){\n \n if ($request->hasFile('image')){\n\n $filenamewithextension = $request->image->getClientOriginalName();\n $filename = pathinfo($filenamewithextension, PATHINFO_FILENAME);\n $extension = $request->image->getClientOriginalExtension();\n $filenametostore = $filename.'_'.time().'.'.$extension;\n $request->image->storeAs('public/img/', $filenametostore);\n //$smallthumbnail = \"_small_\".$filename.'_'.time().'.'.$extension;\n //$smallthumbnailpath = public_path('storage/img/'.$smallthumbnail);\n //$this->createThumbnail($smallthumbnailpath,150,93);\n //$request->image->storeAs('storage/img/', $smallthumbnail);\n\n return response()->json(array('nomeArquivo'=>$filenametostore));\n\n } else{\n //return response()->json(array('nomeArquivo' => 'arquivo não recebido'));\n } \n\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'uploadedFile' => 'required|mimes:jpeg,png,jpg'\n ]);\n \n $file = $request->file('uploadedFile');\n \n if (!$file->isValid()) {\n return JsonService::jsonError('Sorry! The file was not uploadded!');\n }\n\n $filePath = $file->store('/files/images', 'public');\n $this->imageService->createThumbnails($filePath, [200, 500, 800]);\n $fileId = File::create([\n 'originalName' => $file->getClientOriginalName(),\n 'pathToFile' => $filePath,\n 'mimeType' => $file->getClientMimeType(),\n 'user_id' => auth()->id(),\n ])->id;\n \n return JsonService::jsonSuccess(\n 'File was uploaded successfully',\n $this->imageService->getInfoForImage(File::findOrFail($fileId))\n );\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required|string',\n 'sub_title' => 'required|string', \n 'description' => 'required|string', \n 'big_img' => 'required|image', \n 'sm_img' => 'required|image', \n 'client' => 'required|string', \n 'category' => 'required|string' \n ]);\n\n $protfolios= new Protfolio;\n $protfolios->title=$request->title;\n $protfolios->sub_title=$request->sub_title;\n $protfolios->description=$request->description;\n $protfolios->client=$request->client;\n $protfolios->category=$request->category;\n\n $big_file = $request->file('big_img');\n Storage::putFile('public/img/', $big_file);\n $protfolios->big_img =\"storage/img/\".$big_file->hashName();\n\n $sm_file = $request->file('sm_img');\n Storage::putFile('public/img/', $sm_file);\n $protfolios->sm_img =\"storage/img/\".$sm_file->hashName();\n\n $protfolios->save();\n return redirect()->route('admin.protfolios.create')->with('success', \"New Protfolio Create successfully\");\n\n\n\n }", "public function store(CarruselRequest $request)\n {\n $carrusel = new Carrusel;\n\n $carrusel->file = $request->file;\n $carrusel->title = $request->title;\n $carrusel->description = $request->description;\n \n\n $carrusel->save();\n\n\n //IMAGE\n if($request->file('file')){\n $path = Storage::disk('public')->put('image', $request->file('file'));\n $carrusel->fill(['file' => asset($path)])->save();\n }\n\n return redirect()->route('carrusels.index')->with('info', 'La imagen fue guardada en el carrusel.');\n }", "public function publicUpload()\n {\n $this->request->validate([\n $this->inputName => $this->extensions,\n ]);\n\n if ($uploadedFile = $this->request->file($this->inputName))\n {\n $fileName = time() . $uploadedFile->getClientOriginalName();\n $uploadedFile->move(uploadedImagePath() . DIRECTORY_SEPARATOR . $this->path, $fileName);\n $filePath = uploadedImagePath() . DIRECTORY_SEPARATOR . $this->path . DIRECTORY_SEPARATOR .$fileName;\n $image = $this->modelName::create(['name' => $fileName, 'path' => $filePath]);\n return $image->id;\n }\n\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\n\t\t$image = new Photo();\n\t\t$image->user_id \t= $input['user_id'];\n\t\t$image->fileName \t= $input['fileName']->getClientOriginalName();\n\t\t$image->title \t\t= $input['title'];\n\t\t\n\t\tif($image->save()){\n\t\t\t\n\t\t\t$path = user_photos_path();\n\n\t\t\t$move_image = Image::make($input['fileName']->getRealPath());\n\n\t\t\tFile::exists($path) or File::makeDirectory($path);\n\n\t\t\t$move_image->save($path.$image->fileName)\n\t\t\t\t\t->resize(200,200)\n\t\t\t\t\t->greyscale()\n\t\t\t\t\t->save($path. 'tn-'.$image->fileName);\n\n\t\t\treturn Redirect::to('photos');\t\n\t\t}else{\n\t\t\treturn Ridirect::to('photos.create');\n\t\t}\n\t\n\t}", "public function store(Request $request)\n {\n $validated = $request->validate([\n 'name' => 'required',\n 'designation' => 'required',\n 'description' => 'required',\n 'image' => 'required',\n \n ]);\n $testimonial = $request->file('image');\n $name_gen = hexdec(uniqid()).'.'.$testimonial->getClientOriginalExtension();\n Image::make($testimonial)->resize(1920,1088)->save('image/testimonial/'.$name_gen);\n $last_img = 'image/testimonial/'.$name_gen;\n\n \n Testimonial::insert([\n 'name' => $request->name,\n 'designation' => $request->designation,\n 'description' => $request->description,\n 'image' => $last_img,\n 'created_at' => Carbon::now()\n ]);\n toast(' Successfully','success');\n return redirect()->route('testimonial.index');\n }", "public function store(ImageRequest $request)\n {\n $img = new Image();\n $img->title = $request->title;\n $img->album_id = $request->album_id;\n if (request()->hasFile('image')) {\n $file = request()->file('image');\n $extension =$file->getClientOriginalExtension();\n }\n\n\n\n if($request->hasFile('image'))\n {\n $files = $request->file('image');\n foreach ($files as $file) {\n $file->store('users/' . $this->user->id . '/messages');\n\n\n $fileName = $file->store('image', ['disk' => 'uploads']);\n $img->path = $fileName;\n }\n }\n\n\n\n\n\n\n\n \n $img->save();\n return redirect()->route('image.index')->with(['success' => 'Image added successfully.']);\n }", "public function store(Request $request)\n {\n //\n $title = $request->input('title');\n $author = $request->input('author');\n $price = $request->input('price');\n $publisher = $request->input('publisher');\n $file = $request->file('image');\n $image = $file->getClientOriginalName();\n\n $destinationPath = 'uploads';\n \n\n $book = new Library();\n\n $book->title = $title;\n $book->author = $author;\n $book->price = $price;\n $book->publisher = $publisher;\n $book->image = $file;\n\n $book->save();\n $id = $book->id;\n $filename = \"image\".$id.\".jpeg\";\n // echo $filename;\n //rename($image,$filename);\n $file->move($destinationPath,$filename);\n $book->image = $filename;\n $book->save();\n return Redirect::to('library');\n }", "public function store(Request $request)\n {\n\n //dd($request);\n\n if(Auth::check()){\n\n $categorias= DB::table('categorias')->select('nome_categoria', 'id_categoria')->get();\n\n $validatedData = $request->validate([\n 'title'=> 'bail|required|max:40',\n 'select_categoria' => 'bail|required',\n 'descricao' => 'required|max:255',\n 'select_dificuldade'=>'required',\n 'content' => 'required',\n 'file'=>'required'\n\n ]);\n $user = Auth::user();\n\n $min =0;\n $max =99999;\n $random=rand ( $min , $max );\n\n $fileOriginalName= $request->file('file')->getClientOriginalName();\n\n\n $img_capa =$random.\"_Tutorial_\".$user->id.\".\".File::extension($fileOriginalName);\n\n $filecontents= file_get_contents($validatedData[\"file\"]);\n\n $file=Storage::disk('public')->put('Tutoriais_img_capa/'.$img_capa, $filecontents);\n $path = storage_path();\n\n //not working\n //$filemove=File::move($path.\"/Tutoriais_img_capa/\".$fileOriginalName, $path.\"/Fotos_utilizadores/\".$img_capa);\n\n\n //percisa de um try catch\n\n\n $tutorial = new Tutorial();\n\n $tutorial->titulo =$validatedData[\"title\"];\n $tutorial->id_categoria =$validatedData[\"select_categoria\"];\n $tutorial->id_utilizador = $user->id;\n $tutorial->descricao =$validatedData[\"descricao\"];\n $tutorial->content =$validatedData[\"content\"];\n $tutorial->img_capa =$img_capa;\n $tutorial->dificuldade =$validatedData[\"select_dificuldade\"];\n\n $inserted= $tutorial->save();\n//\n// $inserted= DB::table('tutorials')->insert(\n// ['id_categoria' => $validatedData[\"select_categoria\"],\n// 'titulo'=>$validatedData[\"title\"],\n// 'id_utilizador'=>$user->id,\n// 'descricao' => $validatedData[\"descricao\"],\n// 'img_capa'=>$img_capa\n// ,'content'=>$validatedData[\"content\"]]\n// );\n// $inserted->save();\n\n\n Session::flash(\"message\",\"Tutorial Novo Adicionado!!\");\n return view(\"tutoriais.templateInserirTutorial\",\n [\"inserted\"=> $inserted,\"categorias\" => $categorias]);\n\n\n\n }\n return view(\"pages.error\");\n }", "public function store()\n {\n $file = ['slider_name' => Input::file('slider_name')];\n $rules = array(\n 'slider_name'=>'required|mimes:jpg,jpeg,png'\n );\n $validator = Validator::make($file, $rules);\n if($validator->fails()){\n $messages = $validator->messages();\n return redirect('slider/create')->withErrors($validator);\n }else{\n $destinationPath = public_path().'/images/slider';\n $extension = Input::file('slider_name')->getClientOriginalExtension();\n $fileName = Carbon::now()->format('Y-m-d').rand(11111,99999).'.'.$extension;\n Input::file('slider_name')->move($destinationPath, $fileName);\n $file = ['slider_name' => $fileName];\n Slider::create($file);\n return redirect('slider/index');\n }\n }", "public function uploadAction()\n {\n $logedUser = $this->getServiceLocator()\n ->get('user')\n ->getUserSession();\n $permission = $this->getServiceLocator()\n ->get('permissions')\n ->havePermission($logedUser[\"idUser\"], $logedUser[\"idWebsite\"], $this->moduleId);\n if ($this->getServiceLocator()\n ->get('user')\n ->checkPermission($permission, \"edit\")) {\n $request = $this->getRequest();\n if ($request->isPost()) {\n // Get Message Service\n $message = $this->getServiceLocator()->get('systemMessages');\n \n $files = $request->getFiles()->toArray();\n $temp = explode(\".\", $files[\"file\"][\"name\"]);\n $newName = round(microtime(true));\n $newfilename = $newName . '.' . end($temp);\n $image = new Image();\n $image->exchangeArray(array(\n \"website_id\" => $logedUser[\"idWebsite\"],\n \"name\" => $newName,\n \"extension\" => end($temp)\n ));\n if ($image->validation()) {\n if (move_uploaded_file($_FILES[\"file\"][\"tmp_name\"], \"public/files_database/\" . $logedUser[\"idWebsite\"] . \"/\" . $newfilename)) {\n $result = $this->getImageTable()->saveImage($image);\n $message->setCode($result);\n // Log\n $this->getServiceLocator()\n ->get('systemLog')\n ->addLog(0, $message->getMessage(), $message->getLogPriority());\n die('uploadSucess');\n } else {\n die('uploadError');\n }\n } else {\n die('Invalid extension');\n }\n }\n die(\"forbiden\");\n } else {\n die(\"forbiden - without permission\");\n }\n }", "public function upload()\n {\n\n if (null == $this->fichier)\n {\n return;\n }\n\n if ($this->oldFichier)\n {\n // suppression de l'ancienne image\n if (file_exists($this->getUploadRootDir() . '/' . $this->oldFichier))\n {\n unlink($this->getUploadRootDir() . '/' . $this->oldFichier);\n }\n\n\n // suppression des anciens thumbnails\n foreach ($this->thumbnails as $key => $thumbnail)\n {\n if (file_exists($this->getUploadRootDir() . '/' . $key . '-' . $this->oldFichier))\n {\n unlink($this->getUploadRootDir() . '/' . $key . '-' . $this->oldFichier);\n }\n\n }\n }\n\n //$date = new \\DateTime('now');\n\n //$nameImage = $date->format('YmdHis') . '-' . $this->fichier->getClientOriginalName();\n //$extension = $this->fichier->guessExtension();\n //$nameImage = str_replace(' ', '-', $this->alt) . uniqid();\n\n // move (param 1 chemin vers dossier, param 2 nom image)\n\n //$this->name = $nameImage . \".\" . $extension;\n\n $this->fichier->move(\n $this->getUploadRootDir(),\n $this->name\n //$nameImage . \".\" . $extension\n );\n\n //$imagine = new \\Imagine\\Gd\\Imagine();\n\n /*$imagine\n ->open($this->getAbsolutePath())\n ->thumbnail(new \\Imagine\\Image\\Box(350, 160))\n ->save(\n $this->getUploadRootDir().'/' .\n $nameImage . '-thumb-small.' . $extension);*/\n\n $imagine = new \\Imagine\\Gd\\Imagine();\n $imagineOpen = $imagine->open($this->getAbsolutePath());\n\n foreach ($this->thumbnails as $key => $thumbnail)\n {\n $size = new \\Imagine\\Image\\Box($thumbnail[0], $thumbnail[1]);\n $mode = \\Imagine\\Image\\ImageInterface::THUMBNAIL_INSET;\n \n $imagineOpen->thumbnail($size, $mode)\n ->save($this->getUploadRootDir() . '/' . $key . '-' . $this->name);\n }\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n \n\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n $filename = time().'_'.$this->getFile()->getClientOriginalName();\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::$SERVER_PATH_TO_VIDEO_FOLDER,\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload($file, $local_file);", "public function store()\n\t{\n $file = Request::file('file');\n if($file) {\n $name = $file->getClientOriginalName();\n Request::file('file')->move('images/lenses', $name);\n return 'true';\n }else{\n $input = Request::all();\n $input['image'] = '/images/lenses/'.$input['file'];\n return Lense::create($input);\n }\n\t}", "public function storeImage($request, $fileKey, $fileName, $path) {\n\n if($request->hasFile($fileKey)){\n\n //get the file from the profile_image request...\n $image = $request->file($fileKey);\n\n //move the file to correct location\n $image->move($path, $fileName);\n\n }\n\n else {\n return false;\n }\n\n\n\n }", "public function store(Request $request) {\n \n // file validation\n $validator = Validator::make($request->all(),\n ['filename' => 'required|mimes:jpeg,png,jpg,bmp|max:2048']);\n \n // if validation fails\n if($validator->fails()) {\n return Alert::info('Imagen', 'Fallo en validacion de imagen');\n }\n \n // if validation success\n if($file = $request->file('filename')) {\n\n $name = $file->getClientOriginalName();\n \n $target_path = public_path('../resources/img/cartas/');\n \n if($file->move($target_path, $name)) { \n return Alert::info('Imagen', 'Imagen subida correctamente');\n }\n }\n /*\n $name = $request->file('filename')->getClientOriginalName();\n //$extension = $request->file('filename')->extension();\n\n //Storage::putFileAs('filename', new File('./../resources/img/cartas'), $name);\n\n //Storage::disk('local')->put($name, 'Contents');\n\n //$path = Storage::putFile('./resources/img/cartas', $request->file('filename'));\n //$path = Storage::putFileAs('./resources/img/cartas', $request->file('filename'), $name);\n //$path = $request->file('filename')->store('./resources/img/cartas');\n $target_path = public_path('../resources/img/cartas/');\n\n $request->file('filename')->move($target_path, $name);\n\n echo('imagen subida corectamente');\n */\n\n /**\n * $fileName = $request->file->getClientOriginalName();\n * $request->file->move(public_path('../resources/img/cartas'), $fileName);\n */\n\n /**\n * $data = request()->validate([\n * 'name' => 'required',\n * 'email' => 'required|email',\n * 'message' => 'required',\n * ]);\n */\n }", "public function store(Request $request)\n {\n $this->validate($request,[\n 'title'=>'required|string',\n 'sub_title'=>'required|string',\n 'big_image'=>'required|image',\n 'small_image'=>'required|image',\n 'description'=>'required|string',\n 'client'=>'required|string',\n 'category'=>'required|string',\n\n\n ]);\n $portfolios=new Portfolio;\n $portfolios->title=$request->title;\n $portfolios->sub_title=$request->sub_title;\n $portfolios->description=$request->description;\n $portfolios->client=$request->client;\n $portfolios->category=$request->category;\n\n $big_file=$request->file('big_image');\n Storage::putFile('public/img/',$big_file);\n $portfolios->big_image=\"storage/img/\".$big_file->hashName();\n\n\n $small_file=$request->file('small_image');\n Storage::putFile('public/img/',$small_file);\n $portfolios->small_image=\"storage/img/\".$small_file->hashName();\n\n\n\n $portfolios->save();\n return redirect()->route('admin.portfolios.create')->with('success','New portfolio created successfully');\n }", "public static function addImg($myId){\n if ($_FILES[\"pic\"][\"error\"] > 0) {\n echo \"Return Code: \" . $_FILES[\"pic\"][\"error\"] . \"<br>\";\n } else {\n$conn = init_db();\n$url = uniqid();\n$sql='insert into images (u_id, url, ups) values ('.$myId.', \\''.$url.'.jpg\\', 0)';\n$res = mysqli_query($conn,$sql) or die(mysqli_error($conn).'failed query:'.__LINE__);\n$dest = __DIR__.\"/../img/usr/\" . $url.'.jpg';\necho 'moved to '.$dest;\nmove_uploaded_file($_FILES[\"pic\"][\"tmp_name\"],\n $dest);\n}\n}", "public function store(Request $request)\n {\n\n \n $team = $request->file('image');\n $name_gen = hexdec(uniqid()).'.'.$team->getClientOriginalExtension();\n Image::make($team)->resize(1920,1088)->save('image/team/'.$name_gen);\n $last_img = 'image/team/'.$name_gen;\n\n \n Team::insert([\n 'name' => $request->name,\n 'designation' => $request->designation,\n 'image' => $last_img,\n 'created_at' => Carbon::now()\n ]);\n toast(' Successfully','success');\n return redirect()->route('team.index');\n }", "public function store(Request $request)\n {\n $lastinsertedid=logo::insertGetId([\n 'image' => 'default.php',\n 'created_at'=>Carbon::now()\n ]);\n\n \n if ($request->hasFile('image')) {\n $main_photo=$request->image;\n $imagename=$lastinsertedid.\".\".$main_photo->getClientOriginalExtension();\n \n // $ami = app_path('store.gochange-tech.com/uploads/products_images/'.$imagename);\n // dd($ami);\n Image::make($main_photo)->resize(400, 450)->save(base_path('public/upload/logo/'.$imagename));\n\n logo::find($lastinsertedid)->update([\n 'image'=>$imagename\n ]);\n }\n\n return back();\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n $post = new Post();\n $post->title = $request->title;\n if($request->get('image'))\n {\n $file = $request->get('image');\n $name = time().'.' . explode('/', explode(':', substr($file, 0, strpos($file, ';')))[1])[1];\n \\Image::make($request->get('image'))->save(public_path('images/').$name); \n $post->image = $name;\n }\n\n //$post->save();\n\n // return response()->json(['success' => 'You have successfully uploaded an image'], 200); \n }", "public function store(Request $request)\n {\n if ($request->hasFile('image')) {\n // Let's do everything here\n if ($request->file('image')->isValid()) {\n //\n $validated = $request->validate([\n 'name' => 'string|max:40',\n 'image' => 'mimes:jpeg,png|max:1014',\n ]);\n $extension = $request->image->extension();\n $request->image->storeAs('/public', $validated['name'].\".\".$extension);\n $url = Storage::url($validated['name'].\".\".$extension);\n $file = File::create([\n 'name' => $validated['name'],\n 'url' => $url,\n ]);\n Session::flash('success', \"Success!\");\n return Redirect::back();\n }\n }\n abort(500, 'Could not upload image :(');\n }", "public function store(Request $request)\n { \n \n\n if($request->hasFile('image') && $request->file('image')->isValid()){\n\n $requestImage = $request->image;\n\n $extencao = $requestImage->extension();\n\n $imageName = md5($requestImage.strtotime(\"now\"));\n\n $requestImage->move(public_path('img/teste'), $imageName);\n \n Movel::create([\n 'tipo' => $request->tipo,\n 'descricao' => $request->descricao,\n 'foto' => $imageName,\n 'user_id'=>Auth::user()->id,\n ]);\n // var_dump($request->tipo,$request->descricao,$imageName);\n }\n return redirect('dashboard');\n }", "function uploadFile($name) {\r\n // Gets the paths, full and local directory\r\n global $image_dir, $image_dir_path;\r\n if (isset($_FILES[$name])) {\r\n // Gets the actual file name\r\n $filename = $_FILES[$name]['name'];\r\n if (empty($filename)) {\r\n return;\r\n }\r\n // Get the file from the temp folder on the server\r\n $source = $_FILES[$name]['tmp_name'];\r\n // Sets the new path - images folder in this directory\r\n $target = $image_dir_path . '/' . $filename;\r\n // Moves the file to the target folder\r\n move_uploaded_file($source, $target);\r\n // Send file for further processing\r\n processImage($image_dir_path, $filename);\r\n // Sets the path for the image for Database storage\r\n $filepath = $image_dir . '/' . $filename;\r\n // Returns the path where the file is stored\r\n return $filepath;\r\n }\r\n }", "public function save2(Request $request){\n $file = $request->file('file2');\n \n //obtenemos el nombre del archivo\n $nombre = $file->getClientOriginalName();\n //print_r($nombre);\n \n \n Storage::disk('local')->put('logo2.PNG', \\File::get($file));\n \n return Response::json(['response' => 'Actualizado correctamente'],200);\n }", "public function store(Request $request)\n {\n\n $file = $request->file('image');\n $imginame = 'category_' . time() . '.' .$file->getClientOriginalExtension();\n //El public_path nos ubica en la carpeta public del proyecto\n $path = public_path() . '/img/categories/';\n //La funcion move nos los guarda en la carpeta declarada en el path\n $file->move($path,$imginame);\n\n\n $category = new category($request->all());\n $category->image = $imginame;\n $category->save();\n return redirect()->route('categories.index')-> with('mensaje',\"Se ha registrado la categoria $category->name correctamente \");\n }", "public function create(Request $request)\n {\n \n $file_name = $this->saveImage($request->file,'gallery');\n\n $gallery = new gallery();\n \n $gallery->url = $file_name;\n \n $gallery->save();\n \n return redirect()->back()->with(['sucess'=>'image successfully added']); \n\n \n }", "public function store(Request $request)\n {\n $name=$request['name'];\n $testimonial=$request['testimonial'];\n $type=$request['media_type'];\n if($request->hasFile('img_name'))\n { \n $file=$request->file('img_name'); \n $imagename=$file->getClientOriginalName();\n $path_img=$file->storeAs('public/','img'.time().$imagename);\n $img_name=str_replace('public/', '', $path_img);\n $testimonial1= Testimonial::testimonial_create($name,$testimonial,$img_name,$type);\n return redirect('/admin/testimonial/index');\n } \n\n return redirect('/admin/testimonial/index');\n }", "public function store(Request $request)\n {\n\n// $imageName = time() . '-' . preg_match_all('/data\\:image\\/([a-zA-Z]+)\\;base64/',$request->photo,$matched).'.jpg';\n $imageName = time() . '.' . explode('/',explode(':', substr($request->photo, 0, strpos($request->photo, ';')))[1])[1];\n \\Image::make($request->photo)->save(public_path('/assets/uploaded_images/'). $imageName);\n// dd($imageName);\n\n $contact = new Contact();\n $contact->name = $request->name;\n $contact->email = $request->email;\n $contact->position = $request->position;\n $contact->company = $request->company;\n $contact->phone = $request->phone;\n $contact->subject = $request->subject;\n $contact->photo = $imageName;\n $contact->save();\n }" ]
[ "0.7209419", "0.71458685", "0.71009463", "0.7038677", "0.7014978", "0.7011861", "0.6907889", "0.68815935", "0.687421", "0.6851589", "0.6828855", "0.68120307", "0.67946845", "0.67556983", "0.67533976", "0.6738893", "0.6737136", "0.6736024", "0.6725347", "0.67041004", "0.6699532", "0.66952276", "0.66831857", "0.6681011", "0.6672558", "0.6662765", "0.6649938", "0.6631819", "0.66295296", "0.6627401", "0.66271156", "0.66196835", "0.6619012", "0.66135967", "0.6608324", "0.66033554", "0.65931475", "0.6550966", "0.6540967", "0.6536795", "0.65345895", "0.65304667", "0.65298724", "0.65235513", "0.6521603", "0.65134645", "0.6511248", "0.6502627", "0.6490096", "0.6480974", "0.6478102", "0.6474502", "0.64711714", "0.6465774", "0.64600056", "0.64591765", "0.6459059", "0.6455681", "0.64542824", "0.6454273", "0.64529926", "0.6451664", "0.64502335", "0.6440114", "0.6437682", "0.6437302", "0.6426557", "0.64193946", "0.641862", "0.6416667", "0.64162076", "0.6410757", "0.6392746", "0.6388635", "0.6388393", "0.6387017", "0.63863295", "0.6381644", "0.63745594", "0.63730323", "0.6371473", "0.6369523", "0.6367562", "0.6364049", "0.636288", "0.63599855", "0.63598895", "0.6350644", "0.6350644", "0.6350644", "0.6350644", "0.63477814", "0.6341514", "0.634078", "0.6340389", "0.63402504", "0.6339549", "0.6336429", "0.63344383", "0.63292265" ]
0.6515271
45
Takes uploaded file, stores it in the local storage and saves image in the database
public function storeForArticleFeatured(UploadedFile $file, Article $project){ //TODO write image to the local storage }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n Image::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->path\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload()\n\t{\n\t if (null === $this->getFile()) {\n\t return;\n\t }\n\t\n\t // use the original file name here but you should\n\t // sanitize it at least to avoid any security issues\n\t\n\t // move takes the target directory and then the\n\t // target filename to move to\n\t \n\t $this->getFile()->move($this->getWebPath(),$this->imagen);\n\t \n\t \n\t // set the path property to the filename where you've saved the file\n\t $this->path = $this->getFile()->getClientOriginalName();\n\t\t//$this->temp = \n\t // clean up the file property as you won't need it anymore\n\t $this->file = null;\n\t}", "public function upload() {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->avatar)\n {\n return;\n }\n\n //Lastname du fichier\n $file = $this->id_user.'.'.$this->avatar->guessExtension();\n // move takes the target directory and then the target filename to move to\n $this->avatar->move($this->getUploadRootDir(), $file);\n //Suppression des thumbnail déjà en cache\n @unlink(__DIR__.'/../../../../../web/imagine/thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/avatar_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/moyen_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/mini_thumbnail/avatars/'.$file);\n\n // set the path property to the filename where you'ved saved the file\n $this->avatar = $file;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // if there is an error when moving the file, an exception will\n // be automatically thrown by move(). This will properly prevent\n // the entity from being persisted to the database on error\n $this->getFile()->move($this->getUploadRootDir(), $this->fileName);\n\n // check if we have an old image\n if (isset($this->temp)) {\n // delete the old image\n unlink($this->getUploadRootDir().'/'.$this->temp);\n // clear the temp image path\n $this->temp = null;\n }\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getImg()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getImg()->move(\n self::SERVER_PATH_TO_PRESS_IMAGE_FOLDER,\n $this->getImg()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->imageUrl = $this->getImg()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setImg(null);\n }", "public function upload()\n {\n if (null === $this->image) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the target filename to move to\n $this->file->move($this->getUploadRootDir(), $this->image->getClientOriginalName());\n\n // set the path property to the filename where you'ved saved the file\n $this->path = $this->image->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->backgroundImage = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function savetheuploadedfile() {\n\t\t$public_dir = 'public/images/';\n\t\t$baseurl = base_url();\n\t\tif ($_FILES['file']['name']) {\n\t\t\t\tif (!$_FILES['file']['error']) {\n\t\t\t\t\t\t$name = md5(rand(100, 200));\n\t\t\t\t\t\t$ext = explode('.', $_FILES['file']['name']);\n\t\t\t\t\t\t$filename = $name . '.' . $ext[1];\n\t\t\t\t\t\t$destination = $public_dir . $filename; //change path of the folder...\n\t\t\t\t\t\t$location = $_FILES[\"file\"][\"tmp_name\"];\n\t\t\t\t\t\tmove_uploaded_file($location, $destination);\n\t\t\t\t\t\t// echo $destination;\n\n\t\t\t\t\t\techo $baseurl.'/public/images/' . $filename;\n\t\t\t\t} else {\n\t\t\t\t\t\techo $message = 'The following error occured: ' . $_FILES['file']['error'];\n\t\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function upload(){\n if( NULL === $this->getFile()){\n return;\n }\n $filename= $this->getFile()->getClientOriginalName();\n\n // Move to the target directory\n \n $this->getFile()->move(\n $this->getAbsolutePath(), \n $filename);\n\n //Set the logo\n $this->setFilename($filename);\n\n $this->setFile();\n\n }", "public function upload(): void\n {\n // check if we have an old image\n if ($this->oldFileName !== null) {\n $this->removeOldFile();\n }\n\n if (!$this->hasFile()) {\n return;\n }\n\n $this->writeFileToDisk();\n\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n $this->picture = file_get_contents($this->getFile());\n\n if (isset($this->temp)) {\n $this->temp = null;\n }\n\n $this->file = null;\n }", "public function upload(): void\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload()\n{\n if(null === $this->getFile())\n {\n return;\n }\n\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n $this->filename =$this->getFile()->getClientOriginalName();\n\n $this->setFile(null);\n}", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->id . '.' .$this->ext\n );\n\n // set the ext property to the filename where you've saved the file\n //$this->ext = $this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(){\n $url_path = 'assets/imgs/' . $_FILES['file']['name'];\n move_uploaded_file($_FILES['file']['tmp_name'], $url_path);\n $_POST['url_image'] = $url_path;\n echo parent::register($_POST) ? header('location: ?controller=admin') : 'Error en el registro';\n }", "public function save()\n {\n $this->validate();\n $this->validate(['image' => 'required|image']);\n\n // try to upload image and resize by ImageSaverController config\n try {\n $imageSaver = new ImageSaverController();\n $this->imagePath = $imageSaver->loadImage($this->image->getRealPath())->saveAllSizes();\n }catch (\\RuntimeException $exception){\n dd($exception);\n }\n\n $this->PostSaver();\n\n $this->resetAll();\n $this->ChangeCreatedMode();\n $this->swAlert([\n 'title' => 'Good job',\n 'text' => 'successfully added',\n 'icon' => 'success'\n ]);\n $this->render();\n }", "public function store(Request $request)\n {\n //\n\n $user_id = Auth::id();\n $request->validate([\n\n 'image' => 'required|image|mimes:jpeg,png,jpg,webp|max:2048 '\n ]);\n $directory = public_path('images').'/'.$user_id;\n $imageName = time().'.'.$request->image->extension();\n\n //move the uploaded file to a directory named as user_id\n $saved = $request->image->move($directory, $imageName);\n $imagePath= \"$user_id/$imageName\";\n\n $imageUpload = new imageUpload;\n $imageUpload->name=$imageName;\n $imageUpload->path = \"images/$user_id/$imageName\";\n $imageUpload->user_id= $user_id;\n $imageUpload->save();\n\n return redirect()->route('getajaxupdate',['id' => $user_id])\n ->with('success','You have successfully uploaded image.')\n ->with('image',$imageName)\n ->with('id',$user_id);\n\n\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->setImageName($this->getFile()->getClientOriginalName());\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function storeimage(Request $request)\n {\n $this->authorize('isAdmin');\n if($request->file('file'))\n {\n $image = $request->file('file');\n $name = \"ortm_\".time().'.'.$image->getClientOriginalExtension();\n\n $thumbnailImage = Images::make($image)->resize(200, 200)->save(public_path('/img/ourteam/thumbs/' . $name));\n\n $watermark = Images::make(public_path('/img/watermark.png'));\n $Image = Images::make($image)->insert($watermark, 'bottom-right', 10, 10)->save(public_path('/img/ourteam/' . $name));\n\n //$image->move(public_path().'/img/social/', $name);\n }\n\n $image= new Image();\n $image->image_name = $name;\n $image->save();\n\n return response()->json([\n 'data' => $name\n ], 200);\n }", "public function insertImageToDb() \n {\n }", "public function upload() {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(), $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->photo = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n// use the original file name here but you should\n// sanitize it at least to avoid any security issues\n// move takes the target directory and then the\n// target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n// set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n// clean up the file property as you won't need it anymore\n $this->file = null;\n\n\n }", "public function storeForArticleGallery(UploadedFile $file, Article $project){\n //TODO write image to the local storage\n }", "public function store(Request $request)\n {\n \n $file = $request->file('file');\n\n\n $name = time() . $file->getClientOriginalName();\n\n $file->move('images', $name);\n\n\n\n Photo::create(['file'=>$name]);\n\n Session::flash('message', 'Photo added!');\n Session::flash('status', 'success');\n\n }", "public function upload(){\n if (null === $this->getProductsFileImage()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getProductsFileImage()->move(\n $this->getUploadRootDir(),\n $this->getProductsFileImage()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getProductsFileImage()->getClientOriginalName();\n $this->productsImage = $this->getProductsFileImage()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->productsFileImage = null;\n }", "public function storeImage(UploadedFile $file)\n {\n $filename = md5(time().$file->getClientOriginalName()).'.'.$file->getClientOriginalExtension();\n $file->move(Config::get('assets.images'),$filename);\n\n $i = new ImageEntry();\n $i->path = $filename;\n $i->uploader = LoginController::currentUser()->id;\n $i->save();\n return $i;\n }", "public function StoreSlider(Request $request)\n {\n\n $slider_image = $request->file('image');\n\n $name_gen = hexdec(uniqid()).'.'.$slider_image->getClientOriginalExtension();\n Image::make($slider_image)->resize(1920,1088)->save('image/slider/'.$name_gen );\n\n $last_img ='image/slider/'.$name_gen;\n\n\n //end upload image\n\n\n Slider::insert([\n 'title' => $request->title,\n 'description' => $request->description,\n 'image'=> $last_img,\n 'created_at'=>Carbon::now(),\n ]);\n\n return redirect()->route('home.slider')->with('success','Slider Inserted successfully');\n }", "public function postUpload()\n\t{\n\t\t$validator = Validator::make(Input::all(), array(\n\t\t\t'file' => 'image'\n\t\t));\n\t\t//kalo ada url make yang url, kalo ngga yang file\n\t\tif ($validator->fails()) {\n\t\t\treturn Redirect::to('/teaser/upload');\n\t\t}\n\n\t\tif (Input::hasFile('file'))\n {\n \t$folder = '/teaser_photo/';\n $path = public_path() . $folder;\n $filename = $original = Input::file('file')->getClientOriginalName();\n $extension = Input::file('file')->getClientOriginalExtension();\n if (File::exists($path . $filename))\n {\n $filename = time() . '_' . $original;\n }\n $file = Input::file('file')->move($path, $filename);\n\t\t\t\n\n\t\t\t$teaser = new Teaser;\n $teaser->teaser = $folder . $filename;\n $teaser->status = 1;\n $teaser->save();\n return Redirect::to('teaser');\n }\n\t}", "public function uploadImage() \n {\n if (is_null($this->image)) {\n return;\n }\n \n // move image from temp directory to destination one\n $this->image->move(\n $this->getUploadRootDir(),\n $this->image->getClientOriginalName()\n );\n\n $this->path = $this->image->getClientOriginalName();\n $this->image = null;\n }", "public function upload(Request $request){\n if($request->hasFile('image')){\n $resorce = $request->file('image');\n $name = $resorce->getClientOriginalName();\n $resorce->move(\\base_path() .\"/public/images\", $name);\n $save = DB::table('images')->insert(['image' => $name]);\n echo \"Gambar berhasil di upload\";\n }else{\n echo \"Error to upload this file\";\n }\n }", "public function store(Request $request)\n {\n\n $fileName = Storage::disk('public')->put('',$request->file('file_name'));\n\n $thumbPath = storage_path('app/public/thumb/').$fileName;\n\n $manager = new ImageManager(array('driver' => 'gd'));\n\n\n $img = $manager->make($request->file_name)->resize(100, 100)->save($thumbPath);\n\n\n\n $file = new File();\n $file->file_name = $fileName;\n $file->save();\n\n return redirect(route('files.index'));\n }", "public function upload(){\n $file = array('image' => Input::file('avatar'));\n // setting up rules\n $rules = array('image' => 'required',); //mimes:jpeg,bmp,png and for max size max:10000\n // doing the validation, passing post data, rules and the messages\n $validator = Validator::make($file, $rules);\n if ($validator->fails()) {\n return redirect()->route('myprofile')->with(['errors' => $validator->errors()]);\n }else{\n // checking file is valid.\n if (Input::file('avatar')->isValid()) {\n $path = 'public/uploads/users/'.Auth::User()->id.'/avatar/';\n Storage::makeDirectory($path, $mode = 0777, true);\n Storage::disk('local')->put($path, Input::file('avatar'));\n $user = Users::find(Auth::User()->id);\n $createdFileName = Storage::files($path);\n $pathFile = str_replace('public/','',$createdFileName[0]);\n $user->avatar = '/storage/'.$pathFile;\n if ($user->save()){\n return redirect()->route('myprofile')->with(['msg' => 'Image was uploaded with success']);\n }\n }else{\n exit('error');\n }\n }\n }", "private function saveImage()\n {\n $name = $_FILES['image']['name'];\n $tmp_name = $_FILES['image']['tmp_name'];\n\n return move_uploaded_file($tmp_name, 'images/' . $name);\n }", "public function store() {\n\n\t\t$file = array('image' => Input::file('image'));\n\t\t// setting up rules\n\t\t$rules = array('image' => 'required|image'); //mimes:jpeg,bmp,png and for max size max:10000\n\t\t// doing the validation, passing post data, rules and the messages\n\t\t$validator = Validator::make($file, $rules);\n\t\tif ($validator->fails()) {\n\t\t\t// send back to the page with the input data and errors\n\t\t\treturn Redirect::to('posts/create')->withInput()->withErrors($validator);\n\t\t} else {\n\t\t\t// checking file is valid.\n\t\t\tif (Input::file('image')->isValid()) {\n\t\t\t\t$destinationPath = 'uploads'; // upload path\n\t\t\t\t$extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n\t\t\t\t$fileName = rand(11111, 99999) . '.' . $extension; // renameing image\n\t\t\t\tInput::file('image')->move($destinationPath, $fileName); // uploading file to given path\n\t\t\t\t// sending back with message\n\t\t\t\tSession::flash('success', 'Upload successfully');\n\t\t\t\treturn Redirect::to('posts/create');\n\n\t\t\t} else {\n\t\t\t\t// sending back with error message.\n\t\t\t\tSession::flash('error', 'uploaded file is not valid');\n\t\t\t\treturn Redirect::to('posts/create');\n\t\t\t}\n\t\t}\n\t}", "public function store(Request $request)\n { \n \n $data=request()->validate([\n 'caption'=>'required',\n 'file'=>'required | image'\n ]);\n\n $imagePath=request('file')->store('uploads','public');\n\n $image=Image::make(public_path(\"storage/$imagePath\"))->fit(1200,1200);\n $image->save();\n\n try{\n auth()->user()->posts()->create([\n 'caption'=>$data['caption'],\n 'image'=>$imagePath\n ]);\n return $this->responseSuccess('Upload Post successfully');\n }catch(Exception $e){\n return $this->responseServerError(\"Server Error.\");\n }\n\n }", "function uploadFile($name)\n{\n // Gets the paths, full and local directory\n global $image_dir, $image_dir_path;\n if (isset($_FILES[$name])) {\n // Gets the actual file name\n $filename = $_FILES[$name]['name'];\n if (empty($filename)) {\n return;\n }\n // Get the file from the temp folder on the server\n $source = $_FILES[$name]['tmp_name'];\n // Sets the new path - images folder in this directory\n $target = $image_dir_path . '/' . $filename;\n // Moves the file to the target folder\n move_uploaded_file($source, $target);\n // Send file for further processing\n processImage($image_dir_path, $filename);\n // Sets the path for the image for Database storage\n $filepath = $image_dir . '/' . $filename;\n // Returns the path where the file is stored\n return $filepath;\n }\n}", "function upload(){\r\n\t\r\n\tvar_dump($_FILES);\r\n\tif(isset($_FILES[\"fileToUpload\"]) && !empty($_FILES[\"fileToUpload\"][\"name\"])){\r\n\t\t$target_dir = \"../pildid/\";\r\n\t\t$target_file = $target_dir . basename($_FILES[\"fileToUpload\"][\"name\"]);\r\n\t\t$uploadOk = 1;\r\n\t\t$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);\r\n\t\t// Check if image file is a actual image or fake image\r\n\t\tif(isset($_POST[\"submit\"])) {\r\n\t\t\t$check = getimagesize($_FILES[\"fileToUpload\"][\"tmp_name\"]);\r\n\t\t\tif($check !== false) {\r\n\t\t\t\t//echo \"File is an image - \" . $check[\"mime\"] . \".\";\r\n\t\t\t\t$uploadOk = 1;\r\n\t\t\t} else {\r\n\t\t\t\techo \"File is not an image.\";\r\n\t\t\t\t$uploadOk = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Check if file already exists\r\n\t\tif (file_exists($target_file)) {\r\n\t\t\techo \"Sorry, file already exists.\";\r\n\t\t\t$uploadOk = 0;\r\n\t\t}\r\n\t\t// Check file size\r\n\t\tif ($_FILES[\"fileToUpload\"][\"size\"] > 500000) {\r\n\t\t\techo \"Sorry, your file is too large.\";\r\n\t\t\t$uploadOk = 0;\r\n\t\t}\r\n\t\t// Allow certain file formats\r\n\t\tif($imageFileType != \"jpg\" && $imageFileType != \"png\" && $imageFileType != \"jpeg\"\r\n\t\t&& $imageFileType != \"gif\" ) {\r\n\t\t\techo \"Sorry, only JPG, JPEG, PNG & GIF files are allowed.\";\r\n\t\t\t$uploadOk = 0;\r\n\t\t}\r\n\t\t// Check if $uploadOk is set to 0 by an error\r\n\t\tif ($uploadOk == 0) {\r\n\t\t\techo \"Sorry, your file was not uploaded.\";\r\n\t\t// if everything is ok, try to upload file\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$target_file = $target_dir.uniqid().\".\".$imageFileType;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (move_uploaded_file($_FILES[\"fileToUpload\"][\"tmp_name\"], $target_file)) {\r\n\t\t\t\t//echo \"The file \". basename( $_FILES[\"fileToUpload\"][\"name\"]). \" has been uploaded.\";\r\n\t\t\t\t\r\n\t\t\t\t// save file name to DB here\r\n\t\t\t\t$a = new StdClass();\r\n\t\t\t\t$a->name = $target_file;\r\n\t\t\t\treturn $a;\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\treturn \"Sorry, there was an error uploading your file.\";\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\treturn \"Please select the file that you want to upload!\";\r\n\t}\r\n\t\r\n}", "public function upload();", "public function save($value){\n $target_path = IMG_PATH.DS.$this->file_name;\n try {\n //move the uploaded file to target path\n move_uploaded_file($value, $target_path);\n return $this->_add_photo();\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function save()\n {\n\n $photo = $this->flyer->addPhoto($this->makePhoto());\n\n\n // move the photo to the images folder\n $this->file->move($photo->baseDir(), $photo->name);\n\n\n// Image::make($this->path)\n// ->fit(200)\n// ->save($this->thumbnail_path);\n\n // generate a thumbnail\n $this->thumbnail->make($photo->path, $photo->thumbnail_path);\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'image' => 'image|mimes:jpeg,png,jpg,gif|max:2048',\n ]);\n \n if ($request->hasFile('news_image')){\n\n $news_id=$request->news_id;\n $file = $request->file('news_image');\n $extension = $file->getClientOriginalExtension();\n $new_filename = rand(1,100).time().'.'. $extension;\n $location=\"images/news/\";\n //Storage::disk('public')->put($location.$new_filename, File::get($file));\n\n if (!file_exists(public_path($location))) \n File::makeDirectory(public_path($location));\n\n Image::make($file)->save(public_path($location.$new_filename));\n\n\n $newsImage = new Photo;\n $newsImage->filename=$location.$new_filename;\n $newsImage->mime=$file->getClientMimeType();\n $newsImage->original_filename=$file->getClientOriginalName();\n \n $newsImage->save();\n\n $news=News::find($news_id);\n $news->Photos()->attach($newsImage->id);\n return redirect(route('news.show',$news_id))->with('success','Image uploaded successfully!');\n }\n else\n return back();\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $partes_ruta = pathinfo($this->getFile()->getClientOriginalName());\n $this->nombre = md5(uniqid()) . '.' . $partes_ruta['extension'];\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->nombre\n );\n\n $this->url = $this->getWebPath();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function save(){\n\t\t\tif(isset($this->id)){\n\t\t\t\t$this->update();\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//checking for errors\n\t\t\t\t//Can't save if there are pre=existing errors.\n\t\t\t\tif(!empty($this->errors)){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Can't save without filename and temp location on server.\n\t\t\t\tif(empty($this->filename) || empty($this->temp_path)){\n\t\t\t\t\t$this->errors[]=\"The file location is not available!\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Determine the target path\n\t\t\t\t$upload_dir=\"images\";\n\t\t\t\t$target_path=\"../../public/\".$upload_dir.\"/\".$this->filename;\n\t\t\t\t//$target_path=$this->filename;\n\t\t\t\tif(file_exists($target_path)){\n\t\t\t\t\t$this->errors[]=\"The file {$this->filename} already exists!\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Attempt to move the file.\n\t\t\t\tif(move_uploaded_file($this->temp_path, $target_path)){\n\t\t\t\t\t//success\n\t\t\t\t\t//save corresponding entry into database.\n\t\t\t\t\tif($this->create()){\n\t\t\t\t\t\t//we are done with temp_path.\n\t\t\t\t\t\tunset($this->temp_path);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//file not moved.\n\t\t\t\t\t\t$this->error[]=\"file can't be uploaded because of some denied permissions.\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // si on avait un ancien fichier on le supprime\n if (null !== $this->tempFilename) {\n $oldFile = $this->getUploadRootDir().'/'.$this->id.'.'.$this->tempFilename;\n if (file_exists($oldFile)) {\n unlink($oldFile);\n }\n }\n\n // déplace le fichier envoyé dans le répertoire de notre choix\n $this->file->move(\n $this->getUploadRootDir(), // répertoire de destination\n $this->id.'.'.$this->url // nom du fichier à créer \"id.extension\"\n );\n\n }", "public function storeForProjectGallery(UploadedFile $file, Project $project){\n //TODO write image to the local storage\n }", "public function save(Request $request){\n $file = $request->file('file');\n \n //obtenemos el nombre del archivo\n $nombre = $file->getClientOriginalName();\n //print_r($nombre);\n \n \n Storage::disk('local')->put('logo.PNG', \\File::get($file));\n \t\t\n \t\t return Response::json(['response' => 'Actualizado correctamente'],200);\n\t}", "public function store(Request $request)\n {\n\n $file = $request->file('file');\n $path = $request->file->store('the/path');\n\n// $imageName = request()->file->getClientOriginalName();\n// request()->file->move(public_path('upload'), $imageName);\n//\n//\n// return response()->json(['uploaded' => '/upload/'.$imageName]);\n\n\n// $this->validate($request, [\n//\n// 'media' => 'required',\n// 'media.*' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048'\n//\n// ]);\n//\n// if($request->hasfile('media'))\n// {\n//\n// foreach($request->file('media') as $image)\n// {\n// $name=$image->getClientOriginalName();\n// $image->move(public_path().'/images/', $name);\n// $data[] = $name;\n// }\n// }\n//\n// $form= new Media();\n// $form->user_id = Auth::user()->id;\n// $form->name =json_encode($data);\n//\n//\n// $form->save();\n//\n// return back()->with('success', 'Your images has been successfully');\n }", "public function uploadImage()\n {\n $file = array('image' => \\Input::file('image'));\n // setting up rules\n $rules = array('image' => 'required',); //mimes:jpeg,bmp,png and for max size max:10000\n // doing the validation, passing post data, rules and the messages\n $validator = Validator::make($file, $rules);\n if ($validator->fails()) {\n // send back to the page with the input data and errors\n return Redirect::back()->withInput()->withErrors($validator);\n }\n else {\n // checking file is valid.\n if (Input::file('image')->isValid()) {\n $destinationPath = 'temp'; // upload path\n $extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n $fileName = rand(11111, 99999) . '.' . $extension; // renaming image\n Input::file('image')->move($destinationPath, $fileName); // uploading file to given path\n // sending back with message\n Session::flash('success', 'Upload successfully');\n return Redirect::to('upload');\n } else {\n // sending back with error message.\n Session::flash('error', 'uploaded file is not valid');\n return Redirect::to('upload');\n }\n }\n }", "public function storeForProjectFeatured(UploadedFile $file, Project $project){\n //TODO write image to the local storage\n }", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n if(!is_dir($this->getTargetUploadRootDir())){\n mkdir($this->getTargetUploadRootDir(), 0777, true);\n }\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getTargetUploadRootDir(),\n $this->file->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = date('Y-m-d').DIRECTORY_SEPARATOR.$this->id.DIRECTORY_SEPARATOR.$this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n //\nif ($request->hasFile('photo')) {\n $originalname = $request->file('photo')->getClientOriginalName(); \n $extension = Input::file('photo')->getClientOriginalExtension();\n $oldnamewithoutext = substr($originalname, 0, strlen($originalname) - 4); \n $dbimgname = $oldnamewithoutext . '-'. time() . '.' . $extension; \n $newname = iconv(\"utf-8\", \"TIS-620\", $dbimgname);\n $moveImage = $request->file('photo')->move('images', $newname);\n\n} else {\n $dbimgname = \"\";\n} \n //\n $employees = new Employee;\n $employees->title = $request->title;\n $employees->firstname = $request->firstname;\n $employees->lastname = $request->lastname;\n $employees->photo = $dbimgname;\n $employees->status = $request->status;\n $employees->priority = $request->priority;\n \n\n // $this->validate($request, [\n // 'fistname' => 'required|unique:employee|max:255',\n \n // ]);\n\n \n $employees->save();\n $request->session()->flash('status', 'บันทึกข้อมูลเรียบร้อย');\n return back(); \n }", "public function uploadImage()\n {\n if (null === $this->fileimage) {\n return;\n }\n\n $upload = new Upload();\n $this->image = $upload->createName(\n $this->fileimage->getClientOriginalName(),\n $this->getUploadRootDir().'/',\n array('tmp/','miniature/')\n );\n\n $imagine = new Imagine();\n\n /* Tmp */\n $size = new Box(1920,1080);\n $imagine->open($this->fileimage)\n ->thumbnail($size, 'inset')\n ->save($this->getUploadRootDir().'tmp/'.$this->image);\n\n /* Miniature */\n $size = new Box(300,300);\n $imagine->open($this->fileimage)\n ->thumbnail($size, 'outbound')\n ->save($this->getUploadRootDir().'miniature/'.$this->image);\n\n }", "public function upload()\n {\n // The file property can be empty if the field is not required\n if (null === $this->file) {\n return;\n }\n\n // Use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->path\n );\n\n // Set the path property to the filename where you've saved the file\n $this->path = $this->file->getClientOriginalName();\n\n // Clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n\n if(Input::file('imagem')){\n $imagem = Input::file('imagem');\n $extensao = $imagem->getClientOriginalExtension();\n\n if($extensao != 'jpg' && $extensao != 'png' && $extensao != 'jpeg' && $extensao != 'JPG' && $extensao != 'PNG' && $extensao != 'JPEG'){\n return back()->with('erro','Erro: Este arquivo não é imagem');\n }\n }\n\n $perfil = new Perfil;\n $perfil->nome = $request->input('nome');\n $perfil->biografia = $request->input('biografia');\n $perfil->numero = $request->input('numero');\n $perfil->imagem = \"\";\n $perfil->user_id = auth()->user()->id;\n\n $perfil->save();\n\n if(Input::file('imagem')){\n File::move($imagem,public_path().'\\imagem-perfil\\perfil-id_'.$perfil->id.'.'.$extensao);\n $perfil->imagem = public_path().'\\imagem-perfil\\perfil-id_'.$perfil->id.'.'.$extensao;\n $perfil->save();\n }\n\n return redirect('home');\n }", "public function store()\n {\n $data = request()->validate([\n 'caption' => 'required',\n 'price' => 'required',\n 'image' => ['required', 'image','mimes:jpeg,png,jpg,gif,svg', 'max:500000'],\n ]);\n\n $imagePath = request('image')->store('uploads', 'public');\n\n $image = Image::make(public_path(\"storage/{$imagePath}\"))->fit(1200, 1200);\n $image->save();\n $city = Auth::user()->city;\n\n auth()->user()->posts()->create([\n 'caption' => $data['caption'],\n 'image' => $imagePath,\n 'price' => $data['price'],\n 'city' => $city,\n ]);\n\n //user is redirected to their profile\n return redirect('/profile/' . auth()->user()->id);\n }", "public function store(Request $request)\n {\n $personal=new Personal();\n\n $file = $request->file('file');\n //extraccion de los datos del archivo\n $extension = $file->getClientOriginalExtension();\n $name='personal_'.date('Ymd').time();\n $fileName = $name.'.'.$extension;\n\n $img = Storage::disk('imgDisk')->put($fileName,\\File::get($file)); \n\n $personal->file_name=$name;\n $personal->file_ext=$extension;\n\n $personal->nombres=$request->nombres;\n $personal->apellidos=$request->apellidos;\n $personal->cedula=$request->cedula;\n $personal->titulo=$request->titulo;\n $personal->cargo=$request->cargo;\n $personal->telefono=$request->telefono;\n $personal->estado_del=\"A\";\n $personal->save();\n return redirect('/personal_form');\n }", "public function upload()\n\t{\n\t\t$field \t\t = $this->getUploadField();\n\t\t$newName \t = $this->getUploadNewName();\n\t\t//$destination = 'assets/images/location';\t\n\t\t$destination = $this->getUploadDestination();\n\n\t\tif (\\Input::hasFile($field))\n\t\t{\n\t\t \\Input::file($field)->move($destination, $newName);\n\t\t}\n\t\t\n\t\t$this->entity->fill([$field => $newName]);\n\t\t$this->entity->save();\n\n\t\treturn true;\n\t}", "public function store(Request $request)\n {\n if ($request->hasFile('file_name')) {\n if ($request->file('file_name')->isValid()) {\n \n\n \n $filename=$request->file('file_name')->getClientOriginalName();\n $filesize=$request->file('file_name')->getClientSize();\n $request->file_name->storeAs('public/images',$filename);\n\n/* $path = $request->file_name->path();*/\n\n/*$extension = $request->file_name->extension();*/\n/*$path = $request->file_name->storeAs('public/images','sunil.jpg');*/\n//$request->session()->flash('message', 'Thanks for uploading');\n/*return back();//->with('message', 'Thanks for uploading');*/\n $file =new Fileupload();\n $file->file_name=$filename;\n $file->file_size=$filesize;\n $file->save();\n $request->session()->flash('message', 'Thanks for uploading');\n return back();//->with('message', 'Thanks for uploading');\n\n}\n \n}\n }", "public function store(SliderPostRequest $request)\n {\n if($request->status){\n $this->status = 1;\n }\n try{\n if ($request->hasFile('img_url')) {\n\n $fileName =$request->img_url->store('/images');\n\n $slider = new Slider();\n\n $slider->name = $request->name;\n $slider->img_url = $fileName;\n $slider->status =$this->status ;\n /* $slider->created_by = Sentinel::getUser()->id;\n $slider->updated_by= Sentinel::getUser()->id;*/\n $slider->created_by =95;\n $slider->updated_by=95;\n $slider->saveOrFail();\n\n Input::file('img_url')->move('images/', $fileName); // uploading file to given path\n Session::flash('info', 'Upload successfully');\n return Redirect::back();\n\n }else{\n Session::flash('danger', 'uploaded file is not valid');\n return Redirect::back();\n }\n }catch (Exception $e){\n // sending back with error message.\n Session::flash('danger', $e);\n return Redirect::back();\n\n }\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $filename = substr( md5(rand()), 0, 15).'.'.$this->getFile()->guessExtension();\n // move takes the target directory and then the\n // target filename to move to\n\n\n\t\t\t\tif(!file_exists($this->getUploadRootDir())) mkdir($this->getUploadRootDir(), 0777, true);\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n\n $image = time().'.'.$request->img->extension();\n\n $request->img->move(public_path('images'), $image);\n\n\n Image::create([\n 'title'=>$request['title'],\n 'desc'=>$request['desc'],\n 'img'=>$image,\n\n\n ]);\n\n return redirect()->route('image.index')->with('success','successfully done');\n\n }", "public function uploads() {\n $this->Authorization->authorize($this->Settings->newEmptyEntity(), 'create');\n if ($this->request->is(\"Ajax\")) {\n $is_dest = \"img/tmp/\";\n if (!file_exists($is_dest)) {\n //mkdir($is_dest, 0777, true);\n $dir = new Folder(WWW_ROOT . 'img/tmp/', true, 0755);\n $is_dest = $dir->path;\n }\n $fileData = $this->request->getData('file');\n if (strlen($fileData->getClientFilename()) > 1) {\n $ext = pathinfo($fileData->getClientFilename(), PATHINFO_EXTENSION);\n $allowedExt = array('gif', 'jpeg', 'png', 'jpg', 'tif', 'bmp', 'ico');\n if ($this->request->getData('allow_ext')) {\n $allowedExt = explode(\",\", $this->request->getData('allow_ext'));\n }\n if (in_array(strtolower($ext), $allowedExt)) {\n $upload_img = $fileData->getClientFilename();\n $ran = time();\n $upload_img = $ran . \"_\" . $fileData->getClientFilename();\n if (strlen($upload_img) > 100) {\n $upload_img = $ran . \"_\" . rand() . \".\" . $ext;\n }\n $upload_img = str_replace(' ', '_', $upload_img);\n $fileData->moveTo($is_dest . $upload_img);\n $data['filename'] = $upload_img;\n $data['image_path'] = $this->request->getAttribute(\"webroot\") . \"img/tmp/\" . $upload_img;\n $data['success'] = true;\n $data['message'] = \"file successfully uploaded!\";\n } else {\n $data['success'] = false;\n $data['message'] = \"invalid file type!\";\n }\n } else {\n $data['success'] = false;\n $data['message'] = \"invalid file!\";\n }\n }\n $this->set($data);\n $this->viewBuilder()->setOption('serialize', ['filename', 'image_path','success', 'message']);\n }", "public function store(Request $request)\n {\n //validator//\n $validation = Validator::make($request->all(), [\n 'userfile' => 'required|image|mimes:jpeg,png|min:1|max:250'\n ]);\n\n //check if it fail//\n if ($validation->fails()){\n return redirect()->back()->withInput()->with('errors', $validation->errors());\n }\n\n $image = new Image;\n\n //upload image//\n $file = $request->file('userfile');\n $destination_path = 'uploads/';\n $filename = str_random(6).'_'.$file->getClientOriginalName();\n $file->move($destination_path, $filename);\n\n //save path image to db//\n $image->file = $destination_path . $filename;\n $image->caption = $request->input('caption');\n $image->save();\n\n return Redirect::to('articles/'.$request->article_id)->with('message','You just uploaded an image !');\n }", "public function store(Request $request){\n \n if ($request->hasFile('image')){\n\n $filenamewithextension = $request->image->getClientOriginalName();\n $filename = pathinfo($filenamewithextension, PATHINFO_FILENAME);\n $extension = $request->image->getClientOriginalExtension();\n $filenametostore = $filename.'_'.time().'.'.$extension;\n $request->image->storeAs('public/img/', $filenametostore);\n //$smallthumbnail = \"_small_\".$filename.'_'.time().'.'.$extension;\n //$smallthumbnailpath = public_path('storage/img/'.$smallthumbnail);\n //$this->createThumbnail($smallthumbnailpath,150,93);\n //$request->image->storeAs('storage/img/', $smallthumbnail);\n\n return response()->json(array('nomeArquivo'=>$filenametostore));\n\n } else{\n //return response()->json(array('nomeArquivo' => 'arquivo não recebido'));\n } \n\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'uploadedFile' => 'required|mimes:jpeg,png,jpg'\n ]);\n \n $file = $request->file('uploadedFile');\n \n if (!$file->isValid()) {\n return JsonService::jsonError('Sorry! The file was not uploadded!');\n }\n\n $filePath = $file->store('/files/images', 'public');\n $this->imageService->createThumbnails($filePath, [200, 500, 800]);\n $fileId = File::create([\n 'originalName' => $file->getClientOriginalName(),\n 'pathToFile' => $filePath,\n 'mimeType' => $file->getClientMimeType(),\n 'user_id' => auth()->id(),\n ])->id;\n \n return JsonService::jsonSuccess(\n 'File was uploaded successfully',\n $this->imageService->getInfoForImage(File::findOrFail($fileId))\n );\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required|string',\n 'sub_title' => 'required|string', \n 'description' => 'required|string', \n 'big_img' => 'required|image', \n 'sm_img' => 'required|image', \n 'client' => 'required|string', \n 'category' => 'required|string' \n ]);\n\n $protfolios= new Protfolio;\n $protfolios->title=$request->title;\n $protfolios->sub_title=$request->sub_title;\n $protfolios->description=$request->description;\n $protfolios->client=$request->client;\n $protfolios->category=$request->category;\n\n $big_file = $request->file('big_img');\n Storage::putFile('public/img/', $big_file);\n $protfolios->big_img =\"storage/img/\".$big_file->hashName();\n\n $sm_file = $request->file('sm_img');\n Storage::putFile('public/img/', $sm_file);\n $protfolios->sm_img =\"storage/img/\".$sm_file->hashName();\n\n $protfolios->save();\n return redirect()->route('admin.protfolios.create')->with('success', \"New Protfolio Create successfully\");\n\n\n\n }", "public function store(CarruselRequest $request)\n {\n $carrusel = new Carrusel;\n\n $carrusel->file = $request->file;\n $carrusel->title = $request->title;\n $carrusel->description = $request->description;\n \n\n $carrusel->save();\n\n\n //IMAGE\n if($request->file('file')){\n $path = Storage::disk('public')->put('image', $request->file('file'));\n $carrusel->fill(['file' => asset($path)])->save();\n }\n\n return redirect()->route('carrusels.index')->with('info', 'La imagen fue guardada en el carrusel.');\n }", "public function publicUpload()\n {\n $this->request->validate([\n $this->inputName => $this->extensions,\n ]);\n\n if ($uploadedFile = $this->request->file($this->inputName))\n {\n $fileName = time() . $uploadedFile->getClientOriginalName();\n $uploadedFile->move(uploadedImagePath() . DIRECTORY_SEPARATOR . $this->path, $fileName);\n $filePath = uploadedImagePath() . DIRECTORY_SEPARATOR . $this->path . DIRECTORY_SEPARATOR .$fileName;\n $image = $this->modelName::create(['name' => $fileName, 'path' => $filePath]);\n return $image->id;\n }\n\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\n\t\t$image = new Photo();\n\t\t$image->user_id \t= $input['user_id'];\n\t\t$image->fileName \t= $input['fileName']->getClientOriginalName();\n\t\t$image->title \t\t= $input['title'];\n\t\t\n\t\tif($image->save()){\n\t\t\t\n\t\t\t$path = user_photos_path();\n\n\t\t\t$move_image = Image::make($input['fileName']->getRealPath());\n\n\t\t\tFile::exists($path) or File::makeDirectory($path);\n\n\t\t\t$move_image->save($path.$image->fileName)\n\t\t\t\t\t->resize(200,200)\n\t\t\t\t\t->greyscale()\n\t\t\t\t\t->save($path. 'tn-'.$image->fileName);\n\n\t\t\treturn Redirect::to('photos');\t\n\t\t}else{\n\t\t\treturn Ridirect::to('photos.create');\n\t\t}\n\t\n\t}", "public function store(Request $request)\n {\n $validated = $request->validate([\n 'name' => 'required',\n 'designation' => 'required',\n 'description' => 'required',\n 'image' => 'required',\n \n ]);\n $testimonial = $request->file('image');\n $name_gen = hexdec(uniqid()).'.'.$testimonial->getClientOriginalExtension();\n Image::make($testimonial)->resize(1920,1088)->save('image/testimonial/'.$name_gen);\n $last_img = 'image/testimonial/'.$name_gen;\n\n \n Testimonial::insert([\n 'name' => $request->name,\n 'designation' => $request->designation,\n 'description' => $request->description,\n 'image' => $last_img,\n 'created_at' => Carbon::now()\n ]);\n toast(' Successfully','success');\n return redirect()->route('testimonial.index');\n }", "public function store(ImageRequest $request)\n {\n $img = new Image();\n $img->title = $request->title;\n $img->album_id = $request->album_id;\n if (request()->hasFile('image')) {\n $file = request()->file('image');\n $extension =$file->getClientOriginalExtension();\n }\n\n\n\n if($request->hasFile('image'))\n {\n $files = $request->file('image');\n foreach ($files as $file) {\n $file->store('users/' . $this->user->id . '/messages');\n\n\n $fileName = $file->store('image', ['disk' => 'uploads']);\n $img->path = $fileName;\n }\n }\n\n\n\n\n\n\n\n \n $img->save();\n return redirect()->route('image.index')->with(['success' => 'Image added successfully.']);\n }", "public function store(Request $request)\n {\n //\n $title = $request->input('title');\n $author = $request->input('author');\n $price = $request->input('price');\n $publisher = $request->input('publisher');\n $file = $request->file('image');\n $image = $file->getClientOriginalName();\n\n $destinationPath = 'uploads';\n \n\n $book = new Library();\n\n $book->title = $title;\n $book->author = $author;\n $book->price = $price;\n $book->publisher = $publisher;\n $book->image = $file;\n\n $book->save();\n $id = $book->id;\n $filename = \"image\".$id.\".jpeg\";\n // echo $filename;\n //rename($image,$filename);\n $file->move($destinationPath,$filename);\n $book->image = $filename;\n $book->save();\n return Redirect::to('library');\n }", "public function store(Request $request)\n {\n\n //dd($request);\n\n if(Auth::check()){\n\n $categorias= DB::table('categorias')->select('nome_categoria', 'id_categoria')->get();\n\n $validatedData = $request->validate([\n 'title'=> 'bail|required|max:40',\n 'select_categoria' => 'bail|required',\n 'descricao' => 'required|max:255',\n 'select_dificuldade'=>'required',\n 'content' => 'required',\n 'file'=>'required'\n\n ]);\n $user = Auth::user();\n\n $min =0;\n $max =99999;\n $random=rand ( $min , $max );\n\n $fileOriginalName= $request->file('file')->getClientOriginalName();\n\n\n $img_capa =$random.\"_Tutorial_\".$user->id.\".\".File::extension($fileOriginalName);\n\n $filecontents= file_get_contents($validatedData[\"file\"]);\n\n $file=Storage::disk('public')->put('Tutoriais_img_capa/'.$img_capa, $filecontents);\n $path = storage_path();\n\n //not working\n //$filemove=File::move($path.\"/Tutoriais_img_capa/\".$fileOriginalName, $path.\"/Fotos_utilizadores/\".$img_capa);\n\n\n //percisa de um try catch\n\n\n $tutorial = new Tutorial();\n\n $tutorial->titulo =$validatedData[\"title\"];\n $tutorial->id_categoria =$validatedData[\"select_categoria\"];\n $tutorial->id_utilizador = $user->id;\n $tutorial->descricao =$validatedData[\"descricao\"];\n $tutorial->content =$validatedData[\"content\"];\n $tutorial->img_capa =$img_capa;\n $tutorial->dificuldade =$validatedData[\"select_dificuldade\"];\n\n $inserted= $tutorial->save();\n//\n// $inserted= DB::table('tutorials')->insert(\n// ['id_categoria' => $validatedData[\"select_categoria\"],\n// 'titulo'=>$validatedData[\"title\"],\n// 'id_utilizador'=>$user->id,\n// 'descricao' => $validatedData[\"descricao\"],\n// 'img_capa'=>$img_capa\n// ,'content'=>$validatedData[\"content\"]]\n// );\n// $inserted->save();\n\n\n Session::flash(\"message\",\"Tutorial Novo Adicionado!!\");\n return view(\"tutoriais.templateInserirTutorial\",\n [\"inserted\"=> $inserted,\"categorias\" => $categorias]);\n\n\n\n }\n return view(\"pages.error\");\n }", "public function store()\n {\n $file = ['slider_name' => Input::file('slider_name')];\n $rules = array(\n 'slider_name'=>'required|mimes:jpg,jpeg,png'\n );\n $validator = Validator::make($file, $rules);\n if($validator->fails()){\n $messages = $validator->messages();\n return redirect('slider/create')->withErrors($validator);\n }else{\n $destinationPath = public_path().'/images/slider';\n $extension = Input::file('slider_name')->getClientOriginalExtension();\n $fileName = Carbon::now()->format('Y-m-d').rand(11111,99999).'.'.$extension;\n Input::file('slider_name')->move($destinationPath, $fileName);\n $file = ['slider_name' => $fileName];\n Slider::create($file);\n return redirect('slider/index');\n }\n }", "public function uploadAction()\n {\n $logedUser = $this->getServiceLocator()\n ->get('user')\n ->getUserSession();\n $permission = $this->getServiceLocator()\n ->get('permissions')\n ->havePermission($logedUser[\"idUser\"], $logedUser[\"idWebsite\"], $this->moduleId);\n if ($this->getServiceLocator()\n ->get('user')\n ->checkPermission($permission, \"edit\")) {\n $request = $this->getRequest();\n if ($request->isPost()) {\n // Get Message Service\n $message = $this->getServiceLocator()->get('systemMessages');\n \n $files = $request->getFiles()->toArray();\n $temp = explode(\".\", $files[\"file\"][\"name\"]);\n $newName = round(microtime(true));\n $newfilename = $newName . '.' . end($temp);\n $image = new Image();\n $image->exchangeArray(array(\n \"website_id\" => $logedUser[\"idWebsite\"],\n \"name\" => $newName,\n \"extension\" => end($temp)\n ));\n if ($image->validation()) {\n if (move_uploaded_file($_FILES[\"file\"][\"tmp_name\"], \"public/files_database/\" . $logedUser[\"idWebsite\"] . \"/\" . $newfilename)) {\n $result = $this->getImageTable()->saveImage($image);\n $message->setCode($result);\n // Log\n $this->getServiceLocator()\n ->get('systemLog')\n ->addLog(0, $message->getMessage(), $message->getLogPriority());\n die('uploadSucess');\n } else {\n die('uploadError');\n }\n } else {\n die('Invalid extension');\n }\n }\n die(\"forbiden\");\n } else {\n die(\"forbiden - without permission\");\n }\n }", "public function upload()\n {\n\n if (null == $this->fichier)\n {\n return;\n }\n\n if ($this->oldFichier)\n {\n // suppression de l'ancienne image\n if (file_exists($this->getUploadRootDir() . '/' . $this->oldFichier))\n {\n unlink($this->getUploadRootDir() . '/' . $this->oldFichier);\n }\n\n\n // suppression des anciens thumbnails\n foreach ($this->thumbnails as $key => $thumbnail)\n {\n if (file_exists($this->getUploadRootDir() . '/' . $key . '-' . $this->oldFichier))\n {\n unlink($this->getUploadRootDir() . '/' . $key . '-' . $this->oldFichier);\n }\n\n }\n }\n\n //$date = new \\DateTime('now');\n\n //$nameImage = $date->format('YmdHis') . '-' . $this->fichier->getClientOriginalName();\n //$extension = $this->fichier->guessExtension();\n //$nameImage = str_replace(' ', '-', $this->alt) . uniqid();\n\n // move (param 1 chemin vers dossier, param 2 nom image)\n\n //$this->name = $nameImage . \".\" . $extension;\n\n $this->fichier->move(\n $this->getUploadRootDir(),\n $this->name\n //$nameImage . \".\" . $extension\n );\n\n //$imagine = new \\Imagine\\Gd\\Imagine();\n\n /*$imagine\n ->open($this->getAbsolutePath())\n ->thumbnail(new \\Imagine\\Image\\Box(350, 160))\n ->save(\n $this->getUploadRootDir().'/' .\n $nameImage . '-thumb-small.' . $extension);*/\n\n $imagine = new \\Imagine\\Gd\\Imagine();\n $imagineOpen = $imagine->open($this->getAbsolutePath());\n\n foreach ($this->thumbnails as $key => $thumbnail)\n {\n $size = new \\Imagine\\Image\\Box($thumbnail[0], $thumbnail[1]);\n $mode = \\Imagine\\Image\\ImageInterface::THUMBNAIL_INSET;\n \n $imagineOpen->thumbnail($size, $mode)\n ->save($this->getUploadRootDir() . '/' . $key . '-' . $this->name);\n }\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n \n\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n $filename = time().'_'.$this->getFile()->getClientOriginalName();\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::$SERVER_PATH_TO_VIDEO_FOLDER,\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload($file, $local_file);", "public function store()\n\t{\n $file = Request::file('file');\n if($file) {\n $name = $file->getClientOriginalName();\n Request::file('file')->move('images/lenses', $name);\n return 'true';\n }else{\n $input = Request::all();\n $input['image'] = '/images/lenses/'.$input['file'];\n return Lense::create($input);\n }\n\t}", "public function storeImage($request, $fileKey, $fileName, $path) {\n\n if($request->hasFile($fileKey)){\n\n //get the file from the profile_image request...\n $image = $request->file($fileKey);\n\n //move the file to correct location\n $image->move($path, $fileName);\n\n }\n\n else {\n return false;\n }\n\n\n\n }", "public function store(Request $request) {\n \n // file validation\n $validator = Validator::make($request->all(),\n ['filename' => 'required|mimes:jpeg,png,jpg,bmp|max:2048']);\n \n // if validation fails\n if($validator->fails()) {\n return Alert::info('Imagen', 'Fallo en validacion de imagen');\n }\n \n // if validation success\n if($file = $request->file('filename')) {\n\n $name = $file->getClientOriginalName();\n \n $target_path = public_path('../resources/img/cartas/');\n \n if($file->move($target_path, $name)) { \n return Alert::info('Imagen', 'Imagen subida correctamente');\n }\n }\n /*\n $name = $request->file('filename')->getClientOriginalName();\n //$extension = $request->file('filename')->extension();\n\n //Storage::putFileAs('filename', new File('./../resources/img/cartas'), $name);\n\n //Storage::disk('local')->put($name, 'Contents');\n\n //$path = Storage::putFile('./resources/img/cartas', $request->file('filename'));\n //$path = Storage::putFileAs('./resources/img/cartas', $request->file('filename'), $name);\n //$path = $request->file('filename')->store('./resources/img/cartas');\n $target_path = public_path('../resources/img/cartas/');\n\n $request->file('filename')->move($target_path, $name);\n\n echo('imagen subida corectamente');\n */\n\n /**\n * $fileName = $request->file->getClientOriginalName();\n * $request->file->move(public_path('../resources/img/cartas'), $fileName);\n */\n\n /**\n * $data = request()->validate([\n * 'name' => 'required',\n * 'email' => 'required|email',\n * 'message' => 'required',\n * ]);\n */\n }", "public function store(Request $request)\n {\n $this->validate($request,[\n 'title'=>'required|string',\n 'sub_title'=>'required|string',\n 'big_image'=>'required|image',\n 'small_image'=>'required|image',\n 'description'=>'required|string',\n 'client'=>'required|string',\n 'category'=>'required|string',\n\n\n ]);\n $portfolios=new Portfolio;\n $portfolios->title=$request->title;\n $portfolios->sub_title=$request->sub_title;\n $portfolios->description=$request->description;\n $portfolios->client=$request->client;\n $portfolios->category=$request->category;\n\n $big_file=$request->file('big_image');\n Storage::putFile('public/img/',$big_file);\n $portfolios->big_image=\"storage/img/\".$big_file->hashName();\n\n\n $small_file=$request->file('small_image');\n Storage::putFile('public/img/',$small_file);\n $portfolios->small_image=\"storage/img/\".$small_file->hashName();\n\n\n\n $portfolios->save();\n return redirect()->route('admin.portfolios.create')->with('success','New portfolio created successfully');\n }", "public static function addImg($myId){\n if ($_FILES[\"pic\"][\"error\"] > 0) {\n echo \"Return Code: \" . $_FILES[\"pic\"][\"error\"] . \"<br>\";\n } else {\n$conn = init_db();\n$url = uniqid();\n$sql='insert into images (u_id, url, ups) values ('.$myId.', \\''.$url.'.jpg\\', 0)';\n$res = mysqli_query($conn,$sql) or die(mysqli_error($conn).'failed query:'.__LINE__);\n$dest = __DIR__.\"/../img/usr/\" . $url.'.jpg';\necho 'moved to '.$dest;\nmove_uploaded_file($_FILES[\"pic\"][\"tmp_name\"],\n $dest);\n}\n}", "public function store(Request $request)\n {\n\n \n $team = $request->file('image');\n $name_gen = hexdec(uniqid()).'.'.$team->getClientOriginalExtension();\n Image::make($team)->resize(1920,1088)->save('image/team/'.$name_gen);\n $last_img = 'image/team/'.$name_gen;\n\n \n Team::insert([\n 'name' => $request->name,\n 'designation' => $request->designation,\n 'image' => $last_img,\n 'created_at' => Carbon::now()\n ]);\n toast(' Successfully','success');\n return redirect()->route('team.index');\n }", "public function store(Request $request)\n {\n $lastinsertedid=logo::insertGetId([\n 'image' => 'default.php',\n 'created_at'=>Carbon::now()\n ]);\n\n \n if ($request->hasFile('image')) {\n $main_photo=$request->image;\n $imagename=$lastinsertedid.\".\".$main_photo->getClientOriginalExtension();\n \n // $ami = app_path('store.gochange-tech.com/uploads/products_images/'.$imagename);\n // dd($ami);\n Image::make($main_photo)->resize(400, 450)->save(base_path('public/upload/logo/'.$imagename));\n\n logo::find($lastinsertedid)->update([\n 'image'=>$imagename\n ]);\n }\n\n return back();\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n $post = new Post();\n $post->title = $request->title;\n if($request->get('image'))\n {\n $file = $request->get('image');\n $name = time().'.' . explode('/', explode(':', substr($file, 0, strpos($file, ';')))[1])[1];\n \\Image::make($request->get('image'))->save(public_path('images/').$name); \n $post->image = $name;\n }\n\n //$post->save();\n\n // return response()->json(['success' => 'You have successfully uploaded an image'], 200); \n }", "public function store(Request $request)\n {\n if ($request->hasFile('image')) {\n // Let's do everything here\n if ($request->file('image')->isValid()) {\n //\n $validated = $request->validate([\n 'name' => 'string|max:40',\n 'image' => 'mimes:jpeg,png|max:1014',\n ]);\n $extension = $request->image->extension();\n $request->image->storeAs('/public', $validated['name'].\".\".$extension);\n $url = Storage::url($validated['name'].\".\".$extension);\n $file = File::create([\n 'name' => $validated['name'],\n 'url' => $url,\n ]);\n Session::flash('success', \"Success!\");\n return Redirect::back();\n }\n }\n abort(500, 'Could not upload image :(');\n }", "public function store(Request $request)\n { \n \n\n if($request->hasFile('image') && $request->file('image')->isValid()){\n\n $requestImage = $request->image;\n\n $extencao = $requestImage->extension();\n\n $imageName = md5($requestImage.strtotime(\"now\"));\n\n $requestImage->move(public_path('img/teste'), $imageName);\n \n Movel::create([\n 'tipo' => $request->tipo,\n 'descricao' => $request->descricao,\n 'foto' => $imageName,\n 'user_id'=>Auth::user()->id,\n ]);\n // var_dump($request->tipo,$request->descricao,$imageName);\n }\n return redirect('dashboard');\n }", "function uploadFile($name) {\r\n // Gets the paths, full and local directory\r\n global $image_dir, $image_dir_path;\r\n if (isset($_FILES[$name])) {\r\n // Gets the actual file name\r\n $filename = $_FILES[$name]['name'];\r\n if (empty($filename)) {\r\n return;\r\n }\r\n // Get the file from the temp folder on the server\r\n $source = $_FILES[$name]['tmp_name'];\r\n // Sets the new path - images folder in this directory\r\n $target = $image_dir_path . '/' . $filename;\r\n // Moves the file to the target folder\r\n move_uploaded_file($source, $target);\r\n // Send file for further processing\r\n processImage($image_dir_path, $filename);\r\n // Sets the path for the image for Database storage\r\n $filepath = $image_dir . '/' . $filename;\r\n // Returns the path where the file is stored\r\n return $filepath;\r\n }\r\n }", "public function save2(Request $request){\n $file = $request->file('file2');\n \n //obtenemos el nombre del archivo\n $nombre = $file->getClientOriginalName();\n //print_r($nombre);\n \n \n Storage::disk('local')->put('logo2.PNG', \\File::get($file));\n \n return Response::json(['response' => 'Actualizado correctamente'],200);\n }", "public function store(Request $request)\n {\n\n $file = $request->file('image');\n $imginame = 'category_' . time() . '.' .$file->getClientOriginalExtension();\n //El public_path nos ubica en la carpeta public del proyecto\n $path = public_path() . '/img/categories/';\n //La funcion move nos los guarda en la carpeta declarada en el path\n $file->move($path,$imginame);\n\n\n $category = new category($request->all());\n $category->image = $imginame;\n $category->save();\n return redirect()->route('categories.index')-> with('mensaje',\"Se ha registrado la categoria $category->name correctamente \");\n }", "public function create(Request $request)\n {\n \n $file_name = $this->saveImage($request->file,'gallery');\n\n $gallery = new gallery();\n \n $gallery->url = $file_name;\n \n $gallery->save();\n \n return redirect()->back()->with(['sucess'=>'image successfully added']); \n\n \n }", "public function store(Request $request)\n {\n $name=$request['name'];\n $testimonial=$request['testimonial'];\n $type=$request['media_type'];\n if($request->hasFile('img_name'))\n { \n $file=$request->file('img_name'); \n $imagename=$file->getClientOriginalName();\n $path_img=$file->storeAs('public/','img'.time().$imagename);\n $img_name=str_replace('public/', '', $path_img);\n $testimonial1= Testimonial::testimonial_create($name,$testimonial,$img_name,$type);\n return redirect('/admin/testimonial/index');\n } \n\n return redirect('/admin/testimonial/index');\n }", "public function store(Request $request)\n {\n\n// $imageName = time() . '-' . preg_match_all('/data\\:image\\/([a-zA-Z]+)\\;base64/',$request->photo,$matched).'.jpg';\n $imageName = time() . '.' . explode('/',explode(':', substr($request->photo, 0, strpos($request->photo, ';')))[1])[1];\n \\Image::make($request->photo)->save(public_path('/assets/uploaded_images/'). $imageName);\n// dd($imageName);\n\n $contact = new Contact();\n $contact->name = $request->name;\n $contact->email = $request->email;\n $contact->position = $request->position;\n $contact->company = $request->company;\n $contact->phone = $request->phone;\n $contact->subject = $request->subject;\n $contact->photo = $imageName;\n $contact->save();\n }" ]
[ "0.7209419", "0.71458685", "0.71009463", "0.7038677", "0.7014978", "0.7011861", "0.6907889", "0.68815935", "0.687421", "0.6851589", "0.6828855", "0.68120307", "0.67946845", "0.67556983", "0.67533976", "0.6738893", "0.6737136", "0.6736024", "0.6725347", "0.67041004", "0.6699532", "0.66952276", "0.66831857", "0.6681011", "0.6672558", "0.6662765", "0.6649938", "0.6631819", "0.66295296", "0.6627401", "0.66271156", "0.66196835", "0.6619012", "0.66135967", "0.6608324", "0.66033554", "0.65931475", "0.6550966", "0.6540967", "0.6536795", "0.65345895", "0.65304667", "0.65298724", "0.65235513", "0.6521603", "0.6515271", "0.6511248", "0.6502627", "0.6490096", "0.6480974", "0.6478102", "0.6474502", "0.64711714", "0.6465774", "0.64600056", "0.64591765", "0.6459059", "0.6455681", "0.64542824", "0.6454273", "0.64529926", "0.6451664", "0.64502335", "0.6440114", "0.6437682", "0.6437302", "0.6426557", "0.64193946", "0.641862", "0.6416667", "0.64162076", "0.6410757", "0.6392746", "0.6388635", "0.6388393", "0.6387017", "0.63863295", "0.6381644", "0.63745594", "0.63730323", "0.6371473", "0.6369523", "0.6367562", "0.6364049", "0.636288", "0.63599855", "0.63598895", "0.6350644", "0.6350644", "0.6350644", "0.6350644", "0.63477814", "0.6341514", "0.634078", "0.6340389", "0.63402504", "0.6339549", "0.6336429", "0.63344383", "0.63292265" ]
0.65134645
46
Takes uploaded file, stores it in the local storage and saves image in the database
public function storeForArticleGallery(UploadedFile $file, Article $project){ //TODO write image to the local storage }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n Image::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->path\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload()\n\t{\n\t if (null === $this->getFile()) {\n\t return;\n\t }\n\t\n\t // use the original file name here but you should\n\t // sanitize it at least to avoid any security issues\n\t\n\t // move takes the target directory and then the\n\t // target filename to move to\n\t \n\t $this->getFile()->move($this->getWebPath(),$this->imagen);\n\t \n\t \n\t // set the path property to the filename where you've saved the file\n\t $this->path = $this->getFile()->getClientOriginalName();\n\t\t//$this->temp = \n\t // clean up the file property as you won't need it anymore\n\t $this->file = null;\n\t}", "public function upload() {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->avatar)\n {\n return;\n }\n\n //Lastname du fichier\n $file = $this->id_user.'.'.$this->avatar->guessExtension();\n // move takes the target directory and then the target filename to move to\n $this->avatar->move($this->getUploadRootDir(), $file);\n //Suppression des thumbnail déjà en cache\n @unlink(__DIR__.'/../../../../../web/imagine/thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/avatar_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/moyen_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/mini_thumbnail/avatars/'.$file);\n\n // set the path property to the filename where you'ved saved the file\n $this->avatar = $file;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // if there is an error when moving the file, an exception will\n // be automatically thrown by move(). This will properly prevent\n // the entity from being persisted to the database on error\n $this->getFile()->move($this->getUploadRootDir(), $this->fileName);\n\n // check if we have an old image\n if (isset($this->temp)) {\n // delete the old image\n unlink($this->getUploadRootDir().'/'.$this->temp);\n // clear the temp image path\n $this->temp = null;\n }\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getImg()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getImg()->move(\n self::SERVER_PATH_TO_PRESS_IMAGE_FOLDER,\n $this->getImg()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->imageUrl = $this->getImg()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setImg(null);\n }", "public function upload()\n {\n if (null === $this->image) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the target filename to move to\n $this->file->move($this->getUploadRootDir(), $this->image->getClientOriginalName());\n\n // set the path property to the filename where you'ved saved the file\n $this->path = $this->image->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->backgroundImage = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function savetheuploadedfile() {\n\t\t$public_dir = 'public/images/';\n\t\t$baseurl = base_url();\n\t\tif ($_FILES['file']['name']) {\n\t\t\t\tif (!$_FILES['file']['error']) {\n\t\t\t\t\t\t$name = md5(rand(100, 200));\n\t\t\t\t\t\t$ext = explode('.', $_FILES['file']['name']);\n\t\t\t\t\t\t$filename = $name . '.' . $ext[1];\n\t\t\t\t\t\t$destination = $public_dir . $filename; //change path of the folder...\n\t\t\t\t\t\t$location = $_FILES[\"file\"][\"tmp_name\"];\n\t\t\t\t\t\tmove_uploaded_file($location, $destination);\n\t\t\t\t\t\t// echo $destination;\n\n\t\t\t\t\t\techo $baseurl.'/public/images/' . $filename;\n\t\t\t\t} else {\n\t\t\t\t\t\techo $message = 'The following error occured: ' . $_FILES['file']['error'];\n\t\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function upload(){\n if( NULL === $this->getFile()){\n return;\n }\n $filename= $this->getFile()->getClientOriginalName();\n\n // Move to the target directory\n \n $this->getFile()->move(\n $this->getAbsolutePath(), \n $filename);\n\n //Set the logo\n $this->setFilename($filename);\n\n $this->setFile();\n\n }", "public function upload(): void\n {\n // check if we have an old image\n if ($this->oldFileName !== null) {\n $this->removeOldFile();\n }\n\n if (!$this->hasFile()) {\n return;\n }\n\n $this->writeFileToDisk();\n\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n $this->picture = file_get_contents($this->getFile());\n\n if (isset($this->temp)) {\n $this->temp = null;\n }\n\n $this->file = null;\n }", "public function upload(): void\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload()\n{\n if(null === $this->getFile())\n {\n return;\n }\n\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n $this->filename =$this->getFile()->getClientOriginalName();\n\n $this->setFile(null);\n}", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->id . '.' .$this->ext\n );\n\n // set the ext property to the filename where you've saved the file\n //$this->ext = $this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(){\n $url_path = 'assets/imgs/' . $_FILES['file']['name'];\n move_uploaded_file($_FILES['file']['tmp_name'], $url_path);\n $_POST['url_image'] = $url_path;\n echo parent::register($_POST) ? header('location: ?controller=admin') : 'Error en el registro';\n }", "public function save()\n {\n $this->validate();\n $this->validate(['image' => 'required|image']);\n\n // try to upload image and resize by ImageSaverController config\n try {\n $imageSaver = new ImageSaverController();\n $this->imagePath = $imageSaver->loadImage($this->image->getRealPath())->saveAllSizes();\n }catch (\\RuntimeException $exception){\n dd($exception);\n }\n\n $this->PostSaver();\n\n $this->resetAll();\n $this->ChangeCreatedMode();\n $this->swAlert([\n 'title' => 'Good job',\n 'text' => 'successfully added',\n 'icon' => 'success'\n ]);\n $this->render();\n }", "public function store(Request $request)\n {\n //\n\n $user_id = Auth::id();\n $request->validate([\n\n 'image' => 'required|image|mimes:jpeg,png,jpg,webp|max:2048 '\n ]);\n $directory = public_path('images').'/'.$user_id;\n $imageName = time().'.'.$request->image->extension();\n\n //move the uploaded file to a directory named as user_id\n $saved = $request->image->move($directory, $imageName);\n $imagePath= \"$user_id/$imageName\";\n\n $imageUpload = new imageUpload;\n $imageUpload->name=$imageName;\n $imageUpload->path = \"images/$user_id/$imageName\";\n $imageUpload->user_id= $user_id;\n $imageUpload->save();\n\n return redirect()->route('getajaxupdate',['id' => $user_id])\n ->with('success','You have successfully uploaded image.')\n ->with('image',$imageName)\n ->with('id',$user_id);\n\n\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->setImageName($this->getFile()->getClientOriginalName());\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function storeimage(Request $request)\n {\n $this->authorize('isAdmin');\n if($request->file('file'))\n {\n $image = $request->file('file');\n $name = \"ortm_\".time().'.'.$image->getClientOriginalExtension();\n\n $thumbnailImage = Images::make($image)->resize(200, 200)->save(public_path('/img/ourteam/thumbs/' . $name));\n\n $watermark = Images::make(public_path('/img/watermark.png'));\n $Image = Images::make($image)->insert($watermark, 'bottom-right', 10, 10)->save(public_path('/img/ourteam/' . $name));\n\n //$image->move(public_path().'/img/social/', $name);\n }\n\n $image= new Image();\n $image->image_name = $name;\n $image->save();\n\n return response()->json([\n 'data' => $name\n ], 200);\n }", "public function insertImageToDb() \n {\n }", "public function upload() {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(), $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->photo = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n// use the original file name here but you should\n// sanitize it at least to avoid any security issues\n// move takes the target directory and then the\n// target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n// set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n// clean up the file property as you won't need it anymore\n $this->file = null;\n\n\n }", "public function store(Request $request)\n {\n \n $file = $request->file('file');\n\n\n $name = time() . $file->getClientOriginalName();\n\n $file->move('images', $name);\n\n\n\n Photo::create(['file'=>$name]);\n\n Session::flash('message', 'Photo added!');\n Session::flash('status', 'success');\n\n }", "public function upload(){\n if (null === $this->getProductsFileImage()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getProductsFileImage()->move(\n $this->getUploadRootDir(),\n $this->getProductsFileImage()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getProductsFileImage()->getClientOriginalName();\n $this->productsImage = $this->getProductsFileImage()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->productsFileImage = null;\n }", "public function storeImage(UploadedFile $file)\n {\n $filename = md5(time().$file->getClientOriginalName()).'.'.$file->getClientOriginalExtension();\n $file->move(Config::get('assets.images'),$filename);\n\n $i = new ImageEntry();\n $i->path = $filename;\n $i->uploader = LoginController::currentUser()->id;\n $i->save();\n return $i;\n }", "public function StoreSlider(Request $request)\n {\n\n $slider_image = $request->file('image');\n\n $name_gen = hexdec(uniqid()).'.'.$slider_image->getClientOriginalExtension();\n Image::make($slider_image)->resize(1920,1088)->save('image/slider/'.$name_gen );\n\n $last_img ='image/slider/'.$name_gen;\n\n\n //end upload image\n\n\n Slider::insert([\n 'title' => $request->title,\n 'description' => $request->description,\n 'image'=> $last_img,\n 'created_at'=>Carbon::now(),\n ]);\n\n return redirect()->route('home.slider')->with('success','Slider Inserted successfully');\n }", "public function postUpload()\n\t{\n\t\t$validator = Validator::make(Input::all(), array(\n\t\t\t'file' => 'image'\n\t\t));\n\t\t//kalo ada url make yang url, kalo ngga yang file\n\t\tif ($validator->fails()) {\n\t\t\treturn Redirect::to('/teaser/upload');\n\t\t}\n\n\t\tif (Input::hasFile('file'))\n {\n \t$folder = '/teaser_photo/';\n $path = public_path() . $folder;\n $filename = $original = Input::file('file')->getClientOriginalName();\n $extension = Input::file('file')->getClientOriginalExtension();\n if (File::exists($path . $filename))\n {\n $filename = time() . '_' . $original;\n }\n $file = Input::file('file')->move($path, $filename);\n\t\t\t\n\n\t\t\t$teaser = new Teaser;\n $teaser->teaser = $folder . $filename;\n $teaser->status = 1;\n $teaser->save();\n return Redirect::to('teaser');\n }\n\t}", "public function uploadImage() \n {\n if (is_null($this->image)) {\n return;\n }\n \n // move image from temp directory to destination one\n $this->image->move(\n $this->getUploadRootDir(),\n $this->image->getClientOriginalName()\n );\n\n $this->path = $this->image->getClientOriginalName();\n $this->image = null;\n }", "public function upload(Request $request){\n if($request->hasFile('image')){\n $resorce = $request->file('image');\n $name = $resorce->getClientOriginalName();\n $resorce->move(\\base_path() .\"/public/images\", $name);\n $save = DB::table('images')->insert(['image' => $name]);\n echo \"Gambar berhasil di upload\";\n }else{\n echo \"Error to upload this file\";\n }\n }", "public function store(Request $request)\n {\n\n $fileName = Storage::disk('public')->put('',$request->file('file_name'));\n\n $thumbPath = storage_path('app/public/thumb/').$fileName;\n\n $manager = new ImageManager(array('driver' => 'gd'));\n\n\n $img = $manager->make($request->file_name)->resize(100, 100)->save($thumbPath);\n\n\n\n $file = new File();\n $file->file_name = $fileName;\n $file->save();\n\n return redirect(route('files.index'));\n }", "public function upload(){\n $file = array('image' => Input::file('avatar'));\n // setting up rules\n $rules = array('image' => 'required',); //mimes:jpeg,bmp,png and for max size max:10000\n // doing the validation, passing post data, rules and the messages\n $validator = Validator::make($file, $rules);\n if ($validator->fails()) {\n return redirect()->route('myprofile')->with(['errors' => $validator->errors()]);\n }else{\n // checking file is valid.\n if (Input::file('avatar')->isValid()) {\n $path = 'public/uploads/users/'.Auth::User()->id.'/avatar/';\n Storage::makeDirectory($path, $mode = 0777, true);\n Storage::disk('local')->put($path, Input::file('avatar'));\n $user = Users::find(Auth::User()->id);\n $createdFileName = Storage::files($path);\n $pathFile = str_replace('public/','',$createdFileName[0]);\n $user->avatar = '/storage/'.$pathFile;\n if ($user->save()){\n return redirect()->route('myprofile')->with(['msg' => 'Image was uploaded with success']);\n }\n }else{\n exit('error');\n }\n }\n }", "private function saveImage()\n {\n $name = $_FILES['image']['name'];\n $tmp_name = $_FILES['image']['tmp_name'];\n\n return move_uploaded_file($tmp_name, 'images/' . $name);\n }", "public function store() {\n\n\t\t$file = array('image' => Input::file('image'));\n\t\t// setting up rules\n\t\t$rules = array('image' => 'required|image'); //mimes:jpeg,bmp,png and for max size max:10000\n\t\t// doing the validation, passing post data, rules and the messages\n\t\t$validator = Validator::make($file, $rules);\n\t\tif ($validator->fails()) {\n\t\t\t// send back to the page with the input data and errors\n\t\t\treturn Redirect::to('posts/create')->withInput()->withErrors($validator);\n\t\t} else {\n\t\t\t// checking file is valid.\n\t\t\tif (Input::file('image')->isValid()) {\n\t\t\t\t$destinationPath = 'uploads'; // upload path\n\t\t\t\t$extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n\t\t\t\t$fileName = rand(11111, 99999) . '.' . $extension; // renameing image\n\t\t\t\tInput::file('image')->move($destinationPath, $fileName); // uploading file to given path\n\t\t\t\t// sending back with message\n\t\t\t\tSession::flash('success', 'Upload successfully');\n\t\t\t\treturn Redirect::to('posts/create');\n\n\t\t\t} else {\n\t\t\t\t// sending back with error message.\n\t\t\t\tSession::flash('error', 'uploaded file is not valid');\n\t\t\t\treturn Redirect::to('posts/create');\n\t\t\t}\n\t\t}\n\t}", "public function store(Request $request)\n { \n \n $data=request()->validate([\n 'caption'=>'required',\n 'file'=>'required | image'\n ]);\n\n $imagePath=request('file')->store('uploads','public');\n\n $image=Image::make(public_path(\"storage/$imagePath\"))->fit(1200,1200);\n $image->save();\n\n try{\n auth()->user()->posts()->create([\n 'caption'=>$data['caption'],\n 'image'=>$imagePath\n ]);\n return $this->responseSuccess('Upload Post successfully');\n }catch(Exception $e){\n return $this->responseServerError(\"Server Error.\");\n }\n\n }", "function uploadFile($name)\n{\n // Gets the paths, full and local directory\n global $image_dir, $image_dir_path;\n if (isset($_FILES[$name])) {\n // Gets the actual file name\n $filename = $_FILES[$name]['name'];\n if (empty($filename)) {\n return;\n }\n // Get the file from the temp folder on the server\n $source = $_FILES[$name]['tmp_name'];\n // Sets the new path - images folder in this directory\n $target = $image_dir_path . '/' . $filename;\n // Moves the file to the target folder\n move_uploaded_file($source, $target);\n // Send file for further processing\n processImage($image_dir_path, $filename);\n // Sets the path for the image for Database storage\n $filepath = $image_dir . '/' . $filename;\n // Returns the path where the file is stored\n return $filepath;\n }\n}", "function upload(){\r\n\t\r\n\tvar_dump($_FILES);\r\n\tif(isset($_FILES[\"fileToUpload\"]) && !empty($_FILES[\"fileToUpload\"][\"name\"])){\r\n\t\t$target_dir = \"../pildid/\";\r\n\t\t$target_file = $target_dir . basename($_FILES[\"fileToUpload\"][\"name\"]);\r\n\t\t$uploadOk = 1;\r\n\t\t$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);\r\n\t\t// Check if image file is a actual image or fake image\r\n\t\tif(isset($_POST[\"submit\"])) {\r\n\t\t\t$check = getimagesize($_FILES[\"fileToUpload\"][\"tmp_name\"]);\r\n\t\t\tif($check !== false) {\r\n\t\t\t\t//echo \"File is an image - \" . $check[\"mime\"] . \".\";\r\n\t\t\t\t$uploadOk = 1;\r\n\t\t\t} else {\r\n\t\t\t\techo \"File is not an image.\";\r\n\t\t\t\t$uploadOk = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Check if file already exists\r\n\t\tif (file_exists($target_file)) {\r\n\t\t\techo \"Sorry, file already exists.\";\r\n\t\t\t$uploadOk = 0;\r\n\t\t}\r\n\t\t// Check file size\r\n\t\tif ($_FILES[\"fileToUpload\"][\"size\"] > 500000) {\r\n\t\t\techo \"Sorry, your file is too large.\";\r\n\t\t\t$uploadOk = 0;\r\n\t\t}\r\n\t\t// Allow certain file formats\r\n\t\tif($imageFileType != \"jpg\" && $imageFileType != \"png\" && $imageFileType != \"jpeg\"\r\n\t\t&& $imageFileType != \"gif\" ) {\r\n\t\t\techo \"Sorry, only JPG, JPEG, PNG & GIF files are allowed.\";\r\n\t\t\t$uploadOk = 0;\r\n\t\t}\r\n\t\t// Check if $uploadOk is set to 0 by an error\r\n\t\tif ($uploadOk == 0) {\r\n\t\t\techo \"Sorry, your file was not uploaded.\";\r\n\t\t// if everything is ok, try to upload file\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$target_file = $target_dir.uniqid().\".\".$imageFileType;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif (move_uploaded_file($_FILES[\"fileToUpload\"][\"tmp_name\"], $target_file)) {\r\n\t\t\t\t//echo \"The file \". basename( $_FILES[\"fileToUpload\"][\"name\"]). \" has been uploaded.\";\r\n\t\t\t\t\r\n\t\t\t\t// save file name to DB here\r\n\t\t\t\t$a = new StdClass();\r\n\t\t\t\t$a->name = $target_file;\r\n\t\t\t\treturn $a;\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\treturn \"Sorry, there was an error uploading your file.\";\r\n\t\t\t}\r\n\t\t}\r\n\t}else{\r\n\t\treturn \"Please select the file that you want to upload!\";\r\n\t}\r\n\t\r\n}", "public function upload();", "public function save($value){\n $target_path = IMG_PATH.DS.$this->file_name;\n try {\n //move the uploaded file to target path\n move_uploaded_file($value, $target_path);\n return $this->_add_photo();\n } catch (Exception $e) {\n throw $e;\n }\n }", "public function save()\n {\n\n $photo = $this->flyer->addPhoto($this->makePhoto());\n\n\n // move the photo to the images folder\n $this->file->move($photo->baseDir(), $photo->name);\n\n\n// Image::make($this->path)\n// ->fit(200)\n// ->save($this->thumbnail_path);\n\n // generate a thumbnail\n $this->thumbnail->make($photo->path, $photo->thumbnail_path);\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'image' => 'image|mimes:jpeg,png,jpg,gif|max:2048',\n ]);\n \n if ($request->hasFile('news_image')){\n\n $news_id=$request->news_id;\n $file = $request->file('news_image');\n $extension = $file->getClientOriginalExtension();\n $new_filename = rand(1,100).time().'.'. $extension;\n $location=\"images/news/\";\n //Storage::disk('public')->put($location.$new_filename, File::get($file));\n\n if (!file_exists(public_path($location))) \n File::makeDirectory(public_path($location));\n\n Image::make($file)->save(public_path($location.$new_filename));\n\n\n $newsImage = new Photo;\n $newsImage->filename=$location.$new_filename;\n $newsImage->mime=$file->getClientMimeType();\n $newsImage->original_filename=$file->getClientOriginalName();\n \n $newsImage->save();\n\n $news=News::find($news_id);\n $news->Photos()->attach($newsImage->id);\n return redirect(route('news.show',$news_id))->with('success','Image uploaded successfully!');\n }\n else\n return back();\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $partes_ruta = pathinfo($this->getFile()->getClientOriginalName());\n $this->nombre = md5(uniqid()) . '.' . $partes_ruta['extension'];\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->nombre\n );\n\n $this->url = $this->getWebPath();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function save(){\n\t\t\tif(isset($this->id)){\n\t\t\t\t$this->update();\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//checking for errors\n\t\t\t\t//Can't save if there are pre=existing errors.\n\t\t\t\tif(!empty($this->errors)){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Can't save without filename and temp location on server.\n\t\t\t\tif(empty($this->filename) || empty($this->temp_path)){\n\t\t\t\t\t$this->errors[]=\"The file location is not available!\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Determine the target path\n\t\t\t\t$upload_dir=\"images\";\n\t\t\t\t$target_path=\"../../public/\".$upload_dir.\"/\".$this->filename;\n\t\t\t\t//$target_path=$this->filename;\n\t\t\t\tif(file_exists($target_path)){\n\t\t\t\t\t$this->errors[]=\"The file {$this->filename} already exists!\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//Attempt to move the file.\n\t\t\t\tif(move_uploaded_file($this->temp_path, $target_path)){\n\t\t\t\t\t//success\n\t\t\t\t\t//save corresponding entry into database.\n\t\t\t\t\tif($this->create()){\n\t\t\t\t\t\t//we are done with temp_path.\n\t\t\t\t\t\tunset($this->temp_path);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t//file not moved.\n\t\t\t\t\t\t$this->error[]=\"file can't be uploaded because of some denied permissions.\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // si on avait un ancien fichier on le supprime\n if (null !== $this->tempFilename) {\n $oldFile = $this->getUploadRootDir().'/'.$this->id.'.'.$this->tempFilename;\n if (file_exists($oldFile)) {\n unlink($oldFile);\n }\n }\n\n // déplace le fichier envoyé dans le répertoire de notre choix\n $this->file->move(\n $this->getUploadRootDir(), // répertoire de destination\n $this->id.'.'.$this->url // nom du fichier à créer \"id.extension\"\n );\n\n }", "public function storeForProjectGallery(UploadedFile $file, Project $project){\n //TODO write image to the local storage\n }", "public function storeForArticleFeatured(UploadedFile $file, Article $project){\n //TODO write image to the local storage\n }", "public function save(Request $request){\n $file = $request->file('file');\n \n //obtenemos el nombre del archivo\n $nombre = $file->getClientOriginalName();\n //print_r($nombre);\n \n \n Storage::disk('local')->put('logo.PNG', \\File::get($file));\n \t\t\n \t\t return Response::json(['response' => 'Actualizado correctamente'],200);\n\t}", "public function store(Request $request)\n {\n\n $file = $request->file('file');\n $path = $request->file->store('the/path');\n\n// $imageName = request()->file->getClientOriginalName();\n// request()->file->move(public_path('upload'), $imageName);\n//\n//\n// return response()->json(['uploaded' => '/upload/'.$imageName]);\n\n\n// $this->validate($request, [\n//\n// 'media' => 'required',\n// 'media.*' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048'\n//\n// ]);\n//\n// if($request->hasfile('media'))\n// {\n//\n// foreach($request->file('media') as $image)\n// {\n// $name=$image->getClientOriginalName();\n// $image->move(public_path().'/images/', $name);\n// $data[] = $name;\n// }\n// }\n//\n// $form= new Media();\n// $form->user_id = Auth::user()->id;\n// $form->name =json_encode($data);\n//\n//\n// $form->save();\n//\n// return back()->with('success', 'Your images has been successfully');\n }", "public function uploadImage()\n {\n $file = array('image' => \\Input::file('image'));\n // setting up rules\n $rules = array('image' => 'required',); //mimes:jpeg,bmp,png and for max size max:10000\n // doing the validation, passing post data, rules and the messages\n $validator = Validator::make($file, $rules);\n if ($validator->fails()) {\n // send back to the page with the input data and errors\n return Redirect::back()->withInput()->withErrors($validator);\n }\n else {\n // checking file is valid.\n if (Input::file('image')->isValid()) {\n $destinationPath = 'temp'; // upload path\n $extension = Input::file('image')->getClientOriginalExtension(); // getting image extension\n $fileName = rand(11111, 99999) . '.' . $extension; // renaming image\n Input::file('image')->move($destinationPath, $fileName); // uploading file to given path\n // sending back with message\n Session::flash('success', 'Upload successfully');\n return Redirect::to('upload');\n } else {\n // sending back with error message.\n Session::flash('error', 'uploaded file is not valid');\n return Redirect::to('upload');\n }\n }\n }", "public function storeForProjectFeatured(UploadedFile $file, Project $project){\n //TODO write image to the local storage\n }", "public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n if(!is_dir($this->getTargetUploadRootDir())){\n mkdir($this->getTargetUploadRootDir(), 0777, true);\n }\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getTargetUploadRootDir(),\n $this->file->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = date('Y-m-d').DIRECTORY_SEPARATOR.$this->id.DIRECTORY_SEPARATOR.$this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n //\nif ($request->hasFile('photo')) {\n $originalname = $request->file('photo')->getClientOriginalName(); \n $extension = Input::file('photo')->getClientOriginalExtension();\n $oldnamewithoutext = substr($originalname, 0, strlen($originalname) - 4); \n $dbimgname = $oldnamewithoutext . '-'. time() . '.' . $extension; \n $newname = iconv(\"utf-8\", \"TIS-620\", $dbimgname);\n $moveImage = $request->file('photo')->move('images', $newname);\n\n} else {\n $dbimgname = \"\";\n} \n //\n $employees = new Employee;\n $employees->title = $request->title;\n $employees->firstname = $request->firstname;\n $employees->lastname = $request->lastname;\n $employees->photo = $dbimgname;\n $employees->status = $request->status;\n $employees->priority = $request->priority;\n \n\n // $this->validate($request, [\n // 'fistname' => 'required|unique:employee|max:255',\n \n // ]);\n\n \n $employees->save();\n $request->session()->flash('status', 'บันทึกข้อมูลเรียบร้อย');\n return back(); \n }", "public function uploadImage()\n {\n if (null === $this->fileimage) {\n return;\n }\n\n $upload = new Upload();\n $this->image = $upload->createName(\n $this->fileimage->getClientOriginalName(),\n $this->getUploadRootDir().'/',\n array('tmp/','miniature/')\n );\n\n $imagine = new Imagine();\n\n /* Tmp */\n $size = new Box(1920,1080);\n $imagine->open($this->fileimage)\n ->thumbnail($size, 'inset')\n ->save($this->getUploadRootDir().'tmp/'.$this->image);\n\n /* Miniature */\n $size = new Box(300,300);\n $imagine->open($this->fileimage)\n ->thumbnail($size, 'outbound')\n ->save($this->getUploadRootDir().'miniature/'.$this->image);\n\n }", "public function upload()\n {\n // The file property can be empty if the field is not required\n if (null === $this->file) {\n return;\n }\n\n // Use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->path\n );\n\n // Set the path property to the filename where you've saved the file\n $this->path = $this->file->getClientOriginalName();\n\n // Clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n\n if(Input::file('imagem')){\n $imagem = Input::file('imagem');\n $extensao = $imagem->getClientOriginalExtension();\n\n if($extensao != 'jpg' && $extensao != 'png' && $extensao != 'jpeg' && $extensao != 'JPG' && $extensao != 'PNG' && $extensao != 'JPEG'){\n return back()->with('erro','Erro: Este arquivo não é imagem');\n }\n }\n\n $perfil = new Perfil;\n $perfil->nome = $request->input('nome');\n $perfil->biografia = $request->input('biografia');\n $perfil->numero = $request->input('numero');\n $perfil->imagem = \"\";\n $perfil->user_id = auth()->user()->id;\n\n $perfil->save();\n\n if(Input::file('imagem')){\n File::move($imagem,public_path().'\\imagem-perfil\\perfil-id_'.$perfil->id.'.'.$extensao);\n $perfil->imagem = public_path().'\\imagem-perfil\\perfil-id_'.$perfil->id.'.'.$extensao;\n $perfil->save();\n }\n\n return redirect('home');\n }", "public function store()\n {\n $data = request()->validate([\n 'caption' => 'required',\n 'price' => 'required',\n 'image' => ['required', 'image','mimes:jpeg,png,jpg,gif,svg', 'max:500000'],\n ]);\n\n $imagePath = request('image')->store('uploads', 'public');\n\n $image = Image::make(public_path(\"storage/{$imagePath}\"))->fit(1200, 1200);\n $image->save();\n $city = Auth::user()->city;\n\n auth()->user()->posts()->create([\n 'caption' => $data['caption'],\n 'image' => $imagePath,\n 'price' => $data['price'],\n 'city' => $city,\n ]);\n\n //user is redirected to their profile\n return redirect('/profile/' . auth()->user()->id);\n }", "public function store(Request $request)\n {\n $personal=new Personal();\n\n $file = $request->file('file');\n //extraccion de los datos del archivo\n $extension = $file->getClientOriginalExtension();\n $name='personal_'.date('Ymd').time();\n $fileName = $name.'.'.$extension;\n\n $img = Storage::disk('imgDisk')->put($fileName,\\File::get($file)); \n\n $personal->file_name=$name;\n $personal->file_ext=$extension;\n\n $personal->nombres=$request->nombres;\n $personal->apellidos=$request->apellidos;\n $personal->cedula=$request->cedula;\n $personal->titulo=$request->titulo;\n $personal->cargo=$request->cargo;\n $personal->telefono=$request->telefono;\n $personal->estado_del=\"A\";\n $personal->save();\n return redirect('/personal_form');\n }", "public function upload()\n\t{\n\t\t$field \t\t = $this->getUploadField();\n\t\t$newName \t = $this->getUploadNewName();\n\t\t//$destination = 'assets/images/location';\t\n\t\t$destination = $this->getUploadDestination();\n\n\t\tif (\\Input::hasFile($field))\n\t\t{\n\t\t \\Input::file($field)->move($destination, $newName);\n\t\t}\n\t\t\n\t\t$this->entity->fill([$field => $newName]);\n\t\t$this->entity->save();\n\n\t\treturn true;\n\t}", "public function store(Request $request)\n {\n if ($request->hasFile('file_name')) {\n if ($request->file('file_name')->isValid()) {\n \n\n \n $filename=$request->file('file_name')->getClientOriginalName();\n $filesize=$request->file('file_name')->getClientSize();\n $request->file_name->storeAs('public/images',$filename);\n\n/* $path = $request->file_name->path();*/\n\n/*$extension = $request->file_name->extension();*/\n/*$path = $request->file_name->storeAs('public/images','sunil.jpg');*/\n//$request->session()->flash('message', 'Thanks for uploading');\n/*return back();//->with('message', 'Thanks for uploading');*/\n $file =new Fileupload();\n $file->file_name=$filename;\n $file->file_size=$filesize;\n $file->save();\n $request->session()->flash('message', 'Thanks for uploading');\n return back();//->with('message', 'Thanks for uploading');\n\n}\n \n}\n }", "public function store(SliderPostRequest $request)\n {\n if($request->status){\n $this->status = 1;\n }\n try{\n if ($request->hasFile('img_url')) {\n\n $fileName =$request->img_url->store('/images');\n\n $slider = new Slider();\n\n $slider->name = $request->name;\n $slider->img_url = $fileName;\n $slider->status =$this->status ;\n /* $slider->created_by = Sentinel::getUser()->id;\n $slider->updated_by= Sentinel::getUser()->id;*/\n $slider->created_by =95;\n $slider->updated_by=95;\n $slider->saveOrFail();\n\n Input::file('img_url')->move('images/', $fileName); // uploading file to given path\n Session::flash('info', 'Upload successfully');\n return Redirect::back();\n\n }else{\n Session::flash('danger', 'uploaded file is not valid');\n return Redirect::back();\n }\n }catch (Exception $e){\n // sending back with error message.\n Session::flash('danger', $e);\n return Redirect::back();\n\n }\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $filename = substr( md5(rand()), 0, 15).'.'.$this->getFile()->guessExtension();\n // move takes the target directory and then the\n // target filename to move to\n\n\n\t\t\t\tif(!file_exists($this->getUploadRootDir())) mkdir($this->getUploadRootDir(), 0777, true);\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n\n $image = time().'.'.$request->img->extension();\n\n $request->img->move(public_path('images'), $image);\n\n\n Image::create([\n 'title'=>$request['title'],\n 'desc'=>$request['desc'],\n 'img'=>$image,\n\n\n ]);\n\n return redirect()->route('image.index')->with('success','successfully done');\n\n }", "public function uploads() {\n $this->Authorization->authorize($this->Settings->newEmptyEntity(), 'create');\n if ($this->request->is(\"Ajax\")) {\n $is_dest = \"img/tmp/\";\n if (!file_exists($is_dest)) {\n //mkdir($is_dest, 0777, true);\n $dir = new Folder(WWW_ROOT . 'img/tmp/', true, 0755);\n $is_dest = $dir->path;\n }\n $fileData = $this->request->getData('file');\n if (strlen($fileData->getClientFilename()) > 1) {\n $ext = pathinfo($fileData->getClientFilename(), PATHINFO_EXTENSION);\n $allowedExt = array('gif', 'jpeg', 'png', 'jpg', 'tif', 'bmp', 'ico');\n if ($this->request->getData('allow_ext')) {\n $allowedExt = explode(\",\", $this->request->getData('allow_ext'));\n }\n if (in_array(strtolower($ext), $allowedExt)) {\n $upload_img = $fileData->getClientFilename();\n $ran = time();\n $upload_img = $ran . \"_\" . $fileData->getClientFilename();\n if (strlen($upload_img) > 100) {\n $upload_img = $ran . \"_\" . rand() . \".\" . $ext;\n }\n $upload_img = str_replace(' ', '_', $upload_img);\n $fileData->moveTo($is_dest . $upload_img);\n $data['filename'] = $upload_img;\n $data['image_path'] = $this->request->getAttribute(\"webroot\") . \"img/tmp/\" . $upload_img;\n $data['success'] = true;\n $data['message'] = \"file successfully uploaded!\";\n } else {\n $data['success'] = false;\n $data['message'] = \"invalid file type!\";\n }\n } else {\n $data['success'] = false;\n $data['message'] = \"invalid file!\";\n }\n }\n $this->set($data);\n $this->viewBuilder()->setOption('serialize', ['filename', 'image_path','success', 'message']);\n }", "public function store(Request $request)\n {\n //validator//\n $validation = Validator::make($request->all(), [\n 'userfile' => 'required|image|mimes:jpeg,png|min:1|max:250'\n ]);\n\n //check if it fail//\n if ($validation->fails()){\n return redirect()->back()->withInput()->with('errors', $validation->errors());\n }\n\n $image = new Image;\n\n //upload image//\n $file = $request->file('userfile');\n $destination_path = 'uploads/';\n $filename = str_random(6).'_'.$file->getClientOriginalName();\n $file->move($destination_path, $filename);\n\n //save path image to db//\n $image->file = $destination_path . $filename;\n $image->caption = $request->input('caption');\n $image->save();\n\n return Redirect::to('articles/'.$request->article_id)->with('message','You just uploaded an image !');\n }", "public function store(Request $request){\n \n if ($request->hasFile('image')){\n\n $filenamewithextension = $request->image->getClientOriginalName();\n $filename = pathinfo($filenamewithextension, PATHINFO_FILENAME);\n $extension = $request->image->getClientOriginalExtension();\n $filenametostore = $filename.'_'.time().'.'.$extension;\n $request->image->storeAs('public/img/', $filenametostore);\n //$smallthumbnail = \"_small_\".$filename.'_'.time().'.'.$extension;\n //$smallthumbnailpath = public_path('storage/img/'.$smallthumbnail);\n //$this->createThumbnail($smallthumbnailpath,150,93);\n //$request->image->storeAs('storage/img/', $smallthumbnail);\n\n return response()->json(array('nomeArquivo'=>$filenametostore));\n\n } else{\n //return response()->json(array('nomeArquivo' => 'arquivo não recebido'));\n } \n\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'uploadedFile' => 'required|mimes:jpeg,png,jpg'\n ]);\n \n $file = $request->file('uploadedFile');\n \n if (!$file->isValid()) {\n return JsonService::jsonError('Sorry! The file was not uploadded!');\n }\n\n $filePath = $file->store('/files/images', 'public');\n $this->imageService->createThumbnails($filePath, [200, 500, 800]);\n $fileId = File::create([\n 'originalName' => $file->getClientOriginalName(),\n 'pathToFile' => $filePath,\n 'mimeType' => $file->getClientMimeType(),\n 'user_id' => auth()->id(),\n ])->id;\n \n return JsonService::jsonSuccess(\n 'File was uploaded successfully',\n $this->imageService->getInfoForImage(File::findOrFail($fileId))\n );\n }", "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required|string',\n 'sub_title' => 'required|string', \n 'description' => 'required|string', \n 'big_img' => 'required|image', \n 'sm_img' => 'required|image', \n 'client' => 'required|string', \n 'category' => 'required|string' \n ]);\n\n $protfolios= new Protfolio;\n $protfolios->title=$request->title;\n $protfolios->sub_title=$request->sub_title;\n $protfolios->description=$request->description;\n $protfolios->client=$request->client;\n $protfolios->category=$request->category;\n\n $big_file = $request->file('big_img');\n Storage::putFile('public/img/', $big_file);\n $protfolios->big_img =\"storage/img/\".$big_file->hashName();\n\n $sm_file = $request->file('sm_img');\n Storage::putFile('public/img/', $sm_file);\n $protfolios->sm_img =\"storage/img/\".$sm_file->hashName();\n\n $protfolios->save();\n return redirect()->route('admin.protfolios.create')->with('success', \"New Protfolio Create successfully\");\n\n\n\n }", "public function store(CarruselRequest $request)\n {\n $carrusel = new Carrusel;\n\n $carrusel->file = $request->file;\n $carrusel->title = $request->title;\n $carrusel->description = $request->description;\n \n\n $carrusel->save();\n\n\n //IMAGE\n if($request->file('file')){\n $path = Storage::disk('public')->put('image', $request->file('file'));\n $carrusel->fill(['file' => asset($path)])->save();\n }\n\n return redirect()->route('carrusels.index')->with('info', 'La imagen fue guardada en el carrusel.');\n }", "public function publicUpload()\n {\n $this->request->validate([\n $this->inputName => $this->extensions,\n ]);\n\n if ($uploadedFile = $this->request->file($this->inputName))\n {\n $fileName = time() . $uploadedFile->getClientOriginalName();\n $uploadedFile->move(uploadedImagePath() . DIRECTORY_SEPARATOR . $this->path, $fileName);\n $filePath = uploadedImagePath() . DIRECTORY_SEPARATOR . $this->path . DIRECTORY_SEPARATOR .$fileName;\n $image = $this->modelName::create(['name' => $fileName, 'path' => $filePath]);\n return $image->id;\n }\n\n }", "public function store()\n\t{\n\t\t$input = Input::all();\n\n\t\t$image = new Photo();\n\t\t$image->user_id \t= $input['user_id'];\n\t\t$image->fileName \t= $input['fileName']->getClientOriginalName();\n\t\t$image->title \t\t= $input['title'];\n\t\t\n\t\tif($image->save()){\n\t\t\t\n\t\t\t$path = user_photos_path();\n\n\t\t\t$move_image = Image::make($input['fileName']->getRealPath());\n\n\t\t\tFile::exists($path) or File::makeDirectory($path);\n\n\t\t\t$move_image->save($path.$image->fileName)\n\t\t\t\t\t->resize(200,200)\n\t\t\t\t\t->greyscale()\n\t\t\t\t\t->save($path. 'tn-'.$image->fileName);\n\n\t\t\treturn Redirect::to('photos');\t\n\t\t}else{\n\t\t\treturn Ridirect::to('photos.create');\n\t\t}\n\t\n\t}", "public function store(Request $request)\n {\n $validated = $request->validate([\n 'name' => 'required',\n 'designation' => 'required',\n 'description' => 'required',\n 'image' => 'required',\n \n ]);\n $testimonial = $request->file('image');\n $name_gen = hexdec(uniqid()).'.'.$testimonial->getClientOriginalExtension();\n Image::make($testimonial)->resize(1920,1088)->save('image/testimonial/'.$name_gen);\n $last_img = 'image/testimonial/'.$name_gen;\n\n \n Testimonial::insert([\n 'name' => $request->name,\n 'designation' => $request->designation,\n 'description' => $request->description,\n 'image' => $last_img,\n 'created_at' => Carbon::now()\n ]);\n toast(' Successfully','success');\n return redirect()->route('testimonial.index');\n }", "public function store(ImageRequest $request)\n {\n $img = new Image();\n $img->title = $request->title;\n $img->album_id = $request->album_id;\n if (request()->hasFile('image')) {\n $file = request()->file('image');\n $extension =$file->getClientOriginalExtension();\n }\n\n\n\n if($request->hasFile('image'))\n {\n $files = $request->file('image');\n foreach ($files as $file) {\n $file->store('users/' . $this->user->id . '/messages');\n\n\n $fileName = $file->store('image', ['disk' => 'uploads']);\n $img->path = $fileName;\n }\n }\n\n\n\n\n\n\n\n \n $img->save();\n return redirect()->route('image.index')->with(['success' => 'Image added successfully.']);\n }", "public function store(Request $request)\n {\n //\n $title = $request->input('title');\n $author = $request->input('author');\n $price = $request->input('price');\n $publisher = $request->input('publisher');\n $file = $request->file('image');\n $image = $file->getClientOriginalName();\n\n $destinationPath = 'uploads';\n \n\n $book = new Library();\n\n $book->title = $title;\n $book->author = $author;\n $book->price = $price;\n $book->publisher = $publisher;\n $book->image = $file;\n\n $book->save();\n $id = $book->id;\n $filename = \"image\".$id.\".jpeg\";\n // echo $filename;\n //rename($image,$filename);\n $file->move($destinationPath,$filename);\n $book->image = $filename;\n $book->save();\n return Redirect::to('library');\n }", "public function store(Request $request)\n {\n\n //dd($request);\n\n if(Auth::check()){\n\n $categorias= DB::table('categorias')->select('nome_categoria', 'id_categoria')->get();\n\n $validatedData = $request->validate([\n 'title'=> 'bail|required|max:40',\n 'select_categoria' => 'bail|required',\n 'descricao' => 'required|max:255',\n 'select_dificuldade'=>'required',\n 'content' => 'required',\n 'file'=>'required'\n\n ]);\n $user = Auth::user();\n\n $min =0;\n $max =99999;\n $random=rand ( $min , $max );\n\n $fileOriginalName= $request->file('file')->getClientOriginalName();\n\n\n $img_capa =$random.\"_Tutorial_\".$user->id.\".\".File::extension($fileOriginalName);\n\n $filecontents= file_get_contents($validatedData[\"file\"]);\n\n $file=Storage::disk('public')->put('Tutoriais_img_capa/'.$img_capa, $filecontents);\n $path = storage_path();\n\n //not working\n //$filemove=File::move($path.\"/Tutoriais_img_capa/\".$fileOriginalName, $path.\"/Fotos_utilizadores/\".$img_capa);\n\n\n //percisa de um try catch\n\n\n $tutorial = new Tutorial();\n\n $tutorial->titulo =$validatedData[\"title\"];\n $tutorial->id_categoria =$validatedData[\"select_categoria\"];\n $tutorial->id_utilizador = $user->id;\n $tutorial->descricao =$validatedData[\"descricao\"];\n $tutorial->content =$validatedData[\"content\"];\n $tutorial->img_capa =$img_capa;\n $tutorial->dificuldade =$validatedData[\"select_dificuldade\"];\n\n $inserted= $tutorial->save();\n//\n// $inserted= DB::table('tutorials')->insert(\n// ['id_categoria' => $validatedData[\"select_categoria\"],\n// 'titulo'=>$validatedData[\"title\"],\n// 'id_utilizador'=>$user->id,\n// 'descricao' => $validatedData[\"descricao\"],\n// 'img_capa'=>$img_capa\n// ,'content'=>$validatedData[\"content\"]]\n// );\n// $inserted->save();\n\n\n Session::flash(\"message\",\"Tutorial Novo Adicionado!!\");\n return view(\"tutoriais.templateInserirTutorial\",\n [\"inserted\"=> $inserted,\"categorias\" => $categorias]);\n\n\n\n }\n return view(\"pages.error\");\n }", "public function store()\n {\n $file = ['slider_name' => Input::file('slider_name')];\n $rules = array(\n 'slider_name'=>'required|mimes:jpg,jpeg,png'\n );\n $validator = Validator::make($file, $rules);\n if($validator->fails()){\n $messages = $validator->messages();\n return redirect('slider/create')->withErrors($validator);\n }else{\n $destinationPath = public_path().'/images/slider';\n $extension = Input::file('slider_name')->getClientOriginalExtension();\n $fileName = Carbon::now()->format('Y-m-d').rand(11111,99999).'.'.$extension;\n Input::file('slider_name')->move($destinationPath, $fileName);\n $file = ['slider_name' => $fileName];\n Slider::create($file);\n return redirect('slider/index');\n }\n }", "public function uploadAction()\n {\n $logedUser = $this->getServiceLocator()\n ->get('user')\n ->getUserSession();\n $permission = $this->getServiceLocator()\n ->get('permissions')\n ->havePermission($logedUser[\"idUser\"], $logedUser[\"idWebsite\"], $this->moduleId);\n if ($this->getServiceLocator()\n ->get('user')\n ->checkPermission($permission, \"edit\")) {\n $request = $this->getRequest();\n if ($request->isPost()) {\n // Get Message Service\n $message = $this->getServiceLocator()->get('systemMessages');\n \n $files = $request->getFiles()->toArray();\n $temp = explode(\".\", $files[\"file\"][\"name\"]);\n $newName = round(microtime(true));\n $newfilename = $newName . '.' . end($temp);\n $image = new Image();\n $image->exchangeArray(array(\n \"website_id\" => $logedUser[\"idWebsite\"],\n \"name\" => $newName,\n \"extension\" => end($temp)\n ));\n if ($image->validation()) {\n if (move_uploaded_file($_FILES[\"file\"][\"tmp_name\"], \"public/files_database/\" . $logedUser[\"idWebsite\"] . \"/\" . $newfilename)) {\n $result = $this->getImageTable()->saveImage($image);\n $message->setCode($result);\n // Log\n $this->getServiceLocator()\n ->get('systemLog')\n ->addLog(0, $message->getMessage(), $message->getLogPriority());\n die('uploadSucess');\n } else {\n die('uploadError');\n }\n } else {\n die('Invalid extension');\n }\n }\n die(\"forbiden\");\n } else {\n die(\"forbiden - without permission\");\n }\n }", "public function upload()\n {\n\n if (null == $this->fichier)\n {\n return;\n }\n\n if ($this->oldFichier)\n {\n // suppression de l'ancienne image\n if (file_exists($this->getUploadRootDir() . '/' . $this->oldFichier))\n {\n unlink($this->getUploadRootDir() . '/' . $this->oldFichier);\n }\n\n\n // suppression des anciens thumbnails\n foreach ($this->thumbnails as $key => $thumbnail)\n {\n if (file_exists($this->getUploadRootDir() . '/' . $key . '-' . $this->oldFichier))\n {\n unlink($this->getUploadRootDir() . '/' . $key . '-' . $this->oldFichier);\n }\n\n }\n }\n\n //$date = new \\DateTime('now');\n\n //$nameImage = $date->format('YmdHis') . '-' . $this->fichier->getClientOriginalName();\n //$extension = $this->fichier->guessExtension();\n //$nameImage = str_replace(' ', '-', $this->alt) . uniqid();\n\n // move (param 1 chemin vers dossier, param 2 nom image)\n\n //$this->name = $nameImage . \".\" . $extension;\n\n $this->fichier->move(\n $this->getUploadRootDir(),\n $this->name\n //$nameImage . \".\" . $extension\n );\n\n //$imagine = new \\Imagine\\Gd\\Imagine();\n\n /*$imagine\n ->open($this->getAbsolutePath())\n ->thumbnail(new \\Imagine\\Image\\Box(350, 160))\n ->save(\n $this->getUploadRootDir().'/' .\n $nameImage . '-thumb-small.' . $extension);*/\n\n $imagine = new \\Imagine\\Gd\\Imagine();\n $imagineOpen = $imagine->open($this->getAbsolutePath());\n\n foreach ($this->thumbnails as $key => $thumbnail)\n {\n $size = new \\Imagine\\Image\\Box($thumbnail[0], $thumbnail[1]);\n $mode = \\Imagine\\Image\\ImageInterface::THUMBNAIL_INSET;\n \n $imagineOpen->thumbnail($size, $mode)\n ->save($this->getUploadRootDir() . '/' . $key . '-' . $this->name);\n }\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n \n\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n $filename = time().'_'.$this->getFile()->getClientOriginalName();\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::$SERVER_PATH_TO_VIDEO_FOLDER,\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }", "public function upload($file, $local_file);", "public function store()\n\t{\n $file = Request::file('file');\n if($file) {\n $name = $file->getClientOriginalName();\n Request::file('file')->move('images/lenses', $name);\n return 'true';\n }else{\n $input = Request::all();\n $input['image'] = '/images/lenses/'.$input['file'];\n return Lense::create($input);\n }\n\t}", "public function storeImage($request, $fileKey, $fileName, $path) {\n\n if($request->hasFile($fileKey)){\n\n //get the file from the profile_image request...\n $image = $request->file($fileKey);\n\n //move the file to correct location\n $image->move($path, $fileName);\n\n }\n\n else {\n return false;\n }\n\n\n\n }", "public function store(Request $request) {\n \n // file validation\n $validator = Validator::make($request->all(),\n ['filename' => 'required|mimes:jpeg,png,jpg,bmp|max:2048']);\n \n // if validation fails\n if($validator->fails()) {\n return Alert::info('Imagen', 'Fallo en validacion de imagen');\n }\n \n // if validation success\n if($file = $request->file('filename')) {\n\n $name = $file->getClientOriginalName();\n \n $target_path = public_path('../resources/img/cartas/');\n \n if($file->move($target_path, $name)) { \n return Alert::info('Imagen', 'Imagen subida correctamente');\n }\n }\n /*\n $name = $request->file('filename')->getClientOriginalName();\n //$extension = $request->file('filename')->extension();\n\n //Storage::putFileAs('filename', new File('./../resources/img/cartas'), $name);\n\n //Storage::disk('local')->put($name, 'Contents');\n\n //$path = Storage::putFile('./resources/img/cartas', $request->file('filename'));\n //$path = Storage::putFileAs('./resources/img/cartas', $request->file('filename'), $name);\n //$path = $request->file('filename')->store('./resources/img/cartas');\n $target_path = public_path('../resources/img/cartas/');\n\n $request->file('filename')->move($target_path, $name);\n\n echo('imagen subida corectamente');\n */\n\n /**\n * $fileName = $request->file->getClientOriginalName();\n * $request->file->move(public_path('../resources/img/cartas'), $fileName);\n */\n\n /**\n * $data = request()->validate([\n * 'name' => 'required',\n * 'email' => 'required|email',\n * 'message' => 'required',\n * ]);\n */\n }", "public function store(Request $request)\n {\n $this->validate($request,[\n 'title'=>'required|string',\n 'sub_title'=>'required|string',\n 'big_image'=>'required|image',\n 'small_image'=>'required|image',\n 'description'=>'required|string',\n 'client'=>'required|string',\n 'category'=>'required|string',\n\n\n ]);\n $portfolios=new Portfolio;\n $portfolios->title=$request->title;\n $portfolios->sub_title=$request->sub_title;\n $portfolios->description=$request->description;\n $portfolios->client=$request->client;\n $portfolios->category=$request->category;\n\n $big_file=$request->file('big_image');\n Storage::putFile('public/img/',$big_file);\n $portfolios->big_image=\"storage/img/\".$big_file->hashName();\n\n\n $small_file=$request->file('small_image');\n Storage::putFile('public/img/',$small_file);\n $portfolios->small_image=\"storage/img/\".$small_file->hashName();\n\n\n\n $portfolios->save();\n return redirect()->route('admin.portfolios.create')->with('success','New portfolio created successfully');\n }", "public static function addImg($myId){\n if ($_FILES[\"pic\"][\"error\"] > 0) {\n echo \"Return Code: \" . $_FILES[\"pic\"][\"error\"] . \"<br>\";\n } else {\n$conn = init_db();\n$url = uniqid();\n$sql='insert into images (u_id, url, ups) values ('.$myId.', \\''.$url.'.jpg\\', 0)';\n$res = mysqli_query($conn,$sql) or die(mysqli_error($conn).'failed query:'.__LINE__);\n$dest = __DIR__.\"/../img/usr/\" . $url.'.jpg';\necho 'moved to '.$dest;\nmove_uploaded_file($_FILES[\"pic\"][\"tmp_name\"],\n $dest);\n}\n}", "public function store(Request $request)\n {\n\n \n $team = $request->file('image');\n $name_gen = hexdec(uniqid()).'.'.$team->getClientOriginalExtension();\n Image::make($team)->resize(1920,1088)->save('image/team/'.$name_gen);\n $last_img = 'image/team/'.$name_gen;\n\n \n Team::insert([\n 'name' => $request->name,\n 'designation' => $request->designation,\n 'image' => $last_img,\n 'created_at' => Carbon::now()\n ]);\n toast(' Successfully','success');\n return redirect()->route('team.index');\n }", "public function store(Request $request)\n {\n $lastinsertedid=logo::insertGetId([\n 'image' => 'default.php',\n 'created_at'=>Carbon::now()\n ]);\n\n \n if ($request->hasFile('image')) {\n $main_photo=$request->image;\n $imagename=$lastinsertedid.\".\".$main_photo->getClientOriginalExtension();\n \n // $ami = app_path('store.gochange-tech.com/uploads/products_images/'.$imagename);\n // dd($ami);\n Image::make($main_photo)->resize(400, 450)->save(base_path('public/upload/logo/'.$imagename));\n\n logo::find($lastinsertedid)->update([\n 'image'=>$imagename\n ]);\n }\n\n return back();\n\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "public function store(Request $request)\n {\n $post = new Post();\n $post->title = $request->title;\n if($request->get('image'))\n {\n $file = $request->get('image');\n $name = time().'.' . explode('/', explode(':', substr($file, 0, strpos($file, ';')))[1])[1];\n \\Image::make($request->get('image'))->save(public_path('images/').$name); \n $post->image = $name;\n }\n\n //$post->save();\n\n // return response()->json(['success' => 'You have successfully uploaded an image'], 200); \n }", "public function store(Request $request)\n {\n if ($request->hasFile('image')) {\n // Let's do everything here\n if ($request->file('image')->isValid()) {\n //\n $validated = $request->validate([\n 'name' => 'string|max:40',\n 'image' => 'mimes:jpeg,png|max:1014',\n ]);\n $extension = $request->image->extension();\n $request->image->storeAs('/public', $validated['name'].\".\".$extension);\n $url = Storage::url($validated['name'].\".\".$extension);\n $file = File::create([\n 'name' => $validated['name'],\n 'url' => $url,\n ]);\n Session::flash('success', \"Success!\");\n return Redirect::back();\n }\n }\n abort(500, 'Could not upload image :(');\n }", "public function store(Request $request)\n { \n \n\n if($request->hasFile('image') && $request->file('image')->isValid()){\n\n $requestImage = $request->image;\n\n $extencao = $requestImage->extension();\n\n $imageName = md5($requestImage.strtotime(\"now\"));\n\n $requestImage->move(public_path('img/teste'), $imageName);\n \n Movel::create([\n 'tipo' => $request->tipo,\n 'descricao' => $request->descricao,\n 'foto' => $imageName,\n 'user_id'=>Auth::user()->id,\n ]);\n // var_dump($request->tipo,$request->descricao,$imageName);\n }\n return redirect('dashboard');\n }", "function uploadFile($name) {\r\n // Gets the paths, full and local directory\r\n global $image_dir, $image_dir_path;\r\n if (isset($_FILES[$name])) {\r\n // Gets the actual file name\r\n $filename = $_FILES[$name]['name'];\r\n if (empty($filename)) {\r\n return;\r\n }\r\n // Get the file from the temp folder on the server\r\n $source = $_FILES[$name]['tmp_name'];\r\n // Sets the new path - images folder in this directory\r\n $target = $image_dir_path . '/' . $filename;\r\n // Moves the file to the target folder\r\n move_uploaded_file($source, $target);\r\n // Send file for further processing\r\n processImage($image_dir_path, $filename);\r\n // Sets the path for the image for Database storage\r\n $filepath = $image_dir . '/' . $filename;\r\n // Returns the path where the file is stored\r\n return $filepath;\r\n }\r\n }", "public function save2(Request $request){\n $file = $request->file('file2');\n \n //obtenemos el nombre del archivo\n $nombre = $file->getClientOriginalName();\n //print_r($nombre);\n \n \n Storage::disk('local')->put('logo2.PNG', \\File::get($file));\n \n return Response::json(['response' => 'Actualizado correctamente'],200);\n }", "public function store(Request $request)\n {\n\n $file = $request->file('image');\n $imginame = 'category_' . time() . '.' .$file->getClientOriginalExtension();\n //El public_path nos ubica en la carpeta public del proyecto\n $path = public_path() . '/img/categories/';\n //La funcion move nos los guarda en la carpeta declarada en el path\n $file->move($path,$imginame);\n\n\n $category = new category($request->all());\n $category->image = $imginame;\n $category->save();\n return redirect()->route('categories.index')-> with('mensaje',\"Se ha registrado la categoria $category->name correctamente \");\n }", "public function create(Request $request)\n {\n \n $file_name = $this->saveImage($request->file,'gallery');\n\n $gallery = new gallery();\n \n $gallery->url = $file_name;\n \n $gallery->save();\n \n return redirect()->back()->with(['sucess'=>'image successfully added']); \n\n \n }", "public function store(Request $request)\n {\n $name=$request['name'];\n $testimonial=$request['testimonial'];\n $type=$request['media_type'];\n if($request->hasFile('img_name'))\n { \n $file=$request->file('img_name'); \n $imagename=$file->getClientOriginalName();\n $path_img=$file->storeAs('public/','img'.time().$imagename);\n $img_name=str_replace('public/', '', $path_img);\n $testimonial1= Testimonial::testimonial_create($name,$testimonial,$img_name,$type);\n return redirect('/admin/testimonial/index');\n } \n\n return redirect('/admin/testimonial/index');\n }", "public function store(Request $request)\n {\n\n// $imageName = time() . '-' . preg_match_all('/data\\:image\\/([a-zA-Z]+)\\;base64/',$request->photo,$matched).'.jpg';\n $imageName = time() . '.' . explode('/',explode(':', substr($request->photo, 0, strpos($request->photo, ';')))[1])[1];\n \\Image::make($request->photo)->save(public_path('/assets/uploaded_images/'). $imageName);\n// dd($imageName);\n\n $contact = new Contact();\n $contact->name = $request->name;\n $contact->email = $request->email;\n $contact->position = $request->position;\n $contact->company = $request->company;\n $contact->phone = $request->phone;\n $contact->subject = $request->subject;\n $contact->photo = $imageName;\n $contact->save();\n }" ]
[ "0.7209419", "0.71458685", "0.71009463", "0.7038677", "0.7014978", "0.7011861", "0.6907889", "0.68815935", "0.687421", "0.6851589", "0.6828855", "0.68120307", "0.67946845", "0.67556983", "0.67533976", "0.6738893", "0.6737136", "0.6736024", "0.6725347", "0.67041004", "0.6699532", "0.66952276", "0.66831857", "0.6672558", "0.6662765", "0.6649938", "0.6631819", "0.66295296", "0.6627401", "0.66271156", "0.66196835", "0.6619012", "0.66135967", "0.6608324", "0.66033554", "0.65931475", "0.6550966", "0.6540967", "0.6536795", "0.65345895", "0.65304667", "0.65298724", "0.65235513", "0.6521603", "0.6515271", "0.65134645", "0.6511248", "0.6502627", "0.6490096", "0.6480974", "0.6478102", "0.6474502", "0.64711714", "0.6465774", "0.64600056", "0.64591765", "0.6459059", "0.6455681", "0.64542824", "0.6454273", "0.64529926", "0.6451664", "0.64502335", "0.6440114", "0.6437682", "0.6437302", "0.6426557", "0.64193946", "0.641862", "0.6416667", "0.64162076", "0.6410757", "0.6392746", "0.6388635", "0.6388393", "0.6387017", "0.63863295", "0.6381644", "0.63745594", "0.63730323", "0.6371473", "0.6369523", "0.6367562", "0.6364049", "0.636288", "0.63599855", "0.63598895", "0.6350644", "0.6350644", "0.6350644", "0.6350644", "0.63477814", "0.6341514", "0.634078", "0.6340389", "0.63402504", "0.6339549", "0.6336429", "0.63344383", "0.63292265" ]
0.6681011
23
This function prevents changing url(..) in javascript code when needed only style
function style_fixing( $match ) { $match[0] = preg_replace_callback('/url\s*\(\s*[\'\"]?(.*?)\s*[\'\"]?\s*\)/is', "style_url_replace", $match[0]); //echo "<pre>".htmlspecialchars($match[0])."</pre>"; return $match[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function protectUrls($str)\n\t{\n\t\tif (preg_match('/^javascript:/',$str)) {\n\t\t\t$str = '#';\n\t\t}\n\t\t\n\t\treturn $str;\n\t}", "public function testUrlError() {\n\t\t$this->Helper->url('nope.js');\n\t}", "public static function use_inline_scripts(){\n return false;\n }", "protected function determineScriptUrl() {}", "protected function determineScriptUrl() {}", "protected function determineScriptUrl() {}", "function virustotalscan_replace_style()\r\n{\r\n global $mybb, $templates, $virustotalscan_url_css, $plugins;\r\n $groups = explode(\",\", $mybb->settings['virustotalscan_setting_url_groups']);\r\n // doar in cazul in care modulul de scanare al legaturilor este activ se trece la adaugarea codului CSS in forum\r\n if ($mybb->settings['virustotalscan_setting_url_enable'] && virustotalscan_check_server_load($mybb->settings['virustotalscan_setting_url_loadlimit']) && !empty($mybb->settings['virustotalscan_setting_key']) && !in_array($mybb->user['usergroup'], $groups))\r\n {\r\n eval(\"\\$virustotalscan_url_css = \\\"\".$templates->get(\"virustotalscan_url_css\").\"\\\";\"); \r\n // in acest caz va exista scanarea URL-urilor\r\n $plugins->add_hook('parse_message_end', 'virustotalscan_scan_url');\r\n }\r\n}", "function defer_parsing_of_js( $url ) {\r\n if ( is_user_logged_in() ) return $url; //don't break WP Admin\r\n if ( FALSE === strpos( $url, '.js' ) ) return $url;\r\n if ( strpos( $url, 'jquery.js' ) ) return $url;\r\n return str_replace( ' src', ' defer src', $url );\r\n}", "public function disableConcatenateJavascript() {}", "function asset_url($uri = '', $protocol = NULL ,$ctype = '')\n{\n $ci =& get_instance();\n $cache_busting_token = (! Config::DEBUG_MODE )? '?' . $ci->config->item('cache_busting_token') : '';\n if($ctype != ''){\n if($ctype == 'css'){\n $cache_busting_token .= ! Config::DEBUG_MODE ? $ci->config->item('css_suffix') : '';\n }else if($ctype == 'js'){\n $cache_busting_token .= ! Config::DEBUG_MODE ? $ci->config->item('js_suffix') : '';\n }else{\n show_error('parameter ctype is wrong.');\n }\n }else{\n $cache_busting_token .= getSuffix($uri);\n }\n return base_url($uri . $cache_busting_token, $protocol);\n}", "function wpgrade_noversion_css_js( $src ) {\r\n if ( strpos( $src, 'ver=' ) )\r\n $src = remove_query_arg( 'ver', $src );\r\n return $src;\r\n}", "function widgetopts_addhttp($url) {\n if (!preg_match(\"~^(?:f|ht)tps?://~i\", $url)) {\n $url = \"http://\" . $url;\n }\n return $url;\n}", "function set_js_urls($js_url) {\n\n md_set_js_urls($js_url);\n \n }", "function inject_js() {\nglobal $wp;\n$current_url = add_query_arg( $wp->query_string, '', home_url( $wp->request ) );\nif($current_url == 'url zeljene stranice stranice'){\n\techo '<script src=\"'. esc_url( plugins_url( __FILE__ ) ).'/imeJSfajlaGdeSeNalazi.js\"></script>';\n \t }\n}", "function js_disabled() {\n\n }", "function my_opengraph_url( $url ) {\n return false;\n}", "public function getWidgetJsUrl() {\n return check_url(variable_get(AddThis::WIDGET_JS_URL_KEY, AddThis::DEFAULT_WIDGET_JS_URL));\n }", "protected function renderJavascript(){\n \n return sprintf(\n '<script type=\"text/javascript\" src=\"%s\"></script>',\n $this->getField('url')\n );\n \n }", "function javascript_url() {\n\t\tif ( ! isset( $this->_javascript_url ) ) {\n\t\t\t$amp = newclarity_amp();\n\t\t\t$this->_javascript_url = \"https://{$amp->javascript_domain}/{$this->_amp_version}/{$this->element_name}-{$this->_element_version}.js\";\n\t\t}\n\t\treturn $this->_javascript_url;\n\t}", "function use_custom_js() {\n if ( $this->addon->options['email_link_format'] === 'popup_form' ) { return true; }\n if ( $this->slplus->is_CheckTrue( $this->addon->options['disable_initial_directory'] ) ) { return true; }\n return false;\n }", "protected function applyUrl()\n\t{\n\t\t// CSS\n\t\t$nodes = $this->dom->getElementsByTagName('link');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t\t// JS\n\t\t$nodes = $this->dom->getElementsByTagName('script');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Image\n\t\t$nodes = $this->dom->getElementsByTagName('img');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Anchor\n\t\t$nodes = $this->dom->getElementsByTagName('a');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->base_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t}", "function remove_cssjs_ver( $src ) {\n\t$src = remove_query_arg( array('v', 'ver', 'rev'), $src );\n\treturn esc_url($src);\n}", "private function isCustomUrl()\n {\n return substr($this->baseUrl, 0, strlen(self::GCS_BASE_URL)) !== self::GCS_BASE_URL;\n }", "public function disableCompressJavascript() {}", "function jc_url() {\n\n}", "function remove_asset_version($src) {\n return $src ? esc_url(remove_query_arg('ver', $src)) : false;\n }", "function javascript_validation() {\n return false;\n }", "function yz_esc_url( $url ) {\n $url = esc_url( $url );\n $disallowed = array( 'http://', 'https://' );\n foreach( $disallowed as $protocole ) {\n if ( strpos( $url, $protocole ) === 0 ) {\n return str_replace( $protocole, '', $url );\n }\n }\n return $url;\n}", "function setScript($value){\n $this->_options['script']=CHtml::normalizeUrl($value);\n }", "function cdn_html_alter_js_urls(&$html) {\n $url_prefix_regex = _cdn_generate_url_prefix_regex();\n $pattern = \"#src=\\\"(($url_prefix_regex)(.*?\\.js)(\\?.*)?)\\\"#\";\n _cdn_html_alter_file_url($html, $pattern, 0, 3, 4, 'src=\"', '\"');\n}", "function javascript_validation() {\r\n return false;\r\n }", "public function url_js( $url )\n\t{\n\t\tif ( $url && $url2 = $this->rewrite( $url, LiteSpeed_Cache_Config::ITEM_CDN_MAPPING_INC_JS ) ) {\n\t\t\t$url = $url2 ;\n\t\t}\n\t\treturn $url ;\n\t}", "function javascript_validation() {\n return false;\n }", "function force_menu_url($url)\r\n {\r\n //$this->get_category_menu()->forceCurrentUrl($url);\r\n }", "function force_menu_url($url)\r\n {\r\n //$this->get_category_menu()->forceCurrentUrl($url);\r\n }", "public function unsetJavascript() {\n $this->javascript = false;\n }", "function getScriptUrl() ;", "function queue_js_url($url, $options = array())\n{\n get_view()->headScript()->appendFile($url, null, $options);\n}", "protected function loadJavascript() {}", "function shapeSpace_remove_version_scripts_styles($src) {\n\tif (strpos($src, 'ver=')) {\n\t\t$src = remove_query_arg('ver', $src);\n\t}\n\treturn $src;\n}", "function ajax_render_location_rule()\n {\n }", "protected function getUrl() {\r\n $url = \\Nette\\Utils\\Strings::endsWith($this->url, \"/\") ? $this->url : $this->url . \"/\"; \r\n $script = \\Nette\\Utils\\Strings::startsWith($this->script, \"/\") ? $this->script : \"/\" . $this->script; \r\n \r\n return $url . $script;\r\n }", "abstract public function get_url_update();", "function canHandleCurrentUrl() ;", "function PluginUpdateIgnoreJsCss() {\n\t\t$this->__construct();\n\t}", "public function jsloc($uri)\n {\n echo '<script> window.location.replace(\"' . $uri . '\") </script>';\n }", "function hook_javascript($type=null) {\n\t\treturn null;\n\t}", "function remove_cssjs_ver( $src ) {\nif( strpos( $src, '?ver=' ) )\n$src = remove_query_arg( 'ver', $src );\nreturn $src;\n}", "protected function generateJavascript() {}", "protected function generateJavascript() {}", "function js_url($file, $folder = NULL)\n {\n return get_instance()->theme->js_url($file, $folder);\n }", "protected function renderCurrentUrl() {}", "protected function renderCurrentUrl() {}", "protected function disableNativeScriptFilter()\n {\n $this->registerJs(join(\"\\n\", [\n '(function(){ // yii-resource-smart-load extension',\n ' var app = ' . RSmartLoad::JS_GLOBAL_OBJ_PRIVATE_PATH . ';',\n ' var parentFunc = app.addResource;',\n ' app.addResource = function(hash, resource, comment){',\n ' var isAlreadyLoaded = Boolean(app.getResourceByHash(hash));',\n ' if(!isAlreadyLoaded){',\n ' yii.reloadableScripts.push(resource);',\n ' }',\n ' parentFunc.apply(this, arguments);',\n ' } ',\n '})();'\n ]), self::POS_END);\n }", "public function javascript_validation() {\n return false;\n }", "function remove_query_string_scriptscss( $src ) {\n if( strpos( $src, '?ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function remove_query_string_scriptscss( $src ) {\n if( strpos( $src, '?ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function setCheckScript($value){\n $this->_options['checkScript']=CHtml::normalizeUrl($value);\n }", "public function override()\n {\n $js_file_path = $this->getUrl('js/script.js'); //Override js file\n $survey_link = $this->getSurveyLink(); //URI to redirect to\n $finance_data = $this->fetchCostData();\n\n print \"<div id='redirect-uri' class='hidden' redirect-uri=$survey_link ></div>\";\n print \"<script type='text/javascript'>var data1 = $finance_data;</script>\";\n print \"<script type='module' src=$js_file_path></script>\";\n }", "function page_sitestyle() {\r\n\t\tglobal $internal_style, $extern_save, $extern_style;\r\n\t\t\r\n\t\t$out = \"<script type=\\\"text/javascript\\\" language=\\\"JavaScript\\\" src=\\\"./system/functions.js\\\"></script>\";\r\n\t\r\n\t\tif(!isset($extern_save))\r\n\t\t\t$extern_style = $internal_style;\r\n\t\r\n\t\tif(isset($extern_save)) {\r\n\t\t\tif(file_exists(\"./styles/$extern_style/mainpage.php\")) {\r\n\t\t\t\t$sql = \"UPDATE \" . DB_PREFIX . \"config\r\n\t\t\t\t\tSET config_value= '$extern_style'\r\n\t\t\t\t\tWHERE config_name='style'\";\r\n\t\t\t\tdb_result($sql);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t$out .= \"<iframe id=\\\"previewiframe\\\" src=\\\"./index.php?style=\".$extern_style.\"\\\" class=\\\"stylepreview\\\"></iframe>\r\n\t\t<form action=\\\"admin.php\\\" method=\\\"get\\\">\r\n\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"sitestyle\\\" />\r\n\t\t\t<label for=\\\"stylepreviewselect\\\">Style:\r\n\t\t\t\t<select id=\\\"stylepreviewselect\\\" name=\\\"style\\\" size=\\\"1\\\">\";\r\n\t\r\n\t\t$verz = dir(\"./styles/\");\r\n\t\t//\r\n\t\t// read the available styles\r\n\t\t//\r\n\t\twhile($entry = $verz->read()) {\r\n\t\t\t//\r\n\t\t\t// check if the style really exists\r\n\t\t\t//\r\n\t\t\tif($entry != \".\" && $entry != \"..\" && file_exists(\"./styles/\".$entry.\"/mainpage.php\")) {\r\n\t\t\t\t//\r\n\t\t\t\t// mark the selected style as selected in the list\r\n\t\t\t\t//\r\n\t\t\t\tif($entry == $extern_style)\r\n\t\t\t\t\t$out .= \"\\t\\t\\t\\t\\t<option value=\\\"\".$entry.\"\\\" selected=\\\"selected\\\">\".$entry.\"</option>\\r\\n\";\t\r\n\t\t\t\telse\r\n\t\t\t\t\t$out .= \"\\t\\t\\t\\t\\t<option value=\\\"\".$entry.\"\\\">\".$entry.\"</option>\\r\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$verz->close();\r\n\t\r\n\t\t$out .= \"</select>\r\n\t\t\t</label>\r\n\r\n\t\t\t<input type=\\\"submit\\\" value=\\\"Vorschau\\\" onclick=\\\"preview_style();return false;\\\" name=\\\"preview\\\" />\r\n\t\t\t<input type=\\\"submit\\\" value=\\\"Speichern\\\" name=\\\"save\\\" />\r\n\r\n\t\t</form>\";\r\n\t\t\r\n\t\treturn $out;\r\n\t}", "abstract public function url($manipulation_name = '');", "public function denyLink()\n {\n }", "protected function renderAsJavascript() {}", "public function preRenderUrl()\n {\n\n if (!$this->context->element)\n $this->context->element = $this->getIdKey();\n\n $this->defUrl = $this->context->toUrlExt();\n $this->defAction = $this->context->toActionExt();\n\n }", "function sUrl( $url )\r\n\t\t{\r\n\t\t return filter_var( $url, FILTER_SANITIZE_URL );\r\n\t\t \r\n\t\t}", "function cssAndJs() {\r\n\t\t$siteurl = get_bloginfo('wpurl');\r\n\t\t// include css in any case. e.g. for widget\r\n\t\tprint '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$siteurl.'/wp-content/plugins/uwr1results/uwr1results.css\" />'.\"\\n\";\r\n\t\tif (!defined('IS_UWR1RESULTS_VIEW')) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$siteurlPath = substr($siteurl, strlen('http://'.$_SERVER['HTTP_HOST']));\r\n\t\tif ('/' != $siteurlPath{0}) {\r\n\t\t\t$siteurlPath = '/'.$siteurlPath;\r\n\t\t}\r\n\t\t//print '<script type=\"text/javascript\" src=\"'.$siteurl.'/wp-content/plugins/uwr1results/uwr1results.js.php?siteurl='.urlencode($siteurlPath)./*($https?'ssl=1':'').*/'\"></script>'.\"\\n\";\r\n\t}", "function vUrl( $url )\r\n\t\t{\r\n\t\t return filter_var( $url, FILTER_VALIDATE_URL );\r\n\t\t \r\n\t\t}", "protected function block_javascript_file() {\n\t\tadd_action( 'dynamic_sidebar', array( $this, 'display_div_message_to_go_to_consent_settings' ), 10, 1 );\n\t}", "function sdt_remove_ver_css_js( $src ) {\n\tif ( strpos( $src, 'ver=' ) )\n\t\t$src = remove_query_arg( 'ver', $src );\n\treturn $src;\n}", "function tb_string_swap_disable_url( $id ) {\n\n\tglobal $pagenow;\n\n\t$url = admin_url( $pagenow );\n\n\tif( ! empty( $_SERVER['QUERY_STRING'] ) ) {\n\t\t$url .= sprintf( '?%s&nag-ignore=%s', $_SERVER['QUERY_STRING'], 'tb-nag-'.$id );\n\t} else {\n\t\t$url .= sprintf( '?nag-ignore=%s', 'tb-nag-'.$id );\n\t}\n\n\t$url .= sprintf( '&security=%s', wp_create_nonce('themeblvd-string-swap-nag') );\n\n\treturn $url;\n}", "function _drush_patchfile_is_url($url) {\n return parse_url($url, PHP_URL_SCHEME) !== NULL;\n}", "public function enableConcatenateJavascript() {}", "protected function renderJavaScriptAndCss() {}", "public function get_url_background_pion(){ return $this->_url_background_pion;}", "function ghostpool_validate_url() {\n\t\tglobal $post;\n\t\t$gp_page_url = esc_url( home_url() );\n\t\t$gp_urlget = strpos( $gp_page_url, '?' );\n\t\tif ( $gp_urlget === false ) {\n\t\t\t$gp_concate = \"?\";\n\t\t} else {\n\t\t\t$gp_concate = \"&\";\n\t\t}\n\t\treturn $gp_page_url . $gp_concate;\n\t}", "function asc_style_loader_src( $src, $handle ) {\n\tglobal $_asc_admin_css_colors;\n\n\tif ( defined('ASC_INSTALLING') )\n\t\treturn preg_replace( '#^wp-admin/#', './', $src );\n\n\tif ( 'colors' == $handle ) {\n\t\t$color = get_user_option('admin_color');\n\n\t\tif ( empty($color) || !isset($_asc_admin_css_colors[$color]) )\n\t\t\t$color = 'fresh';\n\n\t\t$color = $_asc_admin_css_colors[$color];\n\t\t$parsed = parse_url( $src );\n\t\t$url = $color->url;\n\n\t\tif ( ! $url ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( isset($parsed['query']) && $parsed['query'] ) {\n\t\t\tasc_parse_str( $parsed['query'], $qv );\n\t\t\t$url = add_query_arg( $qv, $url );\n\t\t}\n\n\t\treturn $url;\n\t}\n\n\treturn $src;\n}", "function skin($url=false)\r\n{\r\n $skin = asset('/'.'skin'.'/'.Cms::getCurrentTheme().'/');\r\n\r\n\r\n //if(!File::exists(asset('skin'.'/'.Cms::getCurrentTheme()))) {\r\n // $skin = asset('/'.'skin'.'/theme1/');\r\n //}\r\n\r\n if($url)\r\n $skin.=$url;\r\n return $skin;\r\n}", "function funky_javascript_fix($text)\n {\n }", "function setUrl($url);", "static function prevent_image_hotlinks()\r\n {\r\n global $aio_wp_security;\r\n $rules = '';\r\n if ($aio_wp_security->configs->get_value('aiowps_prevent_hotlinking') == '1') {\r\n $url_string = AIOWPSecurity_Utility_Htaccess::return_regularized_url(AIOWPSEC_WP_HOME_URL);\r\n if ($url_string == FALSE) {\r\n $url_string = AIOWPSEC_WP_HOME_URL;\r\n }\r\n $rules .= AIOWPSecurity_Utility_Htaccess::$prevent_image_hotlinks_marker_start . PHP_EOL; //Add feature marker start\r\n $rules .= '<IfModule mod_rewrite.c>' . PHP_EOL;\r\n $rules .= 'RewriteEngine On' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP_REFERER} !^$' . PHP_EOL;\r\n $rules .= 'RewriteCond %{REQUEST_FILENAME} -f' . PHP_EOL;\r\n $rules .= 'RewriteCond %{REQUEST_FILENAME} \\.(gif|jpe?g?|png)$ [NC]' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP_REFERER} !^' . $url_string . ' [NC]' . PHP_EOL;\r\n $rules .= 'RewriteRule \\.(gif|jpe?g?|png)$ - [F,NC,L]' . PHP_EOL;\r\n $rules .= '</IfModule>' . PHP_EOL;\r\n $rules .= AIOWPSecurity_Utility_Htaccess::$prevent_image_hotlinks_marker_end . PHP_EOL; //Add feature marker end\r\n }\r\n\r\n return $rules;\r\n }", "public function getScriptUrl() {}", "public function getScriptUrl() {}", "public function getScriptUrl() {}", "public function getScriptUrl() {}", "public function getScriptUrl() {}", "public function getScriptUrl() {}", "public function getScriptUrl() {}", "public function getScriptUrl() {}", "function remove_wp_ver_css_js( $src ) {\n\tif ( strpos( $src, 'ver=' . get_bloginfo( 'version' ) ) )\n\t\t$src = remove_query_arg( 'ver', $src );\n\treturn $src;\n}", "function remove_wp_ver_css_js( $src ) {\n\tif ( strpos( $src, 'ver=' . get_bloginfo( 'version' ) ) )\n\t\t$src = remove_query_arg( 'ver', $src );\n\treturn $src;\n}", "public function isDynamicUrl();", "public function isValidUrlInvalidRessourceDataProvider() {}", "protected function updateBrokenLinks() {}", "function theme_url($url) {\n return create_url(CAsdf::Instance()->themeUrl . \"/{$url}\");\n}", "function url($id)\r\n\t{\r\n\t\treturn '';\r\n\t}", "function remove_cssjs_ver( $src ) {\n if( strpos( $src, '?ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function remove_cssjs_ver( $src ) {\n if( strpos( $src, '?ver=' ) )\n $src = remove_query_arg( 'ver', $src );\n return $src;\n}", "function shapeSpace_remove_version_scripts_styles($src) {\n if (strpos($src, 'ver=')) {\n $src = remove_query_arg('ver', $src);\n }\n return $src;\n}", "function wpcom_vip_disable_sharing_resources() {\n\t_wpcom_vip_call_on_hook_or_execute( function() {\n\t\tadd_filter( 'sharing_js', '__return_false' );\n\t\tremove_action( 'wp_head', 'sharing_add_header', 1 );\n\t}, 'init', 99 );\n}", "function pd_remove_wp_ver_css_js($src)\n{\n if (strpos($src, 'ver='))\n $src = remove_query_arg('ver', $src);\n return $src;\n}", "protected function initCurrentUrl() {}" ]
[ "0.63387126", "0.60532975", "0.6023497", "0.59995914", "0.5997442", "0.5997442", "0.5928279", "0.58211726", "0.5800948", "0.5787096", "0.56954926", "0.56805325", "0.5630431", "0.56211627", "0.560884", "0.5606221", "0.5603448", "0.55924416", "0.558454", "0.55580866", "0.55573636", "0.55520856", "0.5538083", "0.55156034", "0.55148757", "0.5514362", "0.5511428", "0.550654", "0.54902387", "0.5482704", "0.5469616", "0.545071", "0.54475987", "0.5447518", "0.5447518", "0.5434586", "0.5419432", "0.53860486", "0.537791", "0.53720254", "0.53619444", "0.5348978", "0.534626", "0.53443134", "0.5338263", "0.5327703", "0.53262377", "0.532364", "0.5317245", "0.5316235", "0.53033555", "0.5300839", "0.5300839", "0.5295479", "0.5294335", "0.5289403", "0.5289403", "0.5287055", "0.52865756", "0.52821183", "0.5282117", "0.5275238", "0.5271123", "0.52649504", "0.5256817", "0.5255061", "0.5254982", "0.52546084", "0.5248839", "0.5245152", "0.52429664", "0.52371556", "0.5231606", "0.5229425", "0.52273077", "0.5222066", "0.5220027", "0.5218026", "0.5213691", "0.5212797", "0.520913", "0.520913", "0.520913", "0.520913", "0.520913", "0.520913", "0.520913", "0.520913", "0.5201029", "0.5201029", "0.5200347", "0.5198738", "0.5198107", "0.5195342", "0.51923984", "0.5189421", "0.5189421", "0.5189056", "0.51833737", "0.51776636", "0.5168942" ]
0.0
-1
Download images and replaces urls in the styles
function style_url_replace( $match ) { global $snoopy, $download_path, $downloaded_files; $relative = $match[1]; $image = convertLink( $match[1] ); if ( in_array( $image, array_keys( $downloaded_files ) ) ) { $filename = $downloaded_files[$image]; } else { $ext = end( explode( '.', $image ) ); $name = time(); $snoopy->fetch( $image ); $filename = $download_path.$name.'.'.$ext; $downloaded_files[$image] = $filename; // can we handle fwrite/fopen failures in a better way? $fp = @fopen( $filename, 'wb' ); @fwrite( $fp, $snoopy->results, strlen( $snoopy->results ) ); @fclose( $fp ); } return 'url('.$filename.')'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getImageIntoCss(): void\n {\n preg_match_all(self::REGEX_IMAGE_FORMAT, $this->sContents, $aHit, PREG_PATTERN_ORDER);\n\n for ($i = 0, $iCountHit = count($aHit[0]); $i < $iCountHit; $i++) {\n $sImgPath = PH7_PATH_ROOT . $this->sBaseUrl . $aHit[1][$i] . $aHit[2][$i];\n $sImgUrl = PH7_URL_ROOT . $this->sBaseUrl . $aHit[1][$i] . $aHit[2][$i];\n\n if ($this->isDataUriEligible($sImgPath)) {\n $this->sContents = str_replace(\n $aHit[0][$i],\n 'url(' . Optimization::dataUri($sImgPath, $this->oFile) . ')',\n $this->sContents\n );\n } else {\n $this->sContents = str_replace(\n $aHit[0][$i],\n 'url(' . $sImgUrl . ')',\n $this->sContents\n );\n }\n }\n }", "function cdn_html_alter_image_urls(&$html) {\n $url_prefix_regex = _cdn_generate_url_prefix_regex();\n $pattern = \"#((<img\\s+|<img\\s+[^>]*\\s+)src\\s*=\\s*[\\\"|\\'])($url_prefix_regex)([^\\\"|^\\']*)([\\\"|\\'])#i\";\n _cdn_html_alter_file_url($html, $pattern, 0, 4, 5, 1, '');\n}", "function do_export_images()\n\t{\n\t\t$skin_dir = $this->ipsclass->input['skin_dirs'];\n\n\t\tif ( ! @file_exists( CACHE_PATH.'style_images/'.$skin_dir ) )\n\t\t{\n\t\t\t$this->ipsclass->main_msg = \"Невозможно найти выбранную директорию, проверьте настройки и попробуйте еще раз\";\n\t\t\t$this->show_export_page();\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Get xml mah-do-dah\n\t\t//-----------------------------------------\n\n\t\trequire_once( KERNEL_PATH.'class_xml.php' );\n\n\t\t$xml = new class_xml();\n\n\t\trequire_once( KERNEL_PATH.'class_xmlarchive.php' );\n\n\t\t$xmlarchive = new class_xmlarchive( KERNEL_PATH );\n\n\t\t$xmlarchive->strip_path = CACHE_PATH.'style_images/'.$skin_dir;\n\n\t\t$xmlarchive->xml_add_directory( CACHE_PATH.'style_images/'.$skin_dir );\n\n\t\t$xmlarchive->xml_create_archive();\n\n\t\t$contents = $xmlarchive->xml_get_contents();\n\n\t\t$this->ipsclass->admin->show_download( $contents, 'ipb_images-'.$skin_dir.'.xml' );\n\t}", "protected function applyUrl()\n\t{\n\t\t// CSS\n\t\t$nodes = $this->dom->getElementsByTagName('link');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t\t// JS\n\t\t$nodes = $this->dom->getElementsByTagName('script');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Image\n\t\t$nodes = $this->dom->getElementsByTagName('img');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Anchor\n\t\t$nodes = $this->dom->getElementsByTagName('a');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->base_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t}", "function url_images(): string\n{\n return \\plugins_url(\"images/\", BOOKCLUBFILE);\n}", "protected function combineImages() {}", "function getImagesDownloadPage($imageUrls){\n ob_start();\n include_once('images-download-tpl.php');\n return ob_get_clean();\n}", "public function getImages(string ...$options)\n {\n list($url, $dir) = $options;\n $this->code = $this->grabbingSite($url);\n $this->imageDirectory = !$dir ? $this->imageDirectory : $dir;\n $this->host = parse_url($url, PHP_URL_HOST);\n $this->scheme = parse_url($url, PHP_URL_SCHEME) . '://';\n\n $this->saveImages();\n }", "public function url()\n\t{\n\t\t$this->buildImage();\n\t\treturn $this->buildCachedFileNameUrl;\n\t}", "public function getImageUrl();", "function training_image_callback() {\n $output = array();\n $file_path = drupal_realpath('modules/image/sample.png');\n $source = (object) array(\n 'uid' => 1,\n 'uri' => $file_path,\n 'filename' => basename($file_path),\n 'filemime' => file_get_mimetype($file_path),\n );\n $directory = 'public://';\n file_copy($source, $directory, $replace = FILE_EXISTS_REPLACE);\n $array_style = image_styles();\n foreach ($array_style as $val) {\n $style_name = $val['name'];\n $path = 'public://sample.png';\n $attributes = array(\n 'class' => 'simple-image',\n );\n $output[] = theme('image_style', array(\n 'style_name' => $style_name,\n 'path' => $path,\n 'attributes' => $attributes,\n ));\n }\n\n return theme('item_list', array(\n 'items' => $output,\n 'type' => 'ol',\n 'title' => t('Default image styles'),\n ));\n}", "public function actionImg(){\n if (!isset($_GET['f'])) exit;\n $size = 200;\n if (isset($_GET['s'])) $size = $_GET['s'];\n $filename = Yii::app()->basePath . DIRECTORY_SEPARATOR . \"..\" . DIRECTORY_SEPARATOR . Yii::app()->params['coverPhotos'].substr($_GET['f'], 0, 2). DIRECTORY_SEPARATOR.$_GET['f'];\n if (!file_exists($filename)) exit;\n \n $type = exif_imagetype($filename);\n \n Yii::app()->clientScript->reset();\n $this->layout = 'none'; // template blank\n\t\tswitch ($type){\n\t\t\tcase IMAGETYPE_JPEG: header(\"Content-Type: image/jpg\"); break;\n\t\t\tcase IMAGETYPE_PNG: header(\"Content-Type: image/png\"); break;\n\t\t\tcase IMAGETYPE_GIF: header(\"Content-Type: image/gif\"); break;\n\t\t}\n\t\t\n header(\"Content-Description: Remote Image\");\n \n list($width, $height) = getimagesize($filename);\n $r = $width / $height;\n \n $oldMin = ($width > $height ? $height : $width);\n if ($oldMin > $size) {\n // don't do enything\n print file_get_contents($filename);\n exit;\n }\n \n if ($width > $height) {\n $newwidth = $size*$r;\n $newheight = $size;\n } else {\n $newheight = $size/$r;\n $newwidth = $size;\n }\n\t\t\n\t\tswitch ($type){\n\t\t\tcase IMAGETYPE_JPEG: $src = imagecreatefromjpeg($filename); break;\n\t\t\tcase IMAGETYPE_PNG: $src = imagecreatefrompng($filename); break;\n\t\t\tcase IMAGETYPE_GIF: $src = imagecreatefromgif($filename); break;\n\t\t}\n\t\t\n $dst = imagecreatetruecolor($newwidth, $newheight);\n fastimagecopyresampled($dst, $src, 0, 0, 0, 0, $newwidth, $newheight, $width, $height, 2);\n \n\t\tswitch ($type){\n\t\t\tcase IMAGETYPE_JPEG: @imagejpeg($dst); break;\n\t\t\tcase IMAGETYPE_PNG: @imagepng($dst); break;\n\t\t\tcase IMAGETYPE_GIF: @imagegif($dst); break;\n\t\t}\n\t\t\n imagedestroy($dst);\n exit;\n }", "function cleanup_theme_images($old_url)\n{\n\t$files_referenced=collapse_1d_complexity('path',$GLOBALS['SITE_DB']->query_select('theme_images',array('DISTINCT path')));\n\n\t$themes=find_all_themes();\n\tforeach (array_keys($themes) as $theme)\n\t{\n\t\t$files_existing=get_image_paths(get_custom_base_url().'/themes/'.rawurlencode($theme).'/images_custom/',get_custom_file_base().'/themes/'.$theme.'/images_custom/');\n\n\t\tforeach (array_keys($files_existing) as $path)\n\t\t{\n\t\t\t$path=str_replace(get_custom_file_base().'/','',filter_naughty($path));\n\t\t\t$encoded_path=substr($path,0,strrpos($path,'/')+1).rawurlencode(substr($path,strrpos($path,'/')+1));\n\t\t\tif ((!in_array($path,$files_referenced)) && (!in_array($encoded_path,$files_referenced)) && (($old_url==$path) || ($old_url==$encoded_path)))\n\t\t\t{\n\t\t\t\t@unlink(get_custom_file_base().'/'.$path);\n\t\t\t\tsync_file($path);\n\t\t\t}\n\t\t}\n\t}\n}", "function image_link($imagename) {\r\n if (is_null($this->imagepath[$imagename]))\r\n {\r\n\tif ($this->monda && ($imagename == \"rss\")) {\r\n\t $path = $this->siteurl . '/wp-includes/images/rss.png';\r\n\t} else {\r\n \t $path = $this->image_url . $imagename . '.png';\r\n\t}\r\n\tif (wp_remote_fopen($path)) {\r\n\t $this->imagepath[$imagename] = $path;\r\n\t}\r\n\telse {\r\n\t $this->imagepath[$imagename] = $this->image_url . 'unknown.png';\r\n\t}\r\n }\r\n return $this->imagepath[$imagename];\r\n }", "function imageBook($url) {\n\tif (File::exists(base_path() . '/public/resourcebook/' . $url)) {\n\t\treturn Asset('resourcebook/' . $url);\n\t} else {\n\t\treturn Asset('resourcebook/question-mark.png');\n\t}\n}", "function export_theme_images()\n{\n header('Content-Type: application/octet-stream' . '; authoritative=true;');\n header('Content-Disposition: attachment; filename=\"theme_images.tar\"');\n\n require_code('tar');\n require_code('files');\n $my_tar = tar_open(null, 'wb');\n $theme_images = $GLOBALS['SITE_DB']->query_select('theme_images', array('DISTINCT id'));\n foreach ($theme_images as $theme_image) {\n $path = rawurldecode(find_theme_image($theme_image['id'], true, true));\n if (($path != '') && (substr($path, 0, strlen('themes/default/images/')) != 'themes/default/images/')) {\n tar_add_file($my_tar, $theme_image['id'] . '.' . get_file_extension($path), $path, 0644, null, true);\n }\n }\n tar_close($my_tar);\n}", "function file_replace( $match ) {\r\n global $snoopy;\r\n\r\n // Href was already converted to the proper server path\r\n preg_match( '/href\\s*=\\s*[\\'\\\"]?(.*?)[\\'\\\" >]/', $match[0], $m );\r\n $href = $m[1];\r\n\r\n $snoopy->fetch( $href );\r\n\r\n return \"<style>\\r\\n\".$snoopy->results.\"</style>\\r\\n\";\r\n}", "private function loadImages(): void\n {\n if (count($this->images) == 1) {\n $this->addMeta('image', $this->images[0]);\n\n return;\n }\n\n foreach ($this->images as $number => $url) {\n $this->addMeta(\"image{$number}\", $url);\n }\n }", "private function download()\n {\n $response = $this->httpClient->request('GET', env('PHOTO_ENDPOINT'));\n $content = json_decode($response->getBody()->getContents());\n\n if (! json_last_error() and property_exists($content, 'images')) {\n\n $requests = function ($images) {\n foreach ($images as $image) {\n yield new \\GuzzleHttp\\Psr7\\Request('GET', $image->url);\n }\n };\n\n $pool = new Pool($this->httpClient, $requests($content->images), [\n 'concurrency' => count($content->images),\n 'fulfilled' => function ($response, $index) use ($content) {\n $exp = explode('/', $content->images[$index]->url);\n\n $imageId = end($exp);\n\n $fileName = env('PHOTO_PATH') . $imageId;\n\n if (! Storage::exists($fileName)) {\n Storage::put($fileName, $response->getBody()->getContents(), 'public');\n }\n },\n 'rejected' => function ($reason, $index) {\n die('fail');\n },\n ]);\n\n $promise = $pool->promise();\n $promise->wait();\n }\n }", "function getUrlImages($parser, $url) {\n global $alreadyFoundImages;\n\n $imageArray = $parser->getImgTags();\n foreach ($imageArray as $image) {\n $src = $image->getAttribute(\"src\");\n $alt = $image->getAttribute(\"alt\");\n $title = $image->getAttribute(\"title\");\n\n if (!$title && !$alt) {\n continue;\n }\n\n $src = convertRealtiveToAbsoluteUrl($src, $url);\n\n // avoiding to display images multiple times\n if (!in_array($src, $alreadyFoundImages)) {\n $alreadyFoundImages[] = $src;\n\n insertImageInDatabase($url, $src, $alt, $title);\n }\n }\n}", "public function Download($comic)\n {\n if (!($comic['url'] && ($comic['active'] == 1)))\n return;\n\n $this->DebugMsg(\"Downloading {$comic['name']} (id: {$comic['comic_id']}; mode: {$comic['fetch_mode']})...\");\n\n switch($comic['fetch_mode'])\n {\n // generic comic fetch: download page, then find strip files.\n case 1:\n if (!$this->GetComic($comic['comic_id'], $comic['url'], $comic['file_path'], $comic['num_files'], $comic['min_size']))\n $this->NotFound($comic);\n\n break;\n\n // this is for comics where the main page has a bunch of links, and each link must be accessed separately. Never more than two pages deep.\n // the file_path field in the DB can contain 2 parts:\n // - match pattern for the script/image URLs (including one set of parens that denote the url to execute, prefixed by the base url) from the main page retrieved\n // - (optional) match pattern for any images that are to be retrieved from the second document retrieved (absolute or relative URLs)\n case 2:\n $script = $this->GetFile($comic['url']);\n\t$searchParams = explode('|',$comic['file_path']);\n $count = 0;\n\n // match against the first level regexp\n if (preg_match_all($searchParams[0], $script, $match))\n {\n // fetch each of these urls (to a limit), and retrieve all images from that page.\n foreach($match[1] as $m)\n {\n // prepend the base of the script URL if there was no http in the target (also below). assumes $m starts with a /\n $internalReferer = BuildURL($comic['url'], $m);\n $internalScript = $this->GetFile($internalReferer, $comic['url']);\n\n // if there was an internal search specified, retrieve internal images. there could be more than one.\n if (isset($searchParams[1]))\n {\n if(preg_match_all($searchParams[1], $internalScript, $internalMatch))\n {\n foreach($internalMatch[1] as $im)\n {\n $imUrl = BuildURL($comic['url'], $im);\n if (!$this->ProcessComic($this->GetFile($imUrl, $internalReferer), $comic['comic_id'], FindTitleTag($im, $internalScript), md5($comic['comic_id'].$imUrl)))\n $this->NotFound($comic);\n }\n }\n }\n else\n {\n if (!$this->ProcessComic($internalScript, $comic['comic_id'], FindTitleTag($m, $script), md5($comic['comic_id'].$internalReferer)))\n $this->NotFound($comic);\n }\n\n // num_files for these comics pertains to the number of pages to load, as opposed to the number of files to return.\n $count++;\n if ($count == $comic['num_files'])\n break;\n }\n }\n else\n $this->NotFound($comic);\n\n break;\n\n // the Cheezburger sites. These pages have lots of images and lots of structure so it's not easy to haul stuff out without DOM manipulation.\n case 3:\n $url = $comic['url'];\n $stopImage = $comic['file_path'];\n $newStopImage = null;\n $foundStopImage = false;\n $count = 0;\n $page = 1;\n\n while((!$foundStopImage) && $count < $comic['num_files'])\n {\n if ($this->testing)\n $this->DebugMsg(\" - Loading {$url}...\");\n\n $dom = @DOMDocument::loadHTML($this->GetFile($url));\n $xp = new DOMXpath($dom);\n\n $item = $xp->evaluate(\"//div[@class = 'post-asset-inner']\");\n foreach($item as $i)\n {\n $srcArray = $title = $id = $src = null;\n\n $data = $i->getElementsByTagName('img');\n if ($data->length > 0)\n {\n $d = $data->item(0);\n $id = $d->getAttribute('id');\n $src = $d->getAttribute('src');\n $title = $d->getAttribute('title');\n\n // if we've handled this image before for this site, then stop.\n if ($id == $stopImage)\n {\n $foundStopImage = true;\n break;\n }\n\n // set the new \"last seen image\" id so the script knows where to stop\n if (!$newStopImage)\n $newStopImage = $id;\n\n // add this image to the database\n if (!$this->ProcessComic($this->GetFile($src, $url), $comic['comic_id'], $title))\n $this->NotFound($comic);\n\n $count++;\n if ($count == $comic['num_files'])\n break;\n }\n\n // if there wasn't an image in the div, then handle video.\n else\n {\n $data = $i->getElementsByTagName('div');\n if ($data->length > 0)\n {\n $id = $data->item(0)->getAttribute('id');\n $iframe = $i->getElementsByTagName('iframe');\n\n // if there was no iframe, then go to the next one.\n if (!$iframe->length)\n continue;\n\n $title = $i->parentNode->parentNode->parentNode->getElementsByTagName('h2')->item(0)->getElementsByTagName('a')->item(0)->nodeValue;\n\n // pass the video init stuff to the video class framework\n $src = $iframe->item(0)->getAttribute('src');\n if ($videoObj = Video::init($src, $this))\n {\n // some videos have no functionality; if that's the case, continue.\n if ($videoObj->noData())\n continue;\n\n // don't add when testing...\n if ($this->testing)\n $this->DebugMsg(\" - Iframe link found: {$src} - {$title} - {$videoObj->getLink()} - {$videoObj->getMode(true)}\");\n else\n {\n if($fileName = $this->SaveFile($videoObj->getThumbfile(), $videoObj->getMd5()))\n {\n $this->DebugMsg(\" - Adding iframe link: {$src} - {$title} - {$videoObj->getLink()}\");\n $this->db->Execute(\"CALL ADDCOMIC({$comic['comic_id']}, '{$videoObj->getMd5()}', '{$videoObj->getImageMimeType()}', '{$this->db->escape($title)}', '{$videoObj->getLink()}', {$videoObj->getMode()})\");\n }\n }\n }\n // if there was no thumbnail, the next part will fail horribly, so notify my and skip this.\n else\n {\n $this->DebugMsg(\" - No thumbFile found, skipping this video: Source: {$src}, Title: {$title}, ID: {$id}, URL: {$comic['url']}\");\n $this->AddError($comic, '- No thumbFile found');\n $this->AddError($comic, \" * Source: {$src}\");\n $this->AddError($comic, \" * Title: {$title}\");\n $this->AddError($comic, \" * ID: {$id}\");\n $this->AddError($comic, \" * URL: {$comic['url']}\");\n continue;\n }\n }\n }\n }\n\n // if we haven't found the last image yet, then go to the next page.\n if (!$foundStopImage)\n $url = $comic['url'].'page/'.++$page;\n }\n\n // we save the id of the first image we saw so the script knows where to stop next time.\n if ((!$this->testing) && $newStopImage)\n $this->db->Execute(\"update comics set file_path = '{$newStopImage}' where comic_id = {$comic['comic_id']}\");\n\n break;\n\n // Baby Blues. From their site, not the King Features syndicated newspaper sites, which are nearly impossible to navigate (nb: not currently used)\n case 4:\n $this->GetComic($comic['comic_id'], $comic['url']);\n $searchParams = explode('|', $comic['file_path']);\n\n if (!(grep($this->DOWNLOAD_DIR.\"/{$comic['comic_id']}/{$searchParams[0]}\", $searchParams[1], $matches) && $this->ProcessComic($this->GetFile($matches[0], $comic['url']), $comic['comic_id'])))\n $this->NotFound($comic);\n\n break;\n\n // Oglaf.com. Another weird structure: main page refers to first page of a story, but there could be more, have to follow links.\n case 5:\n // hit the page first to create the session cookie, and to accept the \"over 18\" thing.\n $cookie = $this->DOWNLOAD_DIR.'/oglaf.cookie.txt';\n $this->GetComic($comic['comic_id'], $comic['url'], null, null, null, true, null, $cookie, \"--post-data 'over18=%C2%A0'\");\n\n $parsed_url = parse_url($comic['url']);\n $url = $parsed_url['host'].'/';\n $searchParams = explode('|', $comic['file_path']);\n do\n {\n $this->GetComic($comic['comic_id'], 'http://'.$url, null, null, null, true, null, $cookie);\n if (preg_match($searchParams[0], file_get_contents($this->DOWNLOAD_DIR.\"/{$comic['comic_id']}/{$url}index.html\"), $newUrl))\n $url = preg_filter($searchParams[1], $parsed_url['host'].'/$1', $newUrl[0]);\n else\n $url = '';\n } while ($url);\n\n if (!$this->GetComic($comic['comic_id'], null, $searchParams[2]))\n $this->NotFound($comic);\n\n break;\n\n // - this is identical to case 2, except the next level of matching occurs on the result of the first level of matching (allowing nested regexp processing\n // - levels of regexps must be separated by a pipe.\n case 6:\n $script = $this->GetFile($comic['url']);\n $searchParams = explode('|',$comic['file_path']);\n $count = 0;\n\n // match against the first level regexp\n if (preg_match_all($searchParams[0], $script, $match))\n {\n // each of these will be regexp'ed again for the actual URLs.fetch each of these urls (to a limit), and retrieve all images from that page.\n foreach($match[1] as $m)\n {\n // if there was an internal search specified, retrieve internal images. there could be more than one.\n if (isset($searchParams[1]))\n {\n if(preg_match_all($searchParams[1], $m, $internalMatch))\n {\n foreach($internalMatch[1] as $im)\n {\n $imUrl = BuildURL($comic['url'], $im);\n if (!$this->ProcessComic($this->GetFile($imUrl, $comic['url']), $comic['comic_id'], FindTitleTag($im, $script), md5($comic['comic_id'].$imUrl)))\n $this->NotFound($comic);\n }\n }\n }\n else\n {\n // this should work like case 2 if no second search param is provided.\n $internalReferer = BuildURL($comic['url'], $m);\n $internalScript = $this->GetFile($internalReferer, $comic['url']);\n\n if (!$this->ProcessComic($internalScript, $comic['comic_id'], FindTitleTag($m, $script), md5($comic['comic_id'].$internalReferer)))\n $this->NotFound($comic);\n }\n\n // num_files for these comics pertains to the number of pages to load, as opposed to the number of files to return.\n $count++;\n if ($count == $comic['num_files'])\n break;\n }\n }\n else\n $this->NotFound($comic);\n\n break;\n\n }\n\n $this->DebugMsg(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n }", "protected function _downloadCss() {\n try {\n $url = 'http://www.janolaw.de/agb-service/shops/janolaw.css';\n\n $content = $this->_getHelper()->getRemoteContent($url);\n\n $file = 'agbdownloader.css';\n $cssDir = Mage::getBaseDir('skin') . DS . 'frontend' . DS . 'base' . DS . 'default' . DS . 'css';\n $cssFile = $cssDir . DS . $file;\n\n if (!is_dir($cssDir)) {\n mkdir($cssDir, true);\n chmod($cssDir, 0755);\n }\n\n if (!file_exists($cssFile)) {\n file_put_contents($cssFile, $content);\n chmod($cssFile, 0644);\n }\n } catch (Janolaw_Agb_Model_MissingConfigException $e) {\n return null; // ignore it, as we have logged that before...\n } catch (Zend_Http_Client_Exception $e) {\n return null; // ignore it, as we have logged that before...\n } catch (Janolaw_Agb_Helper_HttpStatusNotSuccessfulException $e) {\n return null; // ignore it, as we have logged that before...\n } // don't catch other exceptions (e.g. Zend_Pdf_Exception may occur)\n }", "private function pvs_fetch_images($strextraction, $iscss, $cssfile=''){\n\t\t// fetch images\n\t\t$this->idcounter +=1;\n\t\t$img=array();\n\t\tif ($iscss==TRUE) {\n\t\t\t$img[1]=array();\n\t\t\t$strextractionarr= explode('url(', $strextraction);\n\t\t\t$j=0;\n\t\t\t$countstrextractionarr = count($strextractionarr);\n\t\t\tif ($countstrextractionarr > 0) {\n\t\t\t\tfor($i = 1; $i < $countstrextractionarr; $i++) {\n\t\t\t\t\t$strextractionarr2= explode(')', $strextractionarr[$i]);\n\t\t\t\t\t$strextractionarrcand=$strextractionarr2[0];\n\t\t\t\t\t$strextractionarrcand=str_replace('\"', '', $strextractionarrcand);\n\t\t\t\t\t$strextractionarrcand=str_replace(\"'\", '', $strextractionarrcand);\n\t\t\t\t\tif (!strstr($strextractionarrcand, '.css'))\t{\n\t\t\t\t\t\t$img[1][$j]=$strextractionarrcand;\n\t\t\t\t\t\t$j++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$cssfilebits=explode('/', $cssfile);\n\t\t\t$cssfilebits[count($cssfilebits)-1] = '';\n\t\t\t$cssfilepath=implode('/', $cssfilebits);\n\t\t\t$cssfilerelpatharr=explode('/', $cssfilepath);\n\t\t\t$cssfilerelpatharr[0]='';\n\t\t\t$cssfilerelpath='';\n\t\t\t$sizeofcssfilerelpatharr=sizeof($cssfilerelpatharr);\n\t\t\tfor($i = 0; $i < $sizeofcssfilerelpatharr; $i++) {\n\t\t\t\tif (($cssfilerelpatharr[$i] !='') && ($cssfilerelpatharr[$i] !=$this->urlsitestr)) {\n\t\t\t\t\t$cssfilerelpath.=$cssfilerelpatharr[$i].'/';\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} else {\n\t\t\t$image_regex = '/<img[^>]*' . 'src=[\\\"|\\'](.*)[\\\"|\\']/Ui';\n\t\t\t$cssfilepath='';\n\t\t\tpreg_match_all($image_regex, $strextraction, $img, PREG_PATTERN_ORDER);\n\t\t}\n\n\t\t// handling of redirected subdirs\n\t\tif ($this->urlsubpath!=''){\n\t\t\tif (strpos($cssfilepath, $this->urlsubpath)===FALSE) {\n\t\t\t\t$cssfilepath=$cssfilepath . $this->urlsubpath;\n\t\t\t}\n\n\t\t}\n\n\t\t// handling of redirected subdirs end\n\t\t$images_array = array();\n\t\t$j = 0;\n\t\t$countimg1=count($img[1]);\n\t\tfor($i = 0; $i < $countimg1; $i++) {\n\t\t\tif (!strstr($img[1][$i], '.css'))\t{\n\t\t\t\t$imgfilenamearr= explode('/', $img[1][$i]);\n\t\t\t\t$imgfilename=$imgfilenamearr[count($imgfilenamearr)-1];\n\t\t\t\t$imgfilenamearr= explode('.', $imgfilename);\n\t\t\t\t$imgfilename=$imgfilenamearr[0];\n\n\t\t\t\t$hit=$this->checkimagepattern($imgfilename);\n\t\t\t\tif ($hit<2) {\n\t\t\t\t\t$images_array[$j] =$img[1][$i];\n\t\t\t\t\t$j++;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t$images_arrayout = array();\n\n\t\t$images_array_unique=array_unique($images_array);\n\t\t$k = 1;\n\t\tif (($this->selectedpics < $this->conf['attachments.']['webpagePreviewNumberOfImages']) || ($this->logofound == FALSE)) {\n\t\t\t$countimages_array=count($images_array);\n\t\t\tfor($i = 0; $i < $countimages_array; $i++) {\n\n\t\t\t\tif (isset($images_array_unique[$i])) {\n\t\t\t\t\tif ($images_array_unique[$i] != '') {\n\t\t\t\t\t\tif (strstr($images_array_unique[$i], 'http')) {\n\t\t\t\t\t\t\t$images_arrayout[$i]=$images_array_unique[$i];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($iscss==TRUE) {\n\t\t\t\t\t\t\t\t$images_array_unique[$i]=str_replace($cssfilerelpath, '', $images_array_unique[$i]);\n\t\t\t\t\t\t\t\tif (substr($images_array_unique[$i], 0, 1)=='/') {\n\t\t\t\t\t\t\t\t\t$images_arrayout[$i]=$this->urlhomearrstr . $images_array_unique[$i];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$images_arrayout[$i]=$cssfilepath . $images_array_unique[$i];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// handling of redirected subdirs\n\t\t\t\t\t\t\t\tif ($this->urlsubpath!=''){\n\t\t\t\t\t\t\t\t\tif (strpos(($this->urlhomearrstr . $images_array_unique[$i]), $this->urlsubpath)===FALSE) {\n\t\t\t\t\t\t\t\t\t\t$cssfilepath=$this->urlhomearrstr . $this->urlsubpath . $images_array_unique[$i];\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$cssfilepath=$this->urlhomearrstr . $images_array_unique[$i];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$cssfilepath=$this->urlhomearrstr . $images_array_unique[$i];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// handling of redirected subdirs end\n\t\t\t\t\t\t\t\t$images_arrayout[$i]=$cssfilepath;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$cssfilebits=explode('.', $images_arrayout[$i]);\n\t\t\t\t\t\t$extpic = $cssfilebits[count($cssfilebits)-1];\n\t\t\t\t\t\t$arrwrk = array();\n\t\t\t\t\t\t$arrwrk=explode('//', $images_arrayout[$i]);\n\t\t\t\t\t\tif (count($arrwrk)>1) {\n\t\t\t\t\t\t\t$arrwrkout='';\n\t\t\t\t\t\t\t$countarrwrk=count($arrwrk);\n\t\t\t\t\t\t\tfor($i2 = 0; $i2 < $countarrwrk; $i2++) {\n\t\t\t\t\t\t\t\tif ($i2==0) {\n\t\t\t\t\t\t\t\t\t$arrwrkout=$arrwrk[$i2] . '//';\n\t\t\t\t\t\t\t\t} elseif ($i2==count($arrwrk)-1) {\n\t\t\t\t\t\t\t\t\t$arrwrkout .=$arrwrk[$i2];\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t$arrwrkout .=$arrwrk[$i2] . '/';\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$images_arrayout[$i]=$arrwrkout;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$filename=$this->saveAndResize($images_arrayout[$i], 50, 50, '/' . $this->savepath .'temp/temp .' . $extpic, $extpic);\n\n\t\t\t\t\t\tif ($filename) {\n\t\t\t\t\t\t\t$k++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->totalpicscans +=1;\n\t\t\t\t\t\tif (($this->selectedpics > $this->conf['attachments.']['webpagePreviewNumberOfImages']) && (($this->logofound == TRUE) ||\n\t\t\t\t\t\t\t\t(($this->selectedpics > $this->conf['attachments.']['webpagePreviewNumberOfImages']) && ($this->logofound == FALSE) &&\n\t\t\t\t\t\t\t\t\t\t($this->totalpicscans > $this->conf['attachments.']['webpagePreviewScanMaxImageScan'])))) {\n\t\t\t\t\t\t\tif ($this->totalpicscans > $this->conf['attachments.']['webpagePreviewScanMaxImageScansForLogo']) {\n\t\t\t\t\t\t\t\t$i=999999;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ($this->totalpicscans > $this->conf['attachments.']['webpagePreviewScanMaxImageScansForLogo']) {\n\t\t\t\t\t\t\t\t$i=999999;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t$this->totalcounter +=$k-1;\n\t\t}\n\n\t\treturn $images_arrayout;\n\t}", "function lazy_imgs($html, $id, $caption, $title, $align, $url, $size, $alt) {\n\n $imgNew = '<img data-original=\"' . $url . '\" ';\n $html = str_replace('<img ', $imgNew, $html);\n return $html;\n}", "function images_add_folder($image_data_url,$folder_name)\r\n{\r\n\t \r\n\t\r\n\t foreach($image_data_url as $file)\r\n {\r\n //get image contents\r\n $image = file_get_contents($file);\r\n\t\t\t\t\t $f_name=explode (\"?\",$file);\r\n\t\t\t\t $image_url=explode('/',$f_name[0]);\r\n $only_name=$image_url[count($image_url)-1];\r\n //put image contents\r\n file_put_contents($folder_name.\"/\".$only_name, $image);\r\n\t\t\t }\r\n}", "function downlad_files($file, $manual_id, $cache) {\n // while (!empty($file)) {\n // remove each processed file, add the files to be processed for images\n // }\n foreach ($file as $key => $value) {\n // if ($key == 'inkscape-userinterface') {\n // debug('key', $key);\n // debug('value', $value);\n foreach ($value['published'] as $kkey => $vvalue) {\n // debug('vvalue', $vvalue);\n if (MANUAL_LOCAL_FILES_REQUEST) {\n // debug('vvalue', $vvalue);\n $content = file_get_contents(MANUAL_LOCAL_CONTENT_PATH.$vvalue['raw']);\n } elseif (!MANUAL_DEBUG_NO_HTTP_REQUEST) {\n // debug('http_request content', GITHUB_RAW_URL.$vvalue['raw']);\n $content = get_content_from_github(GITHUB_RAW_CONTENT_URL.$vvalue['raw']);\n } else {\n $content = \"# Introduction\";\n /*\n $content = \"\n## La fenêtre principale\n\nabcd (defgh) [blah]\n[test](image/inkscape-user_interface-fr.png)\n\n[test a](image/inkscape-user_interface-fr.png)\n \";\n */\n }\n // debug('content', $content);\n $matches = array();\n if (preg_match_all('/!\\[(.*?)\\]\\((.*?)\\)/', $content, $matches)) {\n // debug('matches', $matches);\n for ($i = 0; $i < count($matches[2]); $i++) {\n $item = $matches[2][$i];\n if (array_key_exists('content/'.$key.'/'.$item, $cache)) {\n // debug('url', GITHUB_RAW_CONTENT_URL.$key.'/'.$item);\n if (MANUAL_LOCAL_FILES_REQUEST) {\n $image = file_get_contents(MANUAL_LOCAL_CONTENT_PATH.$key.'/'.$item);\n } else {\n $image = get_content_from_github(GITHUB_RAW_CONTENT_URL.$key.'/'.$item);\n }\n put_cache($key.'/'.$item, $image, $manual_id);\n $content = str_replace('!['.$matches[1][$i].']('.$item.')', '!['.$matches[1][$i].'](cache/'.$manual_id.'/'.$key.'/'.$item.')', $content); // TODO: find a good way to correctly set the pictures and their paths\n } else {\n Manual_log::$warning[] = \"The \".$key.'/'.$item.\" is referenced but can't be found in the repository\";\n }\n }\n }\n $cache_filename = $vvalue['raw'];\n if (\n array_key_exists('render', $vvalue) &&\n ($vvalue['render']['source'] == 'md') && \n ($vvalue['render']['target'] == 'html')\n ) {\n $content = Markdown($content);\n $cache_filename = $vvalue['render']['filename'];\n }\n // debug('content', $content);\n put_cache($cache_filename, $content, $manual_id);\n }\n // }\n }\n}", "function f_google_scrape_img_YAHOO($db_conn,$exm_url,$calendar_id,$list_title,$yyyy,$mm,$dd,$name,$order)\n{\n $html = file_get_html($exm_url);\n $img_cnt=0;\n //画像\n foreach ($html->find('img') as $element)\n {\n $rtn['img'][$img_cnt] = $element->src;\n if($img_cnt==0)\n {\n if($order>5)\n {\n\n }else{\n f_insert_ymd($db_conn,$calendar_id,$yyyy,$mm,$dd,$list_title,$rtn['img'][$img_cnt],$name,\"\",$order); \n }\n $img_cnt++; \n }\n }\n // 解放する\n $html->clear();\n unset($rtn);\n return \"ok\";\n}", "function import_external_image($url){\n\n global $id;\n\n // get current source ( server ) path\n $L = preg_split( \"/\\//\", \"http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\");\n\n $path=\"\";\n\n for( $i=0; $i<count($L)-1; $i++ ){\n if( $path != \"\" ) $path.=\"/\";\n $path.=$L[$i];\n }\n\n\n if( $url == \"\" ){\n // if url of image is empty then remove file only and return\n unlink(\"icons/\".$id.\".*\"); return \"\";\n } else {\n // if file not exists then return without any action\n if( checkExternalFile($url) == false ) return \"\";\n }\n\n // get file extension from url\n $T=preg_split(\"/\\./\",$url);\n $file_extension = $T[ count($T)-1 ];\n\n // copy external image file into folder icons\n $ch = curl_init( $url );\n $fp = fopen(\"icons/\".$id.\".\".$file_extension , \"wb\");\n curl_setopt($ch, CURLOPT_FILE, $fp);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false);\n curl_exec($ch);\n curl_close($ch);\n fclose($fp);\n\n // return the new path of imported image\n return $path.\"/icons/\".$id.\".\".$file_extension;\n}", "function download_image($image_url, $name = '', $alt = '', $title = '')\n{\n global $_CONFIG;\n \n $reply = file_get_contents($image_url);\n if (!$reply)\n return 0;\n\n $upload_path = global_conf()['absolute_root_path'] . 'i/';\n $new_filename = generate_unique_file_name($upload_path, $image_url);\n if (!$new_filename) {\n dump(\"ERROR FILE!: \");\n dump('$image_url = ' . $image_url);\n trigger_error('IMAGE Error');\n exit;\n }\n\n $rc = file_put_contents($upload_path . $new_filename, $reply);\n if (!$rc) {\n dump(\"ERROR FILE!: \");\n dump('$image_url = ' . $image_url);\n trigger_error('IMAGE Error: Permission denyed');\n exit;\n }\n\n list($img_width, $img_height) = getimagesize($upload_path . $new_filename);\n\n $img_id = db()->insert('images', array('name' => $name,\n 'alt' => $alt,\n 'title' => $title,\n 'enable' => '1',\n 'width' => $img_width,\n 'height' => $img_height,\n 'original_filename' => $image_url,\n 'files' => $new_filename));\n\n return $img_id;\n}", "function GrabImage($url,$originname,$dir1, $dir2) {\n\tglobal $_SC;\n\tif($url==\"\"|| $originname==\"\") return false; \n\tchdir(dirname(dirname(dirname(__FILE__))));//change to the ihome dir.\n\tchdir($_SC['attachdir'].$dir1.'/'.$dir2);\n\t//echo $_SC['attachdir'].$dir1.'/'.$dir2;exit();\n\t$ext=strrchr($url,\".\"); \n\tif($ext!=\".gif\" && $ext!=\".jpg\" && $ext!=\".jpeg\" && $ext!=\".png\") return false; \n\t$filename=\"foreign\".$originname; \n\n\tob_start(); \n\treadfile($url); \n\t$img = ob_get_contents(); \n\tob_end_clean(); \n\t$size = strlen($img); \n\n\t$fp2=@fopen($filename, \"a\"); \n\tfwrite($fp2,$img); \n\tfclose($fp2); \n\n\treturn $filename; \n}", "function dynamik_skin_css_images_converter( $skin_css )\n{\n\t$skin_css = str_replace( '../../theme/images/', 'images/', $skin_css );\n\n\treturn $skin_css;\n}", "protected function fetchAllImages(){\n $this->fetchImagesInContent();\n $this->fetchFullTextImage();\n $this->fetchIntroImage();\n $this->fetchFirstImageInContent();\n }", "function insertUrlImages($image_name){\r\n\t\t\r\n\t}", "protected function fetchImagesInContent(){\n if(isset($this->images)){\n return;\n }\n $texts = array(\n 'text' => $this->Article->text, \n 'full' => $this->Article->fulltext, \n 'intro' => $this->Article->introtext);\n $images = array();\n foreach ($texts as $key => $text) {\n if($text != ''){\n $fetchedImages = $this->extractImageFromHTML($text, $key);\n if($fetchedImages){\n $images = array_merge($images, $fetchedImages);\n }\n }\n }\n if(!empty($images)){\n $this->images = $images;\n }\n }", "public function addImage($url){\n //todo add images in xml simetamp\n $f=Francis::get($url);\n if ( $f->exists() && $f->isImage()) {\n $this->images[]=GiveMe::urlFile(Robert::fromImage($f->path)->jpg(80),true);\n }\n }", "function image($filename='',$attrs='')\n{\n $img_path = get_stylesheet_directory_uri() . \"/images\" . \"/${filename}\";\n $attrs = $attrs == '' ? \"src='${img_path}'\" : (\"src='${img_path}' \" . $attrs);\n output_single_tag('img',$attrs);\n}", "private function originalSizeImageUrl(String $url) : String\n {\n return preg_replace(\"/https?:\\/\\/(.+?)_normal.(jpg|jpeg|png|gif)/\", \"https://$1.$2\", $url);\n }", "public function actionimages()\n {\n $module = \"DocumentAttachments\";\n $urlquerystring = $_SERVER['QUERY_STRING'];\n $paraArr = explode(\"/\", $urlquerystring);\n $ticketId = $paraArr['2'];\n $model = new Troubleticket;\n $imagedata = $model->getimage($module, $ticketId);\n header(\"Content-Type: image/jpeg\");\n header(\"Content-Disposition: inline;filename=\" . $imagedata['result']['filename']);\n echo base64_decode($imagedata['result'][filecontent]);\n die;\n }", "private function parse_image_info($url)\n {\n $final = array();\n $final['source_url'] = $url;\n // <div class=\"field field-name-field-taxonomic-name field-type-taxonomy-term-reference field-label-above\">\n // <div class=\"field field-name-field-description field-type-text-long field-label-none\">\n // <div class=\"field field-name-field-imaging-technique field-type-taxonomy-term-reference field-label-above\">\n // <div class=\"field field-name-field-cc-licence field-type-creative-commons field-label-above\">\n // <div class=\"field field-name-field-creator field-type-text field-label-above\">\n if($html = Functions::lookup_with_cache($url, $this->download_options)) {\n // if(preg_match(\"/<div class=\\\"field field-name-field-taxonomic-name field-type-taxonomy-term-reference field-label-above\\\">(.*?)<div class=\\\"field field-name-field/ims\", $html, $arr)) {\n if(preg_match(\"/<div class=\\\"field field-name-field-taxonomic-name field-type-taxonomy-term-reference field-label-above\\\">(.*?)Download the original/ims\", $html, $arr)) {\n $str = $arr[1];\n if(preg_match(\"/<div class=\\\"field-item even\\\">(.*?)<\\/div>/ims\", $str, $arr)) {\n $str = trim($arr[1]);\n $final['sciname'] = $str;\n }\n }\n if(preg_match(\"/<div class=\\\"field field-name-field-description field-type-text-long field-label-none\\\">(.*?)Download the original/ims\", $html, $arr)) {\n $str = $arr[1];\n if(preg_match(\"/<div class=\\\"field-item even\\\">(.*?)<\\/div>/ims\", $str, $arr)) {\n $str = trim($arr[1]);\n $final['description'] = $str;\n }\n }\n if(preg_match(\"/<div class=\\\"field field-name-field-imaging-technique field-type-taxonomy-term-reference field-label-above\\\">(.*?)Download the original/ims\", $html, $arr)) {\n $str = $arr[1];\n if(preg_match(\"/<div class=\\\"field-item even\\\">(.*?)<\\/div>/ims\", $str, $arr)) {\n $str = trim($arr[1]);\n $final['imaging technique'] = $str;\n }\n }\n if(preg_match(\"/<div class=\\\"field field-name-field-cc-licence field-type-creative-commons field-label-above\\\">(.*?)Download the original/ims\", $html, $arr)) {\n $str = $arr[1];\n if(preg_match(\"/<div class=\\\"field-item even\\\">(.*?)<\\/div>/ims\", $str, $arr)) {\n $str = trim($arr[1]);\n if(preg_match(\"/href=\\\"(.*?)\\\"/ims\", $str, $arr)) {\n $license = $arr[1];\n if(substr($license,0,2) == \"//\") $final['license'] = \"http:\".$license;\n else $final['license'] = $license;\n }\n else $final['license'] = $str;\n }\n if($final['license'] == \"All rights reserved.\") $final['license'] = \"all rights reserved\";\n // $final['license'] = \"http://creativecommons.org/licenses/by-nc-sa/3.0/\"; //debug force\n }\n if(preg_match(\"/<div class=\\\"field field-name-field-creator field-type-text field-label-above\\\">(.*?)Download the original/ims\", $html, $arr)) {\n $str = $arr[1];\n if(preg_match(\"/<div class=\\\"field-item even\\\">(.*?)<\\/div>/ims\", $str, $arr)) {\n $str = trim($arr[1]);\n $final['creator'] = $str;\n }\n }\n //<h2 class=\"element-invisible\"><a href=\"http://cephbase.eol.org/sites/cephbase.eol.org/files/cb0001.jpg\">cb0001.jpg</a></h2>\n if(preg_match(\"/<h2 class=\\\"element-invisible\\\">(.*?)<\\/h2>/ims\", $html, $arr)) {\n if(preg_match(\"/href=\\\"(.*?)\\\"/ims\", $arr[1], $arr2)) $final['media_url'] = $arr2[1];\n }\n }\n // print_r($final); exit;\n return $final;\n }", "protected function generateImages() {\n if ($this->buildNamespace($this->imageFolder) && $this->createShortUrl()) {\n foreach ($this->inputs as $input) {\n $this->generate($input);\n }\n }\n\n return $this->responseJSON();\n }", "function get_the_css_urls() {\n\n md_get_the_css_urls();\n \n }", "public function downloadAction()\n {\n $url = $this->getRequest()->REQUEST_URI;\n $url = str_replace('/stream/download/', '/', '../data/uploads/images' . $url);\n $this->download($url, null, 'application/jpg');\n $this->view->message = \"Download erfolgreich.\";\n }", "function image_save_from_url($my_img,$fullpath){\n if($fullpath!=\"\" && $fullpath){\n $fullpath = $fullpath.\"/\".basename($my_img);\n }\n $ch = curl_init($my_img);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Firefox/45.0');\n $rawdata=curl_exec($ch);\n curl_close ($ch);\n if(file_exists($fullpath)){\n unlink($fullpath);\n }\n $fp = fopen($fullpath,'x');\n fwrite($fp, $rawdata);\n fclose($fp);\n }", "private function get_image_url($keyword, $size){\n\t\t$keyword = str_replace(' ', '-', $keyword);\n\t\t$filename = $keyword.'_'.$size.'.png';\n\t\treturn plugins_url('img/'.$filename, __FILE__);\n\t}", "function photonfill_get_url_image( $img_url, $img_size, $attr = array() ) {\n\treturn Photonfill()->get_url_image( $img_url, $img_size, $attr );\n}", "function imageHtmlCode($url, $adds = '', $attr = '')\r\n {\r\n $this->imagesContentNoSave = false;\r\n if (!$this->testOn && ($this->feed['params']['image_save'] || $this->feed['params']['img_path_method'])) {\r\n if ($this->feed['params']['img_path_method']=='1') $url = ltrim($url, '/');\r\n if ($this->feed['params']['img_path_method']=='2') $url = rtrim(site_url(), '/') . $url;\r\n \r\n } \r\n return strtr($this->feed['params']['imageHtmlCode'], array('%TITLE%' => htmlentities($this->currentTitle, ENT_COMPAT, 'UTF-8'), '%PATH%' => $url, '%ADDS%' => $adds, '%ATTR%' => $attr)); \r\n }", "function import_images($id) {\n $post_data = get_post($id); //post array retreived based on postid\n $srcs = array();\n $content = $post_data->post_content;\n $title = $post_data->post_title;\n if (empty($title)) { \n $title = __('(no title)'); \n \n }\n $update = false;\n\n // find all src attributes\n preg_match_all('/<img[^>]* src=[\\'\"]?([^>\\'\" ]+)/', $post_data->post_content, $matches);\n for ($i=0; $i<count($matches[0]); $i++) {\n $srcs[] = $matches[1][$i];\n }\n \n if (!empty($srcs)) { \n foreach ($srcs as $src) {\n // src=\"http://foo.com/images/foo\"\n if (preg_match('/^http:\\/\\//', $src) || preg_match('/^https:\\/\\//', $src)) { \n $imgpath = $src;\t\t\t\n } \n // intersect base path and src, or just clean up junk\n $imgpath = $this->remove_dot_segments($imgpath);\n\n // load the image from $imgpath\n $imgid = $this->handle_import_media_file($imgpath, $id);\n if ( is_wp_error( $imgid ) ) {\n $this->my_error();\n }\n else {\n $imgpath = wp_get_attachment_url($imgid);\n // replace paths in the content\n if (!is_wp_error($imgpath)) {\t\t\t\n $content = str_replace($src, $imgpath, $content);\n $custom = str_replace($src, $imgpath, $custom);\n $update = true;\n }\n } // is_wp_error else\n } // foreach\n\n // update the post only once\n if ($update == true) {\n $my_post = array();\n $my_post['ID'] = $id;\n $my_post['post_content'] = $content;\n wp_update_post($my_post);\n }\n flush();\n } // if empty \n }", "public function getImage() {}", "function getImages($output){\n\t\t$out = parseSDSS($output);\n\t\n\t\t// Construct a file with a list of the jpeg urls, one on each line\n\t\tforeach($out as $imageFields){\n\t\t\t/*\n\t\t\t* $url = http://das.sdss.org/imaging/$run/$rerun/Zoom/$camcol/$filename\n\t\t\t*\t$filename = fpC-$run-$camcol-$rerun-$field-z00.jpeg (z00 = zoom in 00,10,15,20,30)\n\t\t\t* In $filename, run is padded to a total of 6 digits and field is padded to a total of 4 digits\n\t\t\t* $imageFields = array(run, camcol, rerun, field) \n\t\t\t*/\n\t\t\t$url = \"http://das.sdss.org/imaging/\" . $imageFields[0] . \"/\" . $imageFields[2] . \"/Zoom/\" . $imageFields[1] . \"/fpC-\" . str_pad($imageFields[0],6,\"0\",STR_PAD_LEFT) . \"-\" . $imageFields[1] . \"-\" . $imageFields[2] . \"-\" . str_pad($imageFields[3],4,\"0\",STR_PAD_LEFT) . \"-z00.jpeg\";\n\t\t\t\n\t\t\t// Testing - prints out each url as a link\n\t\t\techo \"<a href='$url'/> $url </a> <br />\";\n\t\t}\n\t\t/*\n\t\t$inputfile = \"sdss-wget.lis\";\n\t\t$cmd = \"wget -nd -nH -q -i $inputfile\";\n\t\texec($cmd);\n\t\t*/\n\t}", "function IMGalt_Content($content) {\n if($content):\n // encode content\n $content = mb_convert_encoding($content, 'HTML-ENTITIES', \"UTF-8\");\n $document = new \\DOMDocument();\n // Disable libxml errors and allow user to fetch error information as needed\n libxml_use_internal_errors(true);\n $document->loadHTML(utf8_decode($content), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);\n // get img tag from content\n $images = $document->getElementsByTagName('img');\n foreach ($images as $image) {\n // get orginal from srcset\n if( $image->hasAttribute('srcset') ):\n $orginal = '';\n // get srcset from content and explode to array\n $srcset = $image->getAttribute('srcset');\n $srcset_array = explode(\", \", $srcset);\n // get orginal size\n foreach ($srcset_array as $key => $value) {\n $single_srcset = explode(\" \", $value);\n $src_size = str_replace(\"w\", \"\", end($single_srcset));\n if(strpos($single_srcset[0], $src_size) !== false):\n // not the orginal size\n // $orginal .= $single_srcset[0] . ' ' . $src_size;\n else:\n $orginal .= $single_srcset[0];\n endif;\n }\n else:\n $orginal = strpos($image->getAttribute('src'), 'http') !== false ? $image->getAttribute('src') : get_option( 'siteurl' ) . $image->getAttribute('src');\n endif;\n // get orginal img id and call alt\n $id = attachment_url_to_postid($orginal);\n $alt = SELF::getAltAttribute($id);\n $image->removeAttribute('alt');\n $image->setAttribute('alt', $alt);\n }\n // output\n return $document->saveHTML();\n endif;\n }", "public static function main() {\n\t\t$page = file_get_html('http://photography.nationalgeographic.com/photography/photo-of-the-day/nature-weather/');\n\t\t$link = $page->find('#search_results', 0)->find('a', 0)->href;\n\n\t\t$page = file_get_html('http://photography.nationalgeographic.com'.$link);\n\t\t$img = $page->find('meta[property=og:image]', 0)->content;\n\t\treturn $img;\n\t}", "function download_image2($image_url){\n $ch = curl_init($image_url);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 40);\n curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');\n curl_setopt($ch, CURLOPT_WRITEFUNCTION, \"curl_callback\");\n // curl_setopt($ch, CURLOPT_VERBOSE, true); // Enable this line to see debug prints\n curl_exec($ch);\n curl_close($ch); \n}", "public function downloadImages(){\n if(Auth::user()->statut_id != 3) return back();\n $this->createZip();\n return response()->download(public_path('allImages.zip'));\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}", "public function actionImages() {\n// if (file_exists($filePath)) {\n// header('Content-Type: image/jpeg');\n// header('Content-Length: ' . filesize($filePath));\n// readfile($filePath);\n// } else {\n// return \"\";\n// }\n return \"\";\n }", "protected function getImageService() {}", "public function getImage(){\n $images = $this->getImageUrls($this->image_size);\n return Utils::saveImage($images->attr('data-url'));\n }", "protected function writeGifAndPng() {}", "function get_image_send_to_editor($id, $caption, $title, $align, $url = '', $rel = \\false, $size = 'medium', $alt = '')\n {\n }", "public function replaceImage()\n {\n $args = func_get_args();\n\n $domDocument = new DomDocument();\n $domDocument->loadXML(self::$_document);\n\n $domImages = $domDocument->getElementsByTagNameNS('http://schemas.openxmlformats.org/drawingml/2006/' .\n 'wordprocessingDrawing', 'docPr');\n $domImagesId = $domDocument->getElementsByTagNameNS(\n 'http://schemas.openxmlformats.org/drawingml/2006/main',\n 'blip'\n );\n\n for ($i = 0; $i < $domImages->length; $i++) {\n if ($domImages->item($i)->getAttribute('descr') ==\n self::$_templateSymbol . $args[0] . self::$_templateSymbol) {\n $ind = $domImagesId->item($i)->getAttribute('r:embed');\n self::$placeholderImages[$ind] = $args[1];\n }\n }\n }", "protected function rehost($html)\n {\n $driver = config('soda.upload.driver');\n $url_prefix = trim(config('soda.upload.folder'), '/');\n\n $images = $this->getElementsByTag($html, 'img');\n\n $first = null;\n foreach ($images as $img) {\n $originalUrl = $img->getAttribute('src');\n echo 'Rehosting image: '.$originalUrl.'<br />';\n flush();\n $file = @file_get_contents($originalUrl);\n if ($file) {\n $unique = uniqid();\n $path_info = pathinfo($originalUrl);\n $final_path = ltrim($url_prefix.'/', '/').$path_info['filename'].'__'.$unique;\n if ($path_info['extension']) {\n $final_path .= '.'.$path_info['extension'];\n }\n\n Storage::disk($driver)->put(\n $final_path,\n $file, 'public'\n );\n\n $rehostedUrl = $driver == 'soda.public' ? '/uploads/'.$final_path : Storage::disk($driver)->url(trim($final_path, '/'));\n\n echo 'Image saved to: '.$rehostedUrl.'<br />';\n\n if (! $first) {\n echo 'Setting featured to: '.$rehostedUrl;\n $first = $rehostedUrl;\n }\n flush();\n //and we can now replace it in our original html..\n $html = str_replace($originalUrl, $rehostedUrl, $html);\n } else {\n echo 'File 404 </br>';\n }\n }\n\n return ['content' => $html, 'image' => $first];\n }", "function spiplistes_corrige_img_pack ($img) {\n\tif(preg_match(\",^<img src='dist/images,\", $img)) {\n\t\t$img = preg_replace(\",^<img src='dist/images,\", \"<img src='../dist/images\", $img);\n\t}\n\treturn($img);\n}", "function cacheImage($url) {\r\n\t\ttry {\r\n\t\t\t$cacheDir = dirname(__FILE__) . '/img/cache/';\r\n if (!file_exists($cacheDir)) {\r\n mkdir($cacheDir, 0777, true);\r\n }\r\n \t$cached_filename = md5($url);\r\n\t\t\t$files = glob($cacheDir . '*.{jpg,jpeg,png,gif}', GLOB_BRACE);\r\n\t\t\t$now = time();\r\n\t\t\tforeach ($files as $file) {\r\n\t\t\t\tif (is_file($file)) {\r\n\t\t\t\t\tif ($now - filemtime($file) >= 60 * 60 * 24 * 5) { // 5 days\r\n\t\t\t\t\t\tunlink($file);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tforeach($files as $file) {\r\n\t\t\t\t$fileName = explode('.',basename($file));\r\n\t\t\t\tif ($fileName[0] == $cached_filename) {\r\n\t\t\t\t $path = getRelativePath(dirname(__FILE__),$file);\r\n\t\t\t\t\t return $path;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$image = file_get_contents($url);\r\n\t\t\tif ($image) {\r\n\t\t\t\t$tempName = $cacheDir . $cached_filename;\r\n\t\t\t\tfile_put_contents($tempName,$image);\r\n\t\t\t\t$imageData = getimagesize($tempName);\r\n\t\t\t\t$extension = image_type_to_extension($imageData[2]);\r\n\t\t\t\tif($extension) {\r\n\t\t\t\t\t$filenameOut = $cacheDir . $cached_filename . $extension;\r\n\t\t\t\t\t$result = file_put_contents($filenameOut, $image);\r\n\t\t\t\t\tif ($result) {\r\n\t\t\t\t\t\trename($tempName,$filenameOut);\r\n\t\t\t\t\t\treturn getRelativePath(dirname(__FILE__),$filenameOut);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tunset($tempName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (\\Exception $e) {\r\n\t\t\twrite_log('Exception: ' . $e->getMessage());\r\n\t\t}\r\n\t\treturn $url;\r\n\t}", "private function _replace_inline_css()\n\t{\n\t\t// preg_match_all( '/url\\s*\\(\\s*(?![\"\\']?data:)(?![\\'|\\\"]?[\\#|\\%|])([^)]+)\\s*\\)([^;},\\s]*)/i', $this->content, $matches ) ;\n\n\t\t/**\n\t\t * Excludes `\\` from URL matching\n\t\t * @see #959152 - Wordpress LSCache CDN Mapping causing malformed URLS\n\t\t * @see #685485\n\t\t * @since 3.0\n\t\t */\n\t\tpreg_match_all( '#url\\((?![\\'\"]?data)[\\'\"]?([^\\)\\'\"\\\\\\]+)[\\'\"]?\\)#i', $this->content, $matches ) ;\n\t\tforeach ( $matches[ 1 ] as $k => $url ) {\n\t\t\t$url = str_replace( array( ' ', '\\t', '\\n', '\\r', '\\0', '\\x0B', '\"', \"'\", '&quot;', '&#039;' ), '', $url ) ;\n\n\t\t\tif ( ! $url2 = $this->rewrite( $url, LiteSpeed_Cache_Config::ITEM_CDN_MAPPING_INC_IMG ) ) {\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\t$attr = str_replace( $matches[ 1 ][ $k ], $url2, $matches[ 0 ][ $k ] ) ;\n\t\t\t$this->content = str_replace( $matches[ 0 ][ $k ], $attr, $this->content ) ;\n\t\t}\n\t}", "function save_image($inPath,$outPath)\n{ //Download images from remote server \n echo sprintf(\"FROM: %s TO ===> %s <br />\", $inPath, $outPath);\n \n /*\n $in=fopen($inPath, \"rb\");\n $out=fopen($outPath, \"wb\");\n while ($chunk = fread($in,8192))\n {\n $res = fwrite($out, $chunk, 8192);\n var_dump($res); \n }\n fclose($in);\n fclose($out);\n */\n\n $ch = curl_init($inPath);\n $fp = fopen($outPath, 'wb');\n curl_setopt($ch, CURLOPT_FILE, $fp);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_exec($ch);\n curl_close($ch);\n fclose($fp); \n}", "function media_theplatform_mpx_get_external_css($href) {\n\n $result = drupal_http_request($href);\n // Grab its CSS.\n $css = $result->data;\n\n // If this is PDK stylesheet, change relative image paths to absolute.\n $parts = explode('/', $href);\n if ($parts[2] == 'pdk.theplatform.com') {\n // Remove filename.\n array_pop($parts);\n // Store filepath.\n $css_path = implode('/', $parts) . '/';\n // Replace all relative images with absolute path to skin_url.\n $css = str_replace(\"url('\", \"url('\" . $css_path, $css);\n }\n return $css;\n}", "public static function imagesReplaceBase64( $html ){\n\n // $html = preg_replace('/<img%20/' , \"<img \" , $html );\n\n preg_match_all('/<img[^>]+>/i',$html,$out,PREG_PATTERN_ORDER);\n // return $out;\n if(count($out[0]) != 0 ){\n foreach($out[0] as $img){\n $begen = strpos($img, \"http\");\n $rest = substr($img,$begen);\n $LinksOfImages[] = str_replace(strstr($rest, '\"'),\"\",$rest);\n }\n } else {\n return $html ;\n }\n\n foreach($LinksOfImages as $link){\n $LinksOfImagess[$link] = str_replace(\" \",\"%20\",$link);\n }\n //return $LinksOfImagess;\n\n foreach($LinksOfImagess as $org => $link){\n try{\n\n $binary = file_get_contents($link);\n $base = base64_encode($binary);\n $mime = getimagesizefromstring($binary)[\"mime\"];\n $str=\"data:\".$mime.\";base64,\";\n $img = $str.$base;\n $arr[$org] = $img ;\n }catch (Exception $e) {\n $arr[$org] = $link;\n }\n }\n\n //return $arr;\n $htmsl = $html ;\n\n\n foreach($arr as $link => $base){\n $htmsl = str_replace($link,$base,$htmsl);\n }\n return $htmsl;\n }", "protected static function parseFileObjectUrls( &$return )\n\t{\n\t\t/* Parse file URLs */\n\t\t\\IPS\\Output::i()->parseFileObjectUrls( $return );\n\t\t\n\t\t/* Fix any protocol-relative URLs */\n\t\t$return = preg_replace_callback( \"/\\s+?(srcset|src)=(['\\\"])\\/\\/([^'\\\"]+?)(['\\\"])/ims\", function( $matches ){\n\t\t\t$baseUrl\t= parse_url( \\IPS\\Settings::i()->base_url );\n\n\t\t\t/* Try to preserve http vs https */\n\t\t\tif( isset( $baseUrl['scheme'] ) )\n\t\t\t{\n\t\t\t\t$url = $baseUrl['scheme'] . '://' . $matches[3];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$url = 'http://' . $matches[3];\n\t\t\t}\n\t\n\t\t\treturn \" {$matches[1]}={$matches[2]}{$url}{$matches[2]}\";\n\t\t}, $return );\n\t}", "function wp_get_http($url, $file_path = \\false, $red = 1)\n {\n }", "public function generateStyleUris(DataInterpreterInterface $interpreter, array $image_styles) {\n // Call image_style_url with the retrieved $value for each $image_style.\n $uri = $interpreter->getWrapper()->value()->uri;\n return array_map(function ($image_style) use ($uri) {\n return url(image_style_url($image_style, $uri), array(\n 'absolute' => $this->isAbsolute,\n ));\n }, $image_styles);\n }", "public function web_common(){\n\t\t//get_num(4) because: 0 = CLASS_KEY, 1=CLASS, 2=TASK_KEY, 3=TASK, 4=remainder\n\t\t$file = str_replace('|', DIRECTORY_SEPARATOR, lc('uri')->get('f', ''));\n\t\tif($file == ''){\n\t\t\t$tmps = lc('uri')->get_num();\n\t\t\tforeach($tmps as $k => $tmp){\n\t\t\t\tif($k >= 3 && $tmp != ''){\n\t\t\t\t\t$file .= $tmp.DIRECTORY_SEPARATOR;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(substr($file, -1) == DIRECTORY_SEPARATOR){\n\t\t\t$file = substr($file, 0, -1);\n\t\t}\n\t\t$file\t\t = str_replace(array('..', '|'), array('', DIRECTORY_SEPARATOR), $file);\n\t\t$template\t = ll('client')->get('template', 'default');\n\t\t$allowedExt\t = array('jpg', 'jpeg', 'png', 'gif', 'bmp', 'svg', 'ico');\n\t\t$file_cache\t = TPLPATH.$template.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.$file;\n\t\tforeach($allowedExt as $ext){\n\t\t\tif(ll('files')->exists($file_cache.'.'.$ext)){\n\t\t\t\t$file_cache .= '.'.$ext;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!ll('files')->exists($file_cache)){\n\t\t\t$file_cache = TPLPATH.'default'.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.$file;\n\t\t\tforeach($allowedExt as $ext){\n\t\t\t\tif(ll('files')->exists($file_cache.'.'.$ext)){\n\t\t\t\t\t$file_cache .= '.'.$ext;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!ll('files')->exists($file_cache)){\n\t\t\t$file_cache = TPLPATH.'img'.DIRECTORY_SEPARATOR.$file;\n\t\t\tforeach($allowedExt as $ext){\n\t\t\t\tif(ll('files')->exists($file_cache.'.'.$ext)){\n\t\t\t\t\t$file_cache .= '.'.$ext;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!ll('files')->exists($file_cache)){\n\t\t\tlc('error')->show_error(404, 'Page not Found');\n\t\t}else{\n\t\t\t$this->send_image($file_cache, $ext);\n\t\t}\n\t}", "public function get_image_link()\n {\n }", "function cdn_html_alter_css_urls(&$html) {\n $url_prefix_regex = _cdn_generate_url_prefix_regex();\n $pattern = \"#href=\\\"(($url_prefix_regex)(.*?\\.css)(\\?.*)?)\\\"#\";\n _cdn_html_alter_file_url($html, $pattern, 0, 3, 4, 'href=\"', '\"'); \n}", "protected function pvs_fetch_css($strextraction,&$strouthtml, $iscss, $cssfile=''){\n\t\tif (($this->selectedpics < $this->conf['attachments.']['webpagePreviewNumberOfImages']) || ($this->logofound == FALSE)) {\n\t\t\t$strouthtml.='<div class=\"cssfiles\">';\n\t\t\t$cssfiles = array();\n\t\t\t$k = 0;\n\t\t\t$strouthtmlcss= array();\n\t\t\t$cssfilerelpath='';\n\t\t\tif ($iscss==TRUE) {\n\t\t\t\t$cssfilebits=explode('/', $cssfile);\n\t\t\t\t$cssfilebits[count($cssfilebits)-1] = '';\n\t\t\t\t$cssfilepath=implode('/', $cssfilebits);\n\t\t\t\t$cssfilerelpatharr=explode('/', $cssfilepath);\n\t\t\t\t$cssfilerelpatharr[0]='';\n\t\t\t\t$cssfilerelpath='';\n\t\t\t\t$sizeofcssfilerelpatharr=sizeof($cssfilerelpatharr);\n\t\t\t\tfor($i = 0; $i < $sizeofcssfilerelpatharr; $i++) {\n\n\t\t\t\t\tif (($cssfilerelpatharr[$i] !='') && ($cssfilerelpatharr[$i] !=$this->urlsitestr)) {\n\t\t\t\t\t\t$cssfilerelpath.=$cssfilerelpatharr[$i].'/';\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\t$cssfilepath=$this->urlhomearrstr;\n\t\t\t}\n\n\t\t\t// handling of redirected subdirs\n\t\t\tif ($this->urlsubpath!=''){\n\t\t\t\tif (strpos($cssfilepath, $this->urlsubpath)===FALSE) {\n\t\t\t\t\t$cssfilepath=$cssfilepath . $this->urlsubpath;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t// handling of redirected subdirs end\n\n\t\t\t// fetch css\n\t\t\t$css_regex = '/import[^;]*' . 'url\\([\\\"|\\'](.*)[\\\"|\\']/Ui';\n\t\t\tpreg_match_all($css_regex, $strextraction, $cssarr, PREG_PATTERN_ORDER);\n\t\t\t$css_array = $cssarr[1];\n\t\t\t$sizeofcss_array=sizeof($css_array);\n\t\t\tfor($i = 0; $i < $sizeofcss_array; $i++) {\n\t\t\t\tif ($css_array[$i]) {\n\t\t\t\t\tif (substr($css_array[$i], 0, 1)=='/') {\n\t\t\t\t\t\t$css_array[$i]=trim(substr($css_array[$i], 1, 2000));\n\t\t\t\t\t}\n\n\t\t\t\t\t$css_arraybits=explode('.', $css_array[$i]);\n\t\t\t\t\tif ($css_arraybits[count($css_arraybits)-1]=='css') {\n\t\t\t\t\t\tif (strstr($css_array[$i], 'http')) {\n\t\t\t\t\t\t\t$strouthtmlcss[$k]='<p id=\"css'. $k . '\">' . $css_array[$i] . '</p>';\n\t\t\t\t\t\t\t$cssfiles[$k]=$css_array[$i];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$css_array[$i]=str_replace($cssfilerelpath, '', $css_array[$i]);\n\t\t\t\t\t\t\t$strouthtmlcss[$k]='<p id=\"css'. $k . '\">' . $cssfilepath . $css_array[$i] . '</p>';\n\t\t\t\t\t\t\t$cssfiles[$k]=$cssfilepath . $css_array[$i];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$k++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$sizeofcss_array=sizeof($css_array);\n\t\t\t}\n \t\t$css_regex = '/<link[^>]*' . 'href=[\\\"|\\'](.*)[\\\"|\\']/Ui';\n\t\t\tpreg_match_all($css_regex, $strextraction, $cssarr, PREG_PATTERN_ORDER);\n\t\t\t$css_array = $cssarr[1];\n\t\t\t$sizeofcss_array2=sizeof($css_array);\n\t\t\tfor($i = 0; $i < $sizeofcss_array2; $i++) {\n\t\t\t\tif ($css_array[$i]) {\n\t\t\t\t\tif (substr($css_array[$i], 0, 1)=='/') {\n\t\t\t\t\t\t$css_array[$i]=trim(substr($css_array[$i], 1, 2000));\n\t\t\t\t\t}\n\n\t\t\t\t\t$css_arraybits=explode('.', $css_array[$i]);\n\t\t\t\t\tif ($css_arraybits[count($css_arraybits)-1]=='css') {\n\t\t\t\t\t\tif (strstr($css_array[$i], 'http')) {\n\t\t\t\t\t\t\t$strouthtmlcss[$k]='<p id=\"css'. $k . '\">' . $css_array[$i] . '</p>';\n\t\t\t\t\t\t\t$cssfiles[$k]=$css_array[$i];\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$css_array[$i]=str_replace($cssfilerelpath, '', $css_array[$i]);\n\t\t\t\t\t\t\t$strouthtmlcss[$k]='<p id=\"css'. $k . '\">' . $cssfilepath . $css_array[$i] . '</p>';\n\t\t\t\t\t\t\t$cssfiles[$k]=$cssfilepath . $css_array[$i];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$k++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$sizeofcss_array2=sizeof($css_array);\n\t\t\t}\n\n\t\t\t$sizeofcssfiles=sizeof($cssfiles);\n\t\t\tfor($i = 0; $i < $sizeofcssfiles; $i++) {\n\t\t\t\tif (array_search($cssfiles[$i], $this->css_array) ==FALSE ) {\n\t\t\t\t\tif (($this->selectedpics < $this->conf['attachments.']['webpagePreviewNumberOfImages']) || ($this->logofound == FALSE)) {\n\t\t\t\t\t\t$htmlcss = $this->file_pvs_get_contents_curl($cssfiles[$i], 'css');\n\t\t\t\t\t\tif ($htmlcss != FALSE) {\n\t\t\t\t\t\t\t$images_arraycss=$this->pvs_fetch_images ($htmlcss, TRUE, $cssfiles[$i]);\n\t\t\t\t\t\t\t$this->images_array=array_merge($this->images_array, $images_arraycss);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$i=999999;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t$sizeofcssfiles=sizeof($cssfiles);\n\t\t\t}\n\n\t\t\t$strouthtml.= '</div>';\n\t\t\treturn $cssfiles;\n\t\t}\n\n\t}", "function loading_page_gifs_replacement_patch()\n{\n\t$opt = get_option('loading_page_options', array());\n\tif(\n\t\t!empty($opt) &&\n\t\t!empty($opt['lp_ls']) &&\n\t\t!empty($opt['lp_ls']['logo']) &&\n\t\t!empty($opt['lp_ls']['logo']['image'])\n\t)\n\t{\n\t\t$path = $opt['lp_ls']['logo']['image'];\n\t\t// Only to solve an issue with the previous version of the plugin when where used .gif\n\t\t$path = preg_replace('/\\/loading\\-screens\\/logo\\/gifs\\/(\\d+)\\.gif/i', '/loading-screens/logo/images/$1.svg', $path);\n\t\t$opt['lp_ls']['logo']['image'] = $path;\n\t\tupdate_option('loading_page_options', $opt);\n\t}\n}", "function get_image($url,$width,$height,$autocreate=true) {\n\t\t$ext = strrchr($url,'.');\n\t\t$new_url = str_replace($ext,'-slider-'.$width.'x'.$height.$ext,$url);\n\t\t\n\t\tif($autocreate) :\n\t\t\t//Create image if something went wrong and it still doesn't exist\n\t\t\t$image = wp_get_image_editor(str_replace(site_url(),ABSPATH,$new_url));\n\t\t\tif(is_wp_error($image)) $this->create_image($url,$width,$height);\n\t\tendif;\n\t\t\n\t\treturn $new_url;\n\t}", "public function download() {\t\t}", "public function image($img) {\n\t\tif (strpos($img, 'http') === false) {\t\t\n\t\t} else {\n\t\t\techo \"<img src='img/{$img}'>\";\n\t\t}\n\t}", "public function renderUri() {\n\t\tif ($this->isThumbnailPossible($this->getFile()->getExtension())) {\n\t\t\t$this->processedFile = $this->getFile()->process($this->getProcessingType(), $this->getConfiguration());\n\t\t\t$result = $this->processedFile->getPublicUrl(TRUE);\n\n\t\t\t// Update time stamp of processed image at this stage. This is needed for the browser to get new version of the thumbnail.\n\t\t\tif ($this->processedFile->getProperty('originalfilesha1') != $this->getFile()->getProperty('sha1')) {\n\t\t\t\t$this->processedFile->updateProperties(array('tstamp' => $this->getFile()->getProperty('tstamp')));\n\t\t\t}\n\t\t} else {\n\t\t\t$result = $this->getIcon($this->getFile()->getExtension());\n\t\t}\n\t\treturn $result;\n\t}", "public function addImages(array $urls);", "protected function _create_cached()\n {\n if($this->url_params['c'])\n {\n // Resize to highest width or height with overflow on the larger side\n $this->image->resize($this->url_params['w'], $this->url_params['h'], Image::INVERSE);\n\n // Crop any overflow from the larger side\n $this->image->crop($this->url_params['w'], $this->url_params['h']);\n }\n else\n {\n // Just Resize\n $this->image->resize($this->url_params['w'], $this->url_params['h']);\n }\n\n // Apply any valid watermark params\n $watermarks = Arr::get($this->config, 'watermarks');\n if ( ! empty($watermarks))\n {\n foreach ($watermarks as $key => $watermark)\n {\n if (key_exists($key, $this->url_params))\n {\n $image = Image::factory($watermark['image']);\n $this->image->watermark($image, $watermark['offset_x'], $watermark['offset_y'], $watermark['opacity']);\n }\n }\n }\n\n // Save\n if($this->url_params['q'])\n {\n //Save image with quality param\n $this->image->save($this->cached_file, $this->url_params['q']);\n }\n else\n {\n //Save image with default quality\n $this->image->save($this->cached_file, Arr::get($this->config, 'quality', 80));\n }\n }", "function _adRenderBuildImageUrlPrefix()\n{\n $conf = $GLOBALS['_MAX']['CONF'];\n return $GLOBALS['_MAX']['SSL_REQUEST'] ? 'https://' . $conf['webpath']['imagesSSL'] : 'http://' . $conf['webpath']['images'];\n}", "function makesitesmages()\n\t{\n\n\t\tglobal $option, $mainframe;\n\n\t\t//First we'll nee access to the file system and we'll use the Joomla way to be all safe.\n\t\tjimport('joomla.filesystem.file');\n\t\t$uploads_path = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_curriculum\". DS . \"masters\" ;\n\t\t$site_path = JPATH_ROOT . DS . \"images\". DS .\"content\" . DS .\"arts_curriculum\". DS . \"site\" ;\n\n\t\t// this is the width in px that we're telling GD to scale to, where's imagemagik when you need it.\n\t\t$new_w = 235;\n\t\t// where our source images live b/c GD needs to read them\n\t\t$cfg_fullsizepics_path = $uploads_path;\n\t\t//where we're sending them when we are done\n\t\t$cfg_thumb_path = $site_path;\n\t\t// we need one more path for this to work\n\t\t$filepath = $uploads_path ;\n\t\t// the directory\n\t\t$dir = dir($filepath);\n\n\t\t//check folders\n\t\t\t\n\t\twhile($entry=$dir->read()) {\n\t\t\t//check the files\n\t\t\tif($entry == \".\" || $entry == \"..\") {\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\t\n\t\t\t$fp = @fopen(\"$filepath/$entry\",\"r\");\n\n\t\t\t$photo_filename = \"$entry\";\n\n\t\t\t$image_stats = GetImageSize($cfg_fullsizepics_path.\"/\".$entry);\n\n\t\t\t$imagewidth = $image_stats[0];\n\n\t\t\t$imageheight = $image_stats[1];\n\n\t\t\t$img_type = $image_stats[2];\n\n\t\t\t$ratio = ($imagewidth / $new_w);\n\n\t\t\t$new_h = round($imageheight / $ratio);\n\n\t\t\tif (!file_exists($cfg_thumb_path.\"/\".$entry)) {\n\n\t\t\t\tif ($img_type==\"2\") {\n\n\t\t\t\t\t$src_img = imagecreatefromjpeg($cfg_fullsizepics_path.\"/\".$entry);\n\n\t\t\t\t\t$dst_img = imagecreatetruecolor($new_w,$new_h);\n\n\t\t\t\t\timagecopyresampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));\n\n\t\t\t\t\timagejpeg($dst_img, \"$cfg_thumb_path\".\"/$entry\", 100);\n\t\t\t\t\t\t\n\t\t\t\t\timagedestroy($dst_img);\n\n\t\t\t\t} elseif ($img_type==\"3\") {\n\n\t\t\t\t\t$src_img=ImageCreateFrompng($cfg_fullsizepics_path.\"/\".$entry);\n\t\t\t\t\t \n\t\t\t\t\t$dst_img=ImageCreateTrueColor($new_w,$new_h);\n\t\t\t\t\t\t\n\t\t\t\t\tImageCopyResampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img));\n\n\t\t\t\t\tImagepng($dst_img, \"$cfg_thumb_path\".\"/$entry\",100);\n\n\t\t\t\t\timagedestroy($dst_img);\n\n\t\t\t\t} elseif ($img_type==\"1\") {\n\n\t\t\t\t\t$cfg_thumb_url=$cfg_fullsizepics_url;\n\n\t\t\t\t} \n\n\t\t\t}\n\n\n\t\t\t\t\n\t\t} //the files are now in the /images/content/sketchup/site directory\n\n\n\t\t//$this->setRedirect( 'index.php?option=' . $option.'&task=movesiteimages&controller=items', 'Site Images made' );\n\t\t$this->setRedirect( 'index.php?option=' . $option, 'Site Images made' );\n\t\n\t}", "public static function download($download)\n {\n if ($download) {\n $zip = new \\ZipArchive;\n $target = 'themes/'.$download;\n $request = 'https://gilacms.com/packages/themes?theme='.$download;\n $pinfo = json_decode(file_get_contents($request), true)[0];\n\n if (!$pinfo) {\n echo '{\"error\":\"'.__('_theme_not_downloaded').'\"}';\n exit;\n }\n $file = 'https://gilacms.com/assets/themes/'.$download.'.zip';\n if (substr($pinfo['download_url'], 0, 8)==='https://') {\n $file = $pinfo['download_url'];\n }\n if (isset($_GET['src'])) {\n $file = $_GET['src'];\n }\n $tmp_name = $target.'__tmp__';\n $localfile = 'themes/'.$download.'.zip';\n\n if (!copy($file, $localfile)) {\n Response::error(__('_theme_not_downloaded'));\n }\n if ($zip->open($localfile) === true) {\n $previousFolder = LOG_PATH.'/previous-themes/';\n $month_in_seconds = 2592000;\n if (file_exists($tmp_name)) {\n rmdir($tmp_name);\n }\n $zip->extractTo($tmp_name);\n $zip->close();\n if (file_exists($target)) {\n rename($target, $previousFolder.date(\"Y-m-d H:i:s\").' '.$download);\n }\n $unzipped = scandir($tmp_name);\n if (count(scandir($tmp_name))===3) {\n if ($unzipped[2][0]!='.') {\n $tmp_name .= '/'.$unzipped[2];\n }\n }\n rename($tmp_name, $target);\n self::copyAssets($download);\n\n if (file_exists($target.'__tmp__')) {\n rmdir($target.'__tmp__');\n }\n $previousPackages = scandir($previousFolder);\n foreach ($previousPackages as $folder) {\n if (filemtime($previousFolder.$folder) < time()-$month_in_seconds) {\n FileManager::delete($previousFolder.$folder);\n }\n }\n\n unlink(LOG_PATH.'/load.php');\n unlink($localfile);\n echo '{\"success\":true}';\n if (!$_REQUEST['g_response']) {\n echo '<meta http-equiv=\"refresh\" content=\"2;url='.Config::base().'/admin/themes\" />';\n }\n } else {\n Response::error(__('_theme_not_downloaded'));\n }\n exit;\n }\n }", "protected function compile()\n\t{\n#\t\t$objArchive = new \\ZipWriter('system/tmp/'. $strTmp);\n\t\tif(\\Input::Get('download') && FE_USER_LOGGED_IN)\n\t\t{\n\t\t\t$objDownload = $this->Database->prepare(\"SELECT * FROM tl_download_item WHERE id=?\")->execute(\\Input::Get('download'));\n\t\t\t$objFile = \\FilesModel::findByUuid($objDownload->fileSRC);\n\n\t\t\t$this->sendFileToBrowser($objFile->path);\n\t\t}\n\n\t\t$objPage = \\PageModel::findById($GLOBALS['objPage']->id);\n\t\t$strUrl = $this->generateFrontendUrl($objPage->row(), '/download/%s');\n\n\t\t$objCategory = $this->Database->prepare(\"SELECT * FROM tl_download_category WHERE alias=?\")->execute(\\Input::Get('category'));\n\t\t$objArchiv = $this->Database->prepare(\"SELECT * FROM tl_download_archiv WHERE id=?\")->execute($objCategory->pid);\n\n\t\t$objData = $this->Database->prepare(\"SELECT * FROM tl_download_item WHERE pid=? && published=1 ORDER BY sorting ASC\")->execute($objCategory->id);\n\t\twhile($objData->next())\n\t\t{\n\t\t\t$objItem = (object) $objData->row();\n\n#\t\t\t$objItem->archiv = $objArchiv->title;\n#\n#\t\t\tif($objCategory->singleSRC)\n#\t\t\t{\n#\t\t\t\t$objItem->archivIcon = \\FilesModel::findByUuid($objCategory->singleSRC)->path;\n#\t\t\t}\n#\n#\t\t\t$objItem->category = $objCategory->title;\n#\t\t\t$objItem->singleSRC = deserialize($objItem->singleSRC);\n#\n#\t\t\t$arrImages = array();\n#\t\t\tif(is_array($objItem->singleSRC))\n#\t\t\t{\n#\t\t\t\tforeach($objItem->singleSRC as $image)\n#\t\t\t\t{\n#\t\t\t\t\t$arrImages[] = (object) array\n#\t\t\t\t\t(\n#\t\t\t\t\t\t'css' => '',\n#\t\t\t\t\t\t'path' => \\FilesModel::findByUuid($image)->path\n#\t\t\t\t\t);\n#\t\t\t\t}\n#\n#\t\t\t\t$arrImages[0]->css = 'first';\n#\t\t\t}\n#\n#\n#\t\t\tif(FE_USER_LOGGED_IN)\n#\t\t\t{\n#\t\t\t\t$objItem->url = sprintf($strUrl, $objItem->id);\n#\t\t\t\t$objItem->css = 'active';\n#\t\t\t\t$objItem->preview = $arrImages;\n#\t\t\t}\n#\t\t\telse\n#\t\t\t{\n#\t\t\t\t$objItem->css = 'inactive';\n#\t\t\t\t$objItem->preview = array($arrImages[0]);\n#\n#\t\t\t}\n\n\t\t\t$arrData[] = $objItem;\n\t\t}\n\n#\t\tif(!count($arrDaata)) { $arrData = array(); }\n\n\t\t$this->Template->items = $arrData;\n\t}", "public function get_image_url()\n {\n }", "private function fetchImages() {\n\t\ttry {\n\t\t\t\n\t\t\t$images = $this->getParam('fetcher',true);\n\t\t\t$images = explode(chr(13), $images);\n\t\t\tif (sizeof($images > 0)) {\n\n\t\t\t\tif (sizeof($images)==1 && $images[0]=='') {\n\t\t\t\t\tthrow new VCDInvalidInputException('Invalid input!');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Check if the screenshots folder already exist\n\t\t\t\t$destFolder = VCDDB_BASE.DIRECTORY_SEPARATOR.ALBUMS.$this->itemObj->getID().DIRECTORY_SEPARATOR;\n\t\t\t\tif (!$this->itemObj->hasScreenshots()) {\n\t\t\t\t\tif (!fs_is_dir($destFolder)) {\n\t\t\t\t\t\tfs_mkdir($destFolder, 0755);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach ($images as $image) {\n\t\t\t\t\tVCDUtils::grabImage(trim($image), false, $destFolder);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (!MovieServices::getScreenshots($this->itemObj->getID())) {\n\t\t\t\t\tMovieServices::markVcdWithScreenshots($this->itemObj->getID());\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} catch (Exception $ex) {\n\t\t\tVCDException::display($ex,true);\n\t\t}\n\t}", "private function _replace_file_types()\n\t{\n\t\tpreg_match_all( '#(src|data-src|href)\\s*=\\s*[\\'\"]([^\\'\"\\\\\\]+)[\\'\"]#i', $this->content, $matches ) ;\n\t\tif ( empty( $matches[ 2 ] ) ) {\n\t\t\treturn ;\n\t\t}\n\n\t\t$filetypes = array_keys( $this->_cfg_cdn_mapping ) ;\n\t\tforeach ( $matches[ 2 ] as $k => $url ) {\n\t\t\t$url_parsed = parse_url( $url ) ;\n\t\t\tif ( empty( $url_parsed[ 'path' ] ) ) {\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\t$postfix = substr( $url_parsed[ 'path' ], strrpos( $url_parsed[ 'path' ], '.' ) ) ;\n\t\t\tif ( ! in_array( $postfix, $filetypes ) ) {\n\t\t\t\tcontinue ;\n\t\t\t}\n\n\t\t\tLiteSpeed_Cache_Log::debug2( 'CDN matched file_type ' . $postfix . ' : ' . $url ) ;\n\n\t\t\tif( ! $url2 = $this->rewrite( $url, LiteSpeed_Cache_Config::ITEM_CDN_MAPPING_FILETYPE, $postfix ) ) {\n\t\t\t\tcontinue ;\n\t\t\t}\n\n\t\t\t$attr = str_replace( $url, $url2, $matches[ 0 ][ $k ] ) ;\n\t\t\t$this->content = str_replace( $matches[ 0 ][ $k ], $attr, $this->content ) ;\n\t\t}\n\t}", "function minorite_image($variables) {\n $attributes = $variables['attributes'];\n $attributes['src'] = file_create_url($variables['path']);\n\n foreach (array('alt', 'title') as $key) {\n\n if (isset($variables[$key])) {\n $attributes[$key] = $variables[$key];\n }\n }\n\n return '<img' . drupal_attributes($attributes) . ' />';\n}", "public function image($type = 'png')\n {\n $this->swallow();\n // if redirecting\n if ($this->redirect) {\n /*header(\"Location: {$this->redirect}\");\n // more headers\n foreach ( $this->headers as $header ) {\n header($header);\n }*/\n $this->redirect($this->redirect, array(), false);\n } else {\n // header json data\n header('Content-Type: image/'.$type);\n // more headers\n foreach ($this->headers as $header) {\n header($header);\n }\n // set css data string\n $results = implode(\"\\n\", $this->vars);\n // send\n echo $results;\n }\n }", "public function setImages(){\n\t\t// imagen destacada\n $this->thumbail_img = $this->getThumbnailImg();\n // imagenes\n $this->images = $this->getImages();\n\t}", "public function download_docx(){\r\n\t\tforeach ($this->urls as $key => $parse) {\r\n\t\t\t$html_content = $this->get_html_from_url($parse['url']);\r\n\r\n\t\t\t// print_r($parse);\r\n\t\t\t// print_r($html_content);\r\n\t\t\t$converter = new Html2docx\\Html2docx();\r\n\t\t\t$converter->assign_pandoc($this->pandoc_path);\r\n\t\t\t$converter->input_html_content($html_content);\r\n\t\t\t$converter->output_file($parse['output_file']);\r\n\t\t\t$docx_file = $converter->convert_from_html();\r\n\r\n\t\t\t$this->download_docx_init($docx_file);\r\n\t\t\t$this->download_file($docx_file);\r\n\t\t}\r\n\t\tunset($this->urls);\r\n\t}", "function wcs_get_image_asset_url( $file_name ) {\n\treturn plugins_url( \"/assets/images/{$file_name}\", WC_Subscriptions::$plugin_file );\n}", "public static function downloadImages($reports, $path = 'data/photos/', $prefix = 'photo-', $i = 1)\n {\n foreach ($reports as $report) {\n if (isset($report['attributes']['field_media_url'])) {\n $raw = file_get_contents($report['attributes']['field_media_url']);\n file_put_contents($path . $prefix . $i . '.jpg', $raw);\n $i++;\n }\n }\n }", "public function mainImageURL()\n {\n if ($this->image) {\n $imageLocation = $this->image->location;\n } else {\n // If the image cannot be displayed, show a generic image.\n $imageLocation = 'generic/generic1.jpg';\n }\n\n return Storage::url($imageLocation);\n }", "function url_to_image($webpage_url, $img_path)\n\t{\n\t\t// $img_path = '#full absolute path for png image file to be created#'; \t// e.g.: linux: /var/www/images/img.png OR windows: d:\\www\\images\\ (path where you want to store image)\n\t\t$url = $this->api_url.\"/?url=\".urlencode($webpage_url); \t\t\t\t\t\t\t\t\t\t\t\t\t// api url with random unique time based value as parameter to prevent cached response\n\t\t$params = array();\n\t\t//\n\t\t$img = $this->post_to_url($url, $params);\n\t\t// print_r($img); exit;\n\t\tif(strpos($img, '\"er\":\"error: #') === false) {\n\t\t\t@ file_put_contents($img_path, $img);\n\t\t\t// your code to further use image as per your req. will be here\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "function download_img($image_dir, $image_url) {\n\tif (!file_exists($image_dir)) {\n\t\tmkdir($image_dir);\n\t}\n\t$ch = curl_init($image_url);\n\t$path_parts = pathinfo($image_url);\n\t$parsed_url = parse_url($path_parts['basename']);\n\t$path_parts = pathinfo($parsed_url['path']);\n\t$path = $image_dir.$path_parts['filename'].\".\".$path_parts['extension'];\n\t$fp = fopen($path, 'wb');\n\tcurl_setopt($ch, CURLOPT_FILE, $fp);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\tcurl_exec($ch);\n\tcurl_close($ch);\n\tfclose($fp);\n\treturn $path;\n}", "function _putimages() {\n parent::_putimages();\n $this->_putformxobjects();\n }", "function returnLiveImage( $getSize, $getDir, $getFilename ){\r\n global $imgPath,$newDir,$filesMoved,$table;\r\n\r\n\t$dirs = [];\r\n\t$dirs['highres'] = \"highres/\";\r\n\t$dirs['large'] = \"large/\";\r\n\t$dirs['primary'] = \"\";\r\n\t$dirs['thumb'] = \"thumbs/\"; \r\n\r\n switch($getDir){\r\n case \"from\":\r\n $switchDir = $imgPath; \r\n break;\r\n case \"to\":\r\n\t\t\t$switchDir = $newDir;\r\n\t\t\t$dirs['highres'] = \"/hi/\";\r\n\t\t\t$dirs['large'] = \"/lg/\"; \r\n $dirs['primary'] = \"/pr/\";\r\n $dirs['thumb'] = \"/th/\";\r\n break;\r\n case \"live\":\r\n $switchDir = 'https://www.classicandsportscar.ltd.uk/images_catalogue/'; \r\n break;\r\n }\r\n\r\n return '<img src=\"'.$switchDir.$dirs[$getSize].$getFilename.'\" class=\"'.$getSize.'\">';\r\n}", "function theme_img($uri, $tag=true)\n{\n\t$path_img = theme_url(assets_dir('img').'/'.$uri);\n\treturn _img($path_img,$uri,$tag);\n}" ]
[ "0.688141", "0.6373753", "0.6367579", "0.6001647", "0.5999664", "0.58871716", "0.5839635", "0.5802336", "0.57954395", "0.5688069", "0.5661476", "0.56460226", "0.56087995", "0.5605742", "0.5588823", "0.5578539", "0.556012", "0.5555235", "0.5543404", "0.5517085", "0.5490574", "0.54905564", "0.54808944", "0.5479418", "0.5471784", "0.5461865", "0.5441166", "0.5430039", "0.5429395", "0.53918207", "0.53885335", "0.534231", "0.53406674", "0.53402334", "0.53325903", "0.5315782", "0.53090864", "0.53080064", "0.53079444", "0.53069484", "0.5305668", "0.5303209", "0.5285078", "0.5283901", "0.5281392", "0.5275097", "0.5272943", "0.526895", "0.52689266", "0.52655274", "0.525917", "0.52413434", "0.5240334", "0.52334255", "0.5229172", "0.52258414", "0.522411", "0.5221666", "0.5219669", "0.52154404", "0.52021354", "0.519943", "0.5198868", "0.51915026", "0.5191366", "0.51825786", "0.51788235", "0.5177737", "0.517357", "0.5173331", "0.51701224", "0.5161488", "0.51609457", "0.5160635", "0.5156449", "0.5151026", "0.5139431", "0.5135186", "0.5134912", "0.5132293", "0.51310986", "0.5128496", "0.51255167", "0.51213163", "0.5110683", "0.5110274", "0.5109919", "0.5107617", "0.5102992", "0.5102802", "0.51015085", "0.5100535", "0.50998497", "0.50955236", "0.5092741", "0.5087277", "0.50859", "0.5081095", "0.50792354", "0.50730795" ]
0.71879554
0
Replaces to .. for proper image displaying in styles with url(..) entries
function file_replace( $match ) { global $snoopy; // Href was already converted to the proper server path preg_match( '/href\s*=\s*[\'\"]?(.*?)[\'\" >]/', $match[0], $m ); $href = $m[1]; $snoopy->fetch( $href ); return "<style>\r\n".$snoopy->results."</style>\r\n"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cdn_html_alter_image_urls(&$html) {\n $url_prefix_regex = _cdn_generate_url_prefix_regex();\n $pattern = \"#((<img\\s+|<img\\s+[^>]*\\s+)src\\s*=\\s*[\\\"|\\'])($url_prefix_regex)([^\\\"|^\\']*)([\\\"|\\'])#i\";\n _cdn_html_alter_file_url($html, $pattern, 0, 4, 5, 1, '');\n}", "function style_url_replace( $match ) {\r\n global $snoopy, $download_path, $downloaded_files;\r\n\r\n $relative = $match[1];\r\n $image = convertLink( $match[1] );\r\n\r\n if ( in_array( $image, array_keys( $downloaded_files ) ) ) {\r\n $filename = $downloaded_files[$image];\r\n } else {\r\n\r\n $ext = end( explode( '.', $image ) );\r\n $name = time();\r\n\r\n $snoopy->fetch( $image );\r\n\r\n $filename = $download_path.$name.'.'.$ext;\r\n $downloaded_files[$image] = $filename;\r\n\r\n // can we handle fwrite/fopen failures in a better way?\r\n $fp = @fopen( $filename, 'wb' );\r\n @fwrite( $fp, $snoopy->results, strlen( $snoopy->results ) );\r\n @fclose( $fp );\r\n }\r\n\r\n return 'url('.$filename.')';\r\n}", "function _adRenderBuildImageUrlPrefix()\n{\n $conf = $GLOBALS['_MAX']['CONF'];\n return $GLOBALS['_MAX']['SSL_REQUEST'] ? 'https://' . $conf['webpath']['imagesSSL'] : 'http://' . $conf['webpath']['images'];\n}", "public function url_img( $url )\n\t{\n\t\tif ( $url && $url2 = $this->rewrite( $url, LiteSpeed_Cache_Config::ITEM_CDN_MAPPING_INC_IMG ) ) {\n\t\t\t$url = $url2 ;\n\t\t}\n\t\treturn $url ;\n\t}", "private function getImageIntoCss(): void\n {\n preg_match_all(self::REGEX_IMAGE_FORMAT, $this->sContents, $aHit, PREG_PATTERN_ORDER);\n\n for ($i = 0, $iCountHit = count($aHit[0]); $i < $iCountHit; $i++) {\n $sImgPath = PH7_PATH_ROOT . $this->sBaseUrl . $aHit[1][$i] . $aHit[2][$i];\n $sImgUrl = PH7_URL_ROOT . $this->sBaseUrl . $aHit[1][$i] . $aHit[2][$i];\n\n if ($this->isDataUriEligible($sImgPath)) {\n $this->sContents = str_replace(\n $aHit[0][$i],\n 'url(' . Optimization::dataUri($sImgPath, $this->oFile) . ')',\n $this->sContents\n );\n } else {\n $this->sContents = str_replace(\n $aHit[0][$i],\n 'url(' . $sImgUrl . ')',\n $this->sContents\n );\n }\n }\n }", "public function getImageAttribute($value)\n {\n return str_replace(url('/'), '', $value);\n }", "function loading_page_gifs_replacement_patch()\n{\n\t$opt = get_option('loading_page_options', array());\n\tif(\n\t\t!empty($opt) &&\n\t\t!empty($opt['lp_ls']) &&\n\t\t!empty($opt['lp_ls']['logo']) &&\n\t\t!empty($opt['lp_ls']['logo']['image'])\n\t)\n\t{\n\t\t$path = $opt['lp_ls']['logo']['image'];\n\t\t// Only to solve an issue with the previous version of the plugin when where used .gif\n\t\t$path = preg_replace('/\\/loading\\-screens\\/logo\\/gifs\\/(\\d+)\\.gif/i', '/loading-screens/logo/images/$1.svg', $path);\n\t\t$opt['lp_ls']['logo']['image'] = $path;\n\t\tupdate_option('loading_page_options', $opt);\n\t}\n}", "function dynamik_skin_css_images_converter( $skin_css )\n{\n\t$skin_css = str_replace( '../../theme/images/', 'images/', $skin_css );\n\n\treturn $skin_css;\n}", "private function originalSizeImageUrl(String $url) : String\n {\n return preg_replace(\"/https?:\\/\\/(.+?)_normal.(jpg|jpeg|png|gif)/\", \"https://$1.$2\", $url);\n }", "public function doImageURL($text)\n {\n // URLs containing \"://\" are left untouched\n return preg_replace('~(!\\[.+?\\]\\()(?!\\w++://)(\\S*(?:\\s*+\".+?\")?\\))~', '$1'.self::$imageUrl.'$2', $text);\n }", "function path_replace( $html ){\n\t\t// url => template_dir/url\n\t\t// url# => url#\n\t\t// http://url => http://url\n\n\t\t$exp = array( '/src=(?:\")http\\:\\/\\/([^\"]+?)(?:\")/i', '/src=(?:\")([^\"]+?)#(?:\")/i', '/src=\"(.*?)\"/', '/src=(?:\\@)([^\"]+?)(?:\\@)/i', '/background=(?:\")http\\:\\/\\/([^\"]+?)(?:\")/i', '/background=(?:\")([^\"]+?)#(?:\")/i', '/background=\"(.*?)\"/', '/background=(?:\\@)([^\"]+?)(?:\\@)/i', '/<link(.*?)href=(?:\")http\\:\\/\\/([^\"]+?)(?:\")/i', '/<link(.*?)href=(?:\")([^\"]+?)#(?:\")/i', '/<link(.*?)href=\"(.*?)\"/', '/<link(.*?)href=(?:\\@)([^\"]+?)(?:\\@)/i' );\n\t\t$sub = array( 'src=@http://$1@', 'src=@$1@', 'src=\"' . $this->tpl_dir . '\\\\1\"', 'src=\"$1\"', 'background=@http://$1@', 'background=@$1@', 'background=\"' . $this->tpl_dir . '\\\\1\"', 'background=\"$1\"', '<link$1href=@http://$2@', '<link$1href=@$2@' , '<link$1href=\"' . $this->tpl_dir . '$2\"', '<link$1href=\"$2\"' );\n\t\treturn preg_replace( $exp, $sub, $html );\n\t}", "function style_fixing( $match ) {\r\n $match[0] = preg_replace_callback('/url\\s*\\(\\s*[\\'\\\"]?(.*?)\\s*[\\'\\\"]?\\s*\\)/is', \"style_url_replace\", $match[0]);\r\n //echo \"<pre>\".htmlspecialchars($match[0]).\"</pre>\";\r\n return $match[0];\r\n}", "function getImageUrl($url)\r\n {\r\n if (substr_count($url, 'http://') or substr_count($url, 'https://')) {\r\n //\r\n } else {\r\n $page = $this->currentUrl;\r\n if ($this->baseHrefs[$page]) {\r\n $page = rtrim($this->baseHrefs[$page], '/');\r\n }\r\n else {\r\n $page = dirname($page);\r\n }\r\n if (!substr_count($url, '/')) return $page . '/' . $url;\r\n $page = 'http://' . parse_url($page, PHP_URL_HOST);\r\n $url = $page . '/' . ltrim($url, '/');\r\n }\r\n $url = html_entity_decode($url);\r\n $url = str_replace(' ', '%20', $url);\r\n return $url;\r\n }", "function title_icon_url2icon_filter($custom_field) {\n\t$img = $custom_field;\n\tif (preg_match('#\\[img\\](.+?)\\[/img\\]#i', $custom_field, $matches)) {\n\t\t$img = '<img src=\"'.$matches[1].'\" alt =\"\" />';\n\t}\n\treturn $img;\n}", "function fixMarkdownImagePaths($md){\n return preg_replace('/(!\\[[^\\]]+\\]\\()([^()]+)(?=\\))/i', '$1' . LOGMD_POSTS_DIR_PATH . '$2', $md);\n }", "public function replaceImage()\n {\n $args = func_get_args();\n\n $domDocument = new DomDocument();\n $domDocument->loadXML(self::$_document);\n\n $domImages = $domDocument->getElementsByTagNameNS('http://schemas.openxmlformats.org/drawingml/2006/' .\n 'wordprocessingDrawing', 'docPr');\n $domImagesId = $domDocument->getElementsByTagNameNS(\n 'http://schemas.openxmlformats.org/drawingml/2006/main',\n 'blip'\n );\n\n for ($i = 0; $i < $domImages->length; $i++) {\n if ($domImages->item($i)->getAttribute('descr') ==\n self::$_templateSymbol . $args[0] . self::$_templateSymbol) {\n $ind = $domImagesId->item($i)->getAttribute('r:embed');\n self::$placeholderImages[$ind] = $args[1];\n }\n }\n }", "protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }", "public function set_image(string $value) {\n $image_names = ['batmobile.gif', 'tumbler.gif', 'animated.gif', 'lego.gif'];\n\n $this->image = parent::filter_file($value, $image_names);\n\n if (empty($this->image)) {\n $this->image = $image_names[0];\n }\n }", "function column_image($item){\n return sprintf('<img src=\"%1$s\">',\n /*$1%s*/ site_url().$item['image']\n );\n }", "private function getPlainFileName(){\r\n return str_replace(\"https://images.pond5.com/\",\"\",$this->fileName); \r\n }", "public function url()\n\t{\n\t\t$this->buildImage();\n\t\treturn $this->buildCachedFileNameUrl;\n\t}", "function tep_get_dest_image($small_image_source,$folder = 'xxs',$suffix=''){\n\treturn str_replace('-s',$suffix,str_replace('small',$folder,$small_image_source));\n}", "function image($filename='',$attrs='')\n{\n $img_path = get_stylesheet_directory_uri() . \"/images\" . \"/${filename}\";\n $attrs = $attrs == '' ? \"src='${img_path}'\" : (\"src='${img_path}' \" . $attrs);\n output_single_tag('img',$attrs);\n}", "function minorite_image($variables) {\n $attributes = $variables['attributes'];\n $attributes['src'] = file_create_url($variables['path']);\n\n foreach (array('alt', 'title') as $key) {\n\n if (isset($variables[$key])) {\n $attributes[$key] = $variables[$key];\n }\n }\n\n return '<img' . drupal_attributes($attributes) . ' />';\n}", "public function createImgUri() {\n\t\t$this->imgUri = FLICKR_FARM;\n\t\t$this->imgUri .= $this->photo['farm'];\n\t\t$this->imgUri .= '.';\n\t\t$this->imgUri .= STATICFLICKR;\n\t\t$this->imgUri .= $this->photo['server'];\n\t\t$this->imgUri .= '/';\n\t\t$this->imgUri .= $this->photo['id'];\n\t\t$this->imgUri .= '_';\n\t \t$this->imgUri .= $this->photo['secret'];\n\t\t$this->imgUri .= '.';\n\t \t$this->imgUri .= IMGEXT;\n\t}", "function makeAbsolutePaths($value){\n\t\t$siteUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL');\n\t\t$value = eregi_replace('src=\"fileadmin','src=\"'.$siteUrl.'fileadmin',$value);\n\t\t$value = eregi_replace('src=\"uploads','src=\"'.$siteUrl.'uploads',$value);\n\t\treturn $value;\n\t}", "public function image($img) {\n\t\tif (strpos($img, 'http') === false) {\t\t\n\t\t} else {\n\t\t\techo \"<img src='img/{$img}'>\";\n\t\t}\n\t}", "function theme_img($uri, $tag=false)\n{\n \n\tif($tag)\n\t{\n\t\treturn '<img src=\"'.theme_url('assets/images/'.$uri).'\" alt=\"'.$tag.'\">';\n\t}\n\telse\n\t{\n\t\treturn theme_url('assets/images/'.$uri);\n\t}\n\t\n}", "function imageHtmlCode($url, $adds = '', $attr = '')\r\n {\r\n $this->imagesContentNoSave = false;\r\n if (!$this->testOn && ($this->feed['params']['image_save'] || $this->feed['params']['img_path_method'])) {\r\n if ($this->feed['params']['img_path_method']=='1') $url = ltrim($url, '/');\r\n if ($this->feed['params']['img_path_method']=='2') $url = rtrim(site_url(), '/') . $url;\r\n \r\n } \r\n return strtr($this->feed['params']['imageHtmlCode'], array('%TITLE%' => htmlentities($this->currentTitle, ENT_COMPAT, 'UTF-8'), '%PATH%' => $url, '%ADDS%' => $adds, '%ATTR%' => $attr)); \r\n }", "private function _replace_inline_css()\n\t{\n\t\t// preg_match_all( '/url\\s*\\(\\s*(?![\"\\']?data:)(?![\\'|\\\"]?[\\#|\\%|])([^)]+)\\s*\\)([^;},\\s]*)/i', $this->content, $matches ) ;\n\n\t\t/**\n\t\t * Excludes `\\` from URL matching\n\t\t * @see #959152 - Wordpress LSCache CDN Mapping causing malformed URLS\n\t\t * @see #685485\n\t\t * @since 3.0\n\t\t */\n\t\tpreg_match_all( '#url\\((?![\\'\"]?data)[\\'\"]?([^\\)\\'\"\\\\\\]+)[\\'\"]?\\)#i', $this->content, $matches ) ;\n\t\tforeach ( $matches[ 1 ] as $k => $url ) {\n\t\t\t$url = str_replace( array( ' ', '\\t', '\\n', '\\r', '\\0', '\\x0B', '\"', \"'\", '&quot;', '&#039;' ), '', $url ) ;\n\n\t\t\tif ( ! $url2 = $this->rewrite( $url, LiteSpeed_Cache_Config::ITEM_CDN_MAPPING_INC_IMG ) ) {\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\t$attr = str_replace( $matches[ 1 ][ $k ], $url2, $matches[ 0 ][ $k ] ) ;\n\t\t\t$this->content = str_replace( $matches[ 0 ][ $k ], $attr, $this->content ) ;\n\t\t}\n\t}", "protected function setImageUrl() {\r\n\t\t$previewImageElement = $this->newsItem->getFirstImagePreview();\r\n\t\tif (!empty($previewImageElement)) {\r\n\t\t\t$imgUrl = $GLOBALS['TSFE']->absRefPrefix . 'uploads/tx_news/' . t3lib_div::rawUrlEncodeFP($previewImageElement->getImage());\r\n\t\t\tif (!t3lib_div::isFirstPartOfStr($imgUrl, t3lib_div::getIndpEnv('TYPO3_SITE_URL'))) {\r\n\t\t\t\t$imgUrl = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . $imgUrl;\r\n\t\t\t}\r\n\t\t\t$this->imageUrl = $imgUrl;\r\n\t\t}\r\n\t}", "function clientbox_shortcode_helper($image){\n return '[client logo=\"' . get_static_uri($image) . '\"]';\n}", "function smarty_modifier_replace_urls($p_string)\n{\n // Images get added by the css after the fact.\n $host = \"([a-z\\d][-a-z\\d]*[a-z\\d]\\.)+[a-z][-a-z\\d]*[a-z]\";\n $port = \"(:\\d{1,})?\";\n $path = \"(\\/[^?<>\\#\\\"\\s]+)?\";\n $query = \"(\\?[^<>\\#\\\"\\s]+)?\";\n\n return preg_replace(\"#((ht|f)tps?:\\/\\/{$host}{$port}{$path}{$query})#i\", \"<a target='_blank' class='extLink' rel='nofollow' href='$1'>$1</a>\", $p_string);\n}", "function replaceIMG($html)\r\n\t{\r\n\t\t$iStart = stripos($html,\"<img\");\r\n\t\twhile((string)$iStart != null) //string typecast to handle \"0\" which equates to FALSE in PHP...\r\n\t\t{\r\n\t\t\t//get entire IMG tag\r\n\t\t\t$iEnd = stripos($html,\">\",$iStart)+1;\r\n\t\t\t$imgTag = substr($html,$iStart,($iEnd-$iStart));\r\n\t\t\t\r\n\t\t\t//get src\r\n\t\t\t$iSrcStart = stripos($imgTag,\"src=\");\r\n\t\t\tif(substr($imgTag,($iSrcStart+4),1) == \"'\")\r\n\t\t\t{\r\n\t\t\t\t//single quote\r\n\t\t\t\t$iSrcEnd = stripos($imgTag,\"'\",$iSrcStart+5);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//double quote\r\n\t\t\t\t$iSrcEnd = stripos($imgTag,'\"',$iSrcStart+5);\r\n\t\t\t}\r\n\t\t\t$imgSrc = substr($imgTag,$iSrcStart+5,($iSrcEnd-($iSrcStart+5)));\r\n\t\t\t\r\n\t\t\t//get alt\r\n\t\t\t$iAltStart = stripos($imgTag,\"alt=\");\r\n\t\t\tif($iAltStart != null)\r\n\t\t\t{\r\n\t\t\t\tif(substr($imgTag,($iAltStart+4),1) == \"'\")\r\n\t\t\t\t{\r\n\t\t\t\t\t//single quote\r\n\t\t\t\t\t$iAltEnd = stripos($imgTag,\"'\",$iAltStart+5);\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//double quote\r\n\t\t\t\t\t$iAltEnd = stripos($imgTag,'\"',$iAltStart+5);\r\n\t\t\t\t}\r\n\t\t\t\t$imgAlt = substr($imgTag,$iAltStart+5,($iAltEnd-($iAltStart+5)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//replace HTML\r\n\t\t\tif((string)stripos($imgSrc,\"scripts/CLEditor/images/icons/\") == null) //exclude icons from rich text editor\r\n\t\t\t{\r\n\t\t\t\t$replacementHTML = \"<div class='table comicborder popupshadow-margin'><div class='table-row'><div class='table-cell'><a href='\" . $imgSrc . \"'>\" . $imgTag . \"</a></div></div>\";\r\n\t\t\t\tif($iAltStart != null)\r\n\t\t\t\t{\r\n\t\t\t\t\t$replacementHTML = $replacementHTML . \"<div class='table-row'><div class='table-cell comicimagecaption'>\" . $imgAlt . \"</div></div>\";\r\n\t\t\t\t}\r\n\t\t\t\t$replacementHTML = $replacementHTML . \"</div>\";\r\n\t\t\t\t$html = substr_replace($html,$replacementHTML,$iStart,($iEnd-$iStart));\r\n\t\t\t\t\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"<img\",($iStart+strlen($replacementHTML)));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//prep next loop\r\n\t\t\t\t$iStart = stripos($html,\"<img\",($iStart+strlen($imgTag)));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $html;\r\n\t}", "function image($url = false, $default = null)\n {\n // no image\n if (!$url) {\n return ($default) ?: config('helpers.default_image');\n }\n\n // pass through\n return '/' . ltrim($url, '/');\n }", "protected function applyUrl()\n\t{\n\t\t// CSS\n\t\t$nodes = $this->dom->getElementsByTagName('link');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t\t// JS\n\t\t$nodes = $this->dom->getElementsByTagName('script');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Image\n\t\t$nodes = $this->dom->getElementsByTagName('img');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('src');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->layout_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('src', $url);\n\t\t\t}\n\t\t}\n\t\t// Anchor\n\t\t$nodes = $this->dom->getElementsByTagName('a');\n\t\tforeach ($nodes as $node) {\n\t\t\t$url = $node->getAttribute('href');\n\t\t\tif (strlen($url) > 0 && $url[0] == ':') {\n\t\t\t\t$url = $this->base_url . '/' . trim($url, ':');\n\t\t\t\t$node->setAttribute('href', $url);\n\t\t\t}\n\t\t}\n\t}", "function url_images(): string\n{\n return \\plugins_url(\"images/\", BOOKCLUBFILE);\n}", "protected function defaultLogoUrl()\n {\n return config('constants.ui_avatars_url').''.urlencode($this->name);\n }", "public function testImagePathPrefix() {\n\t\t$result = $this->Html->image('test.gif', array('pathPrefix' => '/my/custom/path/'));\n\t\t$this->assertTags($result, array('img' => array('src' => '/my/custom/path/test.gif', 'alt' => '')));\n\n\t\t$result = $this->Html->image('test.gif', array('pathPrefix' => 'http://cakephp.org/assets/img/'));\n\t\t$this->assertTags($result, array('img' => array('src' => 'http://cakephp.org/assets/img/test.gif', 'alt' => '')));\n\n\t\t$result = $this->Html->image('test.gif', array('pathPrefix' => '//cakephp.org/assets/img/'));\n\t\t$this->assertTags($result, array('img' => array('src' => '//cakephp.org/assets/img/test.gif', 'alt' => '')));\n\n\t\t$previousConfig = Configure::read('App.imageBaseUrl');\n\t\tConfigure::write('App.imageBaseUrl', '//cdn.cakephp.org/img/');\n\t\t$result = $this->Html->image('test.gif');\n\t\t$this->assertTags($result, array('img' => array('src' => '//cdn.cakephp.org/img/test.gif', 'alt' => '')));\n\t\tConfigure::write('App.imageBaseUrl', $previousConfig);\n\t}", "public function _replace_images_paths($string = '')\n {\n $images_path = (MAIN_TYPE_USER ? ($this->MEDIA_PATH ?? '') : ADMIN_WEB_PATH) . $this->TPL_PATH . $this->_IMAGES_PATH;\n $uploads_path = ($this->MEDIA_PATH ?? '') . ($this->_UPLOADS_PATH ?? '');\n $r = [\n '\"images/' => '\"' . $images_path,\n '\\'images/' => '\\'' . $images_path,\n 'src=\"uploads/' => 'src=\"' . $uploads_path,\n '\"uploads/' => '\"' . $uploads_path,\n '\\'uploads/' => '\\'' . $uploads_path,\n ];\n return str_replace(array_keys($r), array_values($r), $string);\n }", "function namespace_login_style() {\n echo '<style>.login h1 a { background-image: url( http://thesoundtestroom.com/wp-content/uploads/2016/05/whiteHeadSolo150x109.png ) !important; }</style>';\n}", "function attachment_image_link_remove_filter($content) {\n $content = preg_replace(array('{<a(.*?)(wp-att|wp-content\\/uploads)[^>]*><img}', '{ wp-image-[0-9]*\" /></a>}'), array('<img', '\" />'), $content);\n return $content;\n}", "public function getUrl()\n\t{\n\t\treturn '/images/blog/' . $this->name;\n\t}", "public function mainImage():string\n {\n return ($this->image_1) ? url( $this->image_1 ) : url( env('NO_IMAGE_PRODUCT_DEFAULT','') );\n }", "function pixtulate_filter ( $content ) {\r\n\t$pixtulate_connector = get_option ( 'pixtulate_connector' );\r\n\t$base_url = get_site_url();\r\n\r\n\t$base_url_arr = parse_url($base_url);\r\n\tif ($base_url_arr[path]) {\r\n\t\t$base_url_mod = $base_url_arr[scheme]. '\\:\\/\\/' .$base_url_arr[host]. '\\\\' .$base_url_arr[path];\r\n\t} else {\r\n\t\t$base_url_mod = $base_url_arr[scheme]. '\\:\\/\\/' .$base_url_arr[host];\r\n\t}\r\n\r\n\tif($pixtulate_connector == $base_url)\r\n\t\treturn preg_replace(\"/(src=\\\")(.*)([^>]*)(\".$base_url_mod.\"\\/)/\", \"data-$1$2$3\", $content);\r\n\telse\r\n\t\treturn preg_replace(\"/(src=\\\")(.*)([^>]*)(uploads\\/)/\", \"data-$1$3\", $content);\r\n}", "public function renderUri() {\n\t\tif ($this->isThumbnailPossible($this->getFile()->getExtension())) {\n\t\t\t$this->processedFile = $this->getFile()->process($this->getProcessingType(), $this->getConfiguration());\n\t\t\t$result = $this->processedFile->getPublicUrl(TRUE);\n\n\t\t\t// Update time stamp of processed image at this stage. This is needed for the browser to get new version of the thumbnail.\n\t\t\tif ($this->processedFile->getProperty('originalfilesha1') != $this->getFile()->getProperty('sha1')) {\n\t\t\t\t$this->processedFile->updateProperties(array('tstamp' => $this->getFile()->getProperty('tstamp')));\n\t\t\t}\n\t\t} else {\n\t\t\t$result = $this->getIcon($this->getFile()->getExtension());\n\t\t}\n\t\treturn $result;\n\t}", "protected function imageName() {}", "public function mainImageURL()\n {\n if ($this->image) {\n $imageLocation = $this->image->location;\n } else {\n // If the image cannot be displayed, show a generic image.\n $imageLocation = 'generic/generic1.jpg';\n }\n\n return Storage::url($imageLocation);\n }", "private function thumb()\n {\n $preview = array('png', 'jpg', 'gif', 'bmp');\n\n $publicBaseUrl = 'packages/spescina/mediabrowser/src/img/icons/';\n\n if ($this->folder)\n {\n if ($this->back)\n {\n $icon = 'back';\n }\n else\n {\n $icon = 'folder';\n }\n\n $url = $publicBaseUrl . $icon . '.png';\n }\n else\n {\n if (in_array($this->extension, $preview))\n {\n $url = $this->path;\n }\n else\n {\n $url = $publicBaseUrl . $this->extension . '.png';\n }\n }\n\n return $url;\n }", "private function getClassImageURL($root) {\n\t\t// get image url\n\t\t$imageURL = $root->find('header.pad-box-micro div.ribbon-positioner div.featured-course-image span', 0)->getAttribute('style');\n\t\tpreg_match( '/\\((.*?)\\)/', $imageURL, $match);\n\t\tif (isset($match[1])) {\n\t\t\t$imageURL = $this->url . $match[1];\n\t\t}\n\t\t\n\t\treturn $imageURL;\n\t}", "private function script_url($matches){\r\n\t\tif(strpos($matches[1],'.png')!==false || strpos($matches[1],'.jpg')!==false || strpos($matches[1],'.webp')!==false){\r\n\t\t\treturn str_replace($matches[1], whole_url($matches[1], $this->base_url), $matches[0]);\r\n\t\t}\r\n\r\n\t\treturn str_replace($matches[1], proxify_url($matches[1], $this->base_url), $matches[0]);\r\n\t}", "function img_url($file = NULL, $folder = NULL)\n {\n if (filter_var($file, FILTER_VALIDATE_URL) !== FALSE) {\n return $file;\n }\n $file = ($folder !== NULL) ? $file : 'img/'.$file;\n return assets_url($file, $folder);\n }", "public function setImageUrlUnwrapped($var)\n {\n $this->writeWrapperValue(\"image_url\", $var);\n return $this;}", "function imagePath($img, $config) {\n return \"http://\" . $_SERVER[\"HTTP_HOST\"] . $config['global']['path'] . \"assets/rubrics/\" . $img;\n }", "function pangea_image($url, $custom = \"\") {\r\n\r\n $i = pathinfo($url);\r\n\r\n // need at least the extension to work with\r\n if(\r\n !isset($i[\"filename\"]) ||\r\n !isset($i[\"extension\"])\r\n ) {\r\n return( $url );\r\n }\r\n\r\n // two main parts\r\n $filename = $i[\"filename\"];\r\n $extension = $i[\"extension\"];\r\n\r\n // see if the image has already been size-modified\r\n // and if so, replace the $filename with the original version\r\n $p1 = explode(\"_tv\", $filename);\r\n $p2 = explode(\"_\", $filename);\r\n\r\n if( count($p1) !== 1 ) {\r\n // automated framegrab\r\n $filename = $p1[0] . \"_tv\";\r\n } elseif( count($p2) !== 1 ) {\r\n // other\r\n $filename = $p2[0];\r\n }\r\n\r\n // return reconstructed image url with optional $custom\r\n return(sprintf(\r\n \"%s/%s%s.%s\",\r\n $i[\"dirname\"],\r\n $filename,\r\n $custom,\r\n $extension\r\n ));\r\n}", "function imageProcessor($text)\r\n {\r\n $this->images = array();\r\n // если включена обработка пробелов в путях картинок\r\n if ($this->feed['params']['image_space_on']) {\r\n $text = preg_replace_callback('|<img(.*?)src(.*?)=[\\s\\'\\\"]*(.*?)[\\'\\\"](.*?)>|is', array(&$this, 'imageParser'), $text);\r\n } else {\r\n $text = preg_replace_callback('|<img(.*?)src(.*?)=[\\s\\'\\\"]*(.*?)[\\'\\\"\\s](.*?)>|is', array(&$this, 'imageParser'), $text);\r\n }\r\n return $text;\r\n }", "function makeImg($img, $prefix = '', $relative = false)\n{\n\treturn ($img ? '<img alt=\"\" src=\"' . ($relative ? '' : ARC_WWW_PATH) . $prefix . $img . '\" />' : '');\n}", "public function getImageUrl()\n {\n return WEB_SERVER_BASE_URL . '/badges/images/' . $this->data['id'];\n }", "public function buildPhotoUrl () {\n\t\t\n\t}", "function theme_img($uri, $tag = false) {\n if ($tag) {\n return '<img src=\"' . theme_url('assets/img/' . $uri) . '\" alt=\"' . $tag . '\">';\n } else {\n return theme_url('assets/img/' . $uri);\n }\n}", "private function _replace_file_types()\n\t{\n\t\tpreg_match_all( '#(src|data-src|href)\\s*=\\s*[\\'\"]([^\\'\"\\\\\\]+)[\\'\"]#i', $this->content, $matches ) ;\n\t\tif ( empty( $matches[ 2 ] ) ) {\n\t\t\treturn ;\n\t\t}\n\n\t\t$filetypes = array_keys( $this->_cfg_cdn_mapping ) ;\n\t\tforeach ( $matches[ 2 ] as $k => $url ) {\n\t\t\t$url_parsed = parse_url( $url ) ;\n\t\t\tif ( empty( $url_parsed[ 'path' ] ) ) {\n\t\t\t\tcontinue ;\n\t\t\t}\n\t\t\t$postfix = substr( $url_parsed[ 'path' ], strrpos( $url_parsed[ 'path' ], '.' ) ) ;\n\t\t\tif ( ! in_array( $postfix, $filetypes ) ) {\n\t\t\t\tcontinue ;\n\t\t\t}\n\n\t\t\tLiteSpeed_Cache_Log::debug2( 'CDN matched file_type ' . $postfix . ' : ' . $url ) ;\n\n\t\t\tif( ! $url2 = $this->rewrite( $url, LiteSpeed_Cache_Config::ITEM_CDN_MAPPING_FILETYPE, $postfix ) ) {\n\t\t\t\tcontinue ;\n\t\t\t}\n\n\t\t\t$attr = str_replace( $url, $url2, $matches[ 0 ][ $k ] ) ;\n\t\t\t$this->content = str_replace( $matches[ 0 ][ $k ], $attr, $this->content ) ;\n\t\t}\n\t}", "function wpcom_vip_noncdn_uri( $path ) {\n\t// Be gentle on Windows, borrowed from core, see plugin_basename\n\t$path = str_replace( '\\\\','/', $path ); // sanitize for Win32 installs\n\t$path = preg_replace( '|/+|','/', $path ); // remove any duplicate slash\n\n\treturn sprintf( '%s%s', wpcom_vip_themes_root_uri(), str_replace( wpcom_vip_themes_root(), '', $path ) );\n}", "function insertUrlImages($image_name){\r\n\t\t\r\n\t}", "function spiplistes_corrige_img_pack ($img) {\n\tif(preg_match(\",^<img src='dist/images,\", $img)) {\n\t\t$img = preg_replace(\",^<img src='dist/images,\", \"<img src='../dist/images\", $img);\n\t}\n\treturn($img);\n}", "private function setImagesAbsolute(string $markdown, array $params = null) : string\n {\n $aeFiles = \\MarkNotes\\Files::getInstance();\n $aeFunctions = \\MarkNotes\\Functions::getInstance();\n $aeSettings = \\MarkNotes\\Settings::getInstance();\n\n $folderNote = str_replace('/', DS, rtrim($aeSettings->getFolderDocs(true), DS).'/');\n\n if (isset($params['filename'])) {\n $folderNote .= rtrim(dirname($params['filename']), DS).DS;\n\n // Get the full path to this note\n $url = rtrim($aeFunctions->getCurrentURL(false, false), '/').'/'.rtrim($aeSettings->getFolderDocs(false), DS).'/';\n $folder = $url.str_replace(DS, '/', dirname($params['filename'])).'/';\n\n $imgTag = '\\!\\[(.*)\\]\\((.*)\\)';\n\n // Get the list of images i.e. tags like : ![My nice image](.images/local.jpg)\n // and check if the file is local (in a subfolder of the note). If so, convert the relative\n // ![My nice image](.images/local.jpg) to an absolute path\n // ![My nice image](http://localhost/folder/subfolder/.images/local.jpg)\n\n $matches = array();\n if (preg_match_all('/'.$imgTag.'/', $markdown, $matches)) {\n $j = count($matches[0]);\n for ($i = 0; $i <= $j; $i++) {\n if (isset($matches[2][$i])) {\n // Add the fullpath only if the link to the image doesn't contains yet\n // an hyperlink\n if (strpos($matches[2][$i], '//') === false) {\n $filename = $folderNote.str_replace('/', DS, $matches[2][$i]);\n if ($aeFiles->fileExists($filename)) {\n $markdown = str_replace($matches[0][$i], '!['.$matches[1][$i].']('.$folder.$matches[2][$i].')', $markdown);\n } else {\n /*<!-- build:debug -->*/\n if ($aeSettings->getDebugMode()) {\n $aeDebug = \\MarkNotes\\Debug::getInstance();\n $aeDebug->here('DEBUG MODE --- '.$filename.' NOT FOUND');\n }\n /*<!-- endbuild -->*/\n }\n }//if (strpos('//', $matches[2][$i])===FALSE)\n }\n }\n } // if (preg_match_all('/'.$imgTag.'/'\n\n // And process <img> tags\n $imgTag = '<img (.*)src *= *[\"\\']([^\"\\']+[\"\\']*)[\\'|\"]';\n\n $matches = array();\n if (preg_match_all('/'.$imgTag.'/', $markdown, $matches)) {\n $j = count($matches);\n for ($i = 0; $i <= $j; $i++) {\n // Derive the image fullname ($folderNote.str_replace('/',DS,$matches[1][$i]))) and check if the file exists\n if (isset($matches[2][$i])) {\n\n // Add the fullpath only if the link to the image doesn't contains yet\n // an hyperlink\n if (strpos($matches[2][$i], '//') === false) {\n $filename = $folderNote.str_replace('/', DS, $matches[2][$i]);\n\n if ($aeFiles->fileExists($filename)) {\n $img = $folder.$matches[2][$i];\n $markdown = str_replace($matches[0][$i], '<img src=\"'.$img.'\" '.$matches[1][$i], $markdown);\n }\n }\n }\n }\n } // if (preg_match_all('/'.$imgTag.'/'\n } // if (isset($params['filename']))\n\n return $markdown;\n }", "function news_icon() { ?>\n <style type=\"text/css\" media=\"screen\">\n #adminmenu .menu-icon-news div.wp-menu-image:before {\n content: \"\\f464\";\n }\n </style>\n <?php }", "public function getImageUrl() \n {\n // return a default image placeholder if your source avatar is not found\n $imagen = isset($this->imagen) ? $this->imagen : 'default_product.jpg';\n return Url::to('@web/img/producto/'). $imagen;\n }", "public function getUrlAttribute(){\n if(substr($this->image,0,4)=== \"http\"){\n return $this->image;\n }\n //o si viene de la carpeta public\n return '/images/products/' . $this->image;\n }", "function cdn_html_alter_css_urls(&$html) {\n $url_prefix_regex = _cdn_generate_url_prefix_regex();\n $pattern = \"#href=\\\"(($url_prefix_regex)(.*?\\.css)(\\?.*)?)\\\"#\";\n _cdn_html_alter_file_url($html, $pattern, 0, 3, 4, 'href=\"', '\"'); \n}", "function _external_to_internal($content)\n\t{\n\t\t// replace hrefs\n\t\tpreg_match_all(\n\t\t\t\t'/(<[^>]+href=[\"\\']?)([^\"\\' >]+)([^\"\\'>]?[^>]*>)/i', \n\t\t\t\t$content, \n\t\t\t\t$regs, \n\t\t\t\tPREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$orig_href = $regs[2][$i];\n\t\t\t\t$new_href = weSiteImport::_makeInternalLink($orig_href);\n\t\t\t\tif ($new_href != $orig_href) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $new_href . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// replace src (same as href!!)\n\t\tpreg_match_all(\n\t\t\t\t'/(<[^>]+src=[\"\\']?)([^\"\\' >]+)([^\"\\'>]?[^>]*>)/i', \n\t\t\t\t$content, \n\t\t\t\t$regs, \n\t\t\t\tPREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$orig_href = $regs[2][$i];\n\t\t\t\t$new_href = weSiteImport::_makeInternalLink($orig_href);\n\t\t\t\tif ($new_href != $orig_href) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $new_href . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// url() in styles with style=\"\"\n\t\tpreg_match_all('/(<[^>]+style=\")([^\"]+)(\"[^>]*>)/i', $content, $regs, PREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$style = $regs[2][$i];\n\t\t\t\t$newStyle = $style;\n\t\t\t\tpreg_match_all('/(url\\(\\'?)([^\\'\\)]+)(\\'?\\))/i', $style, $regs2, PREG_PATTERN_ORDER);\n\t\t\t\tif ($regs2 != null) {\n\t\t\t\t\tfor ($z = 0; $z < count($regs2[2]); $z++) {\n\t\t\t\t\t\t$orig_url = $regs2[2][$z];\n\t\t\t\t\t\t$new_url = weSiteImport::_makeInternalLink($orig_url);\n\t\t\t\t\t\tif ($orig_url != $new_url) {\n\t\t\t\t\t\t\t$newStyle = str_replace($orig_url, $new_url, $newStyle);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($newStyle != $style) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $newStyle . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// url() in styles with style=''\n\t\tpreg_match_all('/(<[^>]+style=\\')([^\\']+)(\\'[^>]*>)/i', $content, $regs, PREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$style = $regs[2][$i];\n\t\t\t\t$newStyle = $style;\n\t\t\t\tpreg_match_all('/(url\\(\"?)([^\"\\)]+)(\"?\\))/i', $style, $regs2, PREG_PATTERN_ORDER);\n\t\t\t\tif ($regs2 != null) {\n\t\t\t\t\tfor ($z = 0; $z < count($regs2[2]); $z++) {\n\t\t\t\t\t\t$orig_url = $regs2[2][$z];\n\t\t\t\t\t\t$new_url = weSiteImport::_makeInternalLink($orig_url);\n\t\t\t\t\t\tif ($orig_url != $new_url) {\n\t\t\t\t\t\t\t$newStyle = str_replace($orig_url, $new_url, $newStyle);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($newStyle != $style) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $newStyle . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// url() in <style> tags\n\t\tpreg_match_all('/(<style[^>]*>)(.*)(<\\/style>)/isU', $content, $regs, PREG_PATTERN_ORDER);\n\t\tif ($regs != null) {\n\t\t\tfor ($i = 0; $i < count($regs[2]); $i++) {\n\t\t\t\t$style = $regs[2][$i];\n\t\t\t\t$newStyle = $style;\n\t\t\t\t// url() in styles with style=''\n\t\t\t\tpreg_match_all(\n\t\t\t\t\t\t'/(url\\([\\'\"]?)([^\\'\"\\)]+)([\\'\"]?\\))/iU', \n\t\t\t\t\t\t$style, \n\t\t\t\t\t\t$regs2, \n\t\t\t\t\t\tPREG_PATTERN_ORDER);\n\t\t\t\tif ($regs2 != null) {\n\t\t\t\t\tfor ($z = 0; $z < count($regs2[2]); $z++) {\n\t\t\t\t\t\t$orig_url = $regs2[2][$z];\n\t\t\t\t\t\t$new_url = weSiteImport::_makeInternalLink($orig_url);\n\t\t\t\t\t\tif ($orig_url != $new_url) {\n\t\t\t\t\t\t\t$newStyle = str_replace(\n\t\t\t\t\t\t\t\t\t$regs2[0][$z], \n\t\t\t\t\t\t\t\t\t$regs2[1][$z] . $new_url . $regs2[3][$z], \n\t\t\t\t\t\t\t\t\t$newStyle);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($newStyle != $style) {\n\t\t\t\t\t$newTag = $regs[1][$i] . $newStyle . $regs[3][$i];\n\t\t\t\t\t$content = str_replace($regs[0][$i], $newTag, $content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $content;\n\t}", "function bootstrapwp_enhanced_image_navigation($url)\n{\n global $post;\n if (wp_attachment_is_image($post->ID)) {\n $url = $url . '#main';\n }\n return $url;\n}", "function imagesetstyle($image, $style)\n{\n}", "function lazy_imgs($html, $id, $caption, $title, $align, $url, $size, $alt) {\n\n $imgNew = '<img data-original=\"' . $url . '\" ';\n $html = str_replace('<img ', $imgNew, $html);\n return $html;\n}", "protected function replaceImages($string)\n\t{\n\t\t// For closures\n\t\t$obj = $this;\n\n\t\t// Reference-style Images\n\t\t$string = preg_replace_callback('/!\\[(.*?)\\] ?(?:\\n *)?\\[(.*?)\\]/s', function($match) use ($obj)\n\t\t{\n\t\t\tif ($match[2])\n\t\t\t{\n\t\t\t\t$refId = $match[2];\n\t\t\t\t$alt = $match[1];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$refId = $match[1];\n\t\t\t\t$alt = '';\n\t\t\t}\n\t\t\t$refId = strtolower($refId);\n\n\t\t\tif (!$obj->hasReference($refId))\n\t\t\t{\n\t\t\t\treturn $match[0];\n\t\t\t}\n\n\t\t\t$reference = $obj->getReference($refId);\n\t\t\t$title = $reference['title'] ? ' title=\"'. $reference['title'] .'\"' : '';\n\n\t\t\treturn '<img src=\"'. $reference['url'] .'\" alt=\"'. $alt . '\"'. $title .' />';\n\t\t}, $string);\n\n\t\t// Regular Images\n\t\t$string = preg_replace_callback('/!\\[(.*?)\\]\\([ \\t]*<?(\\S+?)>?[ \\t]*(([\\'\"])(.*?)\\4[ \\t]*)?\\)/s', function($match)\n\t\t{\n\t\t\t$alt = $match[1];\n\t\t\t$url = $match[2];\n\t\t\t$title = $match[5] ? ' title=\"'. $match[5] .'\"' : '';\n\n\t\t\treturn '<img src=\"'. $url .'\" alt=\"'. $alt . '\"'. $title .' />';\n\t\t}, $string);\n\n\t\treturn $string;\n\t}", "function getImage($row) {\n if ($row['image'] != '') {\n\t$result = '<a href=\"http://commons.wikimedia.org/wiki/File:' . rawurlencode($row['image']) . '\">';\n\t$result = $result . '<img src=\"' . getImageFromCommons(str_replace(' ', '_', $row['image']), 200) . '\" align=\"right\" />';\n\t$result = $result . '</a>';\n } else {\n\t$result = '<a href=\"' . makeUploadLink($row) .'\" title=\"Upload een zelfgemaakte foto van dit monument naar Commons\" target=\"_blank\">';\n\t$result = $result . '<img src=\"' . getImageFromCommons('Crystal_Clear_app_lphoto.png', 100) . '\" align=\"right\" />';\n\t$result = $result . '</a>';\n }\n return $result;\n}", "public function setAvatarUrl($value)\n {\n $this->avatar = end(explode('/', $value));\n }", "function massimport_convertspip_uri($str) {\n\t return eregi_replace('[^(->)\\'\\\"]http://([^[:space:]<]*)', ' [http://\\\\1->http://\\\\1]', $str); \n}", "function img_responsive($content){\n return str_replace('<img class=\"','<img class=\"lazyload ',$content);\n}", "public function getImageUrlAttribute($value){\n\t\t$imageUrl = \"\";\n\t\t\n\t\tif(!is_null($this->image)){\n\t\t\t$imagePath = public_path().\"/img/\".$this->image;\n\t\t\tif(file_exists($imagePath)) $imageUrl = asset('img/'.$this->image);\n\t\t}\n\t\treturn $imageUrl;\n\t}", "function img( $src = '', $index_page = FALSE, $attributes = '' )\n\t{\n\t\tif ( ! is_array( $src ) )\n\t\t{\n\t\t\t$src = [ 'src' => $src ];\n\t\t}\n\n\t\t// If there is no alt attribute defined, set it to an empty string\n\t\tif ( ! isset( $src[ 'alt' ] ) )\n\t\t{\n\t\t\t$src[ 'alt' ] = '';\n\t\t}\n\n\t\t$img = '<img';\n\n\t\tforeach ( $src as $k => $v )\n\t\t{\n\t\t\tif ( $k === 'src' && ! preg_match( '#^([a-z]+:)?//#i', $v ) )\n\t\t\t{\n\t\t\t\tif ( $index_page === TRUE )\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"' . get_instance()->config->site_url( $v ) . '\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$img .= ' src=\"' . \\O2System::$config->slash_item( 'base_url' ) . $v . '\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$img .= ' ' . $k . '=\"' . $v . '\"';\n\t\t\t}\n\t\t}\n\n\t\treturn $img . _stringify_attributes( $attributes ) . ' />';\n\t}", "private function replaceImage(&$string, $match)\n\t{\n\t\tif (!empty($match['link_start']) || !empty($match['link_end']))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// get the image attributes\n\t\t$image_attributes = $this->helpers->get('link')->getLinkAttributeList($match['image']);\n\n\t\tif (!isset($image_attributes->class) || !isset($image_attributes->src))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$image_attributes->class = explode(' ', $image_attributes->class);\n\n\t\tif (!array_intersect($image_attributes->class, $this->params->classnames_images))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$image_attributes->class = implode(' ', array_diff($image_attributes->class, $this->params->classnames_images));\n\n\t\t$image = (object) array(\n\t\t\t'path' => $this->helpers->get('file')->getFilePath($image_attributes->src),\n\t\t\t'folder' => $this->helpers->get('file')->getFilePath($image_attributes->src),\n\t\t\t'image' => $this->helpers->get('file')->getFileName($image_attributes->src),\n\t\t\t'thumbnail' => $this->helpers->get('file')->getFileName($image_attributes->src),\n\t\t);\n\t\tunset($image_attributes->src);\n\n\t\t$params = (object) array(\n\t\t\t'thumbsuffix' => $this->params->gallery_thumb_suffix,\n\t\t);\n\n\t\tif (\n\t\t\t!$this->helpers->get('file')->isExternal($image->folder . '/' . $image->image)\n\t\t\t&& $check = $this->helpers->get('image')->getImageObject($image->folder, $image->image, $params)\n\t\t)\n\t\t{\n\t\t\t$image = $check;\n\t\t}\n\n\t\t$attributes = new stdClass;\n\t\t$data = array();\n\n\t\t$attributes->href = $image->folder . '/' . $image->image;\n\t\t$attributes->class = $this->params->class . ' nn_modals_image';\n\n\t\t$this->helpers->get('image')->setImageDataFromDataFile($image->folder, $data);\n\t\t$this->helpers->get('image')->setImageDataAtribute('title', $data, $image->image);\n\t\t$this->helpers->get('image')->setImageDataAtribute('description', $data, $image->image);\n\n\t\t$data['title'] = isset($image_attributes->title) ? $image_attributes->title : (isset($image_attributes->alt) ? $image_attributes->alt : '');\n\t\tif (!$data['title'] && $this->params->auto_titles)\n\t\t{\n\t\t\t// set the auto title\n\t\t\t$data['title'] = $this->helpers->get('file')->getTitle($image->image, $this->params->title_case);\n\t\t}\n\t\t$data['group'] = $this->params->auto_group_id;\n\n\t\t$link = array();\n\n\t\t$link[] = $this->helpers->get('link')->buildLink($attributes, $data);\n\t\t$link[] = '<img src=\"' . $image->folder . '/' . $image->thumbnail . '\"' . $this->helpers->get('data')->flattenAttributeList($image_attributes) . '>';\n\t\t$link[] = '</a>';\n\n\t\t$link = implode('', $link);\n\n\t\t$this->replaceOnce($match['image'], $link, $string);\n\t}", "public function getAvatarWebPath()\n {\n //Image par défaut en fonction de la civilité\n if(null === $this->avatar || $this->avatar == '')\n {\n switch($this->civilite)\n {\n case 1 : default :\n $sexe = 'homme';\n break;\n case 2 :\n $sexe = 'femme';\n break;\n }\n return 'bundles/ideafusion/img/default_'.$sexe.'.png';\n }\n else return $this->getUploadDir().'/'.$this->avatar;\n }", "public function renderUri() {\n\n\t\t$relativePath = sprintf('Icons/MimeType/%s.png', $this->file->getProperty('extension'));\n\t\t$fileNameAndPath = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getFileAbsFileName('EXT:media/Resources/Public/' . $relativePath);\n\t\tif (!file_exists($fileNameAndPath)) {\n\t\t\t$relativePath = 'Icons/UnknownMimeType.png';\n\t\t}\n\n\t\treturn Path::getRelativePath($relativePath);\n\t}", "public function getImageUrlAttribute($value) {\n $imageUrl = '';\n if(!is_null($this->image)) {\n $directory = config('cms.image.directory');\n $imagePath = public_path().\"/{$directory}/\".$this->image;\n if(file_exists($imagePath)) $imageUrl = asset('img/'.$this->image);\n }\n return $imageUrl;\n }", "function normalize($url) {\n\t\t//$result = preg_replace('%(?<!:/|[^/])/|(?<=&)&|&$|%', '', $url);\n\t\t$result=str_replace(array('://','//',':::'),array(':::','/','://'),$url);\n\t\treturn $result;\n\t}", "public function getImageUrl() {\n if ($this->_getData('image_url')) {\n if (strpos($this->_getData('image_url'), 'http://') === false) {\n $this->setImageUrl(Mage::getBaseUrl() . ltrim($this->_getData('image_url'), '/ '));\n }\n }\n\n return $this->_getData('image_url');\n }", "function type_url_form_image()\n {\n }", "public function getIconAvatarUrl() {\n return $this->imageUrl . '.jpg';\n }", "function set_img_src($imgsrc, $width = null, $height = null, $returnindex = 0) {\n if (!empty($imgsrc)) {\n $arrsrc = explode(\",\", $imgsrc);\n $src = $arrsrc[$returnindex];\n $imgpath = \"helpers/timthumb.php?src=$src\";\n $imgpath .= ($height != null ? \"&h=$height\" : null);\n $imgpath .= ($width != null ? \"&w=$width\" : null);\n return $imgpath;\n }\n return null;\n}", "static function absPath2($src){\n\t\t$find = array('src=\"/','href=\"/');\n\t\t$replace = array('src=\"http://nocache.azcentral.com/','href=\"http://archive.azcentral.com/');\n\t\treturn str_replace($find,$replace,$src);\n\t}", "function imageBook($url) {\n\tif (File::exists(base_path() . '/public/resourcebook/' . $url)) {\n\t\treturn Asset('resourcebook/' . $url);\n\t} else {\n\t\treturn Asset('resourcebook/question-mark.png');\n\t}\n}", "public function getImageUrl();", "private function _gqbReplaceHref() {\n\t\tglobal $wgGqbDefaultWidth;\n\n\t\t$page = self::$_page->getHTML();\n\t\t$pattern = '~href=\"/wiki/([^\"]+)\"\\s*class=\"image\"~';\t\n\t\t$replaced = preg_replace_callback($pattern,'self::_gqbReplaceMatches',$page);\n\n\t\tself::$_page->clearHTML();\n\t\tself::$_page->addHTML( $replaced );\n\t}", "function ext_to_jpeg($x){\n $bedword = array(\".gif\", \".png\");\n\n\n$goodword = str_replace($bedword, \".jpeg\", $x);\n\nreturn $goodword;\n}", "function zero_filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n }", "function bethel_filter_attachment_link_for_gallery ($link, $id, $size, $permalink, $icon, $text) {\n $original_url = wp_get_attachment_url ($id);\n $new_url = wp_get_attachment_image_src ($id, 'bethel_fullscreen');\n return str_replace($original_url, $new_url[0], $link);\n}", "private function process_img_tag(array $match) {\n global $CFG;\n\n $html = $match[0];\n $url = $match[3];\n $path = $match[4];\n\n // Don't process images that aren't in this site or don't have a relative path.\n if (stripos($url, $CFG->wwwroot) === false && substr($url, 0, 1) != '/') {\n return $html;\n }\n\n // TODO filearea based filter.\n\n $canonurl = $this->get_canonical_url($path);\n\n if ($canonurl === false) {\n return $html;\n }\n\n $html = str_replace($url, $canonurl, $html);\n return $html;\n }", "function make_vImage($element){\n\t\t$dir=base_url().$element->getFile();\n\t\tif(substr($element->getFile(),0,7)=='http://'){\n\t\t\t$dir=$element->getFile();\n\t\t\t$width=$element->getWidth();\n\t\t\t$height=$element->getHeight();\n\t\t}\n\t\t// Si están definidos ancho y alto, usamos esos\n\t\telse if($element->getWidth() or $element->getHeight()){\n\t\t\t$width=$element->getWidth();\n\t\t\t$height=$element->getHeight();\n\t\t}\n\t\t// Si no, miramos el tamaño de la imagen\n\t\telse list($width,$height)=getimagesize($element->getFile());\n\t\t\n\t\treturn '<img'.$this->setStyle($element).($width?' width=\"'.$width.'\"':'').($height?' height=\"'.$height.'\"':'').' alt=\"'.$element->getAltText().'\" src=\"'.\n\t\t\t$dir.'\" />\n\t\t';\n\t}", "function f_blank_song(){\n\treturn '/images/pixel_transp.gif';\n\t}", "function default_thumbnail($url)\n{\n\tif($url == 'url' ){\n\t\treturn \"holder.js/300x300\";\n\t} else {\n\t\treturn \"<img data-src='holder.js/300x300' />\";\n\t}\n}" ]
[ "0.70660114", "0.67237526", "0.633239", "0.62120533", "0.620795", "0.6184678", "0.6155846", "0.61554873", "0.61501056", "0.60122395", "0.59984547", "0.5979588", "0.59424806", "0.59373003", "0.5912624", "0.5900233", "0.58965355", "0.5874314", "0.5853209", "0.581737", "0.5779314", "0.57409614", "0.5739203", "0.573248", "0.5724844", "0.5724273", "0.57213664", "0.572006", "0.5719944", "0.5711178", "0.5676142", "0.5662355", "0.56598973", "0.5649749", "0.5644804", "0.56392646", "0.562754", "0.561111", "0.5589111", "0.5564916", "0.556131", "0.5560816", "0.55597293", "0.5552888", "0.5545314", "0.5539439", "0.5538191", "0.5532836", "0.55244195", "0.5503361", "0.5500585", "0.54890525", "0.5479653", "0.54762816", "0.5471673", "0.54643667", "0.5464047", "0.5458787", "0.54527986", "0.54513645", "0.54499483", "0.54447573", "0.5435608", "0.5429474", "0.54286796", "0.54279804", "0.54266745", "0.5426008", "0.5423721", "0.54186684", "0.5414798", "0.54106635", "0.54088145", "0.5407973", "0.5407144", "0.5402896", "0.54016656", "0.54003525", "0.5397248", "0.5391188", "0.53882074", "0.5386374", "0.5385142", "0.538298", "0.53803045", "0.537867", "0.53652453", "0.53642213", "0.53631467", "0.53593594", "0.535842", "0.53431314", "0.5338992", "0.53349274", "0.5334857", "0.53250426", "0.5324508", "0.53227097", "0.532207", "0.5319861" ]
0.551455
49
/ Cuando tenemos que escribir un archivo ".json" tenemos que ver si hay algo previamente guardado
public function Escribir($filePath, $personaRecibida) { // -> primero lo tenemos que leer try { if (!(isset($filePath))) { throw new Exception('No se recibió path al archivo'); echo "entro"; } else if (!(file_exists($filePath))) { throw new Exception('El directorio no existe'); } else { $this->filePath = $filePath; } // Leo el archivo $this->filePointer = fopen($this->filePath, 'r'); if (filesize($this->filePath) < 1){ $this->fileSize = 5; } else{ $this->fileSize = filesize($this->filePath); } $this->fileJson = fread($this->filePointer, $this->fileSize); $this->fileArrayPersonas = json_decode($this->fileJson) ?? array(); fclose($this->filePointer); //Modifico el array array_push($this->fileArrayPersonas,$personaRecibida); // //Escribo el archivo $this->filePointer = fopen($this->filePath, 'w'); $this->fileCaracteresEscritos = fwrite($this->filePointer, json_encode($this->fileArrayPersonas)); fclose($this->filePointer); return $this->fileCaracteresEscritos; } catch (Exception $e) { return $e->getMessage() . "<br>"; } /* * -> segundo decodificar ese .json para convertirlo * a un array de objetos * * -> tercero cerramos el archivo * * -> cuarto hacemos llamamos a la funcion * array_push($array que leimos, $personas que nos mandaron lo pisamos) */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jsonSave()\n {\n try {\n file_put_contents($this->fname, json_encode($this->content));\n } catch (Exception $e) {\n echo $e;\n }\n }", "private function saveFileJson()\n {\n return file_put_contents($this->arquivoJson, json_encode($this->registros));\n }", "public function GuardarEnArchivo()\n {\n $ret = new stdClass();\n $ret->exito = true;\n $ret->mensaje = \"Se escribio en el archivo con exito\";\n\n //esto escribe algo en un archivo, en vez de abrir el archivo, escribir y despues cerrarlo puedo hacer esto\n //le paso el archivo, la cadena que quiero escribir, FILE_APPEND es para que no se sobreescriba\n if (!file_put_contents(\"./archivos/ufologos.json\", $this->ToJSON() . \"\\n\", FILE_APPEND)) {\n //devuelve numeros, si es igual a 0 quiere decir que no escribio, retorno false y mensaje de error\n $ret->exito = false;\n $ret->mensaje = \"No se pudo escribir en el archivo\";\n }\n //el objeto de retorno lo encodeo en cadena json\n return json_encode($ret);\n }", "public function GuardarJSON($path)\n {\n $ret = new stdClass();\n $ret->exito = true;\n $ret->mensaje = \"Se escribio en el archivo con exito\";\n\n //esto escribe algo en un archivo, en vez de abrir el archivo, escribir y despues cerrarlo puedo hacer esto\n //le paso el archivo, la cadena que quiero escribir, FILE_APPEND es para que no se sobreescriba\n if (!file_put_contents($path, $this->ToJSON() . \"\\n\", FILE_APPEND)) {\n //devuelve numeros, si es igual a 0 quiere decir que no escribio, retorno false y mensaje de error\n $ret->exito = false;\n $ret->mensaje = \"No se pudo escribir en el archivo\";\n }\n //el objeto de retorno lo encodeo en cadena json\n return json_encode($ret);\n }", "function guardarDatos()\n {\n $miArchivo = \"datos.json\";\n $arreglo = array();\n\n try{\n $datosForma = array(\n 'nombreProducto'=> $_POST['nombre'],\n 'nombreCliente'=> $_POST['cliente'],\n 'precio'=> $_POST['precio'],\n 'fechaPedido'=> $_POST['fechaPedido'],\n 'fechaEntrega'=> $_POST['fechaEntrega']\n );\n\n if(file_get_contents($miArchivo) != null)\n {\n $jsondata = file_get_contents($miArchivo);\n\n $arreglo = json_decode($jsondata,true);\n }\n\n array_push($arreglo, $datosForma);\n\n $jsondata = json_encode($arreglo, JSON_PRETTY_PRINT);\n\n if(file_put_contents($miArchivo, $jsondata))\n return true;\n else\n return false;\n }catch(Exception $e)\n {\n return false;\n }\n }", "function get_file($file)\n{\n $data = file_get_contents($file);\n \n if ($data === false) {\n // Default file content - empty JSON object.\n $data = '{}';\n file_put_contents($file, $data);\n }\n\n $result = json_decode($data, true);\n\n // Remove and create file again on JSON parse error.\n if($result === null) {\n unlink($file);\n return get_file($file);\n }\n\n return $result;\n}", "function salvarCompras($novaCompra){\n if(!file_exists('compras.json')){\n $compras[\"listaCompras\"] = [$novaCompra];\n $jsoncompras = json_encode($compras);\n file_put_contents('compras.json',json_encode($compras));\n echo \"<script>alert('Compra salva com sucesso!')</script>\";\n }else {\n // \n $jsoncompras = file_get_contents('compras.json');\n $listaCompras = json_decode($jsoncompras, TRUE);\n $listaCompras[\"listaCompras\"][] = $novaCompra;\n \n $jsonListaCompras = json_encode($listaCompras);\n file_put_contents('compras.json', $jsonListaCompras);\n }\n}", "private function loadJson(){\n if(file_exists($this->fullPath.$this->jsonFile)) {\n $arCfg = get_object_vars(json_decode(file_get_contents($this->fullPath.$this->jsonFile)));\n $this->loadConfigs($arCfg);\n }\n }", "function testMakeJSON(){\n $file = $_SERVER[\"DOCUMENT_ROOT\"].'/C&C_Companion/pages/cards/cards.json';\n\n //Clear file contents and set current file text string to be equa to it\n file_put_contents($file, \"\");\n $current = file_get_contents($file);\n\n $current.= \"[\\n\";\n\n //Check whether the first object has been encoded so that only the first object\n //has no comma in front of it\n $started = false;\n foreach($this->cards as $card){\n if(get_class($card) == \"Summon\"){\n continue;\n }\n\n if($started){\n $current .= \",\\n\\n\\t\".json_encode($card);\n }else{\n $current.= \"\\t\".json_encode($card);\n $started = true;\n }\n\n }\n\n $current.= \"\\n]\";\n\n //Set the file's contents to be equal to the constructed string\n file_put_contents($file, $current);\n\n $this->assertTrue(true);\n }", "public function GuardarEnArchivo(): bool\n {\n $retorno = false;\n $archivo = fopen('../archivos/usuarios.json', \"w\");\n echo $archivo;\n\n if (\n $this->nombre != \"\" &&\n $this->correo != \"\" &&\n $this->clave != \"\"\n ) {\n $exito = fwrite($archivo, $this->ToJSON() . \"\\r\\n\");\n if ($exito > 0)\n $retorno = true;\n }\n fclose($archivo);\n return $retorno;\n }", "private function generatePluginJsonFile()\n {\n $path = $this->pluginRepository->getPluginPath($this->getName()).'plugin.json';\n\n if (! $this->filesystem->isDirectory($dir = dirname($path))) {\n $this->filesystem->makeDirectory($dir, 0775, true);\n }\n\n $this->filesystem->put($path, $this->getStubContents('json'));\n\n $this->console->info(\"Created : {$path}\");\n }", "private function constructFilePath()\r\n {\r\n $this->filePath = MENU_PATH . \"/\" . $this->nameOfJson . \".json\";\r\n }", "function jsonToArray($dir, $file){\n/** Nurodomas kelias iki jsons folderio */ /** __DIR__ - atvaizduoja visa kelia iki failo kuriame naudojamas '__DIR__' pvz:C:\\wamp\\www\\Mindaugas\\2018.09.12 */\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR; \n $file = file_get_contents($path . $file , FILE_USE_INCLUDE_PATH); /** $file(kintamasis) Paims info(pagal nurodyta kelia su $path) is jsons folderio */\n $allInfo = json_decode($file, true); /** $allInfo(kintamasis) decodins .json failus i php masyvus*/\n\n return $allInfo; /** Grazinam visa info is .json failu kaip masyvą */\n}", "public function processJsonFiles(){\n $filesList = $this->getFileList();\n foreach ($filesList as $key => $file) {\n //do this at your will\n if( !preg_match('/.json/', $file['Key'] ) ){\n continue;\n }\n $fileContents = $this->getFile($file['Key']);\n $fileProcessed = $this->processFile($fileContents);\n $this->saveFile($file['Key'], $fileProcessed);\n }\n }", "public function saveDataFile(){\n /** Verifica exitência da pasta **/\n if ($this->verifyPatch()){\n $file = new File('json/dados.json', $this->dados);\n if($file->renderizar())\n $retorno = 'Arquivo criado com sucesso!';\n else\n $retorno = 'Houve um erro ao tentar criar o arquivo. Cheque suas permissões de pasta';\n }else\n $retorno = 'Houve um erro de permissão de acesso a pasta!';\n\n return $retorno;\n }", "function pegaCadastrosJson(){\n $arquivo = file_get_contents('json/cadastros.json');//arquivo Json que será pego\n $GLOBALS['cadastros'] = json_decode($arquivo);//salva no array global cadastros os cadastros\n $cadastrosLocal = $GLOBALS['cadastros'];\n }", "function settings_save_json($path)\n {\n }", "function generate_json_file() {\n // Open new file to write\n $json_file = new SplFileObject(\"../CCNiceAudioFiles.json\", \"w\");\n $json_file->fwrite(\"[\\n\");\n\n // Retrieve all non new entries from the database\n $result = $this->get_list_of_published_files();\n\n // For each file generate json entry to be used for presentation\n foreach( $result as $i ){\n\n unset($i['newfile']);\n unset($i['flaggedfile']);\n unset($i['flagcomment']);\n unset($i['md5_sign']);\n unset($i['publishedfile']);\n unset($i['translated']);\n unset($i['downloads']);\n unset($i['filepath']);\n\n $readable_size = $this->convert_file_size($i['size']);\n $i['size'] = $readable_size;\n\n $json_file->fwrite(json_encode($i) . \",\\n\");\n }\n\n $json_file->fseek(-2, SEEK_CUR);\n\n $json_file->fwrite(\"\\n]\");\n $json_file = null;\n\n return;\n }", "public function jsonFile() \n\t{\t\n\t\tif(isset($GLOBALS['userID']) && isset($_GET['group']) && is_file('src/'.$_GET['group'].'/'.$GLOBALS['userID'].'.json'))\n\t\t{\n\t\t\t//cookie temp Char for possessed chars overrides _COOKIE[Char]\n\t\t\tif(!empty($_COOKIE['tempChar']))\n\t\t\t{\n\t\t\t\t$path = 'src/'.$_GET['group'].'/'.$GLOBALS['userID'].'.json';\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$path = 'src/'.$_GET['group'].'/'.$GLOBALS['userID'].'.json';\n\t\t\t}\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$path = 'placeholder.json';\n\t\t}\n\t\t//import json file \n\t\t$jsonFile = file_get_contents($path);\n\t\t$charData = json_decode($jsonFile);\n\t\t$GLOBALS['chardata'] = $charData;\n\t\treturn ($charData);\n\t}", "public function make_json_file()\n\t{\n\t\t$json_file = fopen('recipes.json', 'w');\n\t\tfwrite($json_file, $this->json_result);\n\t\tfclose($json_file);\t\n\t}", "public function testToGetJsonFileIfNotExist()\n {\n // when\n $actual = $this->tested->getJsonFromFile('file.json');\n\n // then\n $this->expectException($actual);\n }", "function adicionaUsuario() {\n $usuarioAtual = array(\n \"usuario\"=>$this->usuario,\n \"senha\"=>$this->senha,\n \"nome\"=>$this->nome,\n \"email\"=>$this->email\n );\n\n $usuarioAtual_str = json_encode($usuarioAtual);\n\n //retira o colchete e coloca a vírgula no arquivo\n $arquivo_str = file_get_contents(\"data/usuarios.json\");\n $arquivo_str_novo = str_replace(\"]\", \",\", $arquivo_str);\n\n //abre o arquivo\n $usuarios = fopen(\"data/usuarios.json\", \"w\"); //sobreescreve\n fwrite($usuarios, $arquivo_str_novo . $usuarioAtual_str . \"]\");\n fclose($usuarios);\n }", "function JSonWritePOINTReset($obj){\n $file = file_get_contents('lvl.json');\n $fDecode = json_decode($file,true);\n $fDecode['PO'] = 0;\n $fDecode['ID'] = 1;\n $json = json_encode($fDecode);\n file_put_contents('lvl.json',$json);\n}", "public function converterJsonfile(){\n try {\n\n /**\n * Algoritmo para consumir a API e receber em $planets os dados dos planetas\n */\n $flag = 1;\n do{\n $cl = curl_init();\n curl_setopt($cl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($cl, CURLOPT_URL, \"https://swapi.co/api/planets/?page=$flag\");\n curl_setopt($cl, CURLOPT_HTTPHEADER, array(\"Content-Type: application/json;\") );\n $compare = json_decode( curl_exec($cl) );\n foreach( $compare->results as $value ){\n $planets[] = $value;\n }\n $flag++;\n curl_close($cl);\n }while( NULL != $compare->next );\n\n //Com todos os planetas agora monto meus dados conforme o banco de dados e insiro no final.\n foreach( $planets as $planet ){\n\n $data_planet[] = array( \n 'nome' => $planet->name , \n 'clima' => $planet->climate, \n 'terreno' => $planet->terrain, \n 'cnt_aparicoes' => count($planet->films), \n );\n }\n\n //Insert com todos os dados\n $response = $this->model->insert( $data_planet );\n\n return response()->json( $response . ', todos os dados foram carregados e inseridos corretamente!', Response::HTTP_OK );\n \n } catch (Exception $e) {\n return response()->json( [ 'Error' => $e ], Response::HTTP_INTERNAL_SERVER_ERROR );\n }\n\n }", "function write_info_file($dir,$name){\n\t$info = json_decode(file_get_contents($dir.'_info.json'));\n\n\tdate_default_timezone_set('Europe/Minsk');\n\n\t$newObject = new stdClass;\n\t$newObject->name = $name;\n\t$newObject->created = date(\"d.m.Y / H:i:s\");\n\n\tarray_push($info,$newObject);\n\t$file = json_encode($info);\n\n\t$fp = fopen($dir.'_info.json', 'w');\n\tfwrite($fp,$file);\n\tfclose($fp);\n}", "public function saveasfile($insert_data) {\n\n\n $file_size = filesize(\"data.json\");\n $data = array();\n if ($file_size > 0) {\n $myfile = fopen(\"data.json\", \"r\") or die(\"Unable to open file!\");\n $data = fread($myfile, filesize(\"data.json\"));\n $data = (array) json_decode($data);\n }\n \n $new_data = array();\n $data = (array) $data;\n $insert_data = (array) json_decode($insert_data);\n\n foreach ($insert_data as $key => $value) {\n $data[] = $value;\n break;\n }\n\n //echo \"<pre>\"; print_r($insert_data); die;\n $new_data = $data;\n if (!empty($new_data)) {\n $myfile = fopen(\"data.json\", \"w\") or die(\"Unable to open file!\");\n fwrite($myfile, json_encode($new_data));\n fclose($myfile);\n }\n return true;\n }", "public function saveJson()\n {\n $myFile = \"barang.json\";\n $sqlQuery = \"select * from barang\";\n $json = null;\n try {\n $prepare = parent::prepare($sqlQuery);\n $prepare->execute();\n $result = $prepare->fetchAll(PDO::FETCH_ASSOC);\n\n $json = json_encode($result);\n //print_r($json);\n } catch (Exception $ex) {\n //echo 'Error : ' . $ex->getMessage();\n echo \"sistem dalam perbaikan, coba beberapa saat lagi\";\n }\n return file_put_contents($myFile, $json);\n }", "public function testConstructFileAlreadyExists()\n {\n file_put_contents($this->file, null);\n\n $SerializedArray = new SerializedArray($this->file);\n $this->assertEquals($this->file, $this->getProperty($SerializedArray, 'file'));\n }", "function getJson($fileName){\n $file = __DIR__ . \"/settings/$fileName.json\";\n if(file_exists($file)){\n return json_decode(file_get_contents($file), true);\n }else{\n return array();\n }\n}", "public function save(): bool\n {\n\n $bytes_written = file_put_contents($this->file_name, json_encode($this->getData()));\n\n if ($bytes_written === FALSE) {\n return false;\n }\n\n return true;\n }", "function saveNewReviews($newJSON) {\n // Wrap up the php object to JSON\n $newJSON = json_encode($newJSON, JSON_UNESCAPED_SLASHES);\n // Try opening the file\n $fp = fopen('reviews.json', 'w');\n if ( ($fp === false) || (fwrite($fp, $newJSON) === FALSE) ) {\n // File either didn't open or write successfully\n return FALSE;\n } else {\n // All good!\n return TRUE;\n }\n}", "function add_recipe($r) {\n ## Fichier json contenant les recettes\n $file = \"./recipes.json\";\n\n ## Récupérer les données du fichier (càd la recette)\n if (file_exists($file)) {\n $contenu = file_get_contents($file);\n $data = json_decode($contenu, true);\n }\n\n ## Ajout de la recette dans l'array\n array_push($data,$r);\n\n ## Ré-encondage\n $nouveau_contenu = json_encode($data);\n file_put_contents($file,$nouveau_contenu);\n}", "function put_json_output()\n\t{\n\t\tif(!file_exists(\"employee_wage_output.json\"))\n\t\t{\n\t\t\ttouch(\"employee_wage_output.json\");\t\t\t//Creating file if not exists\n\t\t\t$json_file=\"employee_wage_output.json\";\t\t//Getting filename into variable\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$json_file=\"employee_wage_output.json\";\t\t//Getting filename into variable\n\t\t}\n\t\t//Getting old data from file\n\t\t$old_json_data = file_get_contents($json_file);\n\n\t\t//Checking if is not empty\n\t\tif($old_json_data!=null)\n\t\t{\n\t\t\t//Merging old data with new data\n\t\t\t$old_data = json_decode($old_json_data);\n\t\t\tarray_push($old_data, $this->employee_data);\n\n\t\t\t//Converting data into json format\n\t\t\t$json_data = json_encode($old_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Converting data into json format\n\t\t\t$json_data = json_encode($this->employee_data);\n\t\t}\n\t\t\n\t\t//Putting json data into output file\n\t\tfile_put_contents($json_file, $json_data);\n\n\t}", "public function load(): bool\n {\n if (file_exists($this->file_name)) {\n $data = file_get_contents($this->file_name);\n\n if ($data !== false) {\n $this->setData(json_decode($data, true) ?? []);\n } else {\n $this->setData([]);\n }\n\n return true;\n }\n\n return false;\n }", "function json_read($filename){\n return json_decode(file_get_contents($filename));\n}", "function create_json($json_path,$folder,$name,$object){\n\t$dir = $json_path.$folder.'/';\n\tif(file_exists($dir.$name.'.json')){\n\t\treturn 'file exist';\n\t}\n\tif(!file_exists($dir)){\n\t\tcreate_folder($json_path,$folder);\n\t}\n\twrite_info_file($dir,$name);\n\t$fp = fopen($dir.$name.'.json','w');\n\tfwrite($fp,'[]');\n\tfclose($fp);\n\tif($object != ''){\n\t\t$push = json_push($json_path,$folder,$name,$object);\n\t}\n\tadd_last_changes($json_path,$folder,true);\n\tadd_last_changes($dir,$name,true);\n\treturn 'json is created';\n}", "function readFileName()\n{\n include 'connect_mysqli_kiki_viberate.php';\n\n $sql = \"SELECT DISTINCT artist_id FROM itunes_connection_artist_track\";\n $result = $conn_kiki_viberate->query($sql);\n\n if ($result->num_rows > 0) {\n while ($row = $result->fetch_assoc()) {\n $filename = $row['artist_id'] . '.json';\n if (file_exists($filename)) {\n parsingJSON($filename);\n } else {\n }\n }\n }\n}", "public function updateJson() {\r\n\t\t$this->prepareDb();\r\n\t\tif (!$this->getFileContent()) {\r\n\t\t\t$this->log(\"empty db\", 0);\r\n\t\t\treturn (false);\r\n\t\t}\r\n\t\t$this->_jsonFc = json_decode($this->_jsonFc, true);\r\n\t\tif (is_array($this->_jsonFc)) {\r\n\t\t\t$found = false;\r\n\t\t\tforeach ($this->_jsonFc as $key => $fc) {\r\n\t\t\t\tif (isset($fc[\"id\"]) && $fc[\"id\"] == $this->_jsonId) {\r\n\t\t\t\t\t$this->_jsonFc[$key][\"json\"] = $this->expJson();\r\n\t\t\t\t\t$found = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($found) {\r\n\t\t\t\tfile_put_contents($this->_path_db, json_encode($this->_jsonFc, JSON_PRETTY_PRINT));\r\n\t\t\t} else {\r\n\t\t\t\t$this->log(\"id not found in db\", 0);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->clearDump();\r\n\t}", "function ouvrirListeMembres() {\n $fichier = fopen(\"admin/membres.json\", \"w\") ;\n return $fichier ;\n}", "public function collectComposerJsonFile()\r\n {\r\n\r\n $files_found = $this->findSpecificFile($this->site_root, \"composer.json\");\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }", "function open_json($json_path,$folder,$name){\n\t$dir = $json_path.$folder.'/';\n\tif(!file_exists($dir)){\n\t\treturn 'no folder';\n\t}\n\tif(!file_exists($dir.$name.'.json')){\n\t\treturn 'no json';\n\t}\n\treturn file_get_contents($dir.$name.'.json');\n}", "function writeFile($data) {\n\t$my_file = \"users.json\";\n\t$users = [];\n\tif(file_exists($my_file)){\n\t\t$users = json_decode(file_get_contents($my_file), true);\n\t}\n\t$users[] = $data;\n\t$jsonData = json_encode($users);\n\tfile_put_contents($my_file, $jsonData);\n}", "public function actualizarusuario($imagenperfil,$datosuser,$id){\n // NOTE: obtener los usuarios en usuarios.json, transformandolos en un array\n $usuarios = $this->buscarUsuarios();\n // NOTE: recorrer array de todos los usuarios y sobreescribir el registro que corresponda al usuario a editar\n if (!empty($usuarios)) {\n // NOTE: vacio el archivo usuarios.json para poder insertar las modificaciones sin duplicar al usuario\n file_put_contents('usuarios.json', '');\n foreach ($usuarios as $usuario) {\n // NOTE: si encuentro al usuario guardo las modificaciones\n if (strtolower($id) == strtolower($usuario['id'])) {\n $usuario['nombre'] = $datosuser['nombre'];\n $usuario['apellido'] = $datosuser['apellido'];\n $usuario['email'] = $datosuser['email'];\n if ($usuario['password'] != $datosuser['password']) {\n $usuario['password'] = password_hash($datosuser['password'],PASSWORD_DEFAULT);\n }\n if ($imagenperfil['imgperfil']['error'] === UPLOAD_ERR_OK) {\n $ext = strtolower(pathinfo($imagenperfil['imgperfil']['name'], PATHINFO_EXTENSION));\n $hasta = '/images/profileImg/'.'perf'.$id.'.'.$ext;\n $usuario['srcImagenperfil'] = $hasta;\n }\n $userjson = json_encode($usuario);\n file_put_contents('usuarios.json', $userjson . PHP_EOL, FILE_APPEND);\n $this->subirImgPerfil($imagenperfil,$id);\n }else {\n // NOTE: si no encuentro al usuario guardo a los demas sin cambios\n $userjson = json_encode($usuario);\n file_put_contents('usuarios.json', $userjson . PHP_EOL, FILE_APPEND);\n }\n }\n }\n // NOTE: volver a convertir a json y guardar archivo usuarios.json\n //$userjson = json_encode($usuarios);\n //file_put_contents('usuarios2.json', $userjson . PHP_EOL, FILE_APPEND);\n //subirImgPerfil($imagenperfil,$id);\n\n\n }", "function transform_data_txt_to_json($file) {\n $txt_data = \"[\";\n \n //otevreni souboru\n if($file_data = fopen($file, \"r\")) {\n $upscenario_prev = \"\";\n $commodity = \"\";\n //cteni souboru po radcich\n while(($line = fgets($file_data)) !== false) {\n //scenar\n if(preg_match(\"/^<scenar cislo = /i\", $line)) {\n preg_match(\"/<scenar cislo =\\s*([\\.\\d]+)\\s+skladkovaci poplatek =\\s*([\\.\\d]+)\\s+struktura =\\s*([,\\w]+)>/i\", $line, $matches);\n $scenario = $matches[1];\n $upscenario = $matches[2];\n $load_structure = $matches[3];\n \n if($scenario == \"\" || $upscenario == \"\" || $load_structure == \"\") echo \"error<br>\"; ///// !!!!\n \n \n \n //novy nadscenar\n if($upscenario != $upscenario_prev) {\n //$txt_data = rtrim($txt_data, \"]\");\n //pokud neni prvni v souboru\n if($upscenario_prev != \"\") {\n $txt_data = rtrim($txt_data, \",\");\n $txt_data .= ']},';\n }\n \n $txt_data .= '{\"nadscenar\":\"' . $upscenario . '\",';\n $txt_data .= '\"struktura\":\"' . $load_structure . '\",';\n $txt_data .= '\"scenare\":[';\n $upscenario_prev = $upscenario;\n }\n else {\n //$txt_data = rtrim($txt_data, \",]\");\n if(substr($txt_data, -1) == \"]\" && substr($txt_data, -2) == \",\") {\n $txt_data = rtrim($txt_data, \"]\");\n $txt_data = rtrim($txt_data, \",\");\n }\n }\n $txt_data .= '{\"scenar\": \"' . $scenario . '\",';\n }\n //konec scenare\n else if(preg_match(\"/<\\/scenar>/i\", $line)) {\n $scenario = \"\";\n $upscenario = \"\";\n $load_structure = \"\";\n \n $txt_data = rtrim($txt_data, \",\");\n $txt_data .= '},';\n //$txt_data .= \"<b>]</b>\";\n }\n //komodita\n else if(preg_match(\"/<\\w+>/i\", $line)) {\n preg_match(\"/^<(\\w+)>/i\", $line, $matches);\n $commodity = $matches[1];\n $txt_data .= '\"' . $commodity . '\":[';\n }\n //konec komodity\n else if(preg_match(\"/<\\/\" . $commodity . \">/i\", $line)) {\n $txt_data = rtrim($txt_data, \",\");\n $txt_data .= '],';\n }\n //hrana\n else if(preg_match(\"/^\\w+-\\w+\\s+\\w+/\", $line)) {\n preg_match(\"/^(\\w+)-(\\w+)\\s+(\\w+)/\", $line, $matches);\n $node_a = $matches[1];\n $node_b = $matches[2];\n $load = $matches[3];\n $txt_data .= '[' . $node_a . ',' . $node_b . ',' . $load . '],';\n }\n else echo \"error2<br>\";\n }\n\n $txt_data = rtrim($txt_data, \",\");\n $txt_data .= \"]}\";\n }\n \n fclose($file_data);\n \n $txt_data .= \"]\";\n //echo $txt_data;\n echo \"--------------------<br>\";\n //die();\n return $txt_data;\n}", "public function testGetFile() {\n\t\t$filename = 'test.json';\r\n\t textus_get_file($filename);\n\t \r\n\t}", "function CBR_XML_Daily_Ru() {\n \t\t$json_daily_file = __DIR__.'/daily.json';\n \t\tif (!is_file($json_daily_file) || filemtime($json_daily_file) < time() - 60*60*24) { //3600 wtf\n\t\t\t //не работает на шаред хостинге\n /*if ($json_daily = file_get_contents('https://www.cbr-xml-daily.ru/daily_json.js')) {\n file_put_contents($json_daily_file, $json_daily);\n }*/\n\t\t\t\t$ch = curl_init();\n \t\t\tcurl_setopt($ch, CURLOPT_URL, \"https://www.cbr-xml-daily.ru/daily_json.js\");\n \t\t\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n \t\t\t$json_daily = curl_exec($ch);\n \t\t\t\tcurl_close($ch);\n\t\t\t\tif(strlen($json_daily)){\n\t\t\t\t\tfile_put_contents($json_daily_file, $json_daily);\n\t\t\t\t}\n }\n return json_decode(file_get_contents($json_daily_file));\n}", "private function loadData(): void\n {\n if (null !== $this->data) {\n // Data is already loaded.\n return;\n }\n\n $json = file_get_contents($this->filePath);\n $data = (new JsonEncoder())->decode($json, JsonEncoder::FORMAT);\n\n $this->data = [];\n\n foreach ($data['quotes'] as $quote) {\n $this->data[$this->slugifier->slugify($quote['author'])][] = $quote['quote'];\n }\n }", "function ajout_fichier(array $array){\n $json = json_encode($array);\n file_put_contents(FILE_QUESTION, $json);\n}", "public static function getOldJsonFilePath()\n {\n $menusetConfig = self::getMenusetConfig();\n //return Globals::getWorkFolder() . $menusetConfig->setting->fileName;\n return Globals::getDataFilePath($menusetConfig->setting->fileName);\n }", "function load_input_file_into_php_array() {\n#This shows the file the directory of the data info\n$file_string = file_get_contents(\"data/input.json\");\n#Adding true will ensure objects are changed to associative arrays\n$file_array = json_decode($file_string, true);\n #Prints out a message to the command line when function is excecuted\nprint \"Loading...\\n\";\n#Returning the variable will prevent a value of \"null\" showing up\n return $file_array;\n}", "private function verifyPatch(){\n if(!file_exists('json'))\n return mkdir(\"json\");\n else\n return true;\n }", "function map_name_to_camera($path)\n{\n\n $path = $path . DIRECTORY_SEPARATOR . \"meta\";\n $fileList = new DirectoryIterator($path);\n foreach ($fileList as $fileinfo) {\n if ($fileinfo->getExtension() == \"json\") {\n $files[$fileinfo->getMTime()] = $fileinfo->getFilename();\n\n }\n }\n krsort($files);\n $latest = ($path . DIRECTORY_SEPARATOR . reset($files));\n if (file_exists($latest)) {\n $json = json_decode(file_get_contents($latest));\n $name = $json->meta->cameraName;\n return $name;\n } else {\n return \"JSON MISSING\";\n }\n}", "function writeJson($file,$data){ \r\n if(file_exists($file)) {\r\n $tempString = file_get_contents($file);\r\n $handle = fopen($file, 'w+');\r\n $tempArr = json_decode($tempString);\r\n $tempArr[] = $data;\r\n $readyData = json_encode($tempArr);\r\n fwrite($handle,$readyData);\r\n fclose($handle);\r\n }else{\r\n $handle = fopen($file, 'w+');\r\n $tempArr = [];\r\n $tempArr[] = $data;\r\n fwrite($handle,json_encode($tempArr));\r\n fclose($handle);\r\n }\r\n }", "public function save()\n {\n $this->readCache();\n\n file_put_contents($this->filePath, json_encode($this->cacheContents));\n }", "public function loadJson($filename)\n {\n $result = false;\n if (file_exists($filename) && is_file($filename)) {\n $json = file_get_contents($filename);\n $data = json_decode($json, true);\n if (is_array($data)) {\n foreach ($data as $name => $value) {\n $this->__set($name, $value);\n }\n $result = true;\n }\n }\n return $result;\n }", "function json_get_contents( $path ){\n $result = json_file_to_array( $path );\n \n if( is_array( $result ) ){\n \n return $result;\n \n } else {\n \n // Try something else\n \n }\n}", "function json_save($file, $data, $prepend = '', $append = '')\n{\n if (empty($data)) {\n return 'No data to write to file.';\n }\n if (is_array($data)) {\n $data = to_charset($data);\n }\n if (!file_put_contents($file,\n $prepend . json_encode($data, JSON_PRETTY_PRINT) . $append)) {\n $error = json_last_error_msg();\n if (empty($error)) {\n $error = sprintf(\"Unknown Error writing file: '%s' (Prepend: '%s', Append: '%s')\",\n $file, $prepend, $append);\n }\n return $error;\n }\n return true;\n}", "public function isValidJson()\n {\n $config = json_encode(file_get_contents($this->file), true);\n\n if(json_last_error() == JSON_ERROR_NONE) {\n $this->config = $config;\n } else {\n throw new InvalidJsonFormat($this->file);\n }\n }", "function acf_get_local_json_files()\n{\n}", "private function import_json( $uploaded_file ) {\n global $wpdb;\n\n $json = file_get_contents( $uploaded_file );\n $data = json_decode( $json, true );\n\n // prepare data\n $profile_name = $data['profile_name'];\n $data['profile_name'] .= ' (restored)';\n $data['details'] = maybe_serialize( $data['details'] );\n $data['fields'] = maybe_serialize( $data['fields'] );\n\t\tif ( ! $profile_name ) return false;\n\n // insert into db\n\t\t$result = $wpdb->insert( $wpdb->prefix.'amazon_profiles', $data );\n\t\tif ( ! $result ) return false;\n\n\t\treturn $profile_name;\n }", "protected function _save()\n\t{\n\t\t$_file = $this->_storagePath . DIRECTORY_SEPARATOR . $this->_fileName;\n\n\t\t$_data = json_encode( $this->contents() );\n\n\t\tif ( $this->_compressStore )\n\t\t{\n\t\t\t$_data = Utility\\Storage::freeze( $this->contents() );\n\t\t}\n\n\t\tif ( false === file_put_contents( $_file, $_data ) )\n\t\t{\n\t\t\tUtility\\Log::error( 'Unable to store Oasys data in \"' . $_file . '\". System error.' );\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "private function getFile(){\n if($this->checkStatus()){\n chdir('..');\n $filePos = $this->sanitizeInt($this->json->filePos);\n $fileName = $this->sanitizeString($this->json->fileName);\n $fileContents = file_get_contents('aud/'.$fileName);\n $fileMime = mime_content_type('aud/'.$fileName);\n $fileEncode = base64_encode($fileContents);\n $fileArray = array(\n 'fileName' => $fileName,\n 'fileMime' => $fileMime,\n 'fileEncode' => $fileEncode,\n 'filePos' => $filePos\n );\n header('content-type: application/json');\n echo json_encode($fileArray);\n } else {\n $this->notFound404();\n } \n }", "public function createJson(){\n $json = fopen($this->getFilePath(), 'w');\n$content = \"{\n \\\"require\\\" : {\n },\n \\\"bower\\\" : [\n ]\n}\";\n fwrite($json, $content);\n fclose($json);\n }", "public function exportJson()\n {\n $time = time();\n $filePath = ROOT_DIR . \"/data/beer_$time.json\";\n try {\n file_put_contents($filePath, json_encode($this->items));\n\n App::cliLog(\"Successfully exported to $filePath\");\n } catch (Exception $e) {\n App::cliLog($e->getMessage());\n }\n }", "private function readCache(): void{\n //stdClass é uma classe predefinido ou dinamica\n $this->cache = new stdClass();\n if(file_exists('cache.cache')){\n $this->cache = json_decode(file_get_contents('cache.cache'));\n }\n }", "private function editFile()\n {\n $payload = json_decode(file_get_contents('php://input'));\n if (!isset($payload)) {\n $this->info = 'No input data';\n return false;\n }\n $fileName = strtolower($payload->path) . CONTENT_EXT;\n if (!file_exists(CONTENT_DIR . $fileName)) {\n $this->info = 'File not exist';\n return false;\n }\n if (\n strlen($fileName) > strlen(CONTENT_EXT) &&\n file_put_contents(CONTENT_DIR . $fileName, $payload->content)\n ) {\n return true;\n }\n return false;\n }", "function readJSON($file) {\n //JSON Bib einlesen und zurückgeben\n $Lesesaalampel = json_decode($file, true);\n return $Lesesaalampel;\n}", "public function editData() {\n $this->daftar_barang = array_values($this->daftar_barang);\n $data_barang = json_encode($this->daftar_barang, JSON_PRETTY_PRINT);\n file_put_contents($this->file, $data_barang);\n $this->ambilData();\n }", "function createJsonFileName($data){\n $filename = __DIR__ . DIRECTORY_SEPARATOR . 'jsons' . DIRECTORY_SEPARATOR . urlencode($data['name'] . \"_\" . $data['pavarde'] . '.json'); /** nurodomas kelias iki konkretaus .json failo */\n var_dump($data);\n return $filename; /** grazinam gauta info */\n\n}", "public function getFilepath()\n {\n return $this->folder.'/'.$this->file.'.json';\n }", "public function testToGetJsonFileAsArray()\n {\n // given\n $expected = 'departureLocation';\n $expectedCount = 4;\n\n // when\n $actual = $this->tested->getJsonFromFile(DOCUMENT_ROOT . '/data/boarding-card.json');\n\n // then\n $this->assertCount($expectedCount, $actual);\n $this->assertObjectHasAttribute($expected, $actual[0]);\n }", "private function NewFile() : array\n {\n $file = fopen(__DIR__ . '/../cache/deals.txt', \"r\");\n\n $deals = $this->decoratee->GetDeals();\n if($file == false) return $deals;\n\n //converim l'array a json\n $deals_encoded = json_encode($deals);\n //convertim el json a fitxer\n file_put_contents(__DIR__ . '/../cache/deals.txt', $deals_encoded);\n\n return $deals;\n \n }", "public function saveJsonPhpClien()\n {\n $openTag = \"<?php\";\n $header = 'header(\"access-control-allow-origin: *\");';\n $dataType = 'header(\"content-type: application/json; charset=utf-8\");';\n $json = null;\n $closeTag = \"?>\";\n $newLine = \"\\n\";\n\n $myFile = \"barang.clien.php\";\n $sqlQuery = \"SELECT kode, nama FROM barang\";\n try {\n $prepare = parent::prepare($sqlQuery);\n $prepare->execute();\n $result = $prepare->fetchAll(PDO::FETCH_ASSOC);\n\n $json = json_encode($result);\n //print_r($json);\n } catch (Exception $ex) {\n echo 'Error : ' . $ex->getMessage();\n }\n $dataSave =\n $openTag . $newLine .\n $header . $newLine .\n $dataType . $newLine .\n \"echo '\" . $json . \"';\" .\n $newLine . $closeTag;\n return file_put_contents($myFile, $dataSave);\n }", "private function get_composer_json() {\n\t\treturn new JsonFile( $this->get_composer_json_path() );\n\t}", "function jsonConfig($cfg){\n $cfg = implode('/', explode('.', implode('', explode('.json', $cfg))));\n if(substr($cfg, 0, 1) == '/'){\n $cfg = substr($cfg,1);\n }\n\n if(file_exists(public_path('config/'.$cfg.'.json'))){\n $content = Storage::get('config/'.$cfg.'.json');\n\n return json_decode($content, true);\n } else {\n return null;\n }\n}", "function load_json($url=\"assets/json/datalist.json\"){\n if(!$raw_file = file_get_contents($url)){\n $error = error_get_last();\n // echo \"HTTP request failed. Error was: \" . $error['message'];\n }\n else{\n return json_decode($raw_file);\n }\n}", "function nombre_proyecto_getUF(){\n if (!file_exists('uf')) {\n mkdir(\"uf/\", 0777);\n }\n\n if ( file_exists('uf/'.date('Ymd').'.txt') ){\n $fichero = file_get_contents('uf/'.date('Ymd').'.txt', true);\n return $fichero;\n }else{\n $apiUrl = 'https://mindicador.cl/api';\n //Es necesario tener habilitada la directiva allow_url_fopen para usar file_get_contents\n if ( ini_get('allow_url_fopen') ) {\n $json = file_get_contents($apiUrl);\n } else {\n //De otra forma utilizamos cURL\n $curl = curl_init($apiUrl);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $json = curl_exec($curl);\n curl_close($curl);\n }\n $dailyIndicators = json_decode($json);\n $uf = $dailyIndicators->uf->valor;\n $str = 'uf/'.date('Ymd').'.txt';\n $out = fopen($str, \"w\");\n fwrite($out, $uf);\n fclose($out);\n return $uf;\n }\n}", "function writeQuiz() {\n $jsonQuiz = json_encode(buildQuiz(), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n try {\n file_put_contents ('inc/questions.json', $jsonQuiz);\n } catch(Exception $e) {\n echo \"Error: \" . $e->getMessage();\n }\n}", "function generate_recent_json_file() {\n // Open new file to write\n $json_file = new SplFileObject(\"../CCNice5RecentAudioFiles.json\", \"w\");\n $json_file->fwrite(\"[\\n\");\n\n // Retrieve all non new entries from the database\n $result = $this->pdo->query('SELECT * FROM files WHERE publishedfile = 1 ORDER BY date DESC LIMIT 5');\n\n // For each file generate json entry to be used for presentation\n foreach( $result as $i ){\n\n unset($i['newfile']);\n unset($i['flaggedfile']);\n unset($i['flagcomment']);\n unset($i['md5_sign']);\n unset($i['publishedfile']);\n unset($i['translated']);\n unset($i['downloads']);\n unset($i['filepath']);\n\n $readable_size = $this->convert_file_size($i['size']);\n $i['size'] = $readable_size;\n\n $json_file->fwrite(json_encode($i) . \",\\n\");\n }\n\n $json_file->fseek(-2, SEEK_CUR);\n\n $json_file->fwrite(\"\\n]\");\n $json_file = null;\n\n return;\n }", "public function save()\n {\n $filesystem = new Filesystem;\n $message = \"File successfull saved.\";\n\n // $request->validate([\n // 'files.*.id' => 'required|integer',\n // 'files.*.type' => 'required|string|in:create,replace,delete',\n // 'files.*.path' => 'required|string',\n // 'files.*.content' => 'required|string',\n // ]);\n\n $files = json_decode(file_get_contents('php://input'), true);\n if (isset($files['files']) == false) {\n return abort(404);\n }\n\n $files = $files['files'];\n\n foreach ($files as $data) {\n $path = base_path($data['path']);\n\n if(str_contains($path, '/du/')){\n continue;\n }\n\n if ($data['type'] == 'delete' && $filesystem->exists($path)) {\n $filesystem->remove($path);\n $message = \"File successfull deleted.\";\n file_log('delete', relative_path($path) . \"[\" . __LINE__ . \"]\");\n } elseif ($data['type'] == 'create') {\n if($filesystem->exists($path)){\n $message = \"File allready exists. [\".relative_path($path) .\"]\";\n file_log('fail_exists', relative_path($path) . \"[\" . __LINE__ . \"]\");\n }else{\n ensureDirectoryExists(dirname($path));\n $filesystem->dumpFile($path, $data['content']);\n $message = \"File successfull created.\";\n file_log('create', relative_path($path) . \"[\" . __LINE__ . \"]\");\n }\n } elseif ($data['type'] == 'replace') {\n ensureDirectoryExists(dirname($path));\n $filesystem->dumpFile($path, $data['content']);\n $message = \"File successfull replace.\";\n file_log('replace', relative_path($path) . \"[\" . __LINE__ . \"]\");\n } else {\n $message = \"File oparation error.\";\n file_log('fail_oparation', relative_path($path) . \"[\" . __LINE__ . \"]\");\n }\n }\n\n return json_encode([\n 'message' => $message,\n 'project_dir' => project_dir(),\n ]);\n }", "function delete_json($json_path, $folder,$name){\n\t$dir = $json_path.$folder.'/';\n\tif(!file_exists($dir)){\n\t\treturn 'no folder';\n\t}\n\tif(!file_exists($dir.$name.'.json')){\n\t\treturn 'no json';\n\t}\n\tunlink($dir.$name.'.json');\n\t$info = json_decode(file_get_contents($dir.'_info.json'));\n\tfor($i = 0; $i< count($info); $i++){\n\t\tif($info[$i]->name == $name){\n\t\t\tarray_splice($info,$i,1);\n\t\t}\n\t}\n\t$fp = fopen($dir.'_info.json','w');\n\tfwrite($fp,json_encode($info));\n\tfclose($fp);\n\treturn 'json deleted';\n}", "private function _saveZoetropeModelToFile()\n {\n file_put_contents(\n $this->fileDir . $this->jsonFile,\n json_encode($this->zModel)\n );\n }", "public static function getSampleJsonFile()\n {\n return self::fixtureDir().'/fixture_sample.json';\n }", "private function loadJson ($file) {\n // Decode File\n // Insert Contents into table\n $filePath = \"resources/igdb/platforms/\". $file;\n\n $jsonOutput = file_get_contents($filePath);\n $myJson = json_decode($jsonOutput,true);\n\n //echo $myJson['name'] . \" - ID: \" . $myJson['id'] . PHP_EOL;\n\n $myJson['id'] = (!isset($myJson['id'])) ? \"unknown\" : $myJson['id'];\n $myJson['name'] = (!isset($myJson['name'])) ? \"unknown\" : $myJson['name'];\n $myJson['slug'] = (!isset($myJson['slug'])) ? \"unknown\" : $myJson['slug'];\n\n $slug = $myJson['slug'];\n if(array_key_exists($slug,$this->slugUpdates)){$myJson['slug'] = $this->slugUpdates[$slug];}\n\n $myJson['logo']['url'] = (!isset($myJson['logo']['url'])) ? \"unknown\" : $myJson['logo']['url'];\n $myJson['website'] = (!isset($myJson['website'])) ? \"unknown\" : $myJson['website'];\n\n if(isset($myJson['summary'])){\n $myJson['versions'][0]['summary'] = $myJson['summary'];\n } else {\n $myJson['versions'][0]['summary'] = (!isset($myJson['versions'][0]['summary'])) ? \"unknown\" : $myJson['versions'][0]['summary'];\n }\n\n $myJson['generation'] = (!isset($myJson['generation'])) ? \"unknown\" : $myJson['generation'];\n $myJson['alternative_name'] = (!isset($myJson['alternative_name'])) ? \"none\" : $myJson['alternative_name'];\n\n return [\n 'igdb_id' => $myJson['id'],\n 'name' => $myJson['name'],\n 'slug' => $myJson['slug'],\n 'logo' => $myJson['logo']['url'],\n 'website' => $myJson['website'],\n 'summary' => $myJson['versions'][0]['summary'],\n 'alternative_name' => $myJson['alternative_name'],\n 'generation' => $myJson['generation'],\n 'created_at' => \\Carbon\\Carbon::now(),\n 'updated_at' => \\Carbon\\Carbon::now()\n ];\n }", "public function ambilData() {\n // read file & get the data (file_get_contents)\n $data = file_get_contents($this->file);\n $this->daftar_barang = json_decode($data, true);\n $this->daftar_barang = array_values($this->daftar_barang);\n }", "function make_json($data) {\n // generate JSON path with a random filename\n $json_path = __dir__ . '/datasets/' . make_name(10) . '.json';\n // convert PHP array into JSON string\n $json_data = json_encode($data);\n // write the JSON string to the file\n file_put_contents($json_path, $json_data);\n return $json_path;\n }", "function json_read($opt){\n\n if(($raw_json = file_get_contents($opt->in_filename)) === false){\n err(\"Could not read file\",2);\n }\n if (($json_data = json_decode($raw_json,false)) === NULL) {\n err(\"While reading input data\",4);\n }\n if (is_object($json_data) && empty($json_data)) {\n err(\"Could not read file\",2);\n }\n return $json_data;\n }", "public function getFilePath() {\n return base_path() . '/lam.json';\n }", "function __construct(){\n $files = glob('strategies/*.{json}', GLOB_BRACE);\n foreach($files as $file) {\n //do your work here\n $tmp = explode(\"/\",$file);\n $this->strategies[$tmp[count($tmp)-1]] = json_decode(file_get_contents($file),true);\n print_r(json_decode(file_get_contents($file),true));\n \n \n }\n //die();\n $this->activeStrats();\n //print_r($this->strategies);\n }", "function getItemsFromFile()\n{\n return json_decode(file_get_contents(__DIR__ . '/' . JSON_DATA_FILE), true);\n}", "function monk_json_load( $paths ) {\n\t\t\tunset($paths[0]);\n\t\t\t\n\t\t\t\n\t\t\t// append path\n\t\t\t$paths[] = get_stylesheet_directory() . '/acf-json';\n\t\t\t\n\t\t\t\n\t\t\t// return\n\t\t\treturn $paths;\n\t\t\t\n\t}", "function decodeProvidersJsonFile()\n{\n //Providers JSON File\n $path = storage_path() . env('HOTELS_FILE_PATH');\n\n $jsonRequest = file_get_contents($path);\n //Decoding JSON\n return json_decode($jsonRequest);\n}", "protected function openJson()\n {\n if (!file_exists($this->configPath))\n {\n throw new exceptions\\FileException('The configuration file is corrupted or don\\'t exist' );\n }\n else\n {\n $json = file_get_contents($this->configPath);\n $this->config = json_decode($json, TRUE);\n if ($error = json_last_error_msg())\n {\n throw new exceptions\\JsonException (sprintf(\"Failed to parse json string '%s', error: '%s'\", $this->config, $error));\n }\n }\n }", "private function LoadConfigFile(){\n $a = file_get_contents($this->RootDIR . 'config/main.json');\n $this->Config = json_decode($a, true);\n }", "protected function isJsonCheck()\n {\n return is_file($this->jsonFile) && Json::check($this->getJsonContent());\n }", "private function readAppData()\n {\n $fileName = \"{$this->storeDirectory}/appData.json\";\n if (file_exists($fileName)) {\n $data = json_decode(file_get_contents($fileName), true);\n if (isset($data['default-counter'])) {\n $this->defaultCounter = $data['default-counter'];\n }\n }\n }", "function getTestFromJson($file = \"ressources/views/all_test.json\"){\n //$file = $_SERVER['STORAGE_BASE'] . \"/json_files/all_test.json\";\n \t $jsondata = file_get_contents($file);\n \t // converts json data into array\n \t $arr_data = json_decode($jsondata);\n $alltest = array();\n foreach ($arr_data as $test) {\n # code...\n $alltest [$test->id_test] = [\n \"id_test\" => $test->id_test,\n \"id_theme\" => $test->id_theme,\n \"id_rubrique\" => $test->id_rubrique,\n \"statut\" => $test->statut,\n \"titre_test\" => stripslashes((string)$test->titre_test),\n \"unique_result\" => $test->unique_result,\n \"url_image_test\" => $test->url_image_test,\n \"codes_countries\" => $test->codes_countries\n ];\n }\n\n return $alltest;\n }", "private function isJsonFile( $filename )\n\t{\n\t\treturn stristr( $filename, '.json' );\n\t}", "function add_question(array $user){\n $json = file_get_contents(FILE_QUESTION);\n $user['id']= uniqid();\n // 2 convertir contenu en tableau\n $arrayuser = json_decode($json, true);\n // 3 ajouter new user\n $arrayuser[] = $user;\n // convertir le tableau en json\n $json =json_encode($arrayuser);\n file_put_contents(FILE_QUESTION, $json); \n}", "function saveDataJson($data){\n $contact = json_encode($data);\n file_put_contents('data.json',$contact);\n}", "function array_to_json_file( $array, $path, $update = true, $delete = false, $force = false ){\n\tif( $delete == true ){\n \n // If we want to make sure the file is created if directory doesn't exist yet\n if( $force == true ){\n return file_create( $path, $array );\n } else {\n return file_put_contents( $path, $array );\n }\n\t\t\n\t} else {\n\t\t\n\t\t// Add new data to the old file\n\t\t\n\t\t// Get the old array at that path\n\t\t$old_array = json_file_to_array( $path );\n\t\t\n\t\tif( is_array( $old_array ) ){\n\t\t\t\n\t\t\t// We want to replace old values with new ones, but keep any other data that's unchanged\n\t\t\tif( $update == true ){\n\t\t\t\n\t\t\t\t// Update the file with new elements\n\t\t\t\t$new_array = array_merge( $old_array, $array );\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t// We want to want to preserve any data that was already there, just changing new info\n\t\t\t\t$new_array = $old_array + $array;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Send to the file\n \n\t\t\t// If we want to make sure the file is created if directory doesn't exist yet\n if( $force == true ){\n return file_create( $path, $new_array );\n } else {\n return file_put_contents( $path, $new_array );\n }\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t// The file isn't in array format so we can't do anything\n\t\t\treturn false;\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}\n\t\n\t\n}" ]
[ "0.6900428", "0.6645642", "0.6520189", "0.64793134", "0.6461871", "0.6404238", "0.6366969", "0.6334944", "0.62915474", "0.61543465", "0.61538404", "0.60653615", "0.60614556", "0.6043547", "0.6038293", "0.60351855", "0.60111743", "0.6003071", "0.599178", "0.59420764", "0.5931442", "0.5911126", "0.59052736", "0.5892704", "0.586393", "0.5855565", "0.5848013", "0.5834883", "0.5820263", "0.58058554", "0.5796495", "0.5765029", "0.5763237", "0.5760037", "0.5757953", "0.5723939", "0.57193273", "0.57014096", "0.56941044", "0.5691274", "0.5688468", "0.56884", "0.5675321", "0.56630206", "0.5643894", "0.5641831", "0.5632038", "0.5621918", "0.56161827", "0.5615642", "0.56028795", "0.559567", "0.5595084", "0.5592597", "0.55794466", "0.55634236", "0.5534697", "0.55330193", "0.5531579", "0.5531285", "0.5530066", "0.55293995", "0.552407", "0.55145836", "0.55091447", "0.550549", "0.5504038", "0.55034584", "0.550244", "0.55020005", "0.55017585", "0.5498034", "0.5487781", "0.54813915", "0.548063", "0.54785335", "0.54754496", "0.5463161", "0.5463023", "0.5455768", "0.5451495", "0.5446096", "0.54433596", "0.54401857", "0.5437316", "0.54236126", "0.54211783", "0.54208297", "0.5417772", "0.541733", "0.5410168", "0.54098785", "0.54044944", "0.5400516", "0.53910536", "0.5374032", "0.53694", "0.5365052", "0.5358968", "0.5349761", "0.53489554" ]
0.0
-1
Send request to Adaptive, return the response
public static function send($xmlRequest) { $headers = array( "Content-type: application/xml", "Content-length: " . strlen($xmlRequest), "Connection: close", ); try { // INITIATE CURL $curl = curl_init(); $curlOptions = array( CURLOPT_URL => self::URL, CURLOPT_HEADER => false, CURLOPT_HTTPHEADER => $headers, CURLINFO_HEADER_OUT => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_RETURNTRANSFER => true, //Seconds until timeout CURLOPT_TIMEOUT => 300, // set to POST CURLOPT_POST => true, //handle SSL cert CURLOPT_SSL_VERIFYPEER => false, // BUILD THE POST BODY CURLOPT_POSTFIELDS => $xmlRequest, // set to verbose (or not) CURLOPT_VERBOSE => true ); curl_setopt_array($curl, $curlOptions); $response = curl_exec($curl); if ($response == false) { throw new Exception(curl_error($curl), curl_errno($curl)); } curl_close($curl); } catch (Exception $e){ trigger_error( sprintf( 'Curl failed with error #%d: %s', $e->getCode(), $e->getMessage() ), E_USER_ERROR ); } return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendResponse();", "public function request() {\n // The basic flow: build the url, make the request, parse and return the\n // output.\n $url = $this->query_builder->getUrl();\n\n // @todo: does this make sense to be in a separate class? Anyway, this shoudl\n // be somehow refactored because it is hard to replace or overwrite it.\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n $response = curl_exec($curl);\n // @todo: very important: check the curl errors here.\n\n return $this->parser->parse($response);\n }", "public function sendRequestToEndpoint(): Response;", "private function execute()\n {\n // executes a cURL session for the request, and sets the result variable\n $result = Request::get($this->getRequestURL())->send();\n // return the json result\n return $result->raw_body;\n }", "public function execute(){\n try {\n $request = $this->getRestClient();\n $raw_response = $request->request();\n } catch (Zend_Http_Client_Exception $e) {\n Mage::helper('unbxd_recommendation')->log(Zend_Log::ERR,\n sprintf($this->getUrl() .\" failed because HTTP error: %s\", $e->getMessage()));\n return Mage::getModel('unbxd_recommendation/api_response')\n ->setErrorMessage(Unbxd_Recommendation_Model_Api_Response::SERVER_ERR);\n }\n return Mage::getModel(\"unbxd_recommendation/api_response\")\n ->setJsonResponse($this->isJsonResponse())\n ->setResponse($raw_response, $this->getUrl());\n }", "public function send()\r\n\t{\r\n\t\t$header = $this->buildHeader();\r\n\r\n\t\t$this->response = $this->connect($header);\r\n\r\n\t\treturn $this->getContent();\r\n\t}", "function send_request() { \n if(!$this->connect()) { \n return false; \n } \n else { \n $this->result = $this->request($this->data);\n return $this->result; \n } \n }", "public function execute(): object\n {\n $this->buildRequest();\n $client = new HttpClient();\n Log::debug('Creating Digicert Request', [\n 'Method' => $this->requestMethod,\n 'RequestURI' => $this->requestUri,\n 'Options' => $this->options,\n ]);\n RateLimiter::checkLimit();\n $request = $client->request($this->requestMethod, $this->requestUri, $this->options);\n \n return json_decode($request->getBody());\n }", "public function send()\n\t{\n\t\t$this->response = $this->sendHttp();\n\n\t\t// Check status for errors, and throw exceptions if errors exist\n\t\t$this->valdiateResponseCode( $this->response->status );\n\n\t\t// All is well, return response\n\t\treturn $this->response;\n\t}", "public function call()\n\t{\n\t\tcall_user_func_array(array($this->client, 'request'), func_get_args());\n\n\t\treturn $this->client->getResponse();\n\t}", "public function request() {\r\n\t\t$this->verbose('protocol', $this->protocol);\r\n\t\t$this->verbose('method', $this->method);\r\n\t\t$this->verbose('host', $this->host);\r\n\t\t$this->verbose('path', $this->path);\r\n\t\t$this->verbose('query', $this->query);\r\n\t\t$this->verbose('headers', $this->headers);\r\n\t\t$this->verbose('body', $this->body);\r\n\t\t$this->verbose('timeout', $this->timeout);\r\n\r\n\t\t$this->addQueryToPath();\r\n\t\t$this->verbose('path + query', $this->path);\r\n\t\t$this->cleanHost();\r\n\t\t$this->verbose('cleanHost', $this->host);\r\n\r\n\t\t$url = $this->protocol . '://' . $this->host . $this->path;\r\n\t\t$this->verbose('url', $url);\r\n\r\n\t\t$this->headers['Authorization'] = $this->makeAuthHeader();\r\n\r\n\r\n\t\tforeach ($this->headers as $header_key => $header_value) {\r\n\t\t\t$header_array[] = $header_key . \":\" . $header_value;\r\n\t\t}\r\n\r\n\t\t$ch = curl_init();\r\n\t\t$options = array(\r\n\t\t\tCURLOPT_URL => $url,\r\n\t\t\tCURLOPT_RETURNTRANSFER => 1,\r\n\t\t\tCURLOPT_CUSTOMREQUEST => $this->method,\r\n\t\t\tCURLOPT_POSTFIELDS => $this->body,\r\n\t\t\tCURLOPT_HEADER => false,\r\n\t\t\tCURLINFO_HEADER_OUT => true,\r\n\t\t\tCURLOPT_HTTPHEADER => $header_array,\r\n\t\t\tCURLOPT_TIMEOUT => $this->timeout\r\n\t\t);\r\n\t\tcurl_setopt_array($ch, $options);\r\n\r\n\t\t$this->verbose('body at exec', $this->body);\r\n\t\t$response_body = curl_exec($ch);\r\n\t\t$response_error = curl_error($ch);\r\n\t\t$response_headers = curl_getinfo($ch);\r\n\t\tcurl_close($ch);\r\n\r\n\t\t$response['error'] = $response_error;\r\n\t\t$response['body'] = $response_body;\r\n\t\t$response['header'] = $response_headers;\r\n\t\treturn $response;\r\n\t}", "public function send()\n {\n return $this->getResponse()->init($this->_getClient()->request());\n }", "public function send()\n {\n $queryString = $this->buildQueryString();\n\n $headers = array(\n 'method' => 'POST',\n 'content' => $this->buildQueryString(),\n 'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\" .\n \"Content-Length: \" . strlen($queryString) . \"\\r\\n\\r\\n\"\n );\n\n $request = file_get_contents(\n $this->getPaypalUrl(),\n false,\n stream_context_create(array('http' => $headers))\n );\n\n return new Response($request);\n }", "public function sendRequest()\n\t{\n\t\tphpCAS::traceBegin();\n\t\t$ch = curl_init($this->url);\n\t\tif(is_null($this->url) || ! $this->url)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t/**\n\t\t * *******************************************************\n\t\t * Set SSL configuration\n\t\t * *******************************************************\n\t\t */\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT,'casUA_wa67h28m_alliance');\n\t\tif($this->caCertPath)\n\t\t{\n\t\t\tcurl_setopt($ch, CURLOPT_CAINFO, $this->caCertPath['pem']);\n\t\t\tcurl_setopt($ch, CURLOPT_SSLCERT, $this->caCertPath['crt']);\n\t\t\tcurl_setopt($ch, CURLOPT_SSLKEY, $this->caCertPath['key']);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t\tphpCAS::trace('CURL: Set CURLOPT_CAINFO');\n\t\t}\n\t\t\n\t\t// return the CURL output into a variable\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t/**\n\t\t * *******************************************************\n\t\t * Perform the query\n\t\t * *******************************************************\n\t\t */\n\t\t$buf = curl_exec($ch);\n\t\tif($buf === false)\n\t\t{\n\t\t\tphpCAS::trace('curl_exec() failed');\n\t\t\t$this->storeErrorMessage('CURL error #' . curl_errno($ch) . ': ' . curl_error($ch));\n\t\t\t$res = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->storeResponseBody($buf);\n\t\t\tphpCAS::trace(\"Response Body: \\n\" . $buf . \"\\n\");\n\t\t\t$res = true;\n\t\t}\n\t\t// close the CURL session\n\t\tcurl_close($ch);\n\t\t\n\t\tphpCAS::traceEnd($res);\n\t\treturn $res;\n\t}", "public function executeRequest()\n {\n $aux = array();\n\n foreach ($this->headers as $header => $value) {\n $aux[] = \"$header: $value\";\n }\n\n curl_setopt($this->handler, CURLOPT_HTTPHEADER, $aux);\n\n $body = curl_exec($this->handler);\n\n if(empty($body)){\n $code = curl_errno($this->handler);\n\n if ($code == 60 || $code == 77) {\n curl_setopt($this->handler, CURLOPT_CAINFO, __DIR__ . '/cacerts.pem');\n $body = curl_exec($this->handler);\n }\n\n if(empty($body)){\n $error = curl_error($this->handler);\n $code = curl_errno($this->handler);\n throw new \\Exception($error, $code);\n }\n }\n\n $statusCode = curl_getinfo($this->handler, CURLINFO_HTTP_CODE);\n $cookies = curl_getinfo($this->handler, CURLINFO_COOKIELIST);\n\n $response = new HttpResponse();\n $response->cookies = $cookies;\n $response->statusCode = $statusCode;\n $this->getBodyAndHeaders($body, $response);\n\n curl_close($this->handler);\n\n return $response;\n }", "public function sendRequest() {\n $response = file_get_contents($this->url);\n\n if ($response) {\n\n $this->response = $response;\n return true;\n } else {\n\n return false;\n }\n }", "public function sendRequest()\n {\n }", "public function send()\n {\n http_response_code( $this->getResultCode() );\n echo $this->getBody();\n }", "public function sendRequest()\n {\n\n $proxyurl = '';\n if (!is_null($this->proxy)) {\n $proxyurl = $this->proxy->url;\n }\n // create context with proper junk\n $ctx = stream_context_create(\n array(\n $this->uri->protocol => array(\n 'method' => $this->verb,\n 'content' => $this->body,\n 'header' => $this->buildHeaderString(),\n 'proxy' => $proxyurl,\n )\n )\n );\n\n set_error_handler(array($this,'_errorHandler'));\n $fp = fopen($this->uri->url, 'rb', false, $ctx);\n if (!is_resource($fp)) {\n // php sucks\n if (strpos($this->_phpErrorStr, 'HTTP/1.1 304')) {\n restore_error_handler();\n $details = $this->uri->toArray();\n\n $details['code'] = '304';\n $details['httpVersion'] = '1.1';\n\n return new PEAR2_HTTP_Request_Response($details,'',array(),array());\n }\n restore_error_handler();\n throw new PEAR2_HTTP_Request_Exception('Url ' . $this->uri->url . ' could not be opened (PhpStream Adapter ('.$this->_phpErrorStr.'))');\n } else {\n restore_error_handler();\n }\n\n stream_set_timeout($fp, $this->requestTimeout);\n $body = stream_get_contents($fp);\n\n if ($body === false) {\n throw new PEAR2_HTTP_Request_Exception(\n 'Url ' . $this->uri->url . ' did not return a response'\n );\n }\n\n $meta = stream_get_meta_data($fp);\n fclose($fp);\n\n $headers = $meta['wrapper_data'];\n\n $details = $this->uri->toArray();\n\n $tmp = $this->parseResponseCode($headers[0]);\n $details['code'] = $tmp['code'];\n $details['httpVersion'] = $tmp['httpVersion'];\n\n $cookies = array();\n $this->headers = $this->cookies = array();\n\n foreach($headers as $line) {\n $this->processHeader($line);\n }\n\n return new PEAR2_HTTP_Request_Response(\n $details,$body,new PEAR2_HTTP_Request_Headers($this->headers),$this->cookies);\n }", "public function execute() : OffersPageResponse {\n return $this->request($this->buildUrl());\n }", "protected function sendResponse() {}", "protected function execCurl() \n\t{\t\t\t\n\t\tif ( $this->sandbox == true )\n\t\t{\n\t\t\t$server = $this->_server['sandbox'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$server = $this->_server['live'];\n\t\t}\n\n\t\t$url = $server . $this->adhocPostUrl;\n\t\t\n\t\t$headers = array(\n\t\t\t'Content-type: application/x-www-form-urlencoded',\n\t\t\t'Authorization: GoogleLogin auth=' . $this->getAuthToken(),\n\t\t\t'developerToken: ' . $this->developerToken,\n\t\t\t'clientCustomerId: ' . $this->clientCustomerId,\n\t\t\t'returnMoneyInMicros: true',\n\t\t\t\t\t\t\n\t\t);\n\n\t\t$data = '__rdxml=' . urlencode( $this->__rdxml );\n\t\t\n\t\t$ch = curl_init( $url );\n\t\tcurl_setopt( $ch, CURLOPT_POST, 1 );\n\t\tcurl_setopt( $ch, CURLOPT_POSTFIELDS, $data );\n\t\tcurl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, FALSE );\n\t\tcurl_setopt( $ch, CURLOPT_FOLLOWLOCATION, TRUE );\n\t\tcurl_setopt( $ch, CURLOPT_HEADER, FALSE );\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, TRUE );\n\t\tcurl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );\n\t\t\n\t\t$response = curl_exec( $ch );\n\t\t$httpCode = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n\t\t$error = curl_error( $ch );\n\t\tcurl_close( $ch );\n\t\t\n\t\tif( $httpCode == 200 || $httpCode == 403 )\n\t\t{\n\t\t\treturn $response;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( !empty( $error ) )\n\t\t\t{\n\t\t\t\tthrow new exception( $httpCode . ' - ' . $error );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new exception( $httpCode . ' - Unknow error occurred while post operation.' ); \n\t\t\t}\n\t\t}\n\t}", "public function sendRequest( ) {\n\n }", "public function execute()\n {\n if (!empty($_GET[\"responseid\"]) && !empty($_GET[\"requestid\"])) {\n $order_id = base64_decode($_GET[\"requestid\"]);\n $response_id = base64_decode($_GET[\"responseid\"]);\n\n $mode = $this->_paymentMethod->getMerchantConfig('modes');\n\n if ($mode == 'Test') {\n $mid = $this->_paymentMethod->getMerchantConfig('test_mid');\n $mkey = $this->_paymentMethod->getMerchantConfig('test_mkey');\n $client = new SoapClient(\"https://testpti.payserv.net/Paygate/ccservice.asmx?WSDL\");\n } elseif ($mode == 'Live') {\n $mid = $this->_paymentMethod->getMerchantConfig('live_mid');\n $mkey = $this->_paymentMethod->getMerchantConfig('live_mkey');\n $client = new SoapClient(\"https://ptipaygate.paynamics.net/ccservice/ccservice.asmx?WSDL\");\n }\n\n $request_id = '';\n $length = 8;\n $characters = '0123456789';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $request_id .= $characters[rand(0, $charactersLength - 1)];\n }\n\n $merchantid = $mid;\n $requestid = $request_id;\n $org_trxid = $response_id;\n $org_trxid2 = \"\";\n $cert = $mkey;\n $data = $merchantid . $requestid . $org_trxid . $org_trxid2;\n $data = utf8_encode($data . $cert);\n\n // create signature\n $sign = hash(\"sha512\", $data);\n\n $params = array(\"merchantid\" => $merchantid,\n \"request_id\" => $requestid,\n \"org_trxid\" => $org_trxid,\n \"org_trxid2\" => $org_trxid2,\n \"signature\" => $sign);\n\n $result = $client->query($params);\n $response_code = $result->queryResult->txns->ServiceResponse->responseStatus->response_code;\n $response_message = $result->queryResult->txns->ServiceResponse->responseStatus->response_message;\n\n switch ($response_code) {\n case 'GR001':\n case 'GR002':\n case 'GR033':\n $this->getResponse()->setRedirect(\n $this->_getUrl('checkout/onepage/success')\n );\n break;\n default:\n $this->messageManager->addErrorMessage(\n __($response_message)\n );\n /** @var \\Magento\\Framework\\Controller\\Result\\Redirect $resultRedirect */\n $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);\n return $resultRedirect->setPath('checkout/cart');\n break;\n }\n\n// $this->getResponse()->setRedirect(\n// $this->_getUrl('checkout/onepage/success')\n// );\n }\n }", "public function request()\n {\n $this->setParams();\n\n $jsondata = json_encode($this->getData(), JSON_UNESCAPED_SLASHES);\n\n if(!$this->is_JSON($jsondata)){\n $this->log(\"Sending parameters must be JSON.\",'Exiting process.');\n $this->error_message('Sending parameters must be JSON.');\n }\n $lenght = strlen($jsondata);\n if($lenght<=0){\n $this->log(\"Length must be more than zero.\",'Exiting process.');\n $this->error_message(\"Length must be more than zero.\");\n }else{\n $lenght = $lenght <= 999 ? \"0\" . $lenght : $lenght;\n }\n\n $this->response_json = $this->oxd_socket_request(utf8_encode($lenght . $jsondata));\n\n $this->response_json = str_replace(substr($this->response_json, 0, 4), \"\", $this->response_json);\n if ($this->response_json) {\n $object = json_decode($this->response_json);\n if ($object->status == 'error') {\n $this->error_message($object->data->error . ' : ' . $object->data->error_description);\n } elseif ($object->status == 'ok') {\n $this->response_object = json_decode($this->response_json);\n }\n } else {\n $this->log(\"Response is empty...\",'Exiting process.');\n $this->error_message('Response is empty...');\n }\n }", "public function send()\n {\n return curl_exec($this->curl);\n }", "function send_request($request)\n {\n $response = $request->send();\n return $this->parse_response($response);\n }", "public function send()\n {\n $response = $this->apiClient->sendRequest(\n $this->getRequest(),\n $this->withAuthentication\n );\n\n return $this->apiClient->getResponseJson($response);\n }", "private function sendGetRequest($url)\n {\n // Send the request and process the response\n $guzzleResponse = $this->client->request('GET', $url);\n $this->lastResponse = new SmartwaiverResponse($guzzleResponse);\n }", "abstract public function response();", "public function send(): ResponseInterface;", "public function send(): ResponseInterface;", "public function send() {\n\t\t$this->response = $this->curl->send($this, $this->autoFollow, $this->maxRedirects);\n\t\treturn $this->response;\n\t}", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function getResponse();", "public function connect ()\n {\n $endpointurl = $this->_endpoint->getUrl();\n \n $this->_httpclient->setUri($endpointurl['endpointurl']);\n $this->_setParams();\n return $this->_getResponse($endpointurl);\n }", "public function execute() : ChallengeResponse {\n return $this->request($this->buildUrl());\n }", "protected function send()\n {\n $this->addAuthorization();\n\n $response = $this->client->post(\n $this->apiUrl,\n array(\n 'json' => array(\n 'query' => $this->getQuery(),\n 'variables' => $this->variables,\n ),\n 'headers' => $this->headers,\n )\n );\n\n $responseBody = json_decode($response->getBody(), true);\n if ($responseBody === null) {\n throw new \\RuntimeException('Invalid api call: '.json_encode($this->getQuery()));\n }\n\n $this->body = $responseBody;\n if (isset($responseBody['errors'])) {\n $this->errors = $responseBody['errors'];\n } else {\n $this->response = $responseBody['data'];\n }\n }", "public function execute()\n {\n $httpClient = $this->getHttpClient();\n\n $httpRequest = $httpClient->post('/eps/crosssell/recommendations/' . $this->config->getAccountId() . '.do');\n $headers = $httpRequest->getHeaders();\n $httpRequest->addHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8');\n $httpRequest->addHeader('User-Agent', 'Econda PHP SDK');\n\n $httpRequest->addPostFields($this->getHttpPostFields());\n $httpResponse = $httpRequest->send();\n\n if($httpResponse->isSuccessful()) {\n $responseData = $httpResponse->json();\n $this->response = $this->getResponseFromHttpResponse($responseData);\n }\n\n $this->lastHttpRequest = $httpRequest;\n \n return $this->response;\n }", "public function send()\n\t{\n\t\t$url \t\t= $this->getURL();\t\t\n\t\t$data \t\t= $this->getData();\n\t\t$method \t= $this->getMethod();\n\t\t\t\t\n\t\t$ch = curl_init();\n\t\t$options = $this->_options;\n\t\tcurl_setopt_array($ch, array(\n\t\t\tCURLOPT_USERAGENT \t => $options->useragent,\n\t\t\tCURLOPT_CONNECTTIMEOUT => $options->connection_timeout,\n\t\t\tCURLOPT_TIMEOUT\t\t => $options->timeout,\n\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\tCURLINFO_HEADER_OUT\t => true,\n\t\t\tCURLOPT_SSL_VERIFYPEER => $options->ssl,\n\t\t\tCURLOPT_HEADER\t\t => false\n\t\t));\n\t \n $headers = array();\n //if data is string then \n //set the authorization header\n //A Hack to make the linked-in work wihtout affecting\n //other services\n if ( is_string($this->_data) ) {\n $headers[] = $this->_internal_request->to_header();\n $headers[] = \"Content-Type: text/plain\";\n }\n \n if ( !empty($headers) )\n curl_setopt($ch,CURLOPT_HTTPHEADER,$headers);\n \n\t\tswitch ($method) \n\t\t{\n\t\t\tcase KHttpRequest::POST :\n\t\t\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\t\t\tif (!empty($data)) curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\t\t\tbreak;\n\t\t\tcase KHttpRequest::PUT\t: \n\t\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n\t\t\t\tif (!empty($data)) curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\t\t\tbreak;\t\n\t\t\tcase KHttpRequest::DELETE:\n\t\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\n\t\t\t\tif (!empty($data)) curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\t\t}\n\t\t\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\t\t\t\n\t\t$response = curl_exec($ch);\n\t\t\n\t\treturn new ComConnectOauthResponse($response, curl_getinfo($ch));\n\t}", "public function getResponse() {}", "public function getResponse() {}", "public function doRequests();", "public function sendCurl() {\n\t\t$this->curlResponse = $this->curl->exec();\n\t}", "public function request();", "public function send() \n {\n if (!$this->getEndpoint()) {\n // Can't make a request without a URL\n Mage::throwException(\"Unable to send a Klevu Search API request: No URL specified.\");\n }\n\n $raw_request = $this->build();\n Mage::helper('klevu_search')->log(Zend_Log::DEBUG, sprintf(\"API request:\\n%s\", $this->__toString()));\n\n try {\n $raw_response = $raw_request->request();\n } catch (Zend_Http_Client_Exception $e) {\n // Return an empty response\n Mage::helper('klevu_search')->log(Zend_Log::ERR, sprintf(\"HTTP error: %s\", $e->getMessage()));\n return Mage::getModel('klevu_search/api_response_empty');\n }\n\n Mage::helper('klevu_search')->log(\n Zend_Log::DEBUG, sprintf(\n \"API response:\\n%s\\n%s\",\n $raw_response->getHeadersAsString(true, \"\\n\"),\n $raw_response->getBody()\n )\n );\n\n $response = $this->getResponseModel();\n $response->setRawResponse($raw_response);\n\n return $response;\n }", "abstract public function request();", "public function process()\n {\n \t$client = $this->client->getClient();\n\n \ttry {\n $response = $client->get($this->buildUrl());\n return new ResponseJson((string)$response->getBody(), true);\n } catch (RequestException $e) {\n return new ResponseJson((string)$e->getResponse()->getBody(), false);\n }\n }", "public function sendRequest()\n {\n $url = \"http://66.45.237.70/api.php\";\n $number = $this->senderObject->getMobile();\n $text = $this->senderObject->getMessage();\n\n try {\n $this->errorException();\n\n } catch (XenonException $exception) {\n $exception->showException($this->senderObject);\n }\n $config = $this->senderObject->getConfig();\n\n $data = array(\n 'username' => $config['username'],\n 'password' => $config['password'],\n 'number' => $number,\n 'message' => $text\n );\n try {\n $ch = curl_init(); // Initialize cURL\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $smsResult = curl_exec($ch);\n $status = $this->generateReport($smsResult, $data);\n\n } catch (XenonException $exception) {\n $exception->showException();\n }\n }", "public function request(){\n\n $url = 'https://www.amazon.com/ap/oa?client_id=' . \n urlencode($this->strategy['client_id']) . \n '&scope=' . urlencode($this->strategy['scope']) . \n '&response_type=code&redirect_uri=' . \n urlencode($this->strategy['redirect_uri']);\n\n header('Location: ' . $url);\n\t}", "public function getResponse()\n {\n $url = $this->_url;\n\n if (count($this->_params)) {\n $query_string = http_build_query($this->_params);\n $url .= '?' . $query_string;\n }\n\n $ch = curl_init();\n\n // set some default values\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\n // set user generated values\n foreach ($this->_options as $key => $value) {\n curl_setopt($ch, $key, $value);\n }\n\n curl_setopt($ch, CURLOPT_URL, $url);\n\n $result = curl_exec($ch);\n\n curl_close($ch);\n\n return $result;\n }", "abstract function do_api_request();", "public function launch() {\n $this->run();\n return $this->_response;\n }", "protected function execute()\n {\n $authMethod = '?access_token=' . $this->params['access_token'];\n $endpoint = Constants::API_VERSION . $this->path . (('GET' === $this->method) ? '?' . http_build_query($this->params) : $authMethod);\n $endpoint .= (strstr($endpoint, '?') ? '&' : '?') . 'sig=' . static::generateSignature($this->instagram->getApp(), $this->path, $this->params);\n\n $request = HelperFactory::getInstance()->request($this->instagram->getHttpClient(), $endpoint, $this->params, $this->method);\n\n if ($request === null) {\n throw new InstagramResponseException('400 Bad Request: instanceof InstagramResponse cannot be null', 400);\n }\n $this->response = new InstagramResponse($request);\n $this->xRateLimitRemaining = $this->response->getHeader('X-Ratelimit-Remaining');\n }", "public function call()\r\n\t{\r\n\t\t// get the request XML from the DOM document\r\n\t\t$request_xml = $this->__toString();\r\n\t\t\r\n\t\t// get the API function name\r\n\t\t$function_name = get_class($this);\r\n\t\tif (substr($function_name, -4) == 'Mass')\r\n\t\t{\r\n\t\t\t$function_name = substr($function_name, 0, -4);\r\n\t\t}\r\n\t\t$function_name = substr($function_name, strrpos($function_name, '_') + 1);\r\n\t\t\r\n\t\t// make the API call\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// instantiate the SOAP client and make the API call\r\n\t\t\t$client = new SoapClient($this->props['remote_host'].'/external/api/api.wsdl', \r\n\t\t\t\tarray('location' => $this->props['remote_host'].'/external/api/api.php'));\r\n\t\t\t$result = $client->$function_name($this->props['api_version'], $this->props['auth_key'], $request_xml);\r\n\t\t} // end try\r\n\t\t// there was an error trying to make the API call\r\n\t\tcatch (SoapFault $fault)\r\n\t\t{\r\n\t\t\tthrow new Services_WorkXpress_API_Exception(\"SOAP Fault: (faultcode: {$fault->faultcode}; faultstring: {$fault->faultstring})\");\r\n\t\t} // end catch SoapFault\r\n\t\t\r\n\t\t// create a response object\r\n\t\t$class_name = str_replace('Request', 'Response', get_class($this));\r\n\t\tif (substr($class_name, -4) == 'Mass')\r\n\t\t{\r\n\t\t\t$class_name = substr($class_name, 0, -4);\r\n\t\t}\r\n\t\t$response = new $class_name($result);\r\n\t\t\r\n\t\treturn $response;\r\n\t}", "protected function sendRequest($url,$param){\n $this->log(\"Making request to Amazon: \".$this->options['Action']);\n $response = $this->fetchURL($url,$param);\n\n while (isset($response['code']) && $response['code'] == '503' && $this->throttleStop==false){\n $this->sleep();\n $response = $this->fetchURL($url,$param);\n }\n\n $this->rawResponses[]=$response;\n return $response;\n }", "public function Request() {\r\n\r\n\t\t$res = $this->client->RequestPayment(array(\r\n\t\t\t\"MerchantID\" => $this->MerchantID,\r\n\t\t\t\"Password\" => $this->Password,\r\n\t\t\t\"Price\" => $this->Price,\r\n\t\t\t\"ReturnPath\" => $this->ReturnPath,\r\n\t\t\t\"ResNumber\" => $this->ResNumber,\r\n\t\t\t\"Description\" => $this->Description,\r\n\t\t\t\"Paymenter\" => $this->Paymenter,\r\n\t\t\t\"Email\" => $this->Email,\r\n\t\t\t\"Mobile\" => $this->Mobile\r\n\t\t));\r\n\r\n\t\t$PayPath = $res->RequestPaymentResult->PaymentPath;\r\n\t\t$Status = $res->RequestPaymentResult->ResultStatus;\r\n\r\n\t\tif($Status == 'Succeed') {\r\n\t\t\t//header(\"Location: $PayPath\");\r\n\t\t\techo \"<meta http-equiv='Refresh' content='0;URL=$PayPath'>\";\r\n\t\t} else {\r\n\t\t\treturn $Status; \r\n\t\t}\r\n\r\n\t}", "private function execute() {\n\t\t// Max exec time of 1 minute.\n\t\tset_time_limit(60);\n\t\t// Open cURL request\n\t\t$curl_session = curl_init();\n\n\t\t// Set the url to post request to\n\t\tcurl_setopt ($curl_session, CURLOPT_URL, $this->url);\n\t\t// cURL params\n\t\tcurl_setopt ($curl_session, CURLOPT_HEADER, 0);\n\t\tcurl_setopt ($curl_session, CURLOPT_POST, 1);\n\t\t// Pass it the query string we created from $this->data earlier\n\t\tcurl_setopt ($curl_session, CURLOPT_POSTFIELDS, $this->curl_str);\n\t\t// Return the result instead of print\n\t\tcurl_setopt($curl_session, CURLOPT_RETURNTRANSFER,1);\n\t\t// Set a cURL timeout of 30 seconds\n\t\tcurl_setopt($curl_session, CURLOPT_TIMEOUT,30);\n\t\tcurl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, FALSE);\n\n\t\t// Send the request and convert the return value to an array\n\t\t$response = preg_split('/$\\R?^/m',curl_exec($curl_session));\n\n\t\t// Check that it actually reached the SagePay server\n\t\t// If it didn't, set the status as FAIL and the error as the cURL error\n\t\tif (curl_error($curl_session)){\n\t\t\t$this->status = 'FAIL';\n\t\t\t$this->error = curl_error($curl_session);\n\t\t}\n\n\t\t// Close the cURL session\n\t\tcurl_close ($curl_session);\n\n\t\t// Turn the response into an associative array\n\t\tfor ($i=0; $i < count($response); $i++) {\n\t\t\t// Find position of first \"=\" character\n\t\t\t$splitAt = strpos($response[$i], '=');\n\t\t\t// Create an associative array\n\t\t\t$this->response[trim(substr($response[$i], 0, $splitAt))] = trim(substr($response[$i], ($splitAt+1)));\n\t\t}\n\n\t\t// Return values. Assign stuff based on the return 'Status' value from SagePay\n\t\tswitch($this->response['Status']) {\n\t\t\tcase 'OK':\n\t\t\t\t// Transactino made succssfully\n\t\t\t\t$this->status = 'success';\n\t\t\t\t$_SESSION['transaction']['VPSTxId'] = $this->response['VPSTxId']; // assign the VPSTxId to a session variable for storing if need be\n\t\t\t\t$_SESSION['transaction']['TxAuthNo'] = $this->response['TxAuthNo']; // assign the TxAuthNo to a session variable for storing if need be\n\t\t\t\tbreak;\n\t\t\tcase '3DAUTH':\n\t\t\t\t// Transaction required 3D Secure authentication\n\t\t\t\t// The request will return two parameters that need to be passed with the 3D Secure\n\t\t\t\t$this->acsurl = $this->response['ACSURL']; // the url to request for 3D Secure\n\t\t\t\t$this->pareq = $this->response['PAReq']; // param to pass to 3D Secure\n\t\t\t\t$this->md = $this->response['MD']; // param to pass to 3D Secure\n\t\t\t\t$this->status = '3dAuth'; // set $this->status to '3dAuth' so your controller knows how to handle it\n\t\t\t\tbreak;\n\t\t\tcase 'REJECTED':\n\t\t\t\t// errors for if the card is declined\n\t\t\t\t$this->status = 'declined';\n\t\t\t\t$this->error = 'Your payment was not authorised by your bank or your card details where incorrect.';\n\t\t\t\tbreak;\n\t\t\tcase 'NOTAUTHED':\n\t\t\t\t// errors for if their card doesn't authenticate\n\t\t\t\t$this->status = 'notauthed';\n\t\t\t\t$this->error = 'Your payment was not authorised by your bank or your card details where incorrect.';\n\t\t\t\tbreak;\n\t\t\tcase 'INVALID':\n\t\t\t\t// errors for if the user provides incorrect card data\n\t\t\t\t$this->status = 'invalid';\n\t\t\t\t$this->error = 'One or more of your card details where invalid. Please try again.';\n\t\t\t\tbreak;\n\t\t\tcase 'FAIL':\n\t\t\t\t// errors for if the transaction fails for any reason\n\t\t\t\t$this->status = 'fail';\n\t\t\t\t$this->error = 'An unexpected error has occurred. Please try again.';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// default error if none of the above conditions are met\n\t\t\t\t$this->status = 'error';\n\t\t\t\t$this->error = 'An error has occurred. Please try again.';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// set error sessions if the request failed or was declined to be handled by controller\n\t\tif($this->status !== 'success') {\n\t\t\t$_SESSION['error']['status'] = $this->status;\n\t\t\t$_SESSION['error']['description'] = $this->error;\n\t\t}\n\t}", "public function doRequest() {\n $this->request = $this->prepareRequest();\n \n $url = $this->conf->getEndPoint($this->orderType);\n $request = new WebServiceSoap\\SveaDoRequest($url);\n\n $svea_req = $request->GetAddresses($this->request);\n\n $response = new \\SveaResponse($svea_req,\"\");\n return $response->response;\n }", "public function execute() {\n $this->check();\n $this->buildQuery();\n $response = json_decode($this->getContents());\n $this->response = !empty($response) ? $response : NULL;\n }", "public function execute(){\n\n $body = '{\"payer_id\":\"' . $this->payer_id . '\"}';\n $client = new Client();\n try{\n $paymentInfo = $client->request('POST', $this->execute_url, ['headers' => [\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->accessKey,\n ],\n 'body' => $body\n ]);\n }\n catch (\\Exception $ex) {\n $error = json_encode($ex->getMessage());\n return($error);\n }\n $this->parsePaymentBody($paymentInfo);\n return $this->paymentBody;\n\n }", "function getResponse();", "function getResponse();", "function sendRequest()\n\t\t{\n\t\t\t$stream = $this->getRequestStream();\n\t\t\t$stream->write( $this->getRequestString() );\n\t\t\t$stream->close();\n\t\t}", "public function requestData() {\n\t\t// Set up cURL \n\t\t$curl = curl_init($this->query); \n\t\tcurl_setopt($curl, CURLOPT_POST, false); \n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t$response = curl_exec($curl);\n\t\tcurl_close($curl);\n\t\t\t\n\t\treturn $this->parseAPIResponse($response);\n\t}", "abstract public function sendRequest(array $options);", "public function getResponse() {\n }", "public function response();", "private function sendRawGetRequest($url)\n {\n // Send the request and process the response\n $guzzleResponse = $this->client->request('GET', $url);\n\n // Return the status code and body of the response\n return new SmartwaiverRawResponse($guzzleResponse);\n }", "protected function makeRequest()\n {\n $this->buildRequestURL();\n \n $ch = curl_init($this->requestUrl);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $output = curl_exec($ch);\n \n if ($output === false) {\n throw new \\ErrorException(curl_error($ch));\n }\n\n curl_close($ch);\n return $output;\n\n }", "function executeRequest() {\n\n\t\t// curl general\n\t\t$curl_options = [\n\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\tCURLOPT_SSL_VERIFYPEER => true,\n\t\t\tCURLOPT_CUSTOMREQUEST => $this->_requestType\n\t\t];\n\n\t\t// set to post\n\t\tif($this->_requestType == 'POST') {\n\t\t\t$curl_options[CURLOPT_POST] = true;\n\t\t}\n\n\t\t// build url and append query params\n\t\t$url = $this->url($this->_url);\n\t\t$this->_params[$this->_oauth2->getAccessTokenName()] = $this->_oauth2->getAccessToken();\n\t\tif(count($this->_params) > 0) {\n\t\t\t$url->setQuery($this->_params);\n\t\t}\n\t\t$curl_options[CURLOPT_URL] = $url->val();\n\n\t\t// check request headers\n\t\tif(count($this->_headers) > 0) {\n\t\t\t$header = [];\n\t\t\tforeach ($this->_headers as $key => $parsed_urlvalue) {\n\t\t\t\t$header[] = \"$key: $parsed_urlvalue\";\n\t\t\t}\n\t\t\t$curl_options[CURLOPT_HTTPHEADER] = $header;\n\t\t}\n\n\t\t// init curl\n\t\t$ch = curl_init();\n\t\tcurl_setopt_array($ch, $curl_options);\n\n\t\t// https handling\n\t\tif($this->_certificateFile != '') {\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\t\t\tcurl_setopt($ch, CURLOPT_CAINFO, $this->_certificateFile);\n\t\t} else {\n\t\t\t// bypass ssl verification\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\t\t}\n\n\t\t// execute the curl request\n\t\t$result = curl_exec($ch);\n\t\t$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\t\t$content_type = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);\n\t\tif($curl_error = curl_error($ch)) {\n\t\t\tthrow new OAuth2Exception($curl_error);\n\t\t} else {\n\t\t\t$json_decode = $this->jsonDecode($result, true);\n\t\t}\n\t\tcurl_close($ch);\n\n\t\treturn [\n\t\t\t'result' => (null === $json_decode) ? $result : $json_decode,\n\t\t\t'code' => $http_code,\n\t\t\t'content_type' => $content_type\n\t\t];\n\t}", "public function send()\n\t{\n\t\t$post = $this->compile_values();\n\n\t\tif (!function_exists('curl_exec'))\n\t\t\tthrow new Kohana_Exception('cURL is unavailable');\n\n\t\t$request = curl_init($this->_url);\n\t\tcurl_setopt($request, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($request, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($request, CURLOPT_POSTFIELDS, $post);\n\t\tcurl_setopt($request, CURLOPT_SSL_VERIFYPEER, FALSE);\n\n\t\t$response = curl_exec($request);\n\t\tcurl_close($request);\n\n\t\tif (!$response)\n\t\t\tthrow new Kohana_Exception('Error connecting to payment gateway');\n\n\t\t$this->response = explode($this->_delim_char, $response);\n\n\t\treturn $this;\n\t}", "public function getResponse()\n {\n }", "public function & GetResponse ();", "private function execute($request){\r\n\t\t$_CURL = curl_init();\r\n\t\tcurl_setopt($_CURL, CURLOPT_URL, $this->_PAYPAL_ENDPOINT);\r\n\t\tcurl_setopt($_CURL, CURLOPT_VERBOSE, 1);\r\n\t\tcurl_setopt($_CURL, CURLOPT_SSL_VERIFYPEER, FALSE);\r\n\t\tcurl_setopt($_CURL, CURLOPT_SSL_VERIFYHOST, FALSE);\r\n\t\tcurl_setopt($_CURL, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($_CURL, CURLOPT_POST, true);\r\n\t\tcurl_setopt($_CURL, CURLOPT_POSTFIELDS, $request);\r\n\t\t$data = curl_exec($_CURL);\r\n\t\tcurl_close($_CURL);\r\n\t\treturn $data;\r\n\t}", "public function executeRequest() {\n if($this->method == \"get_range\") {\n \treturn $this->getRange();\n }\n else {\n \t$this->response->setStatusCode(405, \"Method Not Found\");\n\t\t\t\t\treturn $this->response;\n }\n }", "protected function sendViaGet(): self\n {\n $this->response = $this->callApi('GET', $this->getUrl(), $this->body());\n\n return $this->parseResponse();\n }", "public function response ();", "public function serveRequest()\n {\n $msg = $this->connection->read();\n if (!$msg) return;\n $this->connection->acknowledge($msg);\n \n $replyMsg = $this->act($msg);\n\n // write correlation id\n $replyMsg->setHeader(\"correlation-id\", $msg->getId());\n\n $this->connection->send($msg->getReplyTo(), $replyMsg);\t\t\n }", "function request($url, $params = false) {\n\t\t$req =& new HTTP_Request($this->base . $url);\n\t\t//authorize\n\t\t$req->setBasicAuth($this->user, $this->pass);\n\t\t//set the headers\n\t\t$req->addHeader(\"Accept\", \"application/xml\");\n\t\t$req->addHeader(\"Content-Type\", \"application/xml\");\n\t\t//if were sending stuff\n\t\tif ($params) {\n\t\t\t//serialize the data\n\t\t\t//$xml = $this->serialize($params);\n\t\t\t//($xml)?$req->setBody($xml):false;\n\t\t\t$req->setBody($params);\n\t\t\t$req->setMethod(HTTP_REQUEST_METHOD_POST);\n\t\t}\n\t\t$response = $req->sendRequest();\n\t\t// print_r($req->getResponseHeader());\n\t\t// echo $req->getResponseCode() .\t\"\\n\";\n\t\t\n\t\tif (PEAR::isError($response)) {\n\t\t return $response->getMessage();\n\t\t} else {\n\t\t print_r($req->getResponseBody());\n\t\t return $req->getResponseBody();\n\t\t}\n\t}", "public function getResponse() {\n\t}", "private function executeRequest()\r\n\t{\r\n\t\ttry {\r\n\t\t\t$html = curl_exec($this->getConnection());\r\n\t\t\tif (curl_error($this->getConnection())) {\r\n\t\t\t\tthrow new Exception(curl_error($this->getConnection()));\r\n\t\t\t}\r\n\t\t} catch (Exception $e) {\r\n\t\t\techo 'Error: ' . $e->getMessage();\r\n\t\t}\r\n\r\n\t\treturn $html;\r\n\t}", "public function request(){\n return \\Gaia\\ShortCircuit::request();\n }", "protected function performRequest($request) {\n $this->responseHeaders = [];\n\n $ch = curl_init($this->getEndpoint());\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->getHttpTimeout());\n curl_setopt($ch, CURLOPT_TIMEOUT, $this->getHttpTimeout());\n curl_setopt($ch, CURLINFO_HEADER_OUT, true);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($ch, CURLOPT_MAXREDIRS, 2);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $this->verifyPeer);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, $this->verifyPeer ? 2 : 0);\n curl_setopt($ch, CURLOPT_VERBOSE, false);\n\n $headers = [];\n foreach ($this->httpHeaders as $key => $value) {\n $headers[] = \"{$key}: {$value}\";\n }\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\n if (isset($request['_http_method'])) {\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $request['_http_method']);\n } else {\n curl_setopt($ch, CURLOPT_POST, true);\n }\n\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($request));\n curl_setopt($ch, CURLOPT_HEADERFUNCTION, [$this,'setResponseHeader']);\n\n $response = curl_exec($ch);\n $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $error = curl_error($ch);\n\n curl_close($ch);\n\n if ($error) {\n throw new JsonRpcException(\"cURL error: {$error}\");\n }\n\n if ($httpCode !== 200 && $httpCode !== 204) {\n throw new JsonRpcException(\n \"Unexpected HTTP status code: {$httpCode}\",\n $httpCode);\n }\n\n if (strlen($response) === 0) {\n // No response at all is fine; happens when we send notification\n // requests.\n return [];\n }\n\n $response = json_decode($response);\n\n if (json_last_error() !== JSON_ERROR_NONE) {\n $jsonError = json_last_error_msg();\n $message = \"Unable to decode json response: {$jsonError}\";\n throw new JsonRpcException($message, json_last_error());\n }\n\n return $response;\n }", "public function send()\n {\n if (is_null($this->url)) {\n return false;\n }\n\n if (!is_null($this->payloadFilename)) {\n $this->httpClient->payloadFromFile($this->payloadFilename);\n $this->payload = null; // Kill it if we have it\n }\n\n if (!is_null($this->outputFilename)) {\n $this->httpClient->outputBodyToFile($this->outputFilename);\n }\n\n $headers = $this->headers->toArray();\n $response = false;\n switch ($this->requestType) {\n case Client::REQUEST_HEAD:\n case Client::REQUEST_GET:\n $response = $this->httpClient->request($this->url, $this->requestType, $headers);\n case Client::REQUEST_DELETE:\n case Client::REQUEST_PUT:\n case Client::REQUEST_PATCH:\n case Client::REQUEST_POST:\n $response = $this->httpClient->request($this->url, $this->requestType, $headers, $this->payload);\n }\n\n return $response;\n }", "public function exec()\n {\n try {\n $http_response = $this->front_controller->exec();\n return $this->http_transport->sendResponse($http_response);\n } catch (Exception $e) {\n $this->echoException($e);\n exit(1);\n }\n }", "public function sendGet ()\n {\n return $this->handleQuery();\n }", "public function make_request() {\n $curl = curl_init();\n\n // Setting our options.\n $options = [\n CURLOPT_URL => $this->get_request_url(),\n CURLOPT_ENCODING => \"gzip\",\n CURLOPT_RETURNTRANSFER => true\n ];\n \n // Setting our extra options - please see top of class for info.\n if(SELF::DEBUG){ $options[CURLOPT_VERBOSE] = true; }\n if(!SELF::SECURE) { $options[CURLOPT_SSL_VERIFYPEER] = false; }\n\n curl_setopt_array($curl, $options);\n\n $this->results = curl_exec($curl);\n\n // https://www.php.net/manual/en/function.curl-errno.php\n if(curl_errno($curl)) {\n throw new \\Exception('Issue occurred with CURL request to server: ' . curl_errno($curl));\n }\n\n // If in debug mode print out the results of our request.\n if(SELF::DEBUG){\n echo '<pre>'.print_r(curl_getinfo($curl),1).'</pre>';\n }\n\n curl_close($curl);\n\n return $this->results;\n }", "public function execute()\n {\n $this->log->info(\"Received server to server notification.\");\n\n $oResponse = $this->resultFactory->create(\\Magento\\Framework\\Controller\\ResultFactory::TYPE_RAW);\n $response = $this->getRequest()->getParams();\n\n $result = null;\n if (array_key_exists('opensslResult', $response)) {\n try {\n $result = $this->helper->decryptResponse($response['opensslResult']);\n\n if ($result != null) {\n $result = json_decode($result);\n\n $this->log->debug(var_export($result, true));\n } else {\n $this->log->error(\"Decoded response is NULL\");\n }\n } catch (\\Exception $ex) {\n $this->log->error($ex->getMessage(), $ex);\n }\n }\n\n if ($result && isset($result->status) &&\n ($result->status == 'complete-ok' || $result->status == 'in-progress')) {\n try {\n $this->helper->processGatewayResponse($result);\n $oResponse->setContents('OK');\n } catch (PaymentException $e) {\n $this->log->error($e->getMessage(), $e);\n $oResponse->setContents('ERROR');\n }\n } else {\n $oResponse->setContents('ERROR');\n }\n\n return $oResponse;\n }", "public function sendRequest()\n {\n return new ServerResponseManager(json_decode(file_get_contents( $this->wrapper.'?'.implode( '&', $this->getRequest() ) ), true));\n }", "function sendCurl(string $method, $arParams = [''], $ignoreErr = true) {\n\n $curl = curl_init(\"http://localhost:8091/\"); // run cli-wallet at port 8091\n\n $data = [\n \"jsonrpc\" => \"2.0\", \n \"id\" => 1, \n \"method\" => $method,\n \"params\" => $arParams\n ];\n\n\n $data_json = json_encode($data); //paste data into json\n\n //PR($data_json);\n \n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type'=>'application/json'));\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data_json);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\n $result = curl_exec($curl);\n curl_close($curl);\n\n $arResult = json_decode($result, true);\n if (isset($arResult) and !empty($arResult)) {\n if (isset($arResult['error']['message']) and !empty($arResult['error']['message'])) {\n if ($ignoreErr != true) {\n die('Stopped with error: <b>' . $arResult['error']['message'] . '</b>');\n } else {\n //PR($arResult['error']['message']);\n }\n } else {\n return $arResult['result'];\n //PR($arResult);\n }\n } else {\n die('Lost connection to the CLI wallet');\n }\n //PR($arResult);\n}", "public function execute()\n\t{\n\t\t$this->prepare();\n\t\t$result = $this->processor->execute( $this->method, $this->url, $this->headers, $this->body, $this->config );\n\t\t$this->body = ''; // We need to do this as we reuse the same object for performance. Once we've executed, the body is useless anyway due to the changing params\n\t\tif ( $result ) {\n\t\t\t$this->response_headers = $this->processor->getHeaders();\n\t\t\t$this->response_body = $this->processor->getBody();\n\t\t\t$this->executed = true;\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\t$this->executed = false;\n\t\t\treturn $result;\n\t\t}\n\t}" ]
[ "0.6639466", "0.65109116", "0.64634997", "0.6449978", "0.6418398", "0.6411755", "0.62883925", "0.625833", "0.6252432", "0.6222598", "0.6220256", "0.6189197", "0.61398774", "0.61340976", "0.6132704", "0.6104922", "0.610356", "0.6037429", "0.6028826", "0.6021623", "0.60145676", "0.6010569", "0.6009261", "0.5996723", "0.597595", "0.59609836", "0.59504473", "0.5946516", "0.59352183", "0.59341127", "0.5931192", "0.5931192", "0.59261805", "0.59044003", "0.59044003", "0.59044003", "0.59044003", "0.59044003", "0.59044003", "0.59044003", "0.59044003", "0.59044003", "0.59044003", "0.59044003", "0.5894926", "0.5894082", "0.5886275", "0.58840597", "0.5849044", "0.58480257", "0.58480257", "0.5840293", "0.5837649", "0.5827291", "0.58207023", "0.5817093", "0.57989067", "0.57976174", "0.5787669", "0.5753194", "0.5745654", "0.5745221", "0.5727027", "0.5726226", "0.57136554", "0.5701054", "0.56952924", "0.5679215", "0.5666568", "0.56435853", "0.5637649", "0.5637649", "0.56362283", "0.5635149", "0.56297415", "0.56271166", "0.56265634", "0.5621539", "0.56193066", "0.5616528", "0.56151795", "0.5601827", "0.5601284", "0.55987525", "0.559146", "0.5582179", "0.55479527", "0.5541353", "0.55333865", "0.55250543", "0.5509042", "0.55078083", "0.55023247", "0.5501967", "0.54891455", "0.5475476", "0.54649794", "0.54639554", "0.54629695", "0.5420817", "0.5416961" ]
0.0
-1
parse a potentially nested array
private static function parseVersions($arr) { $return = false; if (count($arr) > 0) { if (array_key_exists('version', $arr)) { if (is_object($arr['version'])) { $version = $arr['version']; $attr = $version->attributes(); switch ($attr['type']) { case 'VERSION_FOLDER': $return = array_merge( $return, (array)self::parseVersions((array)$version) ); break; case 'ACTUALS': continue; case 'PLANNING': $return[] = array( 'name' => (string)$attr['name'], 'type' => (string)$attr['type'], 'default' => (string)$attr['isDefaultVersion'] ); break; } } else { $return = array(); $versions = $arr['version']; foreach ($versions as $version) { $attr = $version->attributes(); switch ($attr['type']) { case 'VERSION_FOLDER': $return = array_merge( $return, (array)self::parseVersions((array)$version) ); break; case 'ACTUALS': continue; case 'PLANNING': $return[] = array( 'name' => (string)$attr['name'], 'type' => (string)$attr['type'], 'default' => (string)$attr['isDefaultVersion'] ); break; } } } } } if (is_array($return)) { sort($return); } return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ParseFromArray() {\n $this->value = $this->reader->next();\n $this->clean();\n }", "public function parseFromArray()\n {\n $this->value = $this->reader->next();\n }", "function pg_array_parse($array, $asText = true) {\n $s = $array;\n if ($asText) {\n $s = str_replace(\"{\", \"array('\", $s);\n $s = str_replace(\"}\", \"')\", $s); \n $s = str_replace(\",\", \"','\", $s); \n } else {\n $s = str_replace(\"{\", \"array(\", $s);\n $s = str_replace(\"}\", \")\", $s);\n }\n\t$ss = \"\\$retval = $s;\";\n eval($ss);\n\treturn $retval;\n}", "protected function parseData($data){\r\n $d = array();\r\n if(is_string($data)){\r\n try{\r\n parse_str($data,$arr);\r\n $d = $arr;\r\n }catch(Exception $e){\r\n //del lam gi ca\r\n }\r\n }elseif(is_array($data)){\r\n $d = $data;\r\n }\r\n if(!$d) return null;\r\n unset($d[$this->idField]);\r\n $r = array();\r\n foreach($d as $f => $v){\r\n if(in_array($f, $this->fields)) $r[$f] = $v;\r\n }\r\n return $r;\r\n }", "public function parse_array($value)\n\t{\n\t\tif ($value==null)\n\t\t\treturn array();\n\t\t\n\t\tif (is_array($value))\n\t\t\treturn $value;\n\t\t\t\n\t\t$value=trim($value,'{}');\n\t\t$result=explode(',',$value);\n\t\t\n\t\tfor($i=0; $i<count($result); $i++)\n\t\t\tif ($result[$i]=='NULL')\n\t\t\t\t$result[$i]=null;\n\t\t\t\t\n\t\treturn $result;\n\t}", "private static function parseArray($val)\n {\n $result = array();\n $openBrackets = 0;\n $openString = false;\n $openCurlyBraces = 0;\n $openLString = false;\n $buffer = '';\n\n $strLen = strlen($val);\n for($i = 0; $i < $strLen; $i++)\n {\n if($val[$i] == '[' && !$openString && !$openLString)\n {\n $openBrackets++;\n\n if($openBrackets == 1)\n {\n // Skip first and last brackets.\n continue;\n }\n }\n elseif($val[$i] == ']' && !$openString && !$openLString)\n {\n $openBrackets--;\n\n if($openBrackets == 0)\n {\n // Allow terminating commas before the closing bracket\n if(trim($buffer) != '')\n {\n $result[] = self::parseValue( trim($buffer) );\n }\n\n if (!self::checkDataType($result))\n {\n throw new Exception('Data types cannot be mixed in an array: ' . $buffer);\n }\n // Skip first and last brackets. We're finish.\n return $result;\n }\n }\n elseif($val[$i] == '\"' && $val[$i - 1] != \"\\\\\" && !$openLString)\n {\n $openString = !$openString;\n }\n elseif($val[$i] == \"'\" && !$openString) {\n $openLString = !$openLString;\n }\n elseif($val[$i] == \"{\" && !$openString && !$openLString) {\n $openCurlyBraces++;\n }\n elseif($val[$i] == \"}\" && !$openString && !$openLString) {\n $openCurlyBraces--;\n }\n \n if( ($val[$i] == ',' || $val[$i] == '}') && !$openString && !$openLString && $openBrackets == 1 && $openCurlyBraces == 0)\n {\n if ($val[$i] == '}') {\n $buffer .= $val[$i];\n }\n\n $buffer = trim($buffer);\n if (!empty($buffer)) {\n $result[] = self::parseValue($buffer);\n\n if (!self::checkDataType($result))\n {\n throw new Exception('Data types cannot be mixed in an array: ' . $buffer);\n }\n }\n $buffer = '';\n }\n else\n {\n $buffer .= $val[$i];\n }\n }\n\n // If we're here, something went wrong.\n throw new Exception('Wrong array definition: ' . $val);\n }", "function parseArray($arrayToken) {\n\n # remove bounding brackets\n $arrayToken = substr($arrayToken, 1, -1);\n\n # split on elements\n $elementTokens = $this->splitTokens($arrayToken);\n\n # elements will be collected in plain array\n $params = array();\n foreach ($elementTokens as $elementToken) {\n $params[] = $this->parseValue($elementToken);\n }\n return $params;\n }", "public static function parseIteratorArray(array &$array)\n {\n if (!empty($array)) {\n foreach ($array as &$item) {\n if (is_array($item)) {\n self::parseIteratorArray($item);\n } elseif ($item instanceof \\Iterator) {\n $item = iterator_to_array($item);\n self::parseIteratorArray($item);\n }\n }\n }\n }", "abstract public function parseInput(array $input): array;", "public static function parse_multi( $result )\n {\n return ( is_string( $result ) && $array = json_decode( $result, true ) ) ? $array : $result;\n }", "function parseBISArray($str) {\n $str = substr($str, 1, -1); // Strip trailing quotes\n $bla = parseBISArray_helper($str);\n $result = array();\n\n foreach ($bla as $row) {\n foreach ($row as $child) {\n $result[] = $child;\n }\n if (count($row) == 0)\n $result[] = array();\n }\n //var_dump($result);\n return $result;\n}", "private function parseobject($array)\n {\n if (is_object($array)) {\n if (get_class($array) == 'DataObject') {\n return $array;\n }\n $do = DataObject::create();\n foreach (get_object_vars($array) as $key => $obj) {\n if ($key == '__Type') {\n $do->setField('Title', $obj);\n } elseif (is_array($obj) || is_object($obj)) {\n $do->setField($key, $this->parseobject($obj));\n } else {\n $do->setField($key, $obj);\n }\n }\n return $do;\n } elseif (is_array($array)) {\n $dataList = ArrayList::create();\n foreach ($array as $key => $obj) {\n $dataList->push($this->parseobject($obj));\n }\n return $dataList;\n }\n return null;\n }", "protected function _decodeArray()\n {\n $result = array();\n $starttok = $tok = $this->_getNextToken(); // Move past the '['\n $index = 0;\n\n while ($tok && $tok != self::RBRACKET) {\n $result[$index++] = $this->_decodeValue();\n\n $tok = $this->_token;\n\n if ($tok == self::RBRACKET || !$tok) {\n break;\n }\n\n if ($tok != self::COMMA) {\n throw new Rx_Json_Exception('Missing \",\" in array encoding: ' . $this->_getProblemContext());\n }\n\n $tok = $this->_getNextToken();\n }\n\n $this->_getNextToken();\n return ($result);\n }", "public function parse(array $description);", "public function parse() {\n\t\t$pointer = 0;\n\t\t$ar_line = array();\n\n\t\tforeach ($this->structure as $key => $length) {\n\t\t\t$ar_line[$key] = trim(substr($this->line, $pointer, $length), \"\\n\\r \");\n\t\t\t$pointer += $length;\n\t\t}\n\t\t$ar_line['stamp'] = md5(serialize($ar_line));\n\n\t\tif ($this->return == 'array') {\n\t\t\treturn $ar_line;\n\t\t}\n\t\treturn (object) $ar_line;\n\t}", "private function parse(array $block): array\n {\n $raw = get_field('data');\n $className = trim(array_key_exists('className', $block) ? $block['className'] : '');\n\n unset($raw['']);\n\n $data = array(\n 'block' => (object) [\n 'id' => $block['id'],\n 'classList' => !empty($className) ? explode(' ', $className) : [],\n 'className' => $className,\n 'anchor' => !empty($block['anchor']) ? $block['anchor'] : $block['id']\n ],\n 'raw' => !empty($block['data']) ? (object) $block['data'] : (object) [],\n 'data' => !empty($raw) ? (object) $raw : (object) [],\n 'template' => 'blocks::' . $this->getId()\n );\n\n return $this->filter($data, $block);\n }", "public function parse($input) {\n\t//--\n\treturn (array) $this->loadWithSource((array)$this->loadFromString((string)$input));\n\t//--\n}", "public function parseGetData(array $data) {\n return $data;\n }", "public function testParsedArray()\n {\n $entity = DataObjectHandler::getInstance()->getObject('testEntity');\n $this->assertCount(3, $entity->getLinkedEntities());\n }", "function acf_parse_types($array)\n{\n}", "public function processField($arr){\n\t\t$return = array();\n\t\t$parts = explode(',', $arr);\n\t\t$seq = 0;\n\t\tfor($i=0; $i<count($parts); $i++){\n\t\t\tif('blank' == substr($parts[$i],0,5)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlist(,$list) = explode('_', $parts[$i])\t;\n\t\t\t//$list = str_replace('item_', '',$parts[$i]);\n\t\t\tlist($type, $fieldId) = explode('-',$list);\n\t\t\t$return[$type][$fieldId] = \tintval($seq);\n\t\t\t$seq++;\n\t\t}\n\n\t\treturn $return;\n\t}", "function sanitizeArray( $arr ) {\n if (is_array($arr)) {\n foreach($arr as $key => &$data) {\n if (is_array($data)) {\n $data = sanitizeArray($data);\n } else {\n try {\n $json = json_decode( $data , true);\n if (is_array($json)) {\n $data = sanitizeArray( $json );\n continue;\n }\n } catch(Exception $e) {\n $data = sanitize($data);\n }\n }\n }\n }\n return $arr;\n}", "public function parse(): array\n {\n // Text.\n if ($this->type === 'text') {\n return [\n 'text' => $this->message,\n ];\n }\n\n // Template.\n if ($this->type === 'template') {\n $payload = Arr::get($this->message, 'attachments.0.payload');\n\n // Generic template.\n if (Arr::get($payload, 'template_type') === 'generic') {\n return [\n 'generic' => $this->parseGenericTempalte($payload),\n ];\n }\n }\n\n // Image\n if ($this->type === 'image') {\n $payload = Arr::get($this->message, 'attachments.0.payload');\n return [\n 'image' => $this->parseImageAttachment($payload),\n ];\n }\n\n // This for unsupported messages.\n return [];\n }", "public function parse()\n {\n if (isset($this->schema->cmd)) {\n foreach ($this->schema->cmd as $key => $val) {\n if ($key === \"addNamespaces\") {\n $this->registerNamespaces($val);\n } elseif ($key === \"removeEmptyValues\") {\n $this->removeEmptyValues = $val ? true : false;\n } elseif ($key === \"sortResult\") {\n $this->sort = $val ? true : false;\n }\n }\n }\n\n $array = $this->parseRecursive($this->schema);\n\n if ($this->sort) {\n ksort($array);\n }\n\n return $array;\n }", "#[\\JetBrains\\PhpStorm\\ArrayShape([0 => 'int[]', 1 => 'Board[]'])]\nfunction parse_input(string $input): array\n{\n [$n, $b] = explode(\"\\n\\n\", $input, 2);\n\n $numbers = toIntArray(explode(',', $n));\n\n $boards = collect(explode(\"\\n\\n\", $b))\n ->map(function ($board) {\n return new Board($board);\n });\n\n return [$numbers, $boards];\n}", "abstract protected function parse($data);", "protected static function ParcelResultValidatorArray(){\n\t\t\tstatic $validator = array(\n\t\t\t\t'object' => array(array(\n\t\t\t\t\t'GroupID' => array('string' => array()),\n\t\t\t\t\t'OwnerID' => array('string' => array()),\n\t\t\t\t\t'Maturity' => array('integer' => array()),\n\t\t\t\t\t'Area' => array('integer' => array()),\n\t\t\t\t\t'AuctionID' => array('integer' => array()),\n\t\t\t\t\t'SalePrice' => array('integer' => array()),\n\t\t\t\t\t'InfoUUID' => array('string' => array()),\n\t\t\t\t\t'Dwell' => array('integer' => array()),\n\t\t\t\t\t'Flags' => array('integer' => array()),\n\t\t\t\t\t'Name' => array('string' => array()),\n\t\t\t\t\t'Description' => array('string' => array()),\n\t\t\t\t\t'UserLocation' => array('array' => array(array(\n\t\t\t\t\t\tarray('float' => array()),\n\t\t\t\t\t\tarray('float' => array()),\n\t\t\t\t\t\tarray('float' => array())\n\t\t\t\t\t))),\n\t\t\t\t\t'LocalID' => array('integer' => array()),\n\t\t\t\t\t'GlobalID' => array('string' => array()),\n\t\t\t\t\t'RegionID' => array('string' => array()),\n\t\t\t\t\t'MediaDescription' => array('string' => array()),\n\t\t\t\t\t'MediaHeight' => array('integer' => array()),\n\t\t\t\t\t'MediaLoop' => array('boolean' => array()),\n\t\t\t\t\t'MediaType' => array('string' => array()),\n\t\t\t\t\t'ObscureMedia' => array('boolean' => array()),\n\t\t\t\t\t'ObscureMusic' => array('boolean' => array()),\n\t\t\t\t\t'SnapshotID' => array('string' => array()),\n\t\t\t\t\t'MediaAutoScale' => array('integer' => array()),\n\t\t\t\t\t'MediaLoopSet' => array('float' => array()),\n\t\t\t\t\t'MediaURL' => array('string' => array()),\n\t\t\t\t\t'MusicURL' => array('string' => array()),\n\t\t\t\t\t'Bitmap' => array('string' => array()),\n\t\t\t\t\t'Category' => array('integer' => array()),\n\t\t\t\t\t'FirstParty' => array('boolean' => array()),\n\t\t\t\t\t'ClaimDate' => array('integer' => array()),\n\t\t\t\t\t'ClaimPrice' => array('integer' => array()),\n\t\t\t\t\t'Status' => array('integer' => array()),\n\t\t\t\t\t'LandingType' => array('integer' => array()),\n\t\t\t\t\t'PassHours' => array('float' => array()),\n\t\t\t\t\t'PassPrice' => array('integer' => array()),\n\t\t\t\t\t'UserLookAt' => array('array' => array(array(\n\t\t\t\t\t\tarray('float' => array()),\n\t\t\t\t\t\tarray('float' => array()),\n\t\t\t\t\t\tarray('float' => array())\n\t\t\t\t\t))),\n\t\t\t\t\t'AuthBuyerID' => array('string' => array()),\n\t\t\t\t\t'OtherCleanTime' => array('integer' => array()),\n\t\t\t\t\t'RegionHandle' => array('string' => array()),\n\t\t\t\t\t'Private' => array('boolean' => array()),\n\t\t\t\t\t'GenericData' => array('object' => array()),\n\t\t\t\t))\n\t\t\t);\n\t\t\treturn $validator;\n\t\t}", "private function process_array($value) {\n return is_array($value);\n }", "function SS_cleanXMLArray($array){\n\tif (is_array($array)){\n\t\tforeach ($array as $k=>$a){\n\t\t\tif (is_array($a) && count($a)==1 && isset($a[0])){\n\t\t\t\t$array[$k] = SS_cleanXMLArray($a[0]);\n\t\t\t}\n\t\t}\n\t}\n\treturn $array;\n}", "protected function parse_array_attributes( $key ) {\n\t\t$value = $this->{$key};\n\t\tif ( ! is_array( $value ) ) {\n\t\t\treturn $this;\n\t\t}\n\t\t$first = reset( $value );\n\t\tif ( ! is_array( $first ) ) {\n\t\t\treturn $this;\n\t\t}\n\n\t\t// Options aren't affected with taxonomies.\n\t\t$tmp_array = array();\n\t\t$tmp_std = array();\n\n\t\tforeach ( $value as $arr ) {\n\t\t\t$tmp_array[ $arr['key'] ] = $arr['value'];\n\t\t\tif ( isset( $arr['selected'] ) && $arr['selected'] ) {\n\t\t\t\t$tmp_std[] = $arr['key'];\n\t\t\t}\n\n\t\t\t// Push default value to std on Text List.\n\t\t\tif ( empty( $arr['default'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( 'fieldset_text' === $this->type ) {\n\t\t\t\t$tmp_std[ $arr['value'] ] = $arr['default'];\n\t\t\t} else {\n\t\t\t\t$tmp_std[] = $arr['default'];\n\t\t\t}\n\t\t}\n\n\t\t// Parse JSON and dot notations.\n\t\t$this->{$key} = $this->parse_json_dot_notations( $tmp_array );\n\n\t\tif ( $tmp_std ) {\n\t\t\t$this->std = $tmp_std;\n\t\t}\n\t\treturn $this;\n\t}", "protected function parseResult(array $result): array\n {\n [$key, $rawData] = $result;\n\n $data = collect($rawData)\n ->map(function ($rawData) {\n [$id, $rawData] = $rawData;\n\n $data = [];\n for ($i = 0; $i < count($rawData); $i += 2) {\n $value = $rawData[$i + 1];\n $data[\"{$rawData[$i]}\"] = $value;\n }\n\n return ['id' => $id, 'data' => $data];\n });\n\n return ['key' => $key, 'data' => $data->toArray()];\n }", "function rest_is_array($maybe_array)\n {\n }", "public function parseArray(array $array): void\n {\n $this->XMLTree = $this->generateXMLTree($array);\n }", "private function structureIterator($array){\n $data = array();\n foreach($array as $key => $value){\n if(is_array($value))\n $data[$this->slug($key)] = $this->structureIterator($value);\n else {\n if($this->isImage($value))\n $data['images'][] = $value;\n elseif($this->isJson($value))\n $data['info'] = $this->convertJson($value);\n else\n $data['files'][] = $value;\n }\n }\n $this->sortFiles($data);\n return $data;\n }", "abstract public function parsePostData() : array;", "public function parseData(array $data): void\n {\n $collection = new Collection($data);\n\n $this->labels = $collection->filter(static function ($item) {\n return is_string($item);\n })->map(function ($item, $key) {\n return new Label($item, $key, $this->slug);\n });\n\n $this->containers = $collection->filter(static function ($item) {\n return is_array($item);\n })->map(function ($item, $key) {\n return new self($item, $key, $this->slug);\n });\n }", "protected function parseData(array $raw): array\n {\n $data = [];\n foreach ($raw as $field => $value) {\n $data[] = $field;\n $data[] = $value;\n }\n\n return $data;\n }", "public function parseJson($array = false)\n {\n if ($this->getMimeType() == 'application/json') {\n $contents = $this->getContents();\n $contents = json_decode($contents, $array);\n if (json_last_error() == JSON_ERROR_NONE) {\n return $contents;\n }\n }\n return false;\n }", "public function parseArray($data, $element=null) {\n if ($element === null) {\n $element = &$this->xml;\n }\n foreach ($data as $key=>$value) {\n if (is_array($value)) {\n if (is_numeric(array_keys($value)[0])) {\n foreach ($value as $v) {\n if (is_array($v)) {\n $this->parseArray($v, $element->addChild($key));\n } else {\n $element->addChild($key, $this->parseValue($v));\n }\n }\n } else {\n $this->parseArray($value, $element->addChild($key));\n }\n } else {\n $element->addChild($key, $this->parseValue($value));\n }\n }\n }", "function error_parser($value ='')\n{\n return (!is_array(json_decode($value))) ? $value : json_decode($value);\n}", "public function scrubArray(array $data) : array;", "protected function fixValue(array $value)/*# : array */\n {\n $result = [];\n foreach ($value as $k => $v) {\n if (false !== strpos($k, $this->field_splitter)) {\n $res = &$this->searchTree($k, $result, true);\n $res = is_array($v) ? $this->fixValue($v) : $v;\n } else {\n $result[$k] = is_array($v) ? $this->fixValue($v) : $v;\n }\n }\n return $result;\n }", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "public function setFromArray(array &$_data)\n {\n parent::setFromArray($_data);\n \n if (isset($_data['flatpath'])) {\n $this->_parsePath($_data['flatpath']);\n }\n }", "protected function processArray($array)\n {\n if ($array instanceof Collection) {\n $array = $array->getAll();\n }\n\n if (!is_array($array)) {\n throw new InvalidArgumentException('The config must be provided as an array or Collection.');\n }\n\n return $array;\n }", "private function _parseLine($line) {\n\t//--\n\tif(!$line) {\n\t\treturn array();\n\t} //end if\n\t//--\n\t$line = trim($line);\n\t//--\n\tif(!$line) {\n\t\treturn array();\n\t} //end if\n\t//--\n\t$array = array();\n\t//--\n\t$group = $this->nodeContainsGroup($line);\n\tif($group) {\n\t\t$this->addGroup($line, $group);\n\t\t$line = $this->stripGroup ($line, $group);\n\t} //end if\n\t//--\n\tif($this->startsMappedSequence($line)) {\n\t\treturn $this->returnMappedSequence($line);\n\t} //end if\n\tif($this->startsMappedValue($line)) {\n\t\treturn $this->returnMappedValue($line);\n\t} //end if\n\tif($this->isArrayElement($line)) {\n\t\treturn $this->returnArrayElement($line);\n\t} //end if\n\tif($this->isPlainArray($line)) {\n\t\treturn $this->returnPlainArray($line);\n\t} //end if\n\t//--\n\treturn $this->returnKeyValuePair($line);\n\t//--\n}", "protected function parse() {}", "public function _cleanData (array $arr)\n {\n foreach ($arr as $key => $element)\n {\n if (is_array ($element))\n {\n $arr [$key] = $this->_cleanData ($element);\n }\n elseif ($arr [$key] instanceof DotNotation_NullElement)\n {\n unset ($arr [$key]);\n }\n }\n \n return $arr;\n }", "public function parse($data);", "public function parse($data);", "public function parse($data);", "function rest_sanitize_array($maybe_array)\n {\n }", "private function parseData(array $data)\n {\n $field = $data['field'];\n\n foreach ($data['policies'] as $rule => $policy) {\n $passes = call_user_func_array([new Rule(), $rule], [$field, $data['value'], $policy]);\n\n if (!$passes) {\n ErrorHandler::set(\n str_replace(\n [':attribute', ':policy', '_'],\n [$field, $policy, ' '], $this->messages[$rule]), $field\n );\n }\n }\n }", "public function parse(): array\n {\n $this->parseElement();\n $this->parseChildNodes();\n\n return ['dir' => $this->dir,\n 'includes' => $this->includes,\n 'excludes' => $this->excludes];\n }", "protected function recursiveArrayHandler($arrayText)\n {\n $matches = [];\n $arrayToBuild = [];\n if (preg_match_all(Patterns::$SPLIT_PATTERN_SHORTHANDSYNTAX_ARRAY_PARTS, $arrayText, $matches, PREG_SET_ORDER)) {\n foreach ($matches as $singleMatch) {\n $arrayKey = $this->unquoteString($singleMatch['Key']);\n if (!empty($singleMatch['VariableIdentifier'])) {\n $arrayToBuild[$arrayKey] = new ObjectAccessorNode($singleMatch['VariableIdentifier']);\n } elseif (array_key_exists('Number', $singleMatch) && (!empty($singleMatch['Number']) || $singleMatch['Number'] === '0')) {\n // Note: this method of casting picks \"int\" when value is a natural number and \"float\" if any decimals are found. See also NumericNode.\n $arrayToBuild[$arrayKey] = $singleMatch['Number'] + 0;\n } elseif ((array_key_exists('QuotedString', $singleMatch) && !empty($singleMatch['QuotedString']))) {\n $argumentString = $this->unquoteString($singleMatch['QuotedString']);\n $arrayToBuild[$arrayKey] = $this->buildArgumentObjectTree($argumentString);\n } elseif (array_key_exists('Subarray', $singleMatch) && !empty($singleMatch['Subarray'])) {\n $arrayToBuild[$arrayKey] = new ArrayNode($this->recursiveArrayHandler($singleMatch['Subarray']));\n }\n }\n }\n return $arrayToBuild;\n }", "public function importArray($data);", "private function parseField($field)\n {\n $f = array();\n\n if (empty($field['sub_fields'])) {\n if (empty($field['value'])) {\n if (!empty($field['default_value'])) {\n if (is_array($field['default_value'])) {\n return reset($field['default_value']);\n }\n }\n return '';\n } else {\n return $field['value'];\n }\n } else {\n foreach ($field['sub_fields'] as $subfield) {\n if ('repeater' === $subfield['type']) {\n $f[$field['name']] = $this->parseField($subfield);\n } elseif ('group' === $subfield['type']) {\n $f[$field['name']][] = $this->parseField($subfield);\n } else {\n $f[$field['name']][$subfield['name']] = $this->parseField($subfield);\n }\n }\n }\n return $f;\n }", "function acf_update_nested_array(&$array, $ancestors, $value)\n{\n}", "private function _getNestedArrayFields($field)\n {\n $data = $this->_getDataValidation();\n $parts = explode('.', $field);\n $firstElement = array_shift($parts);\n $rules = [$firstElement];\n\n // in case the inputs are checkboxes, ignore them\n if (!array_key_exists($firstElement, $data)) {\n return [];\n }\n\n $currentValue = $data[$firstElement];\n $defaultTotal = 0;\n\n foreach ($parts as $part) {\n if ($part == '*') {\n // key not exist, ignore it\n if (!is_array($currentValue) || empty(array_keys($currentValue)) || !isset($currentValue[array_keys($currentValue)[0]])) {\n return [];\n }\n\n $totalElements = $defaultTotal == 1 ? 1 : count($currentValue);\n $currentValue = $currentValue[array_keys($currentValue)[0]];\n $temp = [];\n for ($s=0; $s < $totalElements; $s++) {\n foreach ($rules as $rule) {\n $temp[] = $rule.\"[\".$s.\"]\";\n }\n }\n $rules = $temp;\n } else {\n // key not exist, ignore it\n if (isset($currentValue[$part])) {\n $defaultTotal = 0;\n $currentValue = $currentValue[$part];\n } else {\n $defaultTotal = 1;\n }\n\n $temp = [];\n foreach ($rules as $rule) {\n $temp[] = $rule.\"[\".$part.\"]\";\n }\n $rules = $temp;\n }\n }\n return $rules;\n }", "private function filter_array( $value ) {\n\t\tif ( empty( $this->type ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tif ( Schema_Type::ARRAY !== $this->type->case() ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tif ( empty( $value ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t$property = self::from_json( $this->schema, $this->get_id() . '::items', $this->items );\n\t\t$array = array();\n\n\t\tforeach ( $value as $item ) {\n\t\t\t$array[] = $property->filter( $item );\n\t\t}\n\n\t\treturn $array;\n\t}", "function wpsl_is_multi_array( $array ) {\n\n foreach ( $array as $value ) {\n if ( is_array( $value ) ) return true;\n }\n\n return false;\n}", "protected function _parse(){\n\t\tforeach ($this->dataArray['tables']['nat']['default-chains'] as $a => &$b){\n\t\t\t$b['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($b['rules'], $b['iptables-rules']);\n\t\t}\n\t\t\n\t\t// Now the IP chains...\n\t\tforeach ($this->dataArray['tables']['nat']['ip-chains'] as &$e){\n\t\t\t$e['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($e['rules'], $e['iptables-rules']);\n\t\t}\n\t\t\n\t\t// And finally, the others...\n\t\tforeach ($this->dataArray['tables']['nat']['other-chains'] as $h => &$i){\n\t\t\t$i['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($i['rules'], $i['iptables-rules']);\n\t\t}\n\t}", "function acf_is_array($array)\n{\n}", "private function __parse_intput() {\n $requests = JsonParser::decode($this->__raw_input);\n if (is_array($requests) === false or\n empty($requests[0])) {\n $requests = array($requests);\n }\n return ($requests);\n }", "private function _parse($value)\n\t{\n\t\tif (is_object($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\t\n\t\tif (is_array($value)) {\n\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t$value[$k] = $this->_parse($v);\n\t\t\t}\n\t\t\treturn $value;\n\t\t}\n\t\t\n\t\tif (preg_match(\"/^[0-9]+$/\", $value)) {\n\t\t\treturn (int) $value;\n\t\t}\n\t\t\n\t\tif (preg_match(\"/^[0-9]+\\.[0-9]+$/\", $value)) {\n\t\t\treturn (float) $value;\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "public static function parseFields($data)\n {\n $data = self::explodeFields($data);\n //string parse\n foreach ($data as $name => $value) {\n $newField = collect();\n foreach ($value as $rule) {\n if (array_key_exists(0, $value)) {\n $newField[] = self::parseStringFields($rule);\n }\n }\n $fields[$name] = $newField->collapse();\n }\n //parse array\n foreach ($data as $name => $value) {\n if (!array_key_exists(0, $value)) {\n $fields[$name] = collect($value);\n }\n }\n\n return $fields ?? [];\n }", "private function _getArrayRule($field, $rules, $isNested = false)\n {\n $arrayRuleName = 'array';\n $hasNullableRule = false;\n\n // check the rule of array if found\n $arrayRule = array_filter(explode('|', $rules), function ($item) use ($arrayRuleName, &$hasNullableRule) {\n $hasNullableRule = $item == 'nullable';\n return substr($item, 0, strlen($arrayRuleName)) == $arrayRuleName;\n });\n\n if (!empty($arrayRule)) {\n try {\n $valueChecked = $this->_getValueChecked($field, $isNested);\n } catch (Exception $e) { // field not exist\n $this->set_message($field, 'The {field} field is not found.');\n return ['required', function ($value) use ($hasNullableRule) {\n return $hasNullableRule;\n }];\n }\n\n $subrules = $this->_extractSubRules($this->_getSubRules($arrayRule));\n\n // Note: CI will ignore the field that its value is an empty array.\n // So, to fix this when the subrules exist and the value is an empty array,\n // set its value to null\n if (!empty($subrules) && empty($valueChecked)) {\n $this->set_null($field);\n /* we do not need to check the error (field not exist) because it was checked above.\n if ($this->set_null($field) === false) {\n return ['required', function ($value) use ($hasNullableRule) {\n return $hasNullableRule;\n }];\n }*/\n }\n\n return [$arrayRuleName, function ($value) use ($valueChecked, $subrules, $arrayRuleName) {\n // check it is an array\n if (!is_array($valueChecked)) {\n $this->set_message($arrayRuleName, 'The {field} field must be an array.');\n return false;\n }\n // validate the subrules of array (min, max, size) if found\n return $this->_validateArraySubrules($valueChecked, $subrules, $arrayRuleName);\n }];\n }\n return null;\n }", "private function _from_array($array, $par, $xss_clean = false)\n {\n if(isset($array[$par])) {\n if($xss_clean) {\n return $this->xss_clean($array[$par]);\n }\n else\n return $array[$par];\n }\n else if($par == null) {\n if($xss_clean) {\n return $this->xss_clean($array);\n }\n else\n return $array;\n }\n else\n return false;\n }", "function wp_parse_str( $string, &$array ) {\n\tparse_str( $string, $array );\n\t$array = apply_filters( 'wp_parse_str', $array );\n}", "public function simpleXML2Array($xml){\n\n $array = (array)$xml;\n\n if (count($array) == 0) {\n $array = (string)$xml; \n }\n\n if (is_array($array)) {\n //recursive Parser\n foreach ($array as $key => $value){\n if (is_object($value)) {\n if(strpos(get_class($value),\"SimpleXML\")!==false){\n $array[$key] = $this->simpleXML2Array($value);\n }\n } else {\n $array[$key] = $this->simpleXML2Array($value);\n }\n }\n }\n\n return $array;\n \n }", "public function parse(string $str): ?array;", "protected function unserializeValue($value)\n\t{\n\t\tif ($value[0] == '{' || $value[0] == '[') {\n\t\t\treturn (array)json_decode($value, true);\n\t\t} elseif (in_array(substr($value, 0, 2), ['O:', 'a:'])) {\n\t\t\treturn (array)unserialize($value);\n\t\t} elseif (is_numeric($value)) {\n\t\t\treturn (array)$value;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t}", "abstract protected function unserializeData(array $data);", "private function parseJson(array $token)\n {\n $value = json_decode($token['value'], true);\n\n if ($error = json_last_error()) {\n // Legacy support for elided quotes. Try to parse again by adding\n // quotes around the bad input value.\n $value = json_decode('\"' . $token['value'] . '\"', true);\n if ($error = json_last_error()) {\n $token['type'] = self::T_UNKNOWN;\n return $token;\n }\n }\n\n $token['value'] = $value;\n return $token;\n }", "protected function parse()\n {\n if($this->isRelationalKey()){\n $this->parsedValue = $this->makeRelationInstruction();\n } \n else {\n $this->parsedValue = $this->parseFlatValue($this->value);\n } \n }", "protected function __resolve_parse($value)\n {\n $value = is_string($value) ? ['file' => $value] : $value;\n $value += [\n 'is_object' => true,\n 'is_root' => true,\n ];\n\n $parsed = $this->parseLater($value['file'], 'file', false);\n\n return\n $value['is_object']\n ? [$value['is_root'] ? '$newRoot' : '$new' => $parsed]\n : $parsed\n ;\n }", "function parseFieldList($dataArray) {\n\t\t$result = array();\n\n\t\tif (!is_array($dataArray)) {\n\t\t\treturn $result;\n\t\t}\n\n\t\tforeach($dataArray as $key => $data) {\n\t\t\t// remove the trailing '.'\n\t\t\t$result[] = substr($key, 0, -1);\n\t\t}\n\n\t\treturn $result;\n\t}", "protected function jsonDecode(array $data)\n {\n foreach ($data as &$value) {\n if (\\is_array($value)) {\n $value = $this->jsonDecode($value);\n } else {\n $value = json_decode($value, true);\n }\n }\n\n return $data;\n }", "function _postProcess() {\r\n $item = current($this->_struct);\r\n \r\n $ret = array('_name'=>$item['tag'], '_attributes'=>array(), '_value'=>null);\r\n\r\n if (isset($item['attributes']) && count($item['attributes'])>0) {\r\n foreach ($item['attributes'] as $key => $data) {\r\n if (!is_null($data)) {\r\n $item['attributes'][$key] = str_replace($this->_replaceWith, $this->_replace, $item['attributes'][$key]);\r\n }\r\n }\r\n $ret['_attributes'] = $item['attributes'];\r\n if ($this->attributesDirectlyUnderParent)\r\n $ret = array_merge($ret, $item['attributes']);\r\n }\r\n\r\n if (isset($item['value']) && $item['value'] != null)\r\n $item['value'] = str_replace($this->_replaceWith, $this->_replace, $item['value']);\r\n \r\n switch ($item['type']) {\r\n case 'open':\r\n $children = array();\r\n while (($child = next($this->_struct)) !== FALSE ) {\r\n if ($child['level'] <= $item['level'])\r\n break;\r\n \r\n $subItem = $this->_postProcess();\r\n \r\n if (isset($subItem['_name'])) {\r\n if (!isset($children[$subItem['_name']]))\r\n $children[$subItem['_name']] = array();\r\n \r\n $children[$subItem['_name']][] = $subItem;\r\n }\r\n else {\r\n foreach ($subItem as $key=>$value) {\r\n if (isset($children[$key])) {\r\n if (is_array($children[$key]))\r\n $children[$key][] = $value;\r\n else\r\n $children[$key] = array($children[$key], $value);\r\n }\r\n else {\r\n $children[$key] = $value;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if ($this->childTagsDirectlyUnderParent)\r\n $ret = array_merge($ret, $this->_condenseArray($children));\r\n else\r\n $ret['_value'] = $this->_condenseArray($children);\r\n \r\n break;\r\n case 'close':\r\n break;\r\n case 'complete':\r\n if (count($ret['_attributes']) > 0) {\r\n if (isset($item['value']))\r\n $ret['_value'] = $item['value'];\r\n }\r\n else {\r\n\t\t\tif (isset($item['value'])) {\r\n\t\t\t\t$ret = array($item['tag']=> $item['value']);\r\n\t\t\t} else {\r\n\t\t\t\t$ret = array($item['tag']=> \"\");\r\n\t\t\t}\r\n }\r\n break;\r\n }\r\n\r\n //added by Dan Coulter\r\n\r\n \r\n /*\r\n foreach ($ret as $key => $data) {\r\n if (!is_null($data) && !is_array($data)) {\r\n $ret[$key] = str_replace($this->_replaceWith, $this->_replace, $ret[$key]);\r\n }\r\n }\r\n */\r\n return $ret;\r\n }", "function nest($array = false, $field='post_parent') {\n\t\tif(!$array || !$field) return;\n\t\t$_array = array();\n\t\t$_array_children = array();\n\t\t\n\t\t// separate children from parents\n\t\tforeach($array as $a) {\n\t\t\tif(!$a->post_parent) {\n\t\t\t\t$_array[] = $a;\n\t\t\t} else {\n\t\t\t\t$_array_children[$a->post_parent][] = $a;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// nest children and parents\n\t\tforeach($_array as $a) {\n\t\t\t$a->children = array();\n\t\t\tif(isset($_array_children[$a->ID])) $a->children = $_array_children[$a->ID];\n\t\t}\n\t\treturn $_array;\n\t}", "private static function consumeArray($contents,&$pos) {\n\t\t//Valid sample: [1,2,['bb','c'=>9],[1=>1,],]\n\t\t$startPos=$pos++;//save initial value of $pos to $startPos and also advance $pos to after the bracket\n\t\tDokser::skipWhitespaceAndComments($contents, $pos);//skip possible whitespace after [\n\t\twhile ($contents[$pos]!=']'){\n\t\t\tDokser::consumeValue($contents, $pos);//consume value, or actually alternatively key as it may be\n\t\t\tDokser::skipWhitespaceAndComments($contents, $pos);//skip whitespace after key/value\n\t\t\tif ($contents[$pos]=='=')//the consumed value was key, skip '=>' and let next iteration consume its value\n\t\t\t\t$pos+=2;\n\t\t\telse if ($contents[$pos]==',')//skip comma\n\t\t\t\t++$pos;\n\t\t\telse//if neither \",\" nor \"=>\" was encontered then it means $pos is now either at a value or \"]\" and then we\n\t\t\t\tcontinue;//we don't have to skip whitespace since it's already been done. otherwise if \",\" or \"=>\" was\n\t\t\tDokser::skipWhitespaceAndComments($contents, $pos);//found we need to skip whitespace after it\n\t\t}\n\t\t++$pos;//go past closing bracket\n\t\treturn substr($contents, $startPos,$pos-$startPos);//return the array-string including its brackets\n\t}", "protected function _parseArrayOptions($options)\n {\n $tmp = array();\n foreach ($options as $option) {\n $keys = explode('.', $option);\n $level = &$tmp;\n for ($i = 0; $i < count($keys) - 1; $i++) {\n if (!array_key_exists($keys[$i], $level)) {\n $level[$keys[$i]] = array();\n }\n $level = &$level[$keys[$i]];\n }\n $keyVal = explode('=', $keys[$i]);\n $level[$keyVal[0]] = $keyVal[1];\n unset($level);\n }\n\n return $tmp;\n }", "private function T_ARRAY($value) {\n\t\t$_convert = array('('=>'{',\t')'=>'}',);\n\t\t$js = $this->parseUntil(array(';'), $_convert, true);\n\t\tif (strpos($js, ':') === false) {\n\t\t\t$this->tmp = -1;\n\t\t\t$js = preg_replace_callback ('/([{, \\t\\n])(\\'.*\\')(|.*:(.*))([,} \\t\\n])/Uis', array($this, 'cb_T_ARRAY'), $js);\n\t\t}\n\t\treturn $js;\n\t}", "protected function arrayToObject($data)\n {\n if ($data) {\n if ($data['type'] == 'uri' or $data['type'] == 'bnode') {\n return $this->resource($data['value']);\n } else {\n return Literal::create($data);\n }\n } else {\n return null;\n }\n }", "protected function _parse($data)\n\t{\n\t\t// Start with an 'empty' array with no data.\n\t\t$current = array();\n\n\t\t// Loop until we're out of data.\n\t\twhile ($data !== '')\n\t\t{\n\t\t\t// Find and remove the next tag.\n\t\t\tpreg_match('/\\A<([\\w\\-:]+)((?:\\s+.+?)?)([\\s]?\\/)?' . '>/', $data, $match);\n\t\t\tif (isset($match[0]))\n\t\t\t{\n\t\t\t\t$data = preg_replace('/' . preg_quote($match[0], '/') . '/s', '', $data, 1);\n\t\t\t}\n\n\t\t\t// Didn't find a tag? Keep looping....\n\t\t\tif (!isset($match[1]) || $match[1] === '')\n\t\t\t{\n\t\t\t\t// If there's no <, the rest is data.\n\t\t\t\t$data_strpos = strpos($data, '<');\n\t\t\t\tif ($data_strpos === false)\n\t\t\t\t{\n\t\t\t\t\t$text_value = $this->_from_cdata($data);\n\t\t\t\t\t$data = '';\n\n\t\t\t\t\tif ($text_value !== '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$current[] = array(\n\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t'value' => $text_value\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If the < isn't immediately next to the current position... more data.\n\t\t\t\telseif ($data_strpos > 0)\n\t\t\t\t{\n\t\t\t\t\t$text_value = $this->_from_cdata(substr($data, 0, $data_strpos));\n\t\t\t\t\t$data = substr($data, $data_strpos);\n\n\t\t\t\t\tif ($text_value !== '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$current[] = array(\n\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t'value' => $text_value\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If we're looking at a </something> with no start, kill it.\n\t\t\t\telseif ($data_strpos !== false && $data_strpos === 0)\n\t\t\t\t{\n\t\t\t\t\t$data_strpos = strpos($data, '<', 1);\n\t\t\t\t\tif ($data_strpos !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$text_value = $this->_from_cdata(substr($data, 0, $data_strpos));\n\t\t\t\t\t\t$data = substr($data, $data_strpos);\n\n\t\t\t\t\t\tif ($text_value !== '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$current[] = array(\n\t\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t\t'value' => $text_value\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$text_value = $this->_from_cdata($data);\n\t\t\t\t\t\t$data = '';\n\n\t\t\t\t\t\tif ($text_value !== '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$current[] = array(\n\t\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t\t'value' => $text_value\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\n\t\t\t\t// Wait for an actual occurrence of an element.\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Create a new element in the array.\n\t\t\t$el = &$current[];\n\t\t\t$el['name'] = $match[1];\n\n\t\t\t// If this ISN'T empty, remove the close tag and parse the inner data.\n\t\t\tif ((!isset($match[3]) || trim($match[3]) !== '/') && (!isset($match[2]) || trim($match[2]) !== '/'))\n\t\t\t{\n\t\t\t\t// Because PHP 5.2.0+ seems to croak using regex, we'll have to do this the less fun way.\n\t\t\t\t$last_tag_end = strpos($data, '</' . $match[1] . '>');\n\t\t\t\tif ($last_tag_end === false)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$offset = 0;\n\t\t\t\twhile (true)\n\t\t\t\t{\n\t\t\t\t\t// Where is the next start tag?\n\t\t\t\t\t$next_tag_start = strpos($data, '<' . $match[1], $offset);\n\n\t\t\t\t\t// If the next start tag is after the last end tag then we've found the right close.\n\t\t\t\t\tif ($next_tag_start === false || $next_tag_start > $last_tag_end)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If not then find the next ending tag.\n\t\t\t\t\t$next_tag_end = strpos($data, '</' . $match[1] . '>', $offset);\n\n\t\t\t\t\t// Didn't find one? Then just use the last and sod it.\n\t\t\t\t\tif ($next_tag_end === false)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\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$last_tag_end = $next_tag_end;\n\t\t\t\t\t\t$offset = $next_tag_start + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Parse the insides.\n\t\t\t\t$inner_match = substr($data, 0, $last_tag_end);\n\n\t\t\t\t// Data now starts from where this section ends.\n\t\t\t\t$data = substr($data, $last_tag_end + strlen('</' . $match[1] . '>'));\n\n\t\t\t\tif (!empty($inner_match))\n\t\t\t\t{\n\t\t\t\t\t// Parse the inner data.\n\t\t\t\t\tif (strpos($inner_match, '<') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$el += $this->_parse($inner_match);\n\t\t\t\t\t}\n\t\t\t\t\telseif (trim($inner_match) !== '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$text_value = $this->_from_cdata($inner_match);\n\t\t\t\t\t\tif (trim($text_value) !== '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$el[] = array(\n\t\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t\t'value' => $text_value\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we're dealing with attributes as well, parse them out.\n\t\t\tif (isset($match[2]) && $match[2] !== '')\n\t\t\t{\n\t\t\t\t// Find all the attribute pairs in the string.\n\t\t\t\tpreg_match_all('/([\\w:]+)=\"(.+?)\"/', $match[2], $attr, PREG_SET_ORDER);\n\n\t\t\t\t// Set them as @attribute-name.\n\t\t\t\tforeach ($attr as $match_attr)\n\t\t\t\t{\n\t\t\t\t\t$el['@' . $match_attr[1]] = $match_attr[2];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Return the parsed array.\n\t\treturn $current;\n\t}", "protected function parseArrayElement(\\SimpleXMLElement $node) {\n\t\t\t$iList = new Common\\Mutable\\ArrayList();\n\t\t\t$children = $node->children();\n\t\t\tforeach ($children as $child) {\n\t\t\t\tswitch ($child->getName()) {\n\t\t\t\t\tcase 'array':\n\t\t\t\t\t\t$iList->addValue($this->parseArrayElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'dictionary':\n\t\t\t\t\t\t$iList->addValue($this->parseDictionaryElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'expression':\n\t\t\t\t\t\t$iList->addValue($this->parseExpressionElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'null':\n\t\t\t\t\t\t$iList->addValue($this->parseNullElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'undefined':\n\t\t\t\t\t\t$iList->addValue($this->parseUndefinedElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'value':\n\t\t\t\t\t\t$iList->addValue($this->parseValueElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new Throwable\\Instantiation\\Exception('Unable to initial class.');\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $iList->toArray();\n\t\t}", "private function isPlainArray($line) {\n\t//--\n\treturn (($line[0] == '[') && (substr($line, -1, 1) == ']'));\n\t//--\n}", "public static function parseTypeArray($type)\n {\n preg_match('/(.*)\\[(.*?)\\]$/', $type, $matches);\n if ($matches) {\n return $matches[2] === '' ? 'dynamic' : int($matches[2]);\n }\n return null;\n }", "abstract public function parse($data, $type);", "protected function _tree($array) {\n\n\t\t\t$root = array(\n\t\t\t\t'children' => array()\n\t\t\t);\n\t\t\t$current = &$root;\n\n\t\t\tforeach ($array as $i => $node) {\n\n\t\t\t\t$result = $this->_tag($node);\n\t\t\t\t\n\t\t\t\tif ($result) {\n\t\t\t\t\t\n\t\t\t\t\tif (isset($result['tag'])) {\n\t\t\t\t\t\t$tag = $result['tag'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$tag = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isset($result['arguments'])) {\n\t\t\t\t\t\t$arguments = $result['arguments'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$arguments = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($tag) {\n\t\t\t\t\t\t// If segment does not contain a closer\n\t\t\t\t\t\tif (!$result['closer']) {\n\t\t\t\t\t\t\t// clean up syntax if segment is isolated and \n\t\t\t\t\t\t\t// preceded by an plain text segment\n\t\t\t\t\t\t\t$last = ArrayMethods::last($current['children']);\n\t\t\t\t\t\t\tif ($result['isolated'] && is_string($last)) {\n\t\t\t\t\t\t\t\tarray_pop($current['children']);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$current['children'][] = array(\n\t\t\t\t\t\t\t\t'index' => $i,\n\t\t\t\t\t\t\t\t'parent' => &$current,\n\t\t\t\t\t\t\t\t'children' => array(),\n\t\t\t\t\t\t\t\t'raw' => $result['source'],\n\t\t\t\t\t\t\t\t'tag' => $tag,\n\t\t\t\t\t\t\t\t'arguments' => $arguments,\n\t\t\t\t\t\t\t\t'delimiter' => $result['delimiter'],\n\t\t\t\t\t\t\t\t'number' => count($current['children'])\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$current = &$current['children'][count($current['children']) - 1];\n\t\t\t\t\t\t} else if (isset($current['tag']) && $result['tag'] == $current['tag']) {\n\t\t\t\t\t\t\t$start = $current['index'] + 1;\n\t\t\t\t\t\t\t$length = $i - $start;\n\t\t\t\t\t\t\t$current['source'] = implode(array_slice($array, $start, $length));\n\t\t\t\t\t\t\t$current = &$current['parent'];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$current['children'][] = array(\n\t\t\t\t\t\t\t'index' => $i,\n\t\t\t\t\t\t\t'parent' => &$current,\n\t\t\t\t\t\t\t'children' => array(),\n\t\t\t\t\t\t\t'raw' => $result['source'],\n\t\t\t\t\t\t\t'tag' => $tag,\n\t\t\t\t\t\t\t'arguments' => $arguments,\n\t\t\t\t\t\t\t'delimiter' => $result['delimiter'],\n\t\t\t\t\t\t\t'number' => count($current['children'])\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$current['children'][] = $node;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $root;\n\t\t}", "public function testPathSubArray()\n {\n $json = new JsonArray(['top1' => ['sub1.1' => 'top1.sub1.1.content']]);\n\n $json->set('top2', ['sub2.1' => []]);\n $json->set('top2/sub2.2', ['top2.sub2.2.content']);\n $this->assertEquals(['sub2.1' => [], 'sub2.2' => ['top2.sub2.2.content']], $json->get('top2'));\n $this->assertEquals([], $json->get('top2/sub2.1'));\n $this->assertEquals(['top2.sub2.2.content'], $json->get('top2/sub2.2'));\n $json->set('top2', 'top2.content');\n $this->assertEquals('top2.content', $json->get('top2'));\n }", "function parseIncomingData($origArr = array()) {\n\t\tglobal $TYPO3_DB;\n\n\t\tstatic $adodbTime = null;\n\n\t\t$parsedArr = array();\n\t\t$parsedArr = $origArr;\n\t\tif (is_array($this->conf['parseFromDBValues.'])) {\n\t\t\treset($this->conf['parseFromDBValues.']);\n\t\t\twhile (list($theField, $theValue) = each($this->conf['parseFromDBValues.'])) {\n\t\t\t\t$listOfCommands = t3lib_div::trimExplode(',', $theValue, 1);\n\t\t\t\tforeach($listOfCommands as $k2 => $cmd) {\n\t\t\t\t\t$cmdParts = split(\"\\[|\\]\", $cmd); // Point is to enable parameters after each command enclosed in brackets [..]. These will be in position 1 in the array.\n\t\t\t\t\t$theCmd = trim($cmdParts[0]);\n\t\t\t\t\tswitch($theCmd) {\n\t\t\t\t\t\tcase 'date':\n\t\t\t\t\t\tif($origArr[$theField]) {\n\t\t\t\t\t\t\t$parsedArr[$theField] = date( 'd.m.Y', $origArr[$theField]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$parsedArr[$theField]) {\n\t\t\t\t\t\t\tunset($parsedArr[$theField]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'adodb_date':\n\t\t\t\t\t\tif (!is_object($adodbTime))\t{\n\t\t\t\t\t\t\tinclude_once(PATH_BE_srfeuserregister.'pi1/class.tx_srfeuserregister_pi1_adodb_time.php');\n\n\t\t\t\t\t\t\t// prepare for handling dates before 1970\n\t\t\t\t\t\t\t$adodbTime = t3lib_div::makeInstance('tx_srfeuserregister_pi1_adodb_time');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif($origArr[$theField]) {\n\t\t\t\t\t\t\t$parsedArr[$theField] = $adodbTime->adodb_date( 'd.m.Y', $origArr[$theField]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$parsedArr[$theField]) {\n\t\t\t\t\t\t\tunset($parsedArr[$theField]);\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}\n\t\t}\n\n\t\t$fieldsList = array_keys($parsedArr);\n\t\tforeach ($this->tca->TCA['columns'] as $colName => $colSettings) {\n\t\t\tif (in_array($colName, $fieldsList) && $colSettings['config']['type'] == 'select' && $colSettings['config']['MM']) {\n\t\t\t\tif (!$parsedArr[$colName]) {\n\t\t\t\t\t$parsedArr[$colName] = '';\n\t\t\t\t} else {\n\t\t\t\t\t$valuesArray = array();\n\t\t\t\t\t$res = $TYPO3_DB->exec_SELECTquery(\n\t\t\t\t\t\t'uid_local,uid_foreign,sorting',\n\t\t\t\t\t\t$colSettings['config']['MM'],\n\t\t\t\t\t\t'uid_local='.intval($parsedArr['uid']),\n\t\t\t\t\t\t'',\n\t\t\t\t\t\t'sorting');\n\t\t\t\t\twhile ($row = $TYPO3_DB->sql_fetch_assoc($res)) {\n\t\t\t\t\t\t$valuesArray[] = $row['uid_foreign'];\n\t\t\t\t\t}\n\t\t\t\t\t$parsedArr[$colName] = implode(',', $valuesArray);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $parsedArr;\n\t}", "abstract public function parse ();", "protected function jsonDecode(array $data)\n {\n foreach ($data as &$value) {\n if (is_array($value)) {\n $value = $this->jsonDecode($value);\n } else {\n $value = json_decode($value, true, 512, JSON_THROW_ON_ERROR);\n }\n }\n\n return $data;\n }", "function sanitizeArray($data = array())\r\n{\r\n foreach ($data as $k => $v) {\r\n if (!is_array($v) && !is_object($v)) { // deep enough to only be values? sanitize them now.\r\n $data[$k] = sanitizeValue($v);\r\n }\r\n if (is_array($v)) { // go deeper\r\n $data[$k] = sanitizeArray($v);\r\n }\r\n }\r\n return $data;\r\n}", "function widgetopts_sanitize_array( &$array ) {\n foreach ($array as &$value) {\n if( !is_array($value) ) {\n\t\t\t// sanitize if value is not an array\n $value = sanitize_text_field( $value );\n\t\t}else{\n\t\t\t// go inside this function again\n widgetopts_sanitize_array($value);\n\t\t}\n }\n\n return $array;\n}", "abstract public function array2Data($arr);" ]
[ "0.66442025", "0.63293284", "0.62897044", "0.61981785", "0.61588895", "0.59986705", "0.5984716", "0.58424723", "0.57783055", "0.576507", "0.566837", "0.56248873", "0.56247383", "0.5606372", "0.55716664", "0.55678403", "0.555264", "0.55389094", "0.55162144", "0.5487364", "0.5486142", "0.5461385", "0.54269445", "0.5384384", "0.5370886", "0.53471416", "0.5342243", "0.53229123", "0.5303288", "0.5298099", "0.5287076", "0.5277548", "0.5263003", "0.52401024", "0.52288264", "0.52099866", "0.52087796", "0.52012765", "0.51858836", "0.51856726", "0.5182591", "0.5170887", "0.5169515", "0.5169515", "0.5169515", "0.5169515", "0.51643497", "0.5160608", "0.515988", "0.5140229", "0.5133909", "0.51293314", "0.51293314", "0.51293314", "0.5124002", "0.5120805", "0.51197624", "0.5112236", "0.51100636", "0.51041806", "0.5098927", "0.5088826", "0.5087799", "0.5082002", "0.50814897", "0.50785655", "0.50675035", "0.5064285", "0.5058539", "0.50558347", "0.5053734", "0.50529605", "0.50520265", "0.50498295", "0.50402707", "0.5038166", "0.5033398", "0.50312537", "0.5027646", "0.5023674", "0.5010308", "0.50023866", "0.49929738", "0.49895582", "0.4985219", "0.49851206", "0.49805415", "0.49790597", "0.49668416", "0.4963237", "0.49599192", "0.4957009", "0.49390393", "0.49373388", "0.49268004", "0.49247855", "0.49152756", "0.49121505", "0.49089912", "0.49020645" ]
0.4916934
96
parse a potentially nested array
private static function parseLevels($arr) { $return = array(); if (count($arr) > 0) { if (array_key_exists('level', $arr)) { $levels = $arr['level']; foreach ($levels as $level) { $attr = $level->attributes(); // echo print_r($attr,true).'<br />'; // continue; if (array_key_exists('level', $level)) { $return = array_merge( $return, self::parseLevels((array)$level) ); continue; } if ( ! empty((string)$attr['name'])) { $return[] = array('name' => (string)$attr['name']); } } } } return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ParseFromArray() {\n $this->value = $this->reader->next();\n $this->clean();\n }", "public function parseFromArray()\n {\n $this->value = $this->reader->next();\n }", "function pg_array_parse($array, $asText = true) {\n $s = $array;\n if ($asText) {\n $s = str_replace(\"{\", \"array('\", $s);\n $s = str_replace(\"}\", \"')\", $s); \n $s = str_replace(\",\", \"','\", $s); \n } else {\n $s = str_replace(\"{\", \"array(\", $s);\n $s = str_replace(\"}\", \")\", $s);\n }\n\t$ss = \"\\$retval = $s;\";\n eval($ss);\n\treturn $retval;\n}", "protected function parseData($data){\r\n $d = array();\r\n if(is_string($data)){\r\n try{\r\n parse_str($data,$arr);\r\n $d = $arr;\r\n }catch(Exception $e){\r\n //del lam gi ca\r\n }\r\n }elseif(is_array($data)){\r\n $d = $data;\r\n }\r\n if(!$d) return null;\r\n unset($d[$this->idField]);\r\n $r = array();\r\n foreach($d as $f => $v){\r\n if(in_array($f, $this->fields)) $r[$f] = $v;\r\n }\r\n return $r;\r\n }", "public function parse_array($value)\n\t{\n\t\tif ($value==null)\n\t\t\treturn array();\n\t\t\n\t\tif (is_array($value))\n\t\t\treturn $value;\n\t\t\t\n\t\t$value=trim($value,'{}');\n\t\t$result=explode(',',$value);\n\t\t\n\t\tfor($i=0; $i<count($result); $i++)\n\t\t\tif ($result[$i]=='NULL')\n\t\t\t\t$result[$i]=null;\n\t\t\t\t\n\t\treturn $result;\n\t}", "private static function parseArray($val)\n {\n $result = array();\n $openBrackets = 0;\n $openString = false;\n $openCurlyBraces = 0;\n $openLString = false;\n $buffer = '';\n\n $strLen = strlen($val);\n for($i = 0; $i < $strLen; $i++)\n {\n if($val[$i] == '[' && !$openString && !$openLString)\n {\n $openBrackets++;\n\n if($openBrackets == 1)\n {\n // Skip first and last brackets.\n continue;\n }\n }\n elseif($val[$i] == ']' && !$openString && !$openLString)\n {\n $openBrackets--;\n\n if($openBrackets == 0)\n {\n // Allow terminating commas before the closing bracket\n if(trim($buffer) != '')\n {\n $result[] = self::parseValue( trim($buffer) );\n }\n\n if (!self::checkDataType($result))\n {\n throw new Exception('Data types cannot be mixed in an array: ' . $buffer);\n }\n // Skip first and last brackets. We're finish.\n return $result;\n }\n }\n elseif($val[$i] == '\"' && $val[$i - 1] != \"\\\\\" && !$openLString)\n {\n $openString = !$openString;\n }\n elseif($val[$i] == \"'\" && !$openString) {\n $openLString = !$openLString;\n }\n elseif($val[$i] == \"{\" && !$openString && !$openLString) {\n $openCurlyBraces++;\n }\n elseif($val[$i] == \"}\" && !$openString && !$openLString) {\n $openCurlyBraces--;\n }\n \n if( ($val[$i] == ',' || $val[$i] == '}') && !$openString && !$openLString && $openBrackets == 1 && $openCurlyBraces == 0)\n {\n if ($val[$i] == '}') {\n $buffer .= $val[$i];\n }\n\n $buffer = trim($buffer);\n if (!empty($buffer)) {\n $result[] = self::parseValue($buffer);\n\n if (!self::checkDataType($result))\n {\n throw new Exception('Data types cannot be mixed in an array: ' . $buffer);\n }\n }\n $buffer = '';\n }\n else\n {\n $buffer .= $val[$i];\n }\n }\n\n // If we're here, something went wrong.\n throw new Exception('Wrong array definition: ' . $val);\n }", "function parseArray($arrayToken) {\n\n # remove bounding brackets\n $arrayToken = substr($arrayToken, 1, -1);\n\n # split on elements\n $elementTokens = $this->splitTokens($arrayToken);\n\n # elements will be collected in plain array\n $params = array();\n foreach ($elementTokens as $elementToken) {\n $params[] = $this->parseValue($elementToken);\n }\n return $params;\n }", "public static function parseIteratorArray(array &$array)\n {\n if (!empty($array)) {\n foreach ($array as &$item) {\n if (is_array($item)) {\n self::parseIteratorArray($item);\n } elseif ($item instanceof \\Iterator) {\n $item = iterator_to_array($item);\n self::parseIteratorArray($item);\n }\n }\n }\n }", "abstract public function parseInput(array $input): array;", "public static function parse_multi( $result )\n {\n return ( is_string( $result ) && $array = json_decode( $result, true ) ) ? $array : $result;\n }", "function parseBISArray($str) {\n $str = substr($str, 1, -1); // Strip trailing quotes\n $bla = parseBISArray_helper($str);\n $result = array();\n\n foreach ($bla as $row) {\n foreach ($row as $child) {\n $result[] = $child;\n }\n if (count($row) == 0)\n $result[] = array();\n }\n //var_dump($result);\n return $result;\n}", "private function parseobject($array)\n {\n if (is_object($array)) {\n if (get_class($array) == 'DataObject') {\n return $array;\n }\n $do = DataObject::create();\n foreach (get_object_vars($array) as $key => $obj) {\n if ($key == '__Type') {\n $do->setField('Title', $obj);\n } elseif (is_array($obj) || is_object($obj)) {\n $do->setField($key, $this->parseobject($obj));\n } else {\n $do->setField($key, $obj);\n }\n }\n return $do;\n } elseif (is_array($array)) {\n $dataList = ArrayList::create();\n foreach ($array as $key => $obj) {\n $dataList->push($this->parseobject($obj));\n }\n return $dataList;\n }\n return null;\n }", "protected function _decodeArray()\n {\n $result = array();\n $starttok = $tok = $this->_getNextToken(); // Move past the '['\n $index = 0;\n\n while ($tok && $tok != self::RBRACKET) {\n $result[$index++] = $this->_decodeValue();\n\n $tok = $this->_token;\n\n if ($tok == self::RBRACKET || !$tok) {\n break;\n }\n\n if ($tok != self::COMMA) {\n throw new Rx_Json_Exception('Missing \",\" in array encoding: ' . $this->_getProblemContext());\n }\n\n $tok = $this->_getNextToken();\n }\n\n $this->_getNextToken();\n return ($result);\n }", "public function parse(array $description);", "public function parse() {\n\t\t$pointer = 0;\n\t\t$ar_line = array();\n\n\t\tforeach ($this->structure as $key => $length) {\n\t\t\t$ar_line[$key] = trim(substr($this->line, $pointer, $length), \"\\n\\r \");\n\t\t\t$pointer += $length;\n\t\t}\n\t\t$ar_line['stamp'] = md5(serialize($ar_line));\n\n\t\tif ($this->return == 'array') {\n\t\t\treturn $ar_line;\n\t\t}\n\t\treturn (object) $ar_line;\n\t}", "private function parse(array $block): array\n {\n $raw = get_field('data');\n $className = trim(array_key_exists('className', $block) ? $block['className'] : '');\n\n unset($raw['']);\n\n $data = array(\n 'block' => (object) [\n 'id' => $block['id'],\n 'classList' => !empty($className) ? explode(' ', $className) : [],\n 'className' => $className,\n 'anchor' => !empty($block['anchor']) ? $block['anchor'] : $block['id']\n ],\n 'raw' => !empty($block['data']) ? (object) $block['data'] : (object) [],\n 'data' => !empty($raw) ? (object) $raw : (object) [],\n 'template' => 'blocks::' . $this->getId()\n );\n\n return $this->filter($data, $block);\n }", "public function parse($input) {\n\t//--\n\treturn (array) $this->loadWithSource((array)$this->loadFromString((string)$input));\n\t//--\n}", "public function parseGetData(array $data) {\n return $data;\n }", "public function testParsedArray()\n {\n $entity = DataObjectHandler::getInstance()->getObject('testEntity');\n $this->assertCount(3, $entity->getLinkedEntities());\n }", "function acf_parse_types($array)\n{\n}", "public function processField($arr){\n\t\t$return = array();\n\t\t$parts = explode(',', $arr);\n\t\t$seq = 0;\n\t\tfor($i=0; $i<count($parts); $i++){\n\t\t\tif('blank' == substr($parts[$i],0,5)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlist(,$list) = explode('_', $parts[$i])\t;\n\t\t\t//$list = str_replace('item_', '',$parts[$i]);\n\t\t\tlist($type, $fieldId) = explode('-',$list);\n\t\t\t$return[$type][$fieldId] = \tintval($seq);\n\t\t\t$seq++;\n\t\t}\n\n\t\treturn $return;\n\t}", "function sanitizeArray( $arr ) {\n if (is_array($arr)) {\n foreach($arr as $key => &$data) {\n if (is_array($data)) {\n $data = sanitizeArray($data);\n } else {\n try {\n $json = json_decode( $data , true);\n if (is_array($json)) {\n $data = sanitizeArray( $json );\n continue;\n }\n } catch(Exception $e) {\n $data = sanitize($data);\n }\n }\n }\n }\n return $arr;\n}", "public function parse(): array\n {\n // Text.\n if ($this->type === 'text') {\n return [\n 'text' => $this->message,\n ];\n }\n\n // Template.\n if ($this->type === 'template') {\n $payload = Arr::get($this->message, 'attachments.0.payload');\n\n // Generic template.\n if (Arr::get($payload, 'template_type') === 'generic') {\n return [\n 'generic' => $this->parseGenericTempalte($payload),\n ];\n }\n }\n\n // Image\n if ($this->type === 'image') {\n $payload = Arr::get($this->message, 'attachments.0.payload');\n return [\n 'image' => $this->parseImageAttachment($payload),\n ];\n }\n\n // This for unsupported messages.\n return [];\n }", "public function parse()\n {\n if (isset($this->schema->cmd)) {\n foreach ($this->schema->cmd as $key => $val) {\n if ($key === \"addNamespaces\") {\n $this->registerNamespaces($val);\n } elseif ($key === \"removeEmptyValues\") {\n $this->removeEmptyValues = $val ? true : false;\n } elseif ($key === \"sortResult\") {\n $this->sort = $val ? true : false;\n }\n }\n }\n\n $array = $this->parseRecursive($this->schema);\n\n if ($this->sort) {\n ksort($array);\n }\n\n return $array;\n }", "#[\\JetBrains\\PhpStorm\\ArrayShape([0 => 'int[]', 1 => 'Board[]'])]\nfunction parse_input(string $input): array\n{\n [$n, $b] = explode(\"\\n\\n\", $input, 2);\n\n $numbers = toIntArray(explode(',', $n));\n\n $boards = collect(explode(\"\\n\\n\", $b))\n ->map(function ($board) {\n return new Board($board);\n });\n\n return [$numbers, $boards];\n}", "abstract protected function parse($data);", "protected static function ParcelResultValidatorArray(){\n\t\t\tstatic $validator = array(\n\t\t\t\t'object' => array(array(\n\t\t\t\t\t'GroupID' => array('string' => array()),\n\t\t\t\t\t'OwnerID' => array('string' => array()),\n\t\t\t\t\t'Maturity' => array('integer' => array()),\n\t\t\t\t\t'Area' => array('integer' => array()),\n\t\t\t\t\t'AuctionID' => array('integer' => array()),\n\t\t\t\t\t'SalePrice' => array('integer' => array()),\n\t\t\t\t\t'InfoUUID' => array('string' => array()),\n\t\t\t\t\t'Dwell' => array('integer' => array()),\n\t\t\t\t\t'Flags' => array('integer' => array()),\n\t\t\t\t\t'Name' => array('string' => array()),\n\t\t\t\t\t'Description' => array('string' => array()),\n\t\t\t\t\t'UserLocation' => array('array' => array(array(\n\t\t\t\t\t\tarray('float' => array()),\n\t\t\t\t\t\tarray('float' => array()),\n\t\t\t\t\t\tarray('float' => array())\n\t\t\t\t\t))),\n\t\t\t\t\t'LocalID' => array('integer' => array()),\n\t\t\t\t\t'GlobalID' => array('string' => array()),\n\t\t\t\t\t'RegionID' => array('string' => array()),\n\t\t\t\t\t'MediaDescription' => array('string' => array()),\n\t\t\t\t\t'MediaHeight' => array('integer' => array()),\n\t\t\t\t\t'MediaLoop' => array('boolean' => array()),\n\t\t\t\t\t'MediaType' => array('string' => array()),\n\t\t\t\t\t'ObscureMedia' => array('boolean' => array()),\n\t\t\t\t\t'ObscureMusic' => array('boolean' => array()),\n\t\t\t\t\t'SnapshotID' => array('string' => array()),\n\t\t\t\t\t'MediaAutoScale' => array('integer' => array()),\n\t\t\t\t\t'MediaLoopSet' => array('float' => array()),\n\t\t\t\t\t'MediaURL' => array('string' => array()),\n\t\t\t\t\t'MusicURL' => array('string' => array()),\n\t\t\t\t\t'Bitmap' => array('string' => array()),\n\t\t\t\t\t'Category' => array('integer' => array()),\n\t\t\t\t\t'FirstParty' => array('boolean' => array()),\n\t\t\t\t\t'ClaimDate' => array('integer' => array()),\n\t\t\t\t\t'ClaimPrice' => array('integer' => array()),\n\t\t\t\t\t'Status' => array('integer' => array()),\n\t\t\t\t\t'LandingType' => array('integer' => array()),\n\t\t\t\t\t'PassHours' => array('float' => array()),\n\t\t\t\t\t'PassPrice' => array('integer' => array()),\n\t\t\t\t\t'UserLookAt' => array('array' => array(array(\n\t\t\t\t\t\tarray('float' => array()),\n\t\t\t\t\t\tarray('float' => array()),\n\t\t\t\t\t\tarray('float' => array())\n\t\t\t\t\t))),\n\t\t\t\t\t'AuthBuyerID' => array('string' => array()),\n\t\t\t\t\t'OtherCleanTime' => array('integer' => array()),\n\t\t\t\t\t'RegionHandle' => array('string' => array()),\n\t\t\t\t\t'Private' => array('boolean' => array()),\n\t\t\t\t\t'GenericData' => array('object' => array()),\n\t\t\t\t))\n\t\t\t);\n\t\t\treturn $validator;\n\t\t}", "private function process_array($value) {\n return is_array($value);\n }", "function SS_cleanXMLArray($array){\n\tif (is_array($array)){\n\t\tforeach ($array as $k=>$a){\n\t\t\tif (is_array($a) && count($a)==1 && isset($a[0])){\n\t\t\t\t$array[$k] = SS_cleanXMLArray($a[0]);\n\t\t\t}\n\t\t}\n\t}\n\treturn $array;\n}", "protected function parse_array_attributes( $key ) {\n\t\t$value = $this->{$key};\n\t\tif ( ! is_array( $value ) ) {\n\t\t\treturn $this;\n\t\t}\n\t\t$first = reset( $value );\n\t\tif ( ! is_array( $first ) ) {\n\t\t\treturn $this;\n\t\t}\n\n\t\t// Options aren't affected with taxonomies.\n\t\t$tmp_array = array();\n\t\t$tmp_std = array();\n\n\t\tforeach ( $value as $arr ) {\n\t\t\t$tmp_array[ $arr['key'] ] = $arr['value'];\n\t\t\tif ( isset( $arr['selected'] ) && $arr['selected'] ) {\n\t\t\t\t$tmp_std[] = $arr['key'];\n\t\t\t}\n\n\t\t\t// Push default value to std on Text List.\n\t\t\tif ( empty( $arr['default'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( 'fieldset_text' === $this->type ) {\n\t\t\t\t$tmp_std[ $arr['value'] ] = $arr['default'];\n\t\t\t} else {\n\t\t\t\t$tmp_std[] = $arr['default'];\n\t\t\t}\n\t\t}\n\n\t\t// Parse JSON and dot notations.\n\t\t$this->{$key} = $this->parse_json_dot_notations( $tmp_array );\n\n\t\tif ( $tmp_std ) {\n\t\t\t$this->std = $tmp_std;\n\t\t}\n\t\treturn $this;\n\t}", "protected function parseResult(array $result): array\n {\n [$key, $rawData] = $result;\n\n $data = collect($rawData)\n ->map(function ($rawData) {\n [$id, $rawData] = $rawData;\n\n $data = [];\n for ($i = 0; $i < count($rawData); $i += 2) {\n $value = $rawData[$i + 1];\n $data[\"{$rawData[$i]}\"] = $value;\n }\n\n return ['id' => $id, 'data' => $data];\n });\n\n return ['key' => $key, 'data' => $data->toArray()];\n }", "function rest_is_array($maybe_array)\n {\n }", "public function parseArray(array $array): void\n {\n $this->XMLTree = $this->generateXMLTree($array);\n }", "private function structureIterator($array){\n $data = array();\n foreach($array as $key => $value){\n if(is_array($value))\n $data[$this->slug($key)] = $this->structureIterator($value);\n else {\n if($this->isImage($value))\n $data['images'][] = $value;\n elseif($this->isJson($value))\n $data['info'] = $this->convertJson($value);\n else\n $data['files'][] = $value;\n }\n }\n $this->sortFiles($data);\n return $data;\n }", "abstract public function parsePostData() : array;", "public function parseData(array $data): void\n {\n $collection = new Collection($data);\n\n $this->labels = $collection->filter(static function ($item) {\n return is_string($item);\n })->map(function ($item, $key) {\n return new Label($item, $key, $this->slug);\n });\n\n $this->containers = $collection->filter(static function ($item) {\n return is_array($item);\n })->map(function ($item, $key) {\n return new self($item, $key, $this->slug);\n });\n }", "protected function parseData(array $raw): array\n {\n $data = [];\n foreach ($raw as $field => $value) {\n $data[] = $field;\n $data[] = $value;\n }\n\n return $data;\n }", "public function parseJson($array = false)\n {\n if ($this->getMimeType() == 'application/json') {\n $contents = $this->getContents();\n $contents = json_decode($contents, $array);\n if (json_last_error() == JSON_ERROR_NONE) {\n return $contents;\n }\n }\n return false;\n }", "public function parseArray($data, $element=null) {\n if ($element === null) {\n $element = &$this->xml;\n }\n foreach ($data as $key=>$value) {\n if (is_array($value)) {\n if (is_numeric(array_keys($value)[0])) {\n foreach ($value as $v) {\n if (is_array($v)) {\n $this->parseArray($v, $element->addChild($key));\n } else {\n $element->addChild($key, $this->parseValue($v));\n }\n }\n } else {\n $this->parseArray($value, $element->addChild($key));\n }\n } else {\n $element->addChild($key, $this->parseValue($value));\n }\n }\n }", "function error_parser($value ='')\n{\n return (!is_array(json_decode($value))) ? $value : json_decode($value);\n}", "public function scrubArray(array $data) : array;", "protected function fixValue(array $value)/*# : array */\n {\n $result = [];\n foreach ($value as $k => $v) {\n if (false !== strpos($k, $this->field_splitter)) {\n $res = &$this->searchTree($k, $result, true);\n $res = is_array($v) ? $this->fixValue($v) : $v;\n } else {\n $result[$k] = is_array($v) ? $this->fixValue($v) : $v;\n }\n }\n return $result;\n }", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "public function setFromArray(array &$_data)\n {\n parent::setFromArray($_data);\n \n if (isset($_data['flatpath'])) {\n $this->_parsePath($_data['flatpath']);\n }\n }", "protected function processArray($array)\n {\n if ($array instanceof Collection) {\n $array = $array->getAll();\n }\n\n if (!is_array($array)) {\n throw new InvalidArgumentException('The config must be provided as an array or Collection.');\n }\n\n return $array;\n }", "private function _parseLine($line) {\n\t//--\n\tif(!$line) {\n\t\treturn array();\n\t} //end if\n\t//--\n\t$line = trim($line);\n\t//--\n\tif(!$line) {\n\t\treturn array();\n\t} //end if\n\t//--\n\t$array = array();\n\t//--\n\t$group = $this->nodeContainsGroup($line);\n\tif($group) {\n\t\t$this->addGroup($line, $group);\n\t\t$line = $this->stripGroup ($line, $group);\n\t} //end if\n\t//--\n\tif($this->startsMappedSequence($line)) {\n\t\treturn $this->returnMappedSequence($line);\n\t} //end if\n\tif($this->startsMappedValue($line)) {\n\t\treturn $this->returnMappedValue($line);\n\t} //end if\n\tif($this->isArrayElement($line)) {\n\t\treturn $this->returnArrayElement($line);\n\t} //end if\n\tif($this->isPlainArray($line)) {\n\t\treturn $this->returnPlainArray($line);\n\t} //end if\n\t//--\n\treturn $this->returnKeyValuePair($line);\n\t//--\n}", "protected function parse() {}", "public function _cleanData (array $arr)\n {\n foreach ($arr as $key => $element)\n {\n if (is_array ($element))\n {\n $arr [$key] = $this->_cleanData ($element);\n }\n elseif ($arr [$key] instanceof DotNotation_NullElement)\n {\n unset ($arr [$key]);\n }\n }\n \n return $arr;\n }", "public function parse($data);", "public function parse($data);", "public function parse($data);", "function rest_sanitize_array($maybe_array)\n {\n }", "private function parseData(array $data)\n {\n $field = $data['field'];\n\n foreach ($data['policies'] as $rule => $policy) {\n $passes = call_user_func_array([new Rule(), $rule], [$field, $data['value'], $policy]);\n\n if (!$passes) {\n ErrorHandler::set(\n str_replace(\n [':attribute', ':policy', '_'],\n [$field, $policy, ' '], $this->messages[$rule]), $field\n );\n }\n }\n }", "public function parse(): array\n {\n $this->parseElement();\n $this->parseChildNodes();\n\n return ['dir' => $this->dir,\n 'includes' => $this->includes,\n 'excludes' => $this->excludes];\n }", "protected function recursiveArrayHandler($arrayText)\n {\n $matches = [];\n $arrayToBuild = [];\n if (preg_match_all(Patterns::$SPLIT_PATTERN_SHORTHANDSYNTAX_ARRAY_PARTS, $arrayText, $matches, PREG_SET_ORDER)) {\n foreach ($matches as $singleMatch) {\n $arrayKey = $this->unquoteString($singleMatch['Key']);\n if (!empty($singleMatch['VariableIdentifier'])) {\n $arrayToBuild[$arrayKey] = new ObjectAccessorNode($singleMatch['VariableIdentifier']);\n } elseif (array_key_exists('Number', $singleMatch) && (!empty($singleMatch['Number']) || $singleMatch['Number'] === '0')) {\n // Note: this method of casting picks \"int\" when value is a natural number and \"float\" if any decimals are found. See also NumericNode.\n $arrayToBuild[$arrayKey] = $singleMatch['Number'] + 0;\n } elseif ((array_key_exists('QuotedString', $singleMatch) && !empty($singleMatch['QuotedString']))) {\n $argumentString = $this->unquoteString($singleMatch['QuotedString']);\n $arrayToBuild[$arrayKey] = $this->buildArgumentObjectTree($argumentString);\n } elseif (array_key_exists('Subarray', $singleMatch) && !empty($singleMatch['Subarray'])) {\n $arrayToBuild[$arrayKey] = new ArrayNode($this->recursiveArrayHandler($singleMatch['Subarray']));\n }\n }\n }\n return $arrayToBuild;\n }", "public function importArray($data);", "private function parseField($field)\n {\n $f = array();\n\n if (empty($field['sub_fields'])) {\n if (empty($field['value'])) {\n if (!empty($field['default_value'])) {\n if (is_array($field['default_value'])) {\n return reset($field['default_value']);\n }\n }\n return '';\n } else {\n return $field['value'];\n }\n } else {\n foreach ($field['sub_fields'] as $subfield) {\n if ('repeater' === $subfield['type']) {\n $f[$field['name']] = $this->parseField($subfield);\n } elseif ('group' === $subfield['type']) {\n $f[$field['name']][] = $this->parseField($subfield);\n } else {\n $f[$field['name']][$subfield['name']] = $this->parseField($subfield);\n }\n }\n }\n return $f;\n }", "function acf_update_nested_array(&$array, $ancestors, $value)\n{\n}", "private function _getNestedArrayFields($field)\n {\n $data = $this->_getDataValidation();\n $parts = explode('.', $field);\n $firstElement = array_shift($parts);\n $rules = [$firstElement];\n\n // in case the inputs are checkboxes, ignore them\n if (!array_key_exists($firstElement, $data)) {\n return [];\n }\n\n $currentValue = $data[$firstElement];\n $defaultTotal = 0;\n\n foreach ($parts as $part) {\n if ($part == '*') {\n // key not exist, ignore it\n if (!is_array($currentValue) || empty(array_keys($currentValue)) || !isset($currentValue[array_keys($currentValue)[0]])) {\n return [];\n }\n\n $totalElements = $defaultTotal == 1 ? 1 : count($currentValue);\n $currentValue = $currentValue[array_keys($currentValue)[0]];\n $temp = [];\n for ($s=0; $s < $totalElements; $s++) {\n foreach ($rules as $rule) {\n $temp[] = $rule.\"[\".$s.\"]\";\n }\n }\n $rules = $temp;\n } else {\n // key not exist, ignore it\n if (isset($currentValue[$part])) {\n $defaultTotal = 0;\n $currentValue = $currentValue[$part];\n } else {\n $defaultTotal = 1;\n }\n\n $temp = [];\n foreach ($rules as $rule) {\n $temp[] = $rule.\"[\".$part.\"]\";\n }\n $rules = $temp;\n }\n }\n return $rules;\n }", "private function filter_array( $value ) {\n\t\tif ( empty( $this->type ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tif ( Schema_Type::ARRAY !== $this->type->case() ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tif ( empty( $value ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t$property = self::from_json( $this->schema, $this->get_id() . '::items', $this->items );\n\t\t$array = array();\n\n\t\tforeach ( $value as $item ) {\n\t\t\t$array[] = $property->filter( $item );\n\t\t}\n\n\t\treturn $array;\n\t}", "function wpsl_is_multi_array( $array ) {\n\n foreach ( $array as $value ) {\n if ( is_array( $value ) ) return true;\n }\n\n return false;\n}", "protected function _parse(){\n\t\tforeach ($this->dataArray['tables']['nat']['default-chains'] as $a => &$b){\n\t\t\t$b['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($b['rules'], $b['iptables-rules']);\n\t\t}\n\t\t\n\t\t// Now the IP chains...\n\t\tforeach ($this->dataArray['tables']['nat']['ip-chains'] as &$e){\n\t\t\t$e['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($e['rules'], $e['iptables-rules']);\n\t\t}\n\t\t\n\t\t// And finally, the others...\n\t\tforeach ($this->dataArray['tables']['nat']['other-chains'] as $h => &$i){\n\t\t\t$i['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($i['rules'], $i['iptables-rules']);\n\t\t}\n\t}", "function acf_is_array($array)\n{\n}", "private function __parse_intput() {\n $requests = JsonParser::decode($this->__raw_input);\n if (is_array($requests) === false or\n empty($requests[0])) {\n $requests = array($requests);\n }\n return ($requests);\n }", "private function _parse($value)\n\t{\n\t\tif (is_object($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\t\n\t\tif (is_array($value)) {\n\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t$value[$k] = $this->_parse($v);\n\t\t\t}\n\t\t\treturn $value;\n\t\t}\n\t\t\n\t\tif (preg_match(\"/^[0-9]+$/\", $value)) {\n\t\t\treturn (int) $value;\n\t\t}\n\t\t\n\t\tif (preg_match(\"/^[0-9]+\\.[0-9]+$/\", $value)) {\n\t\t\treturn (float) $value;\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "public static function parseFields($data)\n {\n $data = self::explodeFields($data);\n //string parse\n foreach ($data as $name => $value) {\n $newField = collect();\n foreach ($value as $rule) {\n if (array_key_exists(0, $value)) {\n $newField[] = self::parseStringFields($rule);\n }\n }\n $fields[$name] = $newField->collapse();\n }\n //parse array\n foreach ($data as $name => $value) {\n if (!array_key_exists(0, $value)) {\n $fields[$name] = collect($value);\n }\n }\n\n return $fields ?? [];\n }", "private function _getArrayRule($field, $rules, $isNested = false)\n {\n $arrayRuleName = 'array';\n $hasNullableRule = false;\n\n // check the rule of array if found\n $arrayRule = array_filter(explode('|', $rules), function ($item) use ($arrayRuleName, &$hasNullableRule) {\n $hasNullableRule = $item == 'nullable';\n return substr($item, 0, strlen($arrayRuleName)) == $arrayRuleName;\n });\n\n if (!empty($arrayRule)) {\n try {\n $valueChecked = $this->_getValueChecked($field, $isNested);\n } catch (Exception $e) { // field not exist\n $this->set_message($field, 'The {field} field is not found.');\n return ['required', function ($value) use ($hasNullableRule) {\n return $hasNullableRule;\n }];\n }\n\n $subrules = $this->_extractSubRules($this->_getSubRules($arrayRule));\n\n // Note: CI will ignore the field that its value is an empty array.\n // So, to fix this when the subrules exist and the value is an empty array,\n // set its value to null\n if (!empty($subrules) && empty($valueChecked)) {\n $this->set_null($field);\n /* we do not need to check the error (field not exist) because it was checked above.\n if ($this->set_null($field) === false) {\n return ['required', function ($value) use ($hasNullableRule) {\n return $hasNullableRule;\n }];\n }*/\n }\n\n return [$arrayRuleName, function ($value) use ($valueChecked, $subrules, $arrayRuleName) {\n // check it is an array\n if (!is_array($valueChecked)) {\n $this->set_message($arrayRuleName, 'The {field} field must be an array.');\n return false;\n }\n // validate the subrules of array (min, max, size) if found\n return $this->_validateArraySubrules($valueChecked, $subrules, $arrayRuleName);\n }];\n }\n return null;\n }", "private function _from_array($array, $par, $xss_clean = false)\n {\n if(isset($array[$par])) {\n if($xss_clean) {\n return $this->xss_clean($array[$par]);\n }\n else\n return $array[$par];\n }\n else if($par == null) {\n if($xss_clean) {\n return $this->xss_clean($array);\n }\n else\n return $array;\n }\n else\n return false;\n }", "function wp_parse_str( $string, &$array ) {\n\tparse_str( $string, $array );\n\t$array = apply_filters( 'wp_parse_str', $array );\n}", "public function simpleXML2Array($xml){\n\n $array = (array)$xml;\n\n if (count($array) == 0) {\n $array = (string)$xml; \n }\n\n if (is_array($array)) {\n //recursive Parser\n foreach ($array as $key => $value){\n if (is_object($value)) {\n if(strpos(get_class($value),\"SimpleXML\")!==false){\n $array[$key] = $this->simpleXML2Array($value);\n }\n } else {\n $array[$key] = $this->simpleXML2Array($value);\n }\n }\n }\n\n return $array;\n \n }", "public function parse(string $str): ?array;", "protected function unserializeValue($value)\n\t{\n\t\tif ($value[0] == '{' || $value[0] == '[') {\n\t\t\treturn (array)json_decode($value, true);\n\t\t} elseif (in_array(substr($value, 0, 2), ['O:', 'a:'])) {\n\t\t\treturn (array)unserialize($value);\n\t\t} elseif (is_numeric($value)) {\n\t\t\treturn (array)$value;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t}", "abstract protected function unserializeData(array $data);", "private function parseJson(array $token)\n {\n $value = json_decode($token['value'], true);\n\n if ($error = json_last_error()) {\n // Legacy support for elided quotes. Try to parse again by adding\n // quotes around the bad input value.\n $value = json_decode('\"' . $token['value'] . '\"', true);\n if ($error = json_last_error()) {\n $token['type'] = self::T_UNKNOWN;\n return $token;\n }\n }\n\n $token['value'] = $value;\n return $token;\n }", "protected function parse()\n {\n if($this->isRelationalKey()){\n $this->parsedValue = $this->makeRelationInstruction();\n } \n else {\n $this->parsedValue = $this->parseFlatValue($this->value);\n } \n }", "protected function __resolve_parse($value)\n {\n $value = is_string($value) ? ['file' => $value] : $value;\n $value += [\n 'is_object' => true,\n 'is_root' => true,\n ];\n\n $parsed = $this->parseLater($value['file'], 'file', false);\n\n return\n $value['is_object']\n ? [$value['is_root'] ? '$newRoot' : '$new' => $parsed]\n : $parsed\n ;\n }", "function parseFieldList($dataArray) {\n\t\t$result = array();\n\n\t\tif (!is_array($dataArray)) {\n\t\t\treturn $result;\n\t\t}\n\n\t\tforeach($dataArray as $key => $data) {\n\t\t\t// remove the trailing '.'\n\t\t\t$result[] = substr($key, 0, -1);\n\t\t}\n\n\t\treturn $result;\n\t}", "protected function jsonDecode(array $data)\n {\n foreach ($data as &$value) {\n if (\\is_array($value)) {\n $value = $this->jsonDecode($value);\n } else {\n $value = json_decode($value, true);\n }\n }\n\n return $data;\n }", "function _postProcess() {\r\n $item = current($this->_struct);\r\n \r\n $ret = array('_name'=>$item['tag'], '_attributes'=>array(), '_value'=>null);\r\n\r\n if (isset($item['attributes']) && count($item['attributes'])>0) {\r\n foreach ($item['attributes'] as $key => $data) {\r\n if (!is_null($data)) {\r\n $item['attributes'][$key] = str_replace($this->_replaceWith, $this->_replace, $item['attributes'][$key]);\r\n }\r\n }\r\n $ret['_attributes'] = $item['attributes'];\r\n if ($this->attributesDirectlyUnderParent)\r\n $ret = array_merge($ret, $item['attributes']);\r\n }\r\n\r\n if (isset($item['value']) && $item['value'] != null)\r\n $item['value'] = str_replace($this->_replaceWith, $this->_replace, $item['value']);\r\n \r\n switch ($item['type']) {\r\n case 'open':\r\n $children = array();\r\n while (($child = next($this->_struct)) !== FALSE ) {\r\n if ($child['level'] <= $item['level'])\r\n break;\r\n \r\n $subItem = $this->_postProcess();\r\n \r\n if (isset($subItem['_name'])) {\r\n if (!isset($children[$subItem['_name']]))\r\n $children[$subItem['_name']] = array();\r\n \r\n $children[$subItem['_name']][] = $subItem;\r\n }\r\n else {\r\n foreach ($subItem as $key=>$value) {\r\n if (isset($children[$key])) {\r\n if (is_array($children[$key]))\r\n $children[$key][] = $value;\r\n else\r\n $children[$key] = array($children[$key], $value);\r\n }\r\n else {\r\n $children[$key] = $value;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if ($this->childTagsDirectlyUnderParent)\r\n $ret = array_merge($ret, $this->_condenseArray($children));\r\n else\r\n $ret['_value'] = $this->_condenseArray($children);\r\n \r\n break;\r\n case 'close':\r\n break;\r\n case 'complete':\r\n if (count($ret['_attributes']) > 0) {\r\n if (isset($item['value']))\r\n $ret['_value'] = $item['value'];\r\n }\r\n else {\r\n\t\t\tif (isset($item['value'])) {\r\n\t\t\t\t$ret = array($item['tag']=> $item['value']);\r\n\t\t\t} else {\r\n\t\t\t\t$ret = array($item['tag']=> \"\");\r\n\t\t\t}\r\n }\r\n break;\r\n }\r\n\r\n //added by Dan Coulter\r\n\r\n \r\n /*\r\n foreach ($ret as $key => $data) {\r\n if (!is_null($data) && !is_array($data)) {\r\n $ret[$key] = str_replace($this->_replaceWith, $this->_replace, $ret[$key]);\r\n }\r\n }\r\n */\r\n return $ret;\r\n }", "function nest($array = false, $field='post_parent') {\n\t\tif(!$array || !$field) return;\n\t\t$_array = array();\n\t\t$_array_children = array();\n\t\t\n\t\t// separate children from parents\n\t\tforeach($array as $a) {\n\t\t\tif(!$a->post_parent) {\n\t\t\t\t$_array[] = $a;\n\t\t\t} else {\n\t\t\t\t$_array_children[$a->post_parent][] = $a;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// nest children and parents\n\t\tforeach($_array as $a) {\n\t\t\t$a->children = array();\n\t\t\tif(isset($_array_children[$a->ID])) $a->children = $_array_children[$a->ID];\n\t\t}\n\t\treturn $_array;\n\t}", "private static function consumeArray($contents,&$pos) {\n\t\t//Valid sample: [1,2,['bb','c'=>9],[1=>1,],]\n\t\t$startPos=$pos++;//save initial value of $pos to $startPos and also advance $pos to after the bracket\n\t\tDokser::skipWhitespaceAndComments($contents, $pos);//skip possible whitespace after [\n\t\twhile ($contents[$pos]!=']'){\n\t\t\tDokser::consumeValue($contents, $pos);//consume value, or actually alternatively key as it may be\n\t\t\tDokser::skipWhitespaceAndComments($contents, $pos);//skip whitespace after key/value\n\t\t\tif ($contents[$pos]=='=')//the consumed value was key, skip '=>' and let next iteration consume its value\n\t\t\t\t$pos+=2;\n\t\t\telse if ($contents[$pos]==',')//skip comma\n\t\t\t\t++$pos;\n\t\t\telse//if neither \",\" nor \"=>\" was encontered then it means $pos is now either at a value or \"]\" and then we\n\t\t\t\tcontinue;//we don't have to skip whitespace since it's already been done. otherwise if \",\" or \"=>\" was\n\t\t\tDokser::skipWhitespaceAndComments($contents, $pos);//found we need to skip whitespace after it\n\t\t}\n\t\t++$pos;//go past closing bracket\n\t\treturn substr($contents, $startPos,$pos-$startPos);//return the array-string including its brackets\n\t}", "protected function _parseArrayOptions($options)\n {\n $tmp = array();\n foreach ($options as $option) {\n $keys = explode('.', $option);\n $level = &$tmp;\n for ($i = 0; $i < count($keys) - 1; $i++) {\n if (!array_key_exists($keys[$i], $level)) {\n $level[$keys[$i]] = array();\n }\n $level = &$level[$keys[$i]];\n }\n $keyVal = explode('=', $keys[$i]);\n $level[$keyVal[0]] = $keyVal[1];\n unset($level);\n }\n\n return $tmp;\n }", "private function T_ARRAY($value) {\n\t\t$_convert = array('('=>'{',\t')'=>'}',);\n\t\t$js = $this->parseUntil(array(';'), $_convert, true);\n\t\tif (strpos($js, ':') === false) {\n\t\t\t$this->tmp = -1;\n\t\t\t$js = preg_replace_callback ('/([{, \\t\\n])(\\'.*\\')(|.*:(.*))([,} \\t\\n])/Uis', array($this, 'cb_T_ARRAY'), $js);\n\t\t}\n\t\treturn $js;\n\t}", "protected function arrayToObject($data)\n {\n if ($data) {\n if ($data['type'] == 'uri' or $data['type'] == 'bnode') {\n return $this->resource($data['value']);\n } else {\n return Literal::create($data);\n }\n } else {\n return null;\n }\n }", "protected function _parse($data)\n\t{\n\t\t// Start with an 'empty' array with no data.\n\t\t$current = array();\n\n\t\t// Loop until we're out of data.\n\t\twhile ($data !== '')\n\t\t{\n\t\t\t// Find and remove the next tag.\n\t\t\tpreg_match('/\\A<([\\w\\-:]+)((?:\\s+.+?)?)([\\s]?\\/)?' . '>/', $data, $match);\n\t\t\tif (isset($match[0]))\n\t\t\t{\n\t\t\t\t$data = preg_replace('/' . preg_quote($match[0], '/') . '/s', '', $data, 1);\n\t\t\t}\n\n\t\t\t// Didn't find a tag? Keep looping....\n\t\t\tif (!isset($match[1]) || $match[1] === '')\n\t\t\t{\n\t\t\t\t// If there's no <, the rest is data.\n\t\t\t\t$data_strpos = strpos($data, '<');\n\t\t\t\tif ($data_strpos === false)\n\t\t\t\t{\n\t\t\t\t\t$text_value = $this->_from_cdata($data);\n\t\t\t\t\t$data = '';\n\n\t\t\t\t\tif ($text_value !== '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$current[] = array(\n\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t'value' => $text_value\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If the < isn't immediately next to the current position... more data.\n\t\t\t\telseif ($data_strpos > 0)\n\t\t\t\t{\n\t\t\t\t\t$text_value = $this->_from_cdata(substr($data, 0, $data_strpos));\n\t\t\t\t\t$data = substr($data, $data_strpos);\n\n\t\t\t\t\tif ($text_value !== '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$current[] = array(\n\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t'value' => $text_value\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If we're looking at a </something> with no start, kill it.\n\t\t\t\telseif ($data_strpos !== false && $data_strpos === 0)\n\t\t\t\t{\n\t\t\t\t\t$data_strpos = strpos($data, '<', 1);\n\t\t\t\t\tif ($data_strpos !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$text_value = $this->_from_cdata(substr($data, 0, $data_strpos));\n\t\t\t\t\t\t$data = substr($data, $data_strpos);\n\n\t\t\t\t\t\tif ($text_value !== '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$current[] = array(\n\t\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t\t'value' => $text_value\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$text_value = $this->_from_cdata($data);\n\t\t\t\t\t\t$data = '';\n\n\t\t\t\t\t\tif ($text_value !== '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$current[] = array(\n\t\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t\t'value' => $text_value\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\n\t\t\t\t// Wait for an actual occurrence of an element.\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Create a new element in the array.\n\t\t\t$el = &$current[];\n\t\t\t$el['name'] = $match[1];\n\n\t\t\t// If this ISN'T empty, remove the close tag and parse the inner data.\n\t\t\tif ((!isset($match[3]) || trim($match[3]) !== '/') && (!isset($match[2]) || trim($match[2]) !== '/'))\n\t\t\t{\n\t\t\t\t// Because PHP 5.2.0+ seems to croak using regex, we'll have to do this the less fun way.\n\t\t\t\t$last_tag_end = strpos($data, '</' . $match[1] . '>');\n\t\t\t\tif ($last_tag_end === false)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$offset = 0;\n\t\t\t\twhile (true)\n\t\t\t\t{\n\t\t\t\t\t// Where is the next start tag?\n\t\t\t\t\t$next_tag_start = strpos($data, '<' . $match[1], $offset);\n\n\t\t\t\t\t// If the next start tag is after the last end tag then we've found the right close.\n\t\t\t\t\tif ($next_tag_start === false || $next_tag_start > $last_tag_end)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If not then find the next ending tag.\n\t\t\t\t\t$next_tag_end = strpos($data, '</' . $match[1] . '>', $offset);\n\n\t\t\t\t\t// Didn't find one? Then just use the last and sod it.\n\t\t\t\t\tif ($next_tag_end === false)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\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$last_tag_end = $next_tag_end;\n\t\t\t\t\t\t$offset = $next_tag_start + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Parse the insides.\n\t\t\t\t$inner_match = substr($data, 0, $last_tag_end);\n\n\t\t\t\t// Data now starts from where this section ends.\n\t\t\t\t$data = substr($data, $last_tag_end + strlen('</' . $match[1] . '>'));\n\n\t\t\t\tif (!empty($inner_match))\n\t\t\t\t{\n\t\t\t\t\t// Parse the inner data.\n\t\t\t\t\tif (strpos($inner_match, '<') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$el += $this->_parse($inner_match);\n\t\t\t\t\t}\n\t\t\t\t\telseif (trim($inner_match) !== '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$text_value = $this->_from_cdata($inner_match);\n\t\t\t\t\t\tif (trim($text_value) !== '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$el[] = array(\n\t\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t\t'value' => $text_value\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we're dealing with attributes as well, parse them out.\n\t\t\tif (isset($match[2]) && $match[2] !== '')\n\t\t\t{\n\t\t\t\t// Find all the attribute pairs in the string.\n\t\t\t\tpreg_match_all('/([\\w:]+)=\"(.+?)\"/', $match[2], $attr, PREG_SET_ORDER);\n\n\t\t\t\t// Set them as @attribute-name.\n\t\t\t\tforeach ($attr as $match_attr)\n\t\t\t\t{\n\t\t\t\t\t$el['@' . $match_attr[1]] = $match_attr[2];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Return the parsed array.\n\t\treturn $current;\n\t}", "protected function parseArrayElement(\\SimpleXMLElement $node) {\n\t\t\t$iList = new Common\\Mutable\\ArrayList();\n\t\t\t$children = $node->children();\n\t\t\tforeach ($children as $child) {\n\t\t\t\tswitch ($child->getName()) {\n\t\t\t\t\tcase 'array':\n\t\t\t\t\t\t$iList->addValue($this->parseArrayElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'dictionary':\n\t\t\t\t\t\t$iList->addValue($this->parseDictionaryElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'expression':\n\t\t\t\t\t\t$iList->addValue($this->parseExpressionElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'null':\n\t\t\t\t\t\t$iList->addValue($this->parseNullElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'undefined':\n\t\t\t\t\t\t$iList->addValue($this->parseUndefinedElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'value':\n\t\t\t\t\t\t$iList->addValue($this->parseValueElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new Throwable\\Instantiation\\Exception('Unable to initial class.');\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $iList->toArray();\n\t\t}", "private function isPlainArray($line) {\n\t//--\n\treturn (($line[0] == '[') && (substr($line, -1, 1) == ']'));\n\t//--\n}", "public static function parseTypeArray($type)\n {\n preg_match('/(.*)\\[(.*?)\\]$/', $type, $matches);\n if ($matches) {\n return $matches[2] === '' ? 'dynamic' : int($matches[2]);\n }\n return null;\n }", "abstract public function parse($data, $type);", "protected function _tree($array) {\n\n\t\t\t$root = array(\n\t\t\t\t'children' => array()\n\t\t\t);\n\t\t\t$current = &$root;\n\n\t\t\tforeach ($array as $i => $node) {\n\n\t\t\t\t$result = $this->_tag($node);\n\t\t\t\t\n\t\t\t\tif ($result) {\n\t\t\t\t\t\n\t\t\t\t\tif (isset($result['tag'])) {\n\t\t\t\t\t\t$tag = $result['tag'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$tag = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isset($result['arguments'])) {\n\t\t\t\t\t\t$arguments = $result['arguments'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$arguments = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($tag) {\n\t\t\t\t\t\t// If segment does not contain a closer\n\t\t\t\t\t\tif (!$result['closer']) {\n\t\t\t\t\t\t\t// clean up syntax if segment is isolated and \n\t\t\t\t\t\t\t// preceded by an plain text segment\n\t\t\t\t\t\t\t$last = ArrayMethods::last($current['children']);\n\t\t\t\t\t\t\tif ($result['isolated'] && is_string($last)) {\n\t\t\t\t\t\t\t\tarray_pop($current['children']);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$current['children'][] = array(\n\t\t\t\t\t\t\t\t'index' => $i,\n\t\t\t\t\t\t\t\t'parent' => &$current,\n\t\t\t\t\t\t\t\t'children' => array(),\n\t\t\t\t\t\t\t\t'raw' => $result['source'],\n\t\t\t\t\t\t\t\t'tag' => $tag,\n\t\t\t\t\t\t\t\t'arguments' => $arguments,\n\t\t\t\t\t\t\t\t'delimiter' => $result['delimiter'],\n\t\t\t\t\t\t\t\t'number' => count($current['children'])\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$current = &$current['children'][count($current['children']) - 1];\n\t\t\t\t\t\t} else if (isset($current['tag']) && $result['tag'] == $current['tag']) {\n\t\t\t\t\t\t\t$start = $current['index'] + 1;\n\t\t\t\t\t\t\t$length = $i - $start;\n\t\t\t\t\t\t\t$current['source'] = implode(array_slice($array, $start, $length));\n\t\t\t\t\t\t\t$current = &$current['parent'];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$current['children'][] = array(\n\t\t\t\t\t\t\t'index' => $i,\n\t\t\t\t\t\t\t'parent' => &$current,\n\t\t\t\t\t\t\t'children' => array(),\n\t\t\t\t\t\t\t'raw' => $result['source'],\n\t\t\t\t\t\t\t'tag' => $tag,\n\t\t\t\t\t\t\t'arguments' => $arguments,\n\t\t\t\t\t\t\t'delimiter' => $result['delimiter'],\n\t\t\t\t\t\t\t'number' => count($current['children'])\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$current['children'][] = $node;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $root;\n\t\t}", "public function testPathSubArray()\n {\n $json = new JsonArray(['top1' => ['sub1.1' => 'top1.sub1.1.content']]);\n\n $json->set('top2', ['sub2.1' => []]);\n $json->set('top2/sub2.2', ['top2.sub2.2.content']);\n $this->assertEquals(['sub2.1' => [], 'sub2.2' => ['top2.sub2.2.content']], $json->get('top2'));\n $this->assertEquals([], $json->get('top2/sub2.1'));\n $this->assertEquals(['top2.sub2.2.content'], $json->get('top2/sub2.2'));\n $json->set('top2', 'top2.content');\n $this->assertEquals('top2.content', $json->get('top2'));\n }", "function parseIncomingData($origArr = array()) {\n\t\tglobal $TYPO3_DB;\n\n\t\tstatic $adodbTime = null;\n\n\t\t$parsedArr = array();\n\t\t$parsedArr = $origArr;\n\t\tif (is_array($this->conf['parseFromDBValues.'])) {\n\t\t\treset($this->conf['parseFromDBValues.']);\n\t\t\twhile (list($theField, $theValue) = each($this->conf['parseFromDBValues.'])) {\n\t\t\t\t$listOfCommands = t3lib_div::trimExplode(',', $theValue, 1);\n\t\t\t\tforeach($listOfCommands as $k2 => $cmd) {\n\t\t\t\t\t$cmdParts = split(\"\\[|\\]\", $cmd); // Point is to enable parameters after each command enclosed in brackets [..]. These will be in position 1 in the array.\n\t\t\t\t\t$theCmd = trim($cmdParts[0]);\n\t\t\t\t\tswitch($theCmd) {\n\t\t\t\t\t\tcase 'date':\n\t\t\t\t\t\tif($origArr[$theField]) {\n\t\t\t\t\t\t\t$parsedArr[$theField] = date( 'd.m.Y', $origArr[$theField]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$parsedArr[$theField]) {\n\t\t\t\t\t\t\tunset($parsedArr[$theField]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'adodb_date':\n\t\t\t\t\t\tif (!is_object($adodbTime))\t{\n\t\t\t\t\t\t\tinclude_once(PATH_BE_srfeuserregister.'pi1/class.tx_srfeuserregister_pi1_adodb_time.php');\n\n\t\t\t\t\t\t\t// prepare for handling dates before 1970\n\t\t\t\t\t\t\t$adodbTime = t3lib_div::makeInstance('tx_srfeuserregister_pi1_adodb_time');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif($origArr[$theField]) {\n\t\t\t\t\t\t\t$parsedArr[$theField] = $adodbTime->adodb_date( 'd.m.Y', $origArr[$theField]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$parsedArr[$theField]) {\n\t\t\t\t\t\t\tunset($parsedArr[$theField]);\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}\n\t\t}\n\n\t\t$fieldsList = array_keys($parsedArr);\n\t\tforeach ($this->tca->TCA['columns'] as $colName => $colSettings) {\n\t\t\tif (in_array($colName, $fieldsList) && $colSettings['config']['type'] == 'select' && $colSettings['config']['MM']) {\n\t\t\t\tif (!$parsedArr[$colName]) {\n\t\t\t\t\t$parsedArr[$colName] = '';\n\t\t\t\t} else {\n\t\t\t\t\t$valuesArray = array();\n\t\t\t\t\t$res = $TYPO3_DB->exec_SELECTquery(\n\t\t\t\t\t\t'uid_local,uid_foreign,sorting',\n\t\t\t\t\t\t$colSettings['config']['MM'],\n\t\t\t\t\t\t'uid_local='.intval($parsedArr['uid']),\n\t\t\t\t\t\t'',\n\t\t\t\t\t\t'sorting');\n\t\t\t\t\twhile ($row = $TYPO3_DB->sql_fetch_assoc($res)) {\n\t\t\t\t\t\t$valuesArray[] = $row['uid_foreign'];\n\t\t\t\t\t}\n\t\t\t\t\t$parsedArr[$colName] = implode(',', $valuesArray);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $parsedArr;\n\t}", "abstract public function parse ();", "private static function parseVersions($arr)\n\t{\n\t\t$return = false;\n\t\tif (count($arr) > 0) {\n\t\t\tif (array_key_exists('version', $arr)) {\n if (is_object($arr['version'])) {\n $version = $arr['version'];\n $attr = $version->attributes();\n switch ($attr['type']) {\n case 'VERSION_FOLDER':\n $return = array_merge(\n $return,\n (array)self::parseVersions((array)$version)\n );\n break;\n\n case 'ACTUALS':\n continue;\n case 'PLANNING':\n $return[] = array(\n 'name' => (string)$attr['name'],\n 'type' => (string)$attr['type'],\n 'default' => (string)$attr['isDefaultVersion']\n );\n break;\n }\n } else {\n\t\t\t\t$return = array();\n $versions = $arr['version'];\n\t\t\t\t foreach ($versions as $version) {\n\t\t\t\t\t $attr = $version->attributes();\n\t\t\t\t\t switch ($attr['type']) {\n\t\t\t\t\t\t case 'VERSION_FOLDER':\n\t\t\t\t\t\t\t $return = array_merge(\n $return,\n (array)self::parseVersions((array)$version)\n );\n\t\t\t\t\t\t\t break;\n\n\t\t\t\t\t\t case 'ACTUALS':\n\t\t\t\t\t\t\t continue;\n\t\t\t\t\t\t case 'PLANNING':\n\t\t\t\t\t\t\t $return[] = array(\n\t\t\t\t\t\t\t\t 'name' => (string)$attr['name'],\n\t\t\t\t\t\t\t\t 'type' => (string)$attr['type'],\n\t\t\t\t\t\t\t\t 'default' => (string)$attr['isDefaultVersion']\n\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t\t }\n }\n\t\t\t}\n\t\t}\n\t\tif (is_array($return)) {\n\t\t\tsort($return);\n\t\t}\n\t\treturn $return;\n\t}", "protected function jsonDecode(array $data)\n {\n foreach ($data as &$value) {\n if (is_array($value)) {\n $value = $this->jsonDecode($value);\n } else {\n $value = json_decode($value, true, 512, JSON_THROW_ON_ERROR);\n }\n }\n\n return $data;\n }", "function sanitizeArray($data = array())\r\n{\r\n foreach ($data as $k => $v) {\r\n if (!is_array($v) && !is_object($v)) { // deep enough to only be values? sanitize them now.\r\n $data[$k] = sanitizeValue($v);\r\n }\r\n if (is_array($v)) { // go deeper\r\n $data[$k] = sanitizeArray($v);\r\n }\r\n }\r\n return $data;\r\n}", "function widgetopts_sanitize_array( &$array ) {\n foreach ($array as &$value) {\n if( !is_array($value) ) {\n\t\t\t// sanitize if value is not an array\n $value = sanitize_text_field( $value );\n\t\t}else{\n\t\t\t// go inside this function again\n widgetopts_sanitize_array($value);\n\t\t}\n }\n\n return $array;\n}", "abstract public function array2Data($arr);" ]
[ "0.66442025", "0.63293284", "0.62897044", "0.61981785", "0.61588895", "0.59986705", "0.5984716", "0.58424723", "0.57783055", "0.576507", "0.566837", "0.56248873", "0.56247383", "0.5606372", "0.55716664", "0.55678403", "0.555264", "0.55389094", "0.55162144", "0.5487364", "0.5486142", "0.5461385", "0.54269445", "0.5384384", "0.5370886", "0.53471416", "0.5342243", "0.53229123", "0.5303288", "0.5298099", "0.5287076", "0.5277548", "0.5263003", "0.52401024", "0.52288264", "0.52099866", "0.52087796", "0.52012765", "0.51858836", "0.51856726", "0.5182591", "0.5170887", "0.5169515", "0.5169515", "0.5169515", "0.5169515", "0.51643497", "0.5160608", "0.515988", "0.5140229", "0.5133909", "0.51293314", "0.51293314", "0.51293314", "0.5124002", "0.5120805", "0.51197624", "0.5112236", "0.51100636", "0.51041806", "0.5098927", "0.5088826", "0.5087799", "0.5082002", "0.50814897", "0.50785655", "0.50675035", "0.5064285", "0.5058539", "0.50558347", "0.5053734", "0.50529605", "0.50520265", "0.50498295", "0.50402707", "0.5038166", "0.5033398", "0.50312537", "0.5027646", "0.5023674", "0.5010308", "0.50023866", "0.49929738", "0.49895582", "0.4985219", "0.49851206", "0.49805415", "0.49790597", "0.49668416", "0.4963237", "0.49599192", "0.4957009", "0.49390393", "0.49373388", "0.49268004", "0.49247855", "0.4916934", "0.49152756", "0.49121505", "0.49089912", "0.49020645" ]
0.0
-1
parse a potentially nested array
private static function parseAccounts($arr) { $results = array(); if (count($arr) > 0) { if (array_key_exists('account', $arr)) { $accounts = $arr['account']; foreach ($accounts as $account) { $attr = $account->attributes(); if (array_key_exists('account', $account)) { $results = array_merge( $results, self::parseAccounts((array)$account) ); continue; } $code = (string)$attr['code']; $name = (string)$attr['name']; // if ($code >= '4000') { $results[] = $code; // } } $results = array_unique($results); sort($results); } } return $results; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ParseFromArray() {\n $this->value = $this->reader->next();\n $this->clean();\n }", "public function parseFromArray()\n {\n $this->value = $this->reader->next();\n }", "function pg_array_parse($array, $asText = true) {\n $s = $array;\n if ($asText) {\n $s = str_replace(\"{\", \"array('\", $s);\n $s = str_replace(\"}\", \"')\", $s); \n $s = str_replace(\",\", \"','\", $s); \n } else {\n $s = str_replace(\"{\", \"array(\", $s);\n $s = str_replace(\"}\", \")\", $s);\n }\n\t$ss = \"\\$retval = $s;\";\n eval($ss);\n\treturn $retval;\n}", "protected function parseData($data){\r\n $d = array();\r\n if(is_string($data)){\r\n try{\r\n parse_str($data,$arr);\r\n $d = $arr;\r\n }catch(Exception $e){\r\n //del lam gi ca\r\n }\r\n }elseif(is_array($data)){\r\n $d = $data;\r\n }\r\n if(!$d) return null;\r\n unset($d[$this->idField]);\r\n $r = array();\r\n foreach($d as $f => $v){\r\n if(in_array($f, $this->fields)) $r[$f] = $v;\r\n }\r\n return $r;\r\n }", "public function parse_array($value)\n\t{\n\t\tif ($value==null)\n\t\t\treturn array();\n\t\t\n\t\tif (is_array($value))\n\t\t\treturn $value;\n\t\t\t\n\t\t$value=trim($value,'{}');\n\t\t$result=explode(',',$value);\n\t\t\n\t\tfor($i=0; $i<count($result); $i++)\n\t\t\tif ($result[$i]=='NULL')\n\t\t\t\t$result[$i]=null;\n\t\t\t\t\n\t\treturn $result;\n\t}", "private static function parseArray($val)\n {\n $result = array();\n $openBrackets = 0;\n $openString = false;\n $openCurlyBraces = 0;\n $openLString = false;\n $buffer = '';\n\n $strLen = strlen($val);\n for($i = 0; $i < $strLen; $i++)\n {\n if($val[$i] == '[' && !$openString && !$openLString)\n {\n $openBrackets++;\n\n if($openBrackets == 1)\n {\n // Skip first and last brackets.\n continue;\n }\n }\n elseif($val[$i] == ']' && !$openString && !$openLString)\n {\n $openBrackets--;\n\n if($openBrackets == 0)\n {\n // Allow terminating commas before the closing bracket\n if(trim($buffer) != '')\n {\n $result[] = self::parseValue( trim($buffer) );\n }\n\n if (!self::checkDataType($result))\n {\n throw new Exception('Data types cannot be mixed in an array: ' . $buffer);\n }\n // Skip first and last brackets. We're finish.\n return $result;\n }\n }\n elseif($val[$i] == '\"' && $val[$i - 1] != \"\\\\\" && !$openLString)\n {\n $openString = !$openString;\n }\n elseif($val[$i] == \"'\" && !$openString) {\n $openLString = !$openLString;\n }\n elseif($val[$i] == \"{\" && !$openString && !$openLString) {\n $openCurlyBraces++;\n }\n elseif($val[$i] == \"}\" && !$openString && !$openLString) {\n $openCurlyBraces--;\n }\n \n if( ($val[$i] == ',' || $val[$i] == '}') && !$openString && !$openLString && $openBrackets == 1 && $openCurlyBraces == 0)\n {\n if ($val[$i] == '}') {\n $buffer .= $val[$i];\n }\n\n $buffer = trim($buffer);\n if (!empty($buffer)) {\n $result[] = self::parseValue($buffer);\n\n if (!self::checkDataType($result))\n {\n throw new Exception('Data types cannot be mixed in an array: ' . $buffer);\n }\n }\n $buffer = '';\n }\n else\n {\n $buffer .= $val[$i];\n }\n }\n\n // If we're here, something went wrong.\n throw new Exception('Wrong array definition: ' . $val);\n }", "function parseArray($arrayToken) {\n\n # remove bounding brackets\n $arrayToken = substr($arrayToken, 1, -1);\n\n # split on elements\n $elementTokens = $this->splitTokens($arrayToken);\n\n # elements will be collected in plain array\n $params = array();\n foreach ($elementTokens as $elementToken) {\n $params[] = $this->parseValue($elementToken);\n }\n return $params;\n }", "public static function parseIteratorArray(array &$array)\n {\n if (!empty($array)) {\n foreach ($array as &$item) {\n if (is_array($item)) {\n self::parseIteratorArray($item);\n } elseif ($item instanceof \\Iterator) {\n $item = iterator_to_array($item);\n self::parseIteratorArray($item);\n }\n }\n }\n }", "abstract public function parseInput(array $input): array;", "public static function parse_multi( $result )\n {\n return ( is_string( $result ) && $array = json_decode( $result, true ) ) ? $array : $result;\n }", "function parseBISArray($str) {\n $str = substr($str, 1, -1); // Strip trailing quotes\n $bla = parseBISArray_helper($str);\n $result = array();\n\n foreach ($bla as $row) {\n foreach ($row as $child) {\n $result[] = $child;\n }\n if (count($row) == 0)\n $result[] = array();\n }\n //var_dump($result);\n return $result;\n}", "private function parseobject($array)\n {\n if (is_object($array)) {\n if (get_class($array) == 'DataObject') {\n return $array;\n }\n $do = DataObject::create();\n foreach (get_object_vars($array) as $key => $obj) {\n if ($key == '__Type') {\n $do->setField('Title', $obj);\n } elseif (is_array($obj) || is_object($obj)) {\n $do->setField($key, $this->parseobject($obj));\n } else {\n $do->setField($key, $obj);\n }\n }\n return $do;\n } elseif (is_array($array)) {\n $dataList = ArrayList::create();\n foreach ($array as $key => $obj) {\n $dataList->push($this->parseobject($obj));\n }\n return $dataList;\n }\n return null;\n }", "protected function _decodeArray()\n {\n $result = array();\n $starttok = $tok = $this->_getNextToken(); // Move past the '['\n $index = 0;\n\n while ($tok && $tok != self::RBRACKET) {\n $result[$index++] = $this->_decodeValue();\n\n $tok = $this->_token;\n\n if ($tok == self::RBRACKET || !$tok) {\n break;\n }\n\n if ($tok != self::COMMA) {\n throw new Rx_Json_Exception('Missing \",\" in array encoding: ' . $this->_getProblemContext());\n }\n\n $tok = $this->_getNextToken();\n }\n\n $this->_getNextToken();\n return ($result);\n }", "public function parse(array $description);", "public function parse() {\n\t\t$pointer = 0;\n\t\t$ar_line = array();\n\n\t\tforeach ($this->structure as $key => $length) {\n\t\t\t$ar_line[$key] = trim(substr($this->line, $pointer, $length), \"\\n\\r \");\n\t\t\t$pointer += $length;\n\t\t}\n\t\t$ar_line['stamp'] = md5(serialize($ar_line));\n\n\t\tif ($this->return == 'array') {\n\t\t\treturn $ar_line;\n\t\t}\n\t\treturn (object) $ar_line;\n\t}", "private function parse(array $block): array\n {\n $raw = get_field('data');\n $className = trim(array_key_exists('className', $block) ? $block['className'] : '');\n\n unset($raw['']);\n\n $data = array(\n 'block' => (object) [\n 'id' => $block['id'],\n 'classList' => !empty($className) ? explode(' ', $className) : [],\n 'className' => $className,\n 'anchor' => !empty($block['anchor']) ? $block['anchor'] : $block['id']\n ],\n 'raw' => !empty($block['data']) ? (object) $block['data'] : (object) [],\n 'data' => !empty($raw) ? (object) $raw : (object) [],\n 'template' => 'blocks::' . $this->getId()\n );\n\n return $this->filter($data, $block);\n }", "public function parse($input) {\n\t//--\n\treturn (array) $this->loadWithSource((array)$this->loadFromString((string)$input));\n\t//--\n}", "public function parseGetData(array $data) {\n return $data;\n }", "public function testParsedArray()\n {\n $entity = DataObjectHandler::getInstance()->getObject('testEntity');\n $this->assertCount(3, $entity->getLinkedEntities());\n }", "function acf_parse_types($array)\n{\n}", "public function processField($arr){\n\t\t$return = array();\n\t\t$parts = explode(',', $arr);\n\t\t$seq = 0;\n\t\tfor($i=0; $i<count($parts); $i++){\n\t\t\tif('blank' == substr($parts[$i],0,5)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlist(,$list) = explode('_', $parts[$i])\t;\n\t\t\t//$list = str_replace('item_', '',$parts[$i]);\n\t\t\tlist($type, $fieldId) = explode('-',$list);\n\t\t\t$return[$type][$fieldId] = \tintval($seq);\n\t\t\t$seq++;\n\t\t}\n\n\t\treturn $return;\n\t}", "function sanitizeArray( $arr ) {\n if (is_array($arr)) {\n foreach($arr as $key => &$data) {\n if (is_array($data)) {\n $data = sanitizeArray($data);\n } else {\n try {\n $json = json_decode( $data , true);\n if (is_array($json)) {\n $data = sanitizeArray( $json );\n continue;\n }\n } catch(Exception $e) {\n $data = sanitize($data);\n }\n }\n }\n }\n return $arr;\n}", "public function parse(): array\n {\n // Text.\n if ($this->type === 'text') {\n return [\n 'text' => $this->message,\n ];\n }\n\n // Template.\n if ($this->type === 'template') {\n $payload = Arr::get($this->message, 'attachments.0.payload');\n\n // Generic template.\n if (Arr::get($payload, 'template_type') === 'generic') {\n return [\n 'generic' => $this->parseGenericTempalte($payload),\n ];\n }\n }\n\n // Image\n if ($this->type === 'image') {\n $payload = Arr::get($this->message, 'attachments.0.payload');\n return [\n 'image' => $this->parseImageAttachment($payload),\n ];\n }\n\n // This for unsupported messages.\n return [];\n }", "public function parse()\n {\n if (isset($this->schema->cmd)) {\n foreach ($this->schema->cmd as $key => $val) {\n if ($key === \"addNamespaces\") {\n $this->registerNamespaces($val);\n } elseif ($key === \"removeEmptyValues\") {\n $this->removeEmptyValues = $val ? true : false;\n } elseif ($key === \"sortResult\") {\n $this->sort = $val ? true : false;\n }\n }\n }\n\n $array = $this->parseRecursive($this->schema);\n\n if ($this->sort) {\n ksort($array);\n }\n\n return $array;\n }", "#[\\JetBrains\\PhpStorm\\ArrayShape([0 => 'int[]', 1 => 'Board[]'])]\nfunction parse_input(string $input): array\n{\n [$n, $b] = explode(\"\\n\\n\", $input, 2);\n\n $numbers = toIntArray(explode(',', $n));\n\n $boards = collect(explode(\"\\n\\n\", $b))\n ->map(function ($board) {\n return new Board($board);\n });\n\n return [$numbers, $boards];\n}", "abstract protected function parse($data);", "protected static function ParcelResultValidatorArray(){\n\t\t\tstatic $validator = array(\n\t\t\t\t'object' => array(array(\n\t\t\t\t\t'GroupID' => array('string' => array()),\n\t\t\t\t\t'OwnerID' => array('string' => array()),\n\t\t\t\t\t'Maturity' => array('integer' => array()),\n\t\t\t\t\t'Area' => array('integer' => array()),\n\t\t\t\t\t'AuctionID' => array('integer' => array()),\n\t\t\t\t\t'SalePrice' => array('integer' => array()),\n\t\t\t\t\t'InfoUUID' => array('string' => array()),\n\t\t\t\t\t'Dwell' => array('integer' => array()),\n\t\t\t\t\t'Flags' => array('integer' => array()),\n\t\t\t\t\t'Name' => array('string' => array()),\n\t\t\t\t\t'Description' => array('string' => array()),\n\t\t\t\t\t'UserLocation' => array('array' => array(array(\n\t\t\t\t\t\tarray('float' => array()),\n\t\t\t\t\t\tarray('float' => array()),\n\t\t\t\t\t\tarray('float' => array())\n\t\t\t\t\t))),\n\t\t\t\t\t'LocalID' => array('integer' => array()),\n\t\t\t\t\t'GlobalID' => array('string' => array()),\n\t\t\t\t\t'RegionID' => array('string' => array()),\n\t\t\t\t\t'MediaDescription' => array('string' => array()),\n\t\t\t\t\t'MediaHeight' => array('integer' => array()),\n\t\t\t\t\t'MediaLoop' => array('boolean' => array()),\n\t\t\t\t\t'MediaType' => array('string' => array()),\n\t\t\t\t\t'ObscureMedia' => array('boolean' => array()),\n\t\t\t\t\t'ObscureMusic' => array('boolean' => array()),\n\t\t\t\t\t'SnapshotID' => array('string' => array()),\n\t\t\t\t\t'MediaAutoScale' => array('integer' => array()),\n\t\t\t\t\t'MediaLoopSet' => array('float' => array()),\n\t\t\t\t\t'MediaURL' => array('string' => array()),\n\t\t\t\t\t'MusicURL' => array('string' => array()),\n\t\t\t\t\t'Bitmap' => array('string' => array()),\n\t\t\t\t\t'Category' => array('integer' => array()),\n\t\t\t\t\t'FirstParty' => array('boolean' => array()),\n\t\t\t\t\t'ClaimDate' => array('integer' => array()),\n\t\t\t\t\t'ClaimPrice' => array('integer' => array()),\n\t\t\t\t\t'Status' => array('integer' => array()),\n\t\t\t\t\t'LandingType' => array('integer' => array()),\n\t\t\t\t\t'PassHours' => array('float' => array()),\n\t\t\t\t\t'PassPrice' => array('integer' => array()),\n\t\t\t\t\t'UserLookAt' => array('array' => array(array(\n\t\t\t\t\t\tarray('float' => array()),\n\t\t\t\t\t\tarray('float' => array()),\n\t\t\t\t\t\tarray('float' => array())\n\t\t\t\t\t))),\n\t\t\t\t\t'AuthBuyerID' => array('string' => array()),\n\t\t\t\t\t'OtherCleanTime' => array('integer' => array()),\n\t\t\t\t\t'RegionHandle' => array('string' => array()),\n\t\t\t\t\t'Private' => array('boolean' => array()),\n\t\t\t\t\t'GenericData' => array('object' => array()),\n\t\t\t\t))\n\t\t\t);\n\t\t\treturn $validator;\n\t\t}", "private function process_array($value) {\n return is_array($value);\n }", "function SS_cleanXMLArray($array){\n\tif (is_array($array)){\n\t\tforeach ($array as $k=>$a){\n\t\t\tif (is_array($a) && count($a)==1 && isset($a[0])){\n\t\t\t\t$array[$k] = SS_cleanXMLArray($a[0]);\n\t\t\t}\n\t\t}\n\t}\n\treturn $array;\n}", "protected function parse_array_attributes( $key ) {\n\t\t$value = $this->{$key};\n\t\tif ( ! is_array( $value ) ) {\n\t\t\treturn $this;\n\t\t}\n\t\t$first = reset( $value );\n\t\tif ( ! is_array( $first ) ) {\n\t\t\treturn $this;\n\t\t}\n\n\t\t// Options aren't affected with taxonomies.\n\t\t$tmp_array = array();\n\t\t$tmp_std = array();\n\n\t\tforeach ( $value as $arr ) {\n\t\t\t$tmp_array[ $arr['key'] ] = $arr['value'];\n\t\t\tif ( isset( $arr['selected'] ) && $arr['selected'] ) {\n\t\t\t\t$tmp_std[] = $arr['key'];\n\t\t\t}\n\n\t\t\t// Push default value to std on Text List.\n\t\t\tif ( empty( $arr['default'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( 'fieldset_text' === $this->type ) {\n\t\t\t\t$tmp_std[ $arr['value'] ] = $arr['default'];\n\t\t\t} else {\n\t\t\t\t$tmp_std[] = $arr['default'];\n\t\t\t}\n\t\t}\n\n\t\t// Parse JSON and dot notations.\n\t\t$this->{$key} = $this->parse_json_dot_notations( $tmp_array );\n\n\t\tif ( $tmp_std ) {\n\t\t\t$this->std = $tmp_std;\n\t\t}\n\t\treturn $this;\n\t}", "protected function parseResult(array $result): array\n {\n [$key, $rawData] = $result;\n\n $data = collect($rawData)\n ->map(function ($rawData) {\n [$id, $rawData] = $rawData;\n\n $data = [];\n for ($i = 0; $i < count($rawData); $i += 2) {\n $value = $rawData[$i + 1];\n $data[\"{$rawData[$i]}\"] = $value;\n }\n\n return ['id' => $id, 'data' => $data];\n });\n\n return ['key' => $key, 'data' => $data->toArray()];\n }", "function rest_is_array($maybe_array)\n {\n }", "public function parseArray(array $array): void\n {\n $this->XMLTree = $this->generateXMLTree($array);\n }", "private function structureIterator($array){\n $data = array();\n foreach($array as $key => $value){\n if(is_array($value))\n $data[$this->slug($key)] = $this->structureIterator($value);\n else {\n if($this->isImage($value))\n $data['images'][] = $value;\n elseif($this->isJson($value))\n $data['info'] = $this->convertJson($value);\n else\n $data['files'][] = $value;\n }\n }\n $this->sortFiles($data);\n return $data;\n }", "abstract public function parsePostData() : array;", "public function parseData(array $data): void\n {\n $collection = new Collection($data);\n\n $this->labels = $collection->filter(static function ($item) {\n return is_string($item);\n })->map(function ($item, $key) {\n return new Label($item, $key, $this->slug);\n });\n\n $this->containers = $collection->filter(static function ($item) {\n return is_array($item);\n })->map(function ($item, $key) {\n return new self($item, $key, $this->slug);\n });\n }", "protected function parseData(array $raw): array\n {\n $data = [];\n foreach ($raw as $field => $value) {\n $data[] = $field;\n $data[] = $value;\n }\n\n return $data;\n }", "public function parseJson($array = false)\n {\n if ($this->getMimeType() == 'application/json') {\n $contents = $this->getContents();\n $contents = json_decode($contents, $array);\n if (json_last_error() == JSON_ERROR_NONE) {\n return $contents;\n }\n }\n return false;\n }", "public function parseArray($data, $element=null) {\n if ($element === null) {\n $element = &$this->xml;\n }\n foreach ($data as $key=>$value) {\n if (is_array($value)) {\n if (is_numeric(array_keys($value)[0])) {\n foreach ($value as $v) {\n if (is_array($v)) {\n $this->parseArray($v, $element->addChild($key));\n } else {\n $element->addChild($key, $this->parseValue($v));\n }\n }\n } else {\n $this->parseArray($value, $element->addChild($key));\n }\n } else {\n $element->addChild($key, $this->parseValue($value));\n }\n }\n }", "function error_parser($value ='')\n{\n return (!is_array(json_decode($value))) ? $value : json_decode($value);\n}", "public function scrubArray(array $data) : array;", "protected function fixValue(array $value)/*# : array */\n {\n $result = [];\n foreach ($value as $k => $v) {\n if (false !== strpos($k, $this->field_splitter)) {\n $res = &$this->searchTree($k, $result, true);\n $res = is_array($v) ? $this->fixValue($v) : $v;\n } else {\n $result[$k] = is_array($v) ? $this->fixValue($v) : $v;\n }\n }\n return $result;\n }", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "abstract public function parse();", "public function setFromArray(array &$_data)\n {\n parent::setFromArray($_data);\n \n if (isset($_data['flatpath'])) {\n $this->_parsePath($_data['flatpath']);\n }\n }", "protected function processArray($array)\n {\n if ($array instanceof Collection) {\n $array = $array->getAll();\n }\n\n if (!is_array($array)) {\n throw new InvalidArgumentException('The config must be provided as an array or Collection.');\n }\n\n return $array;\n }", "private function _parseLine($line) {\n\t//--\n\tif(!$line) {\n\t\treturn array();\n\t} //end if\n\t//--\n\t$line = trim($line);\n\t//--\n\tif(!$line) {\n\t\treturn array();\n\t} //end if\n\t//--\n\t$array = array();\n\t//--\n\t$group = $this->nodeContainsGroup($line);\n\tif($group) {\n\t\t$this->addGroup($line, $group);\n\t\t$line = $this->stripGroup ($line, $group);\n\t} //end if\n\t//--\n\tif($this->startsMappedSequence($line)) {\n\t\treturn $this->returnMappedSequence($line);\n\t} //end if\n\tif($this->startsMappedValue($line)) {\n\t\treturn $this->returnMappedValue($line);\n\t} //end if\n\tif($this->isArrayElement($line)) {\n\t\treturn $this->returnArrayElement($line);\n\t} //end if\n\tif($this->isPlainArray($line)) {\n\t\treturn $this->returnPlainArray($line);\n\t} //end if\n\t//--\n\treturn $this->returnKeyValuePair($line);\n\t//--\n}", "protected function parse() {}", "public function _cleanData (array $arr)\n {\n foreach ($arr as $key => $element)\n {\n if (is_array ($element))\n {\n $arr [$key] = $this->_cleanData ($element);\n }\n elseif ($arr [$key] instanceof DotNotation_NullElement)\n {\n unset ($arr [$key]);\n }\n }\n \n return $arr;\n }", "public function parse($data);", "public function parse($data);", "public function parse($data);", "function rest_sanitize_array($maybe_array)\n {\n }", "private function parseData(array $data)\n {\n $field = $data['field'];\n\n foreach ($data['policies'] as $rule => $policy) {\n $passes = call_user_func_array([new Rule(), $rule], [$field, $data['value'], $policy]);\n\n if (!$passes) {\n ErrorHandler::set(\n str_replace(\n [':attribute', ':policy', '_'],\n [$field, $policy, ' '], $this->messages[$rule]), $field\n );\n }\n }\n }", "public function parse(): array\n {\n $this->parseElement();\n $this->parseChildNodes();\n\n return ['dir' => $this->dir,\n 'includes' => $this->includes,\n 'excludes' => $this->excludes];\n }", "protected function recursiveArrayHandler($arrayText)\n {\n $matches = [];\n $arrayToBuild = [];\n if (preg_match_all(Patterns::$SPLIT_PATTERN_SHORTHANDSYNTAX_ARRAY_PARTS, $arrayText, $matches, PREG_SET_ORDER)) {\n foreach ($matches as $singleMatch) {\n $arrayKey = $this->unquoteString($singleMatch['Key']);\n if (!empty($singleMatch['VariableIdentifier'])) {\n $arrayToBuild[$arrayKey] = new ObjectAccessorNode($singleMatch['VariableIdentifier']);\n } elseif (array_key_exists('Number', $singleMatch) && (!empty($singleMatch['Number']) || $singleMatch['Number'] === '0')) {\n // Note: this method of casting picks \"int\" when value is a natural number and \"float\" if any decimals are found. See also NumericNode.\n $arrayToBuild[$arrayKey] = $singleMatch['Number'] + 0;\n } elseif ((array_key_exists('QuotedString', $singleMatch) && !empty($singleMatch['QuotedString']))) {\n $argumentString = $this->unquoteString($singleMatch['QuotedString']);\n $arrayToBuild[$arrayKey] = $this->buildArgumentObjectTree($argumentString);\n } elseif (array_key_exists('Subarray', $singleMatch) && !empty($singleMatch['Subarray'])) {\n $arrayToBuild[$arrayKey] = new ArrayNode($this->recursiveArrayHandler($singleMatch['Subarray']));\n }\n }\n }\n return $arrayToBuild;\n }", "public function importArray($data);", "private function parseField($field)\n {\n $f = array();\n\n if (empty($field['sub_fields'])) {\n if (empty($field['value'])) {\n if (!empty($field['default_value'])) {\n if (is_array($field['default_value'])) {\n return reset($field['default_value']);\n }\n }\n return '';\n } else {\n return $field['value'];\n }\n } else {\n foreach ($field['sub_fields'] as $subfield) {\n if ('repeater' === $subfield['type']) {\n $f[$field['name']] = $this->parseField($subfield);\n } elseif ('group' === $subfield['type']) {\n $f[$field['name']][] = $this->parseField($subfield);\n } else {\n $f[$field['name']][$subfield['name']] = $this->parseField($subfield);\n }\n }\n }\n return $f;\n }", "function acf_update_nested_array(&$array, $ancestors, $value)\n{\n}", "private function _getNestedArrayFields($field)\n {\n $data = $this->_getDataValidation();\n $parts = explode('.', $field);\n $firstElement = array_shift($parts);\n $rules = [$firstElement];\n\n // in case the inputs are checkboxes, ignore them\n if (!array_key_exists($firstElement, $data)) {\n return [];\n }\n\n $currentValue = $data[$firstElement];\n $defaultTotal = 0;\n\n foreach ($parts as $part) {\n if ($part == '*') {\n // key not exist, ignore it\n if (!is_array($currentValue) || empty(array_keys($currentValue)) || !isset($currentValue[array_keys($currentValue)[0]])) {\n return [];\n }\n\n $totalElements = $defaultTotal == 1 ? 1 : count($currentValue);\n $currentValue = $currentValue[array_keys($currentValue)[0]];\n $temp = [];\n for ($s=0; $s < $totalElements; $s++) {\n foreach ($rules as $rule) {\n $temp[] = $rule.\"[\".$s.\"]\";\n }\n }\n $rules = $temp;\n } else {\n // key not exist, ignore it\n if (isset($currentValue[$part])) {\n $defaultTotal = 0;\n $currentValue = $currentValue[$part];\n } else {\n $defaultTotal = 1;\n }\n\n $temp = [];\n foreach ($rules as $rule) {\n $temp[] = $rule.\"[\".$part.\"]\";\n }\n $rules = $temp;\n }\n }\n return $rules;\n }", "private function filter_array( $value ) {\n\t\tif ( empty( $this->type ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tif ( Schema_Type::ARRAY !== $this->type->case() ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tif ( empty( $value ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\t$property = self::from_json( $this->schema, $this->get_id() . '::items', $this->items );\n\t\t$array = array();\n\n\t\tforeach ( $value as $item ) {\n\t\t\t$array[] = $property->filter( $item );\n\t\t}\n\n\t\treturn $array;\n\t}", "function wpsl_is_multi_array( $array ) {\n\n foreach ( $array as $value ) {\n if ( is_array( $value ) ) return true;\n }\n\n return false;\n}", "protected function _parse(){\n\t\tforeach ($this->dataArray['tables']['nat']['default-chains'] as $a => &$b){\n\t\t\t$b['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($b['rules'], $b['iptables-rules']);\n\t\t}\n\t\t\n\t\t// Now the IP chains...\n\t\tforeach ($this->dataArray['tables']['nat']['ip-chains'] as &$e){\n\t\t\t$e['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($e['rules'], $e['iptables-rules']);\n\t\t}\n\t\t\n\t\t// And finally, the others...\n\t\tforeach ($this->dataArray['tables']['nat']['other-chains'] as $h => &$i){\n\t\t\t$i['iptables-rules'] = array();\n\t\t\t$this->transformToIPTables($i['rules'], $i['iptables-rules']);\n\t\t}\n\t}", "function acf_is_array($array)\n{\n}", "private function __parse_intput() {\n $requests = JsonParser::decode($this->__raw_input);\n if (is_array($requests) === false or\n empty($requests[0])) {\n $requests = array($requests);\n }\n return ($requests);\n }", "private function _parse($value)\n\t{\n\t\tif (is_object($value)) {\n\t\t\treturn $value;\n\t\t}\n\t\t\n\t\tif (is_array($value)) {\n\t\t\tforeach ($value as $k => $v) {\n\t\t\t\t$value[$k] = $this->_parse($v);\n\t\t\t}\n\t\t\treturn $value;\n\t\t}\n\t\t\n\t\tif (preg_match(\"/^[0-9]+$/\", $value)) {\n\t\t\treturn (int) $value;\n\t\t}\n\t\t\n\t\tif (preg_match(\"/^[0-9]+\\.[0-9]+$/\", $value)) {\n\t\t\treturn (float) $value;\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "public static function parseFields($data)\n {\n $data = self::explodeFields($data);\n //string parse\n foreach ($data as $name => $value) {\n $newField = collect();\n foreach ($value as $rule) {\n if (array_key_exists(0, $value)) {\n $newField[] = self::parseStringFields($rule);\n }\n }\n $fields[$name] = $newField->collapse();\n }\n //parse array\n foreach ($data as $name => $value) {\n if (!array_key_exists(0, $value)) {\n $fields[$name] = collect($value);\n }\n }\n\n return $fields ?? [];\n }", "private function _getArrayRule($field, $rules, $isNested = false)\n {\n $arrayRuleName = 'array';\n $hasNullableRule = false;\n\n // check the rule of array if found\n $arrayRule = array_filter(explode('|', $rules), function ($item) use ($arrayRuleName, &$hasNullableRule) {\n $hasNullableRule = $item == 'nullable';\n return substr($item, 0, strlen($arrayRuleName)) == $arrayRuleName;\n });\n\n if (!empty($arrayRule)) {\n try {\n $valueChecked = $this->_getValueChecked($field, $isNested);\n } catch (Exception $e) { // field not exist\n $this->set_message($field, 'The {field} field is not found.');\n return ['required', function ($value) use ($hasNullableRule) {\n return $hasNullableRule;\n }];\n }\n\n $subrules = $this->_extractSubRules($this->_getSubRules($arrayRule));\n\n // Note: CI will ignore the field that its value is an empty array.\n // So, to fix this when the subrules exist and the value is an empty array,\n // set its value to null\n if (!empty($subrules) && empty($valueChecked)) {\n $this->set_null($field);\n /* we do not need to check the error (field not exist) because it was checked above.\n if ($this->set_null($field) === false) {\n return ['required', function ($value) use ($hasNullableRule) {\n return $hasNullableRule;\n }];\n }*/\n }\n\n return [$arrayRuleName, function ($value) use ($valueChecked, $subrules, $arrayRuleName) {\n // check it is an array\n if (!is_array($valueChecked)) {\n $this->set_message($arrayRuleName, 'The {field} field must be an array.');\n return false;\n }\n // validate the subrules of array (min, max, size) if found\n return $this->_validateArraySubrules($valueChecked, $subrules, $arrayRuleName);\n }];\n }\n return null;\n }", "private function _from_array($array, $par, $xss_clean = false)\n {\n if(isset($array[$par])) {\n if($xss_clean) {\n return $this->xss_clean($array[$par]);\n }\n else\n return $array[$par];\n }\n else if($par == null) {\n if($xss_clean) {\n return $this->xss_clean($array);\n }\n else\n return $array;\n }\n else\n return false;\n }", "function wp_parse_str( $string, &$array ) {\n\tparse_str( $string, $array );\n\t$array = apply_filters( 'wp_parse_str', $array );\n}", "public function simpleXML2Array($xml){\n\n $array = (array)$xml;\n\n if (count($array) == 0) {\n $array = (string)$xml; \n }\n\n if (is_array($array)) {\n //recursive Parser\n foreach ($array as $key => $value){\n if (is_object($value)) {\n if(strpos(get_class($value),\"SimpleXML\")!==false){\n $array[$key] = $this->simpleXML2Array($value);\n }\n } else {\n $array[$key] = $this->simpleXML2Array($value);\n }\n }\n }\n\n return $array;\n \n }", "public function parse(string $str): ?array;", "protected function unserializeValue($value)\n\t{\n\t\tif ($value[0] == '{' || $value[0] == '[') {\n\t\t\treturn (array)json_decode($value, true);\n\t\t} elseif (in_array(substr($value, 0, 2), ['O:', 'a:'])) {\n\t\t\treturn (array)unserialize($value);\n\t\t} elseif (is_numeric($value)) {\n\t\t\treturn (array)$value;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t}", "abstract protected function unserializeData(array $data);", "private function parseJson(array $token)\n {\n $value = json_decode($token['value'], true);\n\n if ($error = json_last_error()) {\n // Legacy support for elided quotes. Try to parse again by adding\n // quotes around the bad input value.\n $value = json_decode('\"' . $token['value'] . '\"', true);\n if ($error = json_last_error()) {\n $token['type'] = self::T_UNKNOWN;\n return $token;\n }\n }\n\n $token['value'] = $value;\n return $token;\n }", "protected function parse()\n {\n if($this->isRelationalKey()){\n $this->parsedValue = $this->makeRelationInstruction();\n } \n else {\n $this->parsedValue = $this->parseFlatValue($this->value);\n } \n }", "protected function __resolve_parse($value)\n {\n $value = is_string($value) ? ['file' => $value] : $value;\n $value += [\n 'is_object' => true,\n 'is_root' => true,\n ];\n\n $parsed = $this->parseLater($value['file'], 'file', false);\n\n return\n $value['is_object']\n ? [$value['is_root'] ? '$newRoot' : '$new' => $parsed]\n : $parsed\n ;\n }", "function parseFieldList($dataArray) {\n\t\t$result = array();\n\n\t\tif (!is_array($dataArray)) {\n\t\t\treturn $result;\n\t\t}\n\n\t\tforeach($dataArray as $key => $data) {\n\t\t\t// remove the trailing '.'\n\t\t\t$result[] = substr($key, 0, -1);\n\t\t}\n\n\t\treturn $result;\n\t}", "protected function jsonDecode(array $data)\n {\n foreach ($data as &$value) {\n if (\\is_array($value)) {\n $value = $this->jsonDecode($value);\n } else {\n $value = json_decode($value, true);\n }\n }\n\n return $data;\n }", "function _postProcess() {\r\n $item = current($this->_struct);\r\n \r\n $ret = array('_name'=>$item['tag'], '_attributes'=>array(), '_value'=>null);\r\n\r\n if (isset($item['attributes']) && count($item['attributes'])>0) {\r\n foreach ($item['attributes'] as $key => $data) {\r\n if (!is_null($data)) {\r\n $item['attributes'][$key] = str_replace($this->_replaceWith, $this->_replace, $item['attributes'][$key]);\r\n }\r\n }\r\n $ret['_attributes'] = $item['attributes'];\r\n if ($this->attributesDirectlyUnderParent)\r\n $ret = array_merge($ret, $item['attributes']);\r\n }\r\n\r\n if (isset($item['value']) && $item['value'] != null)\r\n $item['value'] = str_replace($this->_replaceWith, $this->_replace, $item['value']);\r\n \r\n switch ($item['type']) {\r\n case 'open':\r\n $children = array();\r\n while (($child = next($this->_struct)) !== FALSE ) {\r\n if ($child['level'] <= $item['level'])\r\n break;\r\n \r\n $subItem = $this->_postProcess();\r\n \r\n if (isset($subItem['_name'])) {\r\n if (!isset($children[$subItem['_name']]))\r\n $children[$subItem['_name']] = array();\r\n \r\n $children[$subItem['_name']][] = $subItem;\r\n }\r\n else {\r\n foreach ($subItem as $key=>$value) {\r\n if (isset($children[$key])) {\r\n if (is_array($children[$key]))\r\n $children[$key][] = $value;\r\n else\r\n $children[$key] = array($children[$key], $value);\r\n }\r\n else {\r\n $children[$key] = $value;\r\n }\r\n }\r\n }\r\n }\r\n \r\n if ($this->childTagsDirectlyUnderParent)\r\n $ret = array_merge($ret, $this->_condenseArray($children));\r\n else\r\n $ret['_value'] = $this->_condenseArray($children);\r\n \r\n break;\r\n case 'close':\r\n break;\r\n case 'complete':\r\n if (count($ret['_attributes']) > 0) {\r\n if (isset($item['value']))\r\n $ret['_value'] = $item['value'];\r\n }\r\n else {\r\n\t\t\tif (isset($item['value'])) {\r\n\t\t\t\t$ret = array($item['tag']=> $item['value']);\r\n\t\t\t} else {\r\n\t\t\t\t$ret = array($item['tag']=> \"\");\r\n\t\t\t}\r\n }\r\n break;\r\n }\r\n\r\n //added by Dan Coulter\r\n\r\n \r\n /*\r\n foreach ($ret as $key => $data) {\r\n if (!is_null($data) && !is_array($data)) {\r\n $ret[$key] = str_replace($this->_replaceWith, $this->_replace, $ret[$key]);\r\n }\r\n }\r\n */\r\n return $ret;\r\n }", "function nest($array = false, $field='post_parent') {\n\t\tif(!$array || !$field) return;\n\t\t$_array = array();\n\t\t$_array_children = array();\n\t\t\n\t\t// separate children from parents\n\t\tforeach($array as $a) {\n\t\t\tif(!$a->post_parent) {\n\t\t\t\t$_array[] = $a;\n\t\t\t} else {\n\t\t\t\t$_array_children[$a->post_parent][] = $a;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// nest children and parents\n\t\tforeach($_array as $a) {\n\t\t\t$a->children = array();\n\t\t\tif(isset($_array_children[$a->ID])) $a->children = $_array_children[$a->ID];\n\t\t}\n\t\treturn $_array;\n\t}", "private static function consumeArray($contents,&$pos) {\n\t\t//Valid sample: [1,2,['bb','c'=>9],[1=>1,],]\n\t\t$startPos=$pos++;//save initial value of $pos to $startPos and also advance $pos to after the bracket\n\t\tDokser::skipWhitespaceAndComments($contents, $pos);//skip possible whitespace after [\n\t\twhile ($contents[$pos]!=']'){\n\t\t\tDokser::consumeValue($contents, $pos);//consume value, or actually alternatively key as it may be\n\t\t\tDokser::skipWhitespaceAndComments($contents, $pos);//skip whitespace after key/value\n\t\t\tif ($contents[$pos]=='=')//the consumed value was key, skip '=>' and let next iteration consume its value\n\t\t\t\t$pos+=2;\n\t\t\telse if ($contents[$pos]==',')//skip comma\n\t\t\t\t++$pos;\n\t\t\telse//if neither \",\" nor \"=>\" was encontered then it means $pos is now either at a value or \"]\" and then we\n\t\t\t\tcontinue;//we don't have to skip whitespace since it's already been done. otherwise if \",\" or \"=>\" was\n\t\t\tDokser::skipWhitespaceAndComments($contents, $pos);//found we need to skip whitespace after it\n\t\t}\n\t\t++$pos;//go past closing bracket\n\t\treturn substr($contents, $startPos,$pos-$startPos);//return the array-string including its brackets\n\t}", "protected function _parseArrayOptions($options)\n {\n $tmp = array();\n foreach ($options as $option) {\n $keys = explode('.', $option);\n $level = &$tmp;\n for ($i = 0; $i < count($keys) - 1; $i++) {\n if (!array_key_exists($keys[$i], $level)) {\n $level[$keys[$i]] = array();\n }\n $level = &$level[$keys[$i]];\n }\n $keyVal = explode('=', $keys[$i]);\n $level[$keyVal[0]] = $keyVal[1];\n unset($level);\n }\n\n return $tmp;\n }", "private function T_ARRAY($value) {\n\t\t$_convert = array('('=>'{',\t')'=>'}',);\n\t\t$js = $this->parseUntil(array(';'), $_convert, true);\n\t\tif (strpos($js, ':') === false) {\n\t\t\t$this->tmp = -1;\n\t\t\t$js = preg_replace_callback ('/([{, \\t\\n])(\\'.*\\')(|.*:(.*))([,} \\t\\n])/Uis', array($this, 'cb_T_ARRAY'), $js);\n\t\t}\n\t\treturn $js;\n\t}", "protected function arrayToObject($data)\n {\n if ($data) {\n if ($data['type'] == 'uri' or $data['type'] == 'bnode') {\n return $this->resource($data['value']);\n } else {\n return Literal::create($data);\n }\n } else {\n return null;\n }\n }", "protected function _parse($data)\n\t{\n\t\t// Start with an 'empty' array with no data.\n\t\t$current = array();\n\n\t\t// Loop until we're out of data.\n\t\twhile ($data !== '')\n\t\t{\n\t\t\t// Find and remove the next tag.\n\t\t\tpreg_match('/\\A<([\\w\\-:]+)((?:\\s+.+?)?)([\\s]?\\/)?' . '>/', $data, $match);\n\t\t\tif (isset($match[0]))\n\t\t\t{\n\t\t\t\t$data = preg_replace('/' . preg_quote($match[0], '/') . '/s', '', $data, 1);\n\t\t\t}\n\n\t\t\t// Didn't find a tag? Keep looping....\n\t\t\tif (!isset($match[1]) || $match[1] === '')\n\t\t\t{\n\t\t\t\t// If there's no <, the rest is data.\n\t\t\t\t$data_strpos = strpos($data, '<');\n\t\t\t\tif ($data_strpos === false)\n\t\t\t\t{\n\t\t\t\t\t$text_value = $this->_from_cdata($data);\n\t\t\t\t\t$data = '';\n\n\t\t\t\t\tif ($text_value !== '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$current[] = array(\n\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t'value' => $text_value\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If the < isn't immediately next to the current position... more data.\n\t\t\t\telseif ($data_strpos > 0)\n\t\t\t\t{\n\t\t\t\t\t$text_value = $this->_from_cdata(substr($data, 0, $data_strpos));\n\t\t\t\t\t$data = substr($data, $data_strpos);\n\n\t\t\t\t\tif ($text_value !== '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$current[] = array(\n\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t'value' => $text_value\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If we're looking at a </something> with no start, kill it.\n\t\t\t\telseif ($data_strpos !== false && $data_strpos === 0)\n\t\t\t\t{\n\t\t\t\t\t$data_strpos = strpos($data, '<', 1);\n\t\t\t\t\tif ($data_strpos !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$text_value = $this->_from_cdata(substr($data, 0, $data_strpos));\n\t\t\t\t\t\t$data = substr($data, $data_strpos);\n\n\t\t\t\t\t\tif ($text_value !== '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$current[] = array(\n\t\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t\t'value' => $text_value\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$text_value = $this->_from_cdata($data);\n\t\t\t\t\t\t$data = '';\n\n\t\t\t\t\t\tif ($text_value !== '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$current[] = array(\n\t\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t\t'value' => $text_value\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\n\t\t\t\t// Wait for an actual occurrence of an element.\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Create a new element in the array.\n\t\t\t$el = &$current[];\n\t\t\t$el['name'] = $match[1];\n\n\t\t\t// If this ISN'T empty, remove the close tag and parse the inner data.\n\t\t\tif ((!isset($match[3]) || trim($match[3]) !== '/') && (!isset($match[2]) || trim($match[2]) !== '/'))\n\t\t\t{\n\t\t\t\t// Because PHP 5.2.0+ seems to croak using regex, we'll have to do this the less fun way.\n\t\t\t\t$last_tag_end = strpos($data, '</' . $match[1] . '>');\n\t\t\t\tif ($last_tag_end === false)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$offset = 0;\n\t\t\t\twhile (true)\n\t\t\t\t{\n\t\t\t\t\t// Where is the next start tag?\n\t\t\t\t\t$next_tag_start = strpos($data, '<' . $match[1], $offset);\n\n\t\t\t\t\t// If the next start tag is after the last end tag then we've found the right close.\n\t\t\t\t\tif ($next_tag_start === false || $next_tag_start > $last_tag_end)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If not then find the next ending tag.\n\t\t\t\t\t$next_tag_end = strpos($data, '</' . $match[1] . '>', $offset);\n\n\t\t\t\t\t// Didn't find one? Then just use the last and sod it.\n\t\t\t\t\tif ($next_tag_end === false)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\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$last_tag_end = $next_tag_end;\n\t\t\t\t\t\t$offset = $next_tag_start + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Parse the insides.\n\t\t\t\t$inner_match = substr($data, 0, $last_tag_end);\n\n\t\t\t\t// Data now starts from where this section ends.\n\t\t\t\t$data = substr($data, $last_tag_end + strlen('</' . $match[1] . '>'));\n\n\t\t\t\tif (!empty($inner_match))\n\t\t\t\t{\n\t\t\t\t\t// Parse the inner data.\n\t\t\t\t\tif (strpos($inner_match, '<') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$el += $this->_parse($inner_match);\n\t\t\t\t\t}\n\t\t\t\t\telseif (trim($inner_match) !== '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$text_value = $this->_from_cdata($inner_match);\n\t\t\t\t\t\tif (trim($text_value) !== '')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$el[] = array(\n\t\t\t\t\t\t\t\t'name' => '!',\n\t\t\t\t\t\t\t\t'value' => $text_value\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If we're dealing with attributes as well, parse them out.\n\t\t\tif (isset($match[2]) && $match[2] !== '')\n\t\t\t{\n\t\t\t\t// Find all the attribute pairs in the string.\n\t\t\t\tpreg_match_all('/([\\w:]+)=\"(.+?)\"/', $match[2], $attr, PREG_SET_ORDER);\n\n\t\t\t\t// Set them as @attribute-name.\n\t\t\t\tforeach ($attr as $match_attr)\n\t\t\t\t{\n\t\t\t\t\t$el['@' . $match_attr[1]] = $match_attr[2];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Return the parsed array.\n\t\treturn $current;\n\t}", "protected function parseArrayElement(\\SimpleXMLElement $node) {\n\t\t\t$iList = new Common\\Mutable\\ArrayList();\n\t\t\t$children = $node->children();\n\t\t\tforeach ($children as $child) {\n\t\t\t\tswitch ($child->getName()) {\n\t\t\t\t\tcase 'array':\n\t\t\t\t\t\t$iList->addValue($this->parseArrayElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'dictionary':\n\t\t\t\t\t\t$iList->addValue($this->parseDictionaryElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'expression':\n\t\t\t\t\t\t$iList->addValue($this->parseExpressionElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'null':\n\t\t\t\t\t\t$iList->addValue($this->parseNullElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'undefined':\n\t\t\t\t\t\t$iList->addValue($this->parseUndefinedElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'value':\n\t\t\t\t\t\t$iList->addValue($this->parseValueElement($child));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new Throwable\\Instantiation\\Exception('Unable to initial class.');\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $iList->toArray();\n\t\t}", "private function isPlainArray($line) {\n\t//--\n\treturn (($line[0] == '[') && (substr($line, -1, 1) == ']'));\n\t//--\n}", "public static function parseTypeArray($type)\n {\n preg_match('/(.*)\\[(.*?)\\]$/', $type, $matches);\n if ($matches) {\n return $matches[2] === '' ? 'dynamic' : int($matches[2]);\n }\n return null;\n }", "abstract public function parse($data, $type);", "protected function _tree($array) {\n\n\t\t\t$root = array(\n\t\t\t\t'children' => array()\n\t\t\t);\n\t\t\t$current = &$root;\n\n\t\t\tforeach ($array as $i => $node) {\n\n\t\t\t\t$result = $this->_tag($node);\n\t\t\t\t\n\t\t\t\tif ($result) {\n\t\t\t\t\t\n\t\t\t\t\tif (isset($result['tag'])) {\n\t\t\t\t\t\t$tag = $result['tag'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$tag = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isset($result['arguments'])) {\n\t\t\t\t\t\t$arguments = $result['arguments'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$arguments = \"\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($tag) {\n\t\t\t\t\t\t// If segment does not contain a closer\n\t\t\t\t\t\tif (!$result['closer']) {\n\t\t\t\t\t\t\t// clean up syntax if segment is isolated and \n\t\t\t\t\t\t\t// preceded by an plain text segment\n\t\t\t\t\t\t\t$last = ArrayMethods::last($current['children']);\n\t\t\t\t\t\t\tif ($result['isolated'] && is_string($last)) {\n\t\t\t\t\t\t\t\tarray_pop($current['children']);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$current['children'][] = array(\n\t\t\t\t\t\t\t\t'index' => $i,\n\t\t\t\t\t\t\t\t'parent' => &$current,\n\t\t\t\t\t\t\t\t'children' => array(),\n\t\t\t\t\t\t\t\t'raw' => $result['source'],\n\t\t\t\t\t\t\t\t'tag' => $tag,\n\t\t\t\t\t\t\t\t'arguments' => $arguments,\n\t\t\t\t\t\t\t\t'delimiter' => $result['delimiter'],\n\t\t\t\t\t\t\t\t'number' => count($current['children'])\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$current = &$current['children'][count($current['children']) - 1];\n\t\t\t\t\t\t} else if (isset($current['tag']) && $result['tag'] == $current['tag']) {\n\t\t\t\t\t\t\t$start = $current['index'] + 1;\n\t\t\t\t\t\t\t$length = $i - $start;\n\t\t\t\t\t\t\t$current['source'] = implode(array_slice($array, $start, $length));\n\t\t\t\t\t\t\t$current = &$current['parent'];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$current['children'][] = array(\n\t\t\t\t\t\t\t'index' => $i,\n\t\t\t\t\t\t\t'parent' => &$current,\n\t\t\t\t\t\t\t'children' => array(),\n\t\t\t\t\t\t\t'raw' => $result['source'],\n\t\t\t\t\t\t\t'tag' => $tag,\n\t\t\t\t\t\t\t'arguments' => $arguments,\n\t\t\t\t\t\t\t'delimiter' => $result['delimiter'],\n\t\t\t\t\t\t\t'number' => count($current['children'])\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$current['children'][] = $node;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $root;\n\t\t}", "public function testPathSubArray()\n {\n $json = new JsonArray(['top1' => ['sub1.1' => 'top1.sub1.1.content']]);\n\n $json->set('top2', ['sub2.1' => []]);\n $json->set('top2/sub2.2', ['top2.sub2.2.content']);\n $this->assertEquals(['sub2.1' => [], 'sub2.2' => ['top2.sub2.2.content']], $json->get('top2'));\n $this->assertEquals([], $json->get('top2/sub2.1'));\n $this->assertEquals(['top2.sub2.2.content'], $json->get('top2/sub2.2'));\n $json->set('top2', 'top2.content');\n $this->assertEquals('top2.content', $json->get('top2'));\n }", "function parseIncomingData($origArr = array()) {\n\t\tglobal $TYPO3_DB;\n\n\t\tstatic $adodbTime = null;\n\n\t\t$parsedArr = array();\n\t\t$parsedArr = $origArr;\n\t\tif (is_array($this->conf['parseFromDBValues.'])) {\n\t\t\treset($this->conf['parseFromDBValues.']);\n\t\t\twhile (list($theField, $theValue) = each($this->conf['parseFromDBValues.'])) {\n\t\t\t\t$listOfCommands = t3lib_div::trimExplode(',', $theValue, 1);\n\t\t\t\tforeach($listOfCommands as $k2 => $cmd) {\n\t\t\t\t\t$cmdParts = split(\"\\[|\\]\", $cmd); // Point is to enable parameters after each command enclosed in brackets [..]. These will be in position 1 in the array.\n\t\t\t\t\t$theCmd = trim($cmdParts[0]);\n\t\t\t\t\tswitch($theCmd) {\n\t\t\t\t\t\tcase 'date':\n\t\t\t\t\t\tif($origArr[$theField]) {\n\t\t\t\t\t\t\t$parsedArr[$theField] = date( 'd.m.Y', $origArr[$theField]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$parsedArr[$theField]) {\n\t\t\t\t\t\t\tunset($parsedArr[$theField]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'adodb_date':\n\t\t\t\t\t\tif (!is_object($adodbTime))\t{\n\t\t\t\t\t\t\tinclude_once(PATH_BE_srfeuserregister.'pi1/class.tx_srfeuserregister_pi1_adodb_time.php');\n\n\t\t\t\t\t\t\t// prepare for handling dates before 1970\n\t\t\t\t\t\t\t$adodbTime = t3lib_div::makeInstance('tx_srfeuserregister_pi1_adodb_time');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif($origArr[$theField]) {\n\t\t\t\t\t\t\t$parsedArr[$theField] = $adodbTime->adodb_date( 'd.m.Y', $origArr[$theField]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$parsedArr[$theField]) {\n\t\t\t\t\t\t\tunset($parsedArr[$theField]);\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}\n\t\t}\n\n\t\t$fieldsList = array_keys($parsedArr);\n\t\tforeach ($this->tca->TCA['columns'] as $colName => $colSettings) {\n\t\t\tif (in_array($colName, $fieldsList) && $colSettings['config']['type'] == 'select' && $colSettings['config']['MM']) {\n\t\t\t\tif (!$parsedArr[$colName]) {\n\t\t\t\t\t$parsedArr[$colName] = '';\n\t\t\t\t} else {\n\t\t\t\t\t$valuesArray = array();\n\t\t\t\t\t$res = $TYPO3_DB->exec_SELECTquery(\n\t\t\t\t\t\t'uid_local,uid_foreign,sorting',\n\t\t\t\t\t\t$colSettings['config']['MM'],\n\t\t\t\t\t\t'uid_local='.intval($parsedArr['uid']),\n\t\t\t\t\t\t'',\n\t\t\t\t\t\t'sorting');\n\t\t\t\t\twhile ($row = $TYPO3_DB->sql_fetch_assoc($res)) {\n\t\t\t\t\t\t$valuesArray[] = $row['uid_foreign'];\n\t\t\t\t\t}\n\t\t\t\t\t$parsedArr[$colName] = implode(',', $valuesArray);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $parsedArr;\n\t}", "abstract public function parse ();", "private static function parseVersions($arr)\n\t{\n\t\t$return = false;\n\t\tif (count($arr) > 0) {\n\t\t\tif (array_key_exists('version', $arr)) {\n if (is_object($arr['version'])) {\n $version = $arr['version'];\n $attr = $version->attributes();\n switch ($attr['type']) {\n case 'VERSION_FOLDER':\n $return = array_merge(\n $return,\n (array)self::parseVersions((array)$version)\n );\n break;\n\n case 'ACTUALS':\n continue;\n case 'PLANNING':\n $return[] = array(\n 'name' => (string)$attr['name'],\n 'type' => (string)$attr['type'],\n 'default' => (string)$attr['isDefaultVersion']\n );\n break;\n }\n } else {\n\t\t\t\t$return = array();\n $versions = $arr['version'];\n\t\t\t\t foreach ($versions as $version) {\n\t\t\t\t\t $attr = $version->attributes();\n\t\t\t\t\t switch ($attr['type']) {\n\t\t\t\t\t\t case 'VERSION_FOLDER':\n\t\t\t\t\t\t\t $return = array_merge(\n $return,\n (array)self::parseVersions((array)$version)\n );\n\t\t\t\t\t\t\t break;\n\n\t\t\t\t\t\t case 'ACTUALS':\n\t\t\t\t\t\t\t continue;\n\t\t\t\t\t\t case 'PLANNING':\n\t\t\t\t\t\t\t $return[] = array(\n\t\t\t\t\t\t\t\t 'name' => (string)$attr['name'],\n\t\t\t\t\t\t\t\t 'type' => (string)$attr['type'],\n\t\t\t\t\t\t\t\t 'default' => (string)$attr['isDefaultVersion']\n\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t\t }\n }\n\t\t\t}\n\t\t}\n\t\tif (is_array($return)) {\n\t\t\tsort($return);\n\t\t}\n\t\treturn $return;\n\t}", "protected function jsonDecode(array $data)\n {\n foreach ($data as &$value) {\n if (is_array($value)) {\n $value = $this->jsonDecode($value);\n } else {\n $value = json_decode($value, true, 512, JSON_THROW_ON_ERROR);\n }\n }\n\n return $data;\n }", "function sanitizeArray($data = array())\r\n{\r\n foreach ($data as $k => $v) {\r\n if (!is_array($v) && !is_object($v)) { // deep enough to only be values? sanitize them now.\r\n $data[$k] = sanitizeValue($v);\r\n }\r\n if (is_array($v)) { // go deeper\r\n $data[$k] = sanitizeArray($v);\r\n }\r\n }\r\n return $data;\r\n}", "function widgetopts_sanitize_array( &$array ) {\n foreach ($array as &$value) {\n if( !is_array($value) ) {\n\t\t\t// sanitize if value is not an array\n $value = sanitize_text_field( $value );\n\t\t}else{\n\t\t\t// go inside this function again\n widgetopts_sanitize_array($value);\n\t\t}\n }\n\n return $array;\n}", "abstract public function array2Data($arr);" ]
[ "0.66442025", "0.63293284", "0.62897044", "0.61981785", "0.61588895", "0.59986705", "0.5984716", "0.58424723", "0.57783055", "0.576507", "0.566837", "0.56248873", "0.56247383", "0.5606372", "0.55716664", "0.55678403", "0.555264", "0.55389094", "0.55162144", "0.5487364", "0.5486142", "0.5461385", "0.54269445", "0.5384384", "0.5370886", "0.53471416", "0.5342243", "0.53229123", "0.5303288", "0.5298099", "0.5287076", "0.5277548", "0.5263003", "0.52401024", "0.52288264", "0.52099866", "0.52087796", "0.52012765", "0.51858836", "0.51856726", "0.5182591", "0.5170887", "0.5169515", "0.5169515", "0.5169515", "0.5169515", "0.51643497", "0.5160608", "0.515988", "0.5140229", "0.5133909", "0.51293314", "0.51293314", "0.51293314", "0.5124002", "0.5120805", "0.51197624", "0.5112236", "0.51100636", "0.51041806", "0.5098927", "0.5088826", "0.5087799", "0.5082002", "0.50814897", "0.50785655", "0.50675035", "0.5064285", "0.5058539", "0.50558347", "0.5053734", "0.50529605", "0.50520265", "0.50498295", "0.50402707", "0.5038166", "0.5033398", "0.50312537", "0.5027646", "0.5023674", "0.5010308", "0.50023866", "0.49929738", "0.49895582", "0.4985219", "0.49851206", "0.49805415", "0.49790597", "0.49668416", "0.4963237", "0.49599192", "0.4957009", "0.49390393", "0.49373388", "0.49268004", "0.49247855", "0.4916934", "0.49152756", "0.49121505", "0.49089912", "0.49020645" ]
0.0
-1
Lists all Follow models.
public function actionIndex() { $searchModel = new FollowSearch (); $dataProvider = $searchModel->search ( Yii::$app->request->queryParams ); return $this->render ( 'index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider ] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOwnerFollows()\n {\n return $this->http->get('/users/%s/follows', 'self');\n }", "public function followers()\n {\n return $this->hasMany(Models\\AccountFollower::class, 'account_id');\n }", "public function followables()\n\t{\n\t\treturn $this->morphMany(Followable::class, 'follower');\n\t}", "public function FollowingList()\n {\n return $this->belongsToMany('App\\User', 'user_following', 'user_id', 'following_id' );\n }", "public static function getFollowers(){\n\n\t}", "public function Followers()\n {\n return $this->belongsToMany('App\\User', 'user_following', 'following_id', 'user_id' );\n }", "public function followers(){\n return $this->hasMany('App\\Models\\Follow','user_id_follower');\n }", "public function followers() {\n return $this->belongsToMany(User::class);\n }", "public function index()\n {\n $user = auth()->user();\n $test = $user->followings()->get();\n return UserResource::collection($test)\n ->additional(ResponseHelper::additionalInfo());\n }", "public function follows() {\n return $this->belongsToMany(User::class, 'follows', 'user_id', 'following_user_id');\n }", "public function index()\n {\n $title = 'Seguimiento';\n $follows = Auth::user()->follows()->with(['user'])->paginate(10);\n $followers = Auth::user()->followers()->with(['user'])->paginate(10);\n\n return view('app.follows.index', compact('follows','followers','title'));\n }", "function listAll() {\n //$limit = 1000;\n //$offset = (max(1, $page) - 1) * $limit;\n $uid = userInfo('uid');\n $model = Model::load('FriendModel');\n $friends = $model->getAll($uid);\n// $db = Database::create();\n// $r = $db->read(\"select * from Users limit $offset, $limit\");\n// $c = $db->read(\"select count(*) as c from Users\");\n// $total = intval($c[0]['c']);\n//\n// $r = array_map([User::class, 'mapper_user_list'], $r);\n\n View::load('user_list', [\n 'total' => count($friends),\n //'total_page' => ceil($total / $limit),\n 'friend_list' => $friends\n ]);\n }", "public function following()\n {\n return $this->hasMany(Models\\AccountFollower::class, 'follower_account_id');\n }", "public function following() {\n // Need to explicitly state table name follows or else the table will look for user_users\n return $this->belongsToMany(User::class, 'follows');\n }", "public function getFollowers()\n {\n return $this->followers;\n }", "public static function getFollowers() {\n $db = Db::instance();\n $q = \"SELECT * FROM `\".self::DB_TABLE.\"`\";\n $result = $db->query($q);\n\n $followers = array();\n if($result->num_rows != 0) {\n while($row = $result->fetch_assoc()) {\n $followers[] = self::getFollower($row['id']);\n }\n }\n return $followers;\n }", "public function getFollowers()\n {\n $data = [];\n \n foreach(Users::find(authApi()->user()->id)->followers()->get() as $user){\n $user->profile_pic = getImage($user->profile_pic);\n \n $user['isFollowed'] = authApi()->user() ? \n Follow::where('followed_id', $user->id)->where('user_id', authApi()->user()->id)->first() \n ? true : false : false;\n $data[] = $user;\n }\n \n $json['data']['followers'] = $data;\n\n return response()->json($json, 200);\n }", "public function index(Request $request)\n {\n $following = $request->user()->following()->get();\n\n return response()->json(['data' => $following], 200);\n }", "public function viewAll($params){\n $token = $this->require_authentication();\n\n if ($token == null) {\n $this->error404($params[0]);\n return;\n }\n $db = $this->getDBConn();\n\n // Fetch the user list\n $users = User::fetchAll($db);\n $currUser = $token->getUser();\n $follow = new Following();\n if ($users == null) {\n $this->addFlashMessage(\"Unable to fetch users: Unknown Error\", self::FLASH_LEVEL_SERVER_ERR);\n $this->redirect('/');\n }\n\n\n include_once \"app/views/user/users.phtml\";\n }", "public function getFollowUpInfoList() {\n return $this->_get(3);\n }", "public function getFollowedByList($perPage = null)\n {\n return $this->getOrPaginateFollowedBy($this->getFollowedByQueryBuilder(), $perPage);\n }", "public function followers()\n {\n return $this->belongsToMany(User::class, 'followers', 'follower_id', 'user_id')->withTimestamps();\n }", "public function getFollowings()\n {\n $data = [];\n \n foreach(Users::find(authApi()->user()->id)->followings()->get() as $user){\n $user->profile_pic = getImage($user->profile_pic);\n \n $user['isFollowed'] = authApi()->user() ? \n Follow::where('followed_id', $user->id)->where('user_id', authApi()->user()->id)->first() \n ? true : false : false;\n $data[] = $user;\n }\n \n $json['data']['followings'] = $data;\n\n return response()->json($json, 200);\n }", "public function following(){\n return $this->belongsToMany('User', 'followers', 'user_id', 'follow_id')->withTimestamps();\n }", "public function follows()\n {\n // a user can follow many users\n // because the relational table does not follow convention in this case ie. user_user we have to set it\n // we also have to specify the foreign id's\n return $this->belongsToMany(User::class, 'follows', 'user_id', 'following_user_id')->withTimestamps();\n }", "public function actionFollowing()\n\t{\n\t\tif(!Yii::app()->user->isGuest)\n\t\t{\n\t\t\t$this->layout='front_layout';\n\t\t\tYii::app()->clientScript->registerCoreScript('jquery'); \n\t\t\t$id=Yii::app()->user->id;\n\t\t\t$criteria = new CDbCriteria();\n\t\t\t$criteria->condition = \"t.user_id=$id and exists(select * from photos where user_id=t.follow_id)\";\n\t\t\t$criteria->limit=2;\n\t\t\t$allusersphotos=UsersFollow::model()->with('follow', 'follow.userDetails', 'follow.photos')->findAll($criteria); \n\t\t\t$this->render('following', array('photos'=>$allusersphotos));\n\t\t}\n\t\telse\n\t\tYii::app()->end();\n\t}", "public function getFollowers()\n {\n $savedFollowers = $this->getSavedFollowers();\n \n if ($latestFollowers = $this->getUpdatedFollowers()) {\n $this->saveUnfollowers($savedFollowers, $latestFollowers);\n return $latestFollowers;\n }\n \n return $savedFollowers;\n }", "public function followers(){\n return $this->belongsToMany('User', 'followers', 'follow_id', 'user_id')->withTimestamps();\n }", "public function get_FollowingList($user_id){\r\n $this->db->select(\"followers.user_id,followers.follower_id,followers.created_at,users.full_name,users.user_name,users.picture\");\r\n $this->db->from('followers');\r\n $this->db->order_by(\"full_name\", \"asc\");\r\n $this->db->join('users','users.user_id = followers.user_id');\r\n $this->db->where('followers.follower_id',$user_id);\r\n $followinglist=$this->db->get();\r\n return $followinglist->result();\r\n }", "public function timeline() {\n // Include all the user's posts\n $ids = $this->follows()->pluck('id');\n $ids->push($this->id);\n // And the posts from the people that he/she follows\n return Post::whereIn('user_id', $ids)\n ->withLikes()\n ->latest()\n ->paginate(10);\n }", "public function getFollowerList(Request $request)\n { \n $input = $request->input();\n\n $validator = Validator::make($input, [\n 'businessId' => 'required|integer',\n 'index' => 'required',\n 'limit' => 'required',\n ]);\n\n if ($validator->fails()) {\n return response()->json(['status' => 'exception','response' => $validator->errors()->first()]); \n }\n\n $userIds = BusinessFollower::whereBusinessId($input['businessId'])->pluck('user_id');\n $response = User::select('first_name', 'middle_name', 'last_name', 'email', 'image')->whereIn('id', $userIds)->skip($input['index'])->take($input['limit'])->get();\n\n if (count($response) > 0) {\n return response()->json(['status' => 'success','response' => $response]); \n } else {\n return response()->json(['status' => 'exception','response' => 'No follower found.']); \n } \n }", "public function allUsersYouAreFollowing($id)\n {\n $perPage = 3;\n return $this->where(['followed_userid'=>$id])->with('followers')->paginate($perPage);\n }", "public function list()\n {\n $data = Model::with('user')->get()->toArray();\n return $this->responseData($data);\n }", "public function list()\n {\n $listUsers = AppUser::findAll();\n $this->show('back/user/list', [\"users\" => $listUsers]);\n }", "public function twitterFollowersList(array $args = array()) {\n\n $app = $this->getContainer();\n\n // Get values from config\n $extensionConfig = $this->getConfig();\n $config = $app['config']->get('general');\n\n // Set our request method\n $requestMethod = 'GET';\n\n // Create our API URL\n $baseUrl = \"https://api.twitter.com/1.1/followers/list.json\";\n $fullUrl = $this->constructFullUrl($baseUrl, $args);\n\n // Setup our Oauth values array with values as per docs\n $oauth = $this->setOauthValues($requestMethod, $baseUrl, $args);\n\n // Create header string to set in our request\n $header = array($this->buildHeaderString($oauth));\n\n $key = 'followerslist-'.md5($fullUrl);\n if ($app['cache']->contains($key) && $extensionConfig['cache_time'] > 0) {\n // If this request has been cached and setting is not disabling cache, then retrieve it\n $result = $app['cache']->fetch($key);\n } else {\n // If not in cache then send our request to the Twitter API with appropriate Authorization header as per docs\n try {\n $result = $app['guzzle.client']->get($fullUrl, ['headers' => ['Authorization' => $header]])->getBody(true);\n } catch(\\Exception $e) {\n return ['error' => $e->getMessage()];\n }\n // Decode the JSON that is returned\n $result = json_decode($result, true);\n $app['cache']->save($key, $result, $extensionConfig['cache_time']);\n }\n\n return $result;\n }", "public function getOwnerFollowedBy()\n {\n return $this->http->get('/users/%s/followed-by', 'self');\n }", "public function following($model = null)\n {\n return $this->morphToMany(($model) ?: $this->getMorphClass(), 'follower', 'followers', 'follower_id', 'followable_id')\n ->withPivot('followable_type')\n ->wherePivot('followable_type', ($model) ?: $this->getMorphClass())\n ->wherePivot('follower_type', $this->getMorphClass())\n ->withTimestamps();\n }", "public function actionList()\r\n {\r\n $this->_userAutehntication();\r\n switch($_GET['model'])\r\n {\r\n case 'posts': \r\n $models = Post::model()->findAll();\r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Error: Mode <b>list</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n if(is_null($models)) {\r\n $this->_sendResponse(200, sprintf('No Post found for model <b>%s</b>', $_GET['model']) );\r\n } else {\r\n $rows = array();\r\n foreach($models as $model)\r\n $rows[] = $model->attributes;\r\n\r\n $this->_sendResponse(200, CJSON::encode($rows));\r\n }\r\n }", "public function viewFollowingList($username)\n\t{\n\t\t$data['user'] = User::whereRaw('username = ?', array($username))->first();\n\t}", "public function all()\n {\n if (!$this->isLogged()) exit;\n $this->oUtil->getModel('Todo');\n $this->oModel = new \\TestProject\\Model\\Todo;\n\n $this->oUtil->oTodos = $this->oModel->getAll();\n\n $this->oUtil->getView('index');\n }", "protected function renderFollowing() {\n $auth = new \\tweeterapp\\auth\\TweeterAuthentification();\n $html = '<h2>Liste des utilisateurs suivis</h2><ul id=\"followees\">';\n $user = User::where('username','=',$auth->user_login)->first();\n $liste_following = $user->follows()->get();\n foreach($liste_following as $l) {\n $html .= ' <li>\n <div class=\"tweet\">\n <div class=\"tweet-text\"><a href=\"'.Router::urlFor('user',[\"id\" => $l->id]).'\">'.$l->fullname.'</a></div>\n </div>\n </li>';\n }\n $html .= '</ul>';\n return $html;\n }", "public static function followers ( $list = false ) {\n\n\t\tstatic::api()->request('GET', static::api()->url('1.1/followers/ids'), array(\n\t\t\t'screen_name' => static::$screen_name\n\t\t));\n\n\t\t$response = static::api()->response['response'];\n\t\t$code = static::api()->response['code'];\n\n\t\tif ($code === 200) {\n\t\t\t$response = json_decode($response, false, 512, JSON_BIGINT_AS_STRING);\n\t\t\tif ($list === TRUE) {\n\t\t\t\treturn static::users($response->ids);\n\t\t\t} else {\n\t\t\t\treturn count($response->ids);\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\n\t}", "function showFollowers($userid){\n $res = $this->db->get_where(\"following\", array('follower_id' => $userid));\n $followerFound = array();\n foreach($res->result() as $row){\n $followerFound[] = new Follower($row->user_id,$row->follower_id,$row->user_name,$row->follower_name);\n }\n return $followerFound;\n }", "public function followings()\n\t{\n\t\treturn $this->belongsToMany('Competition', 'followings');\n\t}", "public function followers($options = []);", "public function getSeguidores()\n {\n return $this->hasMany(Follow::className(), ['follow_id' => 'id'])->inverseOf('follow');\n }", "public function followers()\n {\n return $this->belongsTo('App\\Models\\User','userid','id');\n }", "function showFollowing($userid){\n $res = $this->db->get_where(\"following\", array('user_id' => $userid));\n $followerFound = array();\n foreach($res->result() as $row){\n $followerFound[] = new Follower($row->user_id,$row->follower_id,$row->user_name,$row->follower_name);\n }\n return $followerFound;\n }", "public function index(){\n \t\n \t$users = auth()->user()->following()->pluck('profiles.user_id');\n \t\n \t$posts = post::whereIn('user_id', $users)->latest()->get();\n\n \treturn view('posts.index', compact('posts'));\n }", "function index(){\n\n \n $users = $this->User_model->all();\n\n $data = array();\n $data['users'] = $users;\n\n $this->load->view('list', $data);\n }", "public function actionList() {\n $models = Post::model()->findAll();\n $rows = array();\n foreach($models as $model) \n $rows[] = $model->attributes;\n\t\t$data_response = array(\n\t\t\t'error'=> array('status'=>200, 'message'=>''),\n\t\t\t'datas'=>$rows\n\t\t);\n $this->response($data_response);\n }", "public function user_followers() {\n\t\t\tif ($this->request->is('get')) {\n\t\t\t\t$user_id = $_GET['user_id'];\n\t\t\t\t\n\t\t\t\t$userFollowers = ClassRegistry::init('users_followings')->find('all' ,array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'fields'=>array('users_followings.id, users_profiles.firstname, users_profiles.lastname , users_profiles.photo, users_profiles.handler,users_profiles.user_id,users_profiles.tags'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'joins'=>array(array('alias' => 'users_profiles', 'table' => 'users_profiles', 'type' => 'left', 'foreignKey' => false, 'conditions' => array('users_followings.user_id = users_profiles.user_id'))),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conditions'=>array('users_followings.following_id='.$user_id.' AND users_followings.following_type=\"users\" AND users_followings.status=2')));\n\t\t\t\t$this->set('userFollowers',$userFollowers);\n\t\t\t\t\n\t\t\t\t/*Tweet count for current user*/\n\t$tweets_count_added_user= ClassRegistry::init('tweets')->find('all',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('conditions'=>array('tweets.user_id='.$user_id.' AND tweets.status=2')));\n\t\t\n\t$this->set('tweets_count_added_user',sizeof($tweets_count_added_user));\n\n\t\t\t\t\t/************************************** To show user following and followers ***********************/\n\t\t\t\t$userFollowings = ClassRegistry::init('users_followings')->find('all' ,array('fields'=>array('users_followings.id,users_followings.status, count(users_followings.following_id) as total_following'),'conditions'=>array('users_followings.user_id='.$user_id.' AND users_followings.following_type=\"users\" AND users_followings.status=2')));\n\t\t\n\t\t$userFollows = ClassRegistry::init('users_followings')->find('all' ,array('fields'=>array('users_followings.id,users_followings.status ,count(users_followings.user_id) as total_follow'),'conditions'=>array('users_followings.following_id='.$user_id.' AND users_followings.following_type=\"users\" AND users_followings.status=2')));\n\t\t\n\t\t\n\t\t$userFollowingsbyYou = $userFollowings[0][0];\n\t\t$userFollowingsbyYou = $userFollowingsbyYou['total_following'];\n\t\t$this->set('following',$userFollowingsbyYou);\n\t\t\n\t\t$userFollowYou = $userFollows[0][0];\n\t\t$userFollowYou = $userFollowYou['total_follow'];\n\t\t$this->set('followers',$userFollowYou);\t\t\n\t\t$this->set('userName',$this->userInfo['users_profiles']);\n\t\t\t}\n\t\t$this->autorender = false;\n\t $this->layout = false;\n\t $this->render('user_followers');\n\t}", "function showfollowing($id)\n\t{\n\t\t$this->load->model('user_model');\n\t\t\n\t\t$this->load->model('user_social_model');\n \t$data['user'] = $this->user_model->load($id);\n \t$data['social_list'] = $this->user_social_model->loadByUser($id);\n\t\t$data['users'] = $this->user_model->find_following($id);\n\t\t\n\t\t$data['user'] = $this->user_model->load($id);\n\t\t$this->load->model('item_model');\n $data['view_num'] = $this->item_model->get_sum_viewnum($id);\n $data['fav_num'] = $this->item_model->get_sum_favnum($id);\n $this->load->model('item_fav_model');\n\t\t$data['likes_num'] = $this->item_fav_model->count_item_favs(array('uid'=>$id));\n\t\t$this->load->model('item_model');\n\t\t$res= $this->item_model->find_items(array('user'=>$id),0);\n\t\t$data['works_num']= count($res);\n\t\t\t$taglist = Array();\n\t\t\tforeach($res as $item){\n\t\t\t\t$itemtaglist = explode(\" \",$item['tags']);\n\t\t\t\tforeach($itemtaglist as $tag){\n\t\t\t\t\tif(!in_array($tag,$taglist)){\n\t\t\t\t\t\tif($tag!='')\n\t\t\t\t\t\tarray_push($taglist,$tag);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t$data['tags'] = $taglist;\n\t\t$this->load->model('user_follow_model');\n\t\tif ($this->session->userdata('id')!=null){\n\t \t\t$data['follow'] = $this->user_follow_model->loadByUserAndFav($id,$this->session->userdata('id'));\n\t }\n\t\t\t$this->load->model('country_model');\n\t\t\t$country = $this->country_model->load($data['user']['countryCode']);\n\t\t\t$data['country_name'] = $country['full_name'];\n\t\t\t$data['nav']= 'profile';\n\t\t\t$data['feature']= 'following';\n\t\t$this->load->view('user/user_follow',$data);\n\t}", "public function getAllUsers(Request $request)\n { \n $users = User::all();\n foreach($users as $user){\n $user->followers = Follow::where('userId', $user->id)->count();\n $user->following = Follow::where('followedBy', $user->id)->count();\n $user->recipes = Recipe::where('userId', $user->id)->count();\n $user->saveCount = Favorite::where('userId', $user->id)->where('commentId', null)->count();\n $user->followingThisUser = false;\n $user->followedByThisUser = false;\n if(Follow::where('followedBy', $request->userID)->where('userId', $user->id)->count() == 1){\n $user->followingThisUser = true;\n }\n if(Follow::where('followedBy', $user->id)->where('userId', $request->userID)->count() == 1){\n $user->followedByThisUser = true;\n }\n }\n\n return response()->json([\n 'status' => 200,\n 'message' => 'User accounts have been fetched',\n 'data' => $users\n ], 200);\n }", "public function getList() {\n\t\t$this->request = array('uri' => array('path' => 'users.json'));\n\n\t\treturn $this->find('all');\n\t}", "public function getUserFollowers($userId);", "public function users() {\n # Set up the View\n $this->template->content = View::instance(\"v_requests_users\");\n $this->template->title = \"Follow Others Prayer Rquests\";\n # query list of all users (except current user who is automatically followed)\n $q = \"SELECT * FROM users WHERE users.user_id !=\".$this->user->user_id;\n\n $users = DB::instance(DB_NAME)->select_rows($q);\n\n # Build query to get all the users from users_users followed by this user\n $q = \"SELECT *\n FROM users_users\n WHERE users_users.user_id = \".$this->user->user_id;\n \n # use select_array APi with user_id_followed as index\n # to facilitate view display code\n $connections = DB::instance(DB_NAME)->select_array($q, 'user_id_followed');\n\n # Pass data to the view\n $this->template->content->users = $users;\n $this->template->content->connections = $connections;\n # Render this view\n\n echo $this->template; \n\n }", "public function index()\n {\n return view('home', ['posts' => Post::query()->whereIn('user_id', Auth::user()->followings()->where('status', 1)->get()->pluck('id')->push(Auth::id()))->with(['user.media','media','comments','likes'])->latest()->get()]);\n }", "public function user_following() {\n\t\t\tif ($this->request->is('get')) {\n\t\t\t\t$user_id = $_GET['user_id'];\n\t\t\t\t\n\t\t\t\t$userFollowings = ClassRegistry::init('users_followings')->find('all' ,array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'fields'=>array('users_followings.id, users_profiles.firstname, users_profiles.lastname , users_profiles.photo, users_profiles.handler,users_profiles.user_id,users_profiles.tags'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'joins'=>array(array('alias' => 'users_profiles', 'table' => 'users_profiles', 'type' => 'left', 'foreignKey' => false, 'conditions' => array('users_followings.following_id = users_profiles.user_id'))),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'conditions'=>array('users_followings.user_id='.$user_id.' AND users_followings.following_type=\"users\" AND users_followings.status=2')));\n\t\t\t\t$this->set('userFollowings',$userFollowings);\n\t\t\t\t\n\t\t\t\t/*Tweet count for current user*/\n\t$tweets_count_added_user= ClassRegistry::init('tweets')->find('all',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('conditions'=>array('tweets.user_id='.$user_id.' AND tweets.status=2')));\n\t\t\n\t$this->set('tweets_count_added_user',sizeof($tweets_count_added_user));\n\n\t\t\t\t\t/************************************** To show user following and followers ***********************/\n\t\t\t\t$userFollowings = ClassRegistry::init('users_followings')->find('all' ,array('fields'=>array('users_followings.id,users_followings.status, count(users_followings.following_id) as total_following'),'conditions'=>array('users_followings.user_id='.$user_id.' AND users_followings.following_type=\"users\" AND users_followings.status=2')));\n\t\t\n\t\t$userFollows = ClassRegistry::init('users_followings')->find('all' ,array('fields'=>array('users_followings.id,users_followings.status ,count(users_followings.user_id) as total_follow'),'conditions'=>array('users_followings.following_id='.$user_id.' AND users_followings.following_type=\"users\" AND users_followings.status=2')));\n\t\t\n\t\t\n\t\t$userFollowingsbyYou = $userFollowings[0][0];\n\t\t$userFollowingsbyYou = $userFollowingsbyYou['total_following'];\n\t\t$this->set('following',$userFollowingsbyYou);\n\t\t\n\t\t$userFollowYou = $userFollows[0][0];\n\t\t$userFollowYou = $userFollowYou['total_follow'];\n\t\t$this->set('followers',$userFollowYou);\t\t\n\t\t$this->set('userName',$this->userInfo['users_profiles']);\n\t\t\t}\n\t\t$this->autorender = false;\n\t $this->layout = false;\n\t $this->render('user_following');\n\t}", "public function users_list() {\n return response()->json(User::latest()->get());\n }", "public function run()\n {\n $users = User::all();\n $user = $users[0];\n $user_id = $user->id;\n\n // 取出除第一个用户的以外的所有用户的id\n $followers = $users->filter(function ($data) use ($user_id) {\n return $user_id != $data['id'];\n });\n $follower_ids = array_column($followers->toArray(), 'id');\n\n // 第一个用户关注除自己之外的所有用户\n $user->follow($follower_ids);\n\n // 除了第一个用户之外所有用户都关注第一个用户\n foreach ($followers as $follower) {\n $follower->follow($user_id);\n }\n }", "public function get_following_by_user(Request $request)\n {\n $input = $request->all();\n $user = auth()->user();\n\n $follows = DB::select('select * from users , follows where users.id = follows.idfollowing and follows.user_id = ?', [$user->id]);\n return response()->json(['code' => '200', 'result' => $follows]);\n }", "public function index(){\n\t\t$users = $this->User->find(\"users\", \"all\");\t\n\t\t$this->set(\"users\", $users);\n\t}", "public function index()\r\n {\r\n \r\n $genres = Genre::all();\r\n $user_id = Auth::user()->id;\r\n $followers = array();\r\n $user = User::find($user_id);\r\n \r\n foreach($user->genres as $genre){\r\n $follower_array[] = array(\r\n 'name'=>$user->username,\r\n 'genre'=>$genre->genre\r\n );\r\n } \r\n\r\n //$genre_array = $\r\n //return $users->follower->fname;\r\n //$follower = $users->followers->first();\r\n return $follower_array;\r\n }", "public function model()\n {\n return CompanyFollower::class;\n }", "public function index() {\n $rows = AdminUser::paginate(10);\n return View::make(\"CoreCms::user.listing\")->with(\"models\", $rows);\n }", "public function following()\n {\n \t$following = DB::table('followers')\n \t\t->left_join('users', 'users.id', '=', 'followers.following_id')\n \t\t->where('followers.follower_id', '=', $this->id)\n \t\t->where(\"followers.isCurrent\", \"=\", 1)\n \t\t->get();\n \treturn $following;\n }", "public function index()\n {\n $users = User::all();\n }", "public function getList(){\n\t\t$model=new Model();\n\t\treturn $model->select(\"SELECT * FROM tb_usuarios ORDER BY idusuario\");\n\t}", "public function getAllFollowers($id,$number=20)\n {\n $follwers = Followers::where('user_id',$id)->select('follower_id')->get();\n $userId = [];\n foreach ($follwers as $follwer)\n $userId[] = $follwer->follower_id;\n return User::whereIn('id',$userId)->paginate($number);\n\n }", "public function getPostsFollowing(){\n\n\t\t$sql = new Sql;\n\n\t\t$results = $sql->select(\"SELECT uhp.id ,uhp.iduser, uhp.description,uhp.dtpost,u.username,u.name,phi.id_post,u.img_profile,(select count(*) from post_has_comment where id_post = uhp.id) as qtdComments FROM user_has_post uhp\n\t\t\tINNER JOIN users u ON(u.iduser = uhp.iduser)\n\t\t\tleft JOIN post_has_img phi ON(phi.id_post = uhp.id )\n\t\t\tleft JOIN user_follow uf ON( uf.idfollower = 4)\n\t\t\twhere uhp.iduser = uf.idfollowing OR uhp.iduser = :iduser\n\t\t\torder by uhp.dtpost desc\",[\n\t\t\t\t\":iduser\"\t=>\t$_SESSION[User::SESSION]['iduser']\n\t\t\t]);\n\n\t\treturn $results;\n\t}", "public function friends()\n {\n return $this->hasMany(Models\\AccountFriend::class, 'account_id');\n }", "public function following()\n {\n return $this->belongsTo('App\\Models\\User','followed_userid','id');\n }", "public function run()\n {\n //\n $users = User::all();\n $user = $users->first();\n $user_id = $user->id;\n\n $users = $users->slice(1);\n\n // 第一个用户关注所有用户\n $user->follow($users->pluck(\"id\")->toArray());\n\n // 除了第一个用户之外,所有用户都关注第一个用户\n foreach ($users as $user) {\n $user->follow($user_id);\n }\n }", "public static function findAll()\r\n {\r\n $dbConn = DBModel::getConnection();\r\n $stmt = $dbConn->prepare('\r\n SELECT * FROM edit_pageuser\r\n ');\r\n $stmt->execute();\r\n $stmt->setFetchMode(PDO::FETCH_CLASS, 'PageUserModel');\r\n return $stmt->fetchAll();\r\n }", "public function list()\n {\n// $owner->name = 'admin';\n// $owner->display_name = 'Project Owner';\n// $owner->description = 'User is the owner of a given project';\n// $owner->save();\n//\n// $createPost = new Permission();\n// $createPost->name = 'create-post';\n// $createPost->display_name = 'Create Posts';\n// $createPost->description = 'create new blog posts';\n// $createPost->save();\n// $owner->attachPermission($createPost);\n\n// $admin = new Role();\n// $admin->name = '222';\n// $admin->display_name = 'User Administrator';\n// $admin->description = 'User is allowed to manage and edit other users';\n// $admin->save();\n//\n// $user = User::where('name', '=', '张洪波')->first();\n//\n// //调用EntrustUserTrait提供的attachRole方法\n// $user->attachRole($admin); // 参数可以是Role对象,数组或id\n//\n//// // 或者也可以使用Eloquent原生的方法\n//// $user->roles()->attach($admin->id); //只需传递id即可\n\n $list = UserRepository::getUserAll();\n return view('admin.user.list',compact('list'));\n }", "public function listAction()\n {\n return new ViewModel([\n 'users' => $this->table->fetchAll(),\n ]);\n }", "public function index()\n {\n // We connect to users we are following through their profile, but the posts are associated to users, not profiles\n $users = auth()->user()->following()->pluck('profiles.user_id');\n\n // with('user') refers to Post model user, and is there to optimize queries to the database (which shows with a limit 1 on Telescope)\n //$posts = Post::whereIn('user_id', $users)->orderBy('created_at', 'DESC')->get();\n $posts = Post::whereIn('user_id', $users)->with('user')->latest()->paginate(5);\n\n return view('posts.index', compact('posts'));\n }", "public function index()\n {\n return Favourite::all();\n }", "public function index()\n {\n //get users' followers ids in an array to be used in tweets listing.\n $followersIds = UserFollow::where('followerId', Auth::id())->pluck('followedId')->toArray();\n\n\n //list users' & whom follow tweets.\n $tweets = Tweet::with(['user','like'])\n ->whereIn('ownerUserId', $followersIds)\n ->orWhere('ownerUserId',Auth::id())\n ->get();\n\n return view('layouts.tweet.index', [\n 'tweets' => $tweets,\n ]);\n }", "public function getFollowingList(Request $request)\n { \n $input = $request->input();\n\n $validator = Validator::make($input, [\n 'userId' => 'required|integer',\n 'index' => 'required',\n 'limit' => 'required',\n ]);\n\n if ($validator->fails()) {\n return response()->json(['status' => 'exception','response' => $validator->errors()->first()]); \n }\n\n $response = BusinessFollower::Select('business_followers.id','user_businesses.user_id', 'user_businesses.id as business_id', 'user_businesses.title', 'user_businesses.bussiness_category_id', 'user_businesses.bussiness_subcategory_id','user_businesses.business_logo')->join('user_businesses','user_businesses.id', '=', 'business_followers.business_id')->where('business_followers.user_id', '=', $input['userId'])->skip($input['index'])->take($input['limit'])->get();\n\n $follower = array();\n\n foreach($response as $key => $data)\n {\n $follower[$key]['id'] = $data->id;\n $follower[$key]['user_id'] = $data->user_id;\n $follower[$key]['business_id'] = $data->business_id;\n $follower[$key]['title'] = $data->title;\n $follower[$key]['bussiness_category_id'] = $data->bussiness_category_id;\n $follower[$key]['bussiness_subcategory_id'] = $data->bussiness_subcategory_id;\n $follower[$key]['business_logo'] = $data->business_logo;\n $user = User::find($data->user_id);\n $follower[$key]['is_premium'] = ($user->user_role_id == 5)? 1:0;\n }\n\n if (count($response) > 0) {\n return response()->json(['status' => 'success','response' => $follower]); \n } else {\n return response()->json(['status' => 'exception','response' => 'No data found.']); \n } \n }", "public function getUserFollows($id)\n {\n $endpointUrl = sprintf($this->_endpointUrls['user_follows'], $id, $this->getAccessToken());\n $this->_initHttpClient($endpointUrl);\n $response = $this->_getHttpClientResponse();\n return $this->parseJson($response);\n }", "public function getFriends() {\n $ret = $this->get('users/self/friends');\n return $ret['friends']['items'];\n }", "public function GetAllUnite() {\n if ($this->get_request_method() != \"GET\") {\n $this->response('', 406);\n }\n\n $sql = $this->db->prepare(\"SELECT * FROM unite\");\n $sql->execute();\n if ($sql->rowCount() > 0) {\n $result = array();\n while ($rlt = $sql->fetchAll()) {\n $result[] = $rlt;\n }\n // If success everythig is good send header as \"OK\" and return list of users in JSON format\n $this->response($this->json($result[0]), 200);\n }\n $this->response('', 204); // If no records \"No Content\" status\n }", "public function index()\n {\n return $this->user->all();\n }", "public function listAll()\n {\n $tournament = Tournaments::get();\n return response()->json($tournament, 200);\n }", "public function all()\n {\n return $this->model->get();\n }", "public function follower()\n {\n return $this->belongsTo(CommunityFacade::getUserClass(), 'follower_account_id');\n }", "public function index() {\n\t\t$this->template->content = View::instance(\"v_posts_index\");\n\t\t$this->template->title = \"All the posts\";\n\t\t\t\n\t\t# Figure out the connections\n\t\t$q = \"SELECT *\n\t\t\tFROM users_users\n\t\t\tWHERE user_id = \".$this->user->user_id;\n\t\t\t\n\t\t$connections = DB::instance(DB_NAME)->select_rows($q);\n\t\t\t\t\t\t\n\t\t$connections_string = \"\";\n\t\t\n\t\tforeach($connections as $k => $v) {\n\t\t\t$connections_string .= $v['user_id_followed'].\",\";\n\t\t}\t\t\t\t\n\t\t\n\t\t# Trim off the last comma\n\t\t\t$connections_string = substr($connections_string, 0, -1);\n\t\t\n\t\t# Grab all the posts\n\t\t$q = \"SELECT *\n\t\t\tFROM posts\n\t\t\tJOIN users USING(user_id)\n\t\t\tWHERE posts.user_id IN (\".$connections_string.\")\";\n\t\t\t\t\t\n\t\t$posts = DB::instance(DB_NAME)->select_rows($q);\n\t\t\t\t \n\t\t# Pass data to the view\n\t\t$this->template->content->posts = $posts;\n\t\t\n\t\t\t\n\t\t# Render the view\n\t\techo $this->template;\n\t\n\t}", "public function getAll()\n {\n return $this->model->orderBy('id', 'DESC')->get();\n }", "public function index()\n\t{\n\t\t$friends = Friend::orderBy('id', 'desc')->paginate(10);\n\n\t\treturn view('friends.index', compact('friends'));\n\t}", "public function getFollowerRequests(Request $request)\n {\n $user = $request->get('user');\n\n $followerRequestsIds = $user->followRequestsUsersIds();\n\n $followerRequests = $this->userRepo->allUsersInIdArray\n ($followerRequestsIds)->all();\n\n return Response::dataResponse(true, ['users' => $followerRequests]);\n }", "public function index()\n\t{\n\t\t$this->set('users', $this->User->find('all')); // view vars\n\t}", "public function followers()\r\n\t{\r\n\t\t// Set the current page\r\n\t\t$data['current_page'] = 'followers';\r\n\t\t$data['user'] = $this->user;\r\n\r\n\t\t// Get follower history\r\n\t\t$data['follower_history'] = $this->people->get_follower_history($this->user['id']);\r\n\r\n\t\t// Load the page\r\n\t\t$this->load->view('layouts/header', array('page_title' => $this->user['username']));\r\n\t\t$this->load->view('profiles/followers', $data);\r\n\t\t$this->load->view('layouts/footer');\r\n\t}", "public function index()\n {\n\n return User::all();\n }", "protected function getSavedFollowers() {\n $savedFollowers = Profile::where('follower', 1)->get();\n $followerObjects = array();\n foreach ($savedFollowers as $follower) {\n $profile = $follower->profile;\n // By unserializing the saved profile field we'll get the whole\n // profile with the same object structure as it was when returned\n // by the API.\n $followerObjects[$follower->id] = unserialize($follower->profile);\n }\n return $followerObjects;\n }", "protected function renderDashboardFollowers(){\n echo $this->sphere($this->data);\n $user = User::where('id','=',$this->data)->first();\n $html = '<h2>Liste des utilisateurs qui suivent '.$user->fullname.'</h2><ul id=\"followees\">';\n $liste_followers = $user->followedBy()->get();\n foreach($liste_followers as $follower) {\n $html .= ' <li>\n <div class=\"tweet\">\n <div class=\"tweet-text\"><a href=\"'.Router::urlFor('user',[\"id\" => $follower->id]).'\">'.$follower->fullname.'</a></div>\n </div>\n </li>';\n }\n $html .= '</ul>';\n return $html;\n }", "public function GetAll()\n {\n return $this->model->all();\n }", "public function get_followerslist($user_id){\r\n $this->db->select(\"followers.user_id,followers.follower_id,followers.created_at,users.full_name,users.user_name,users.picture\");\r\n $this->db->from('followers');\r\n $this->db->order_by(\"full_name\", \"asc\");\r\n $this->db->join('users','users.user_id = followers.follower_id');\r\n $this->db->where('followers.user_id',$user_id);\r\n $query = $this->db->get();\r\n return $query->result();\r\n\r\n // $data = $this->db->query(\" Select followers.user_id,followers.follower_id,followers.created_at,users.full_name,users.picture,(select count(1) from followers where followers.follower_id ='\".$user_id.\"' AND followers.user_id=followers.follower_id) as isfollow FROM followers Left join users on users.user_id = followers.follower_id where followers.user_id='\".$user_id.\"'\")->result();\r\n // return $data;\r\n }", "public function follower(Request $request)\n {\n /*\n * --------------------------------------------------------------------------\n * Populating account followers\n * --------------------------------------------------------------------------\n * Retrieve followers 10 data per request, because we implement lazy\n * pagination via ajax so return json data when 'page' variable exist, and\n * return view if doesn't.\n */\n\n $contributor = new Contributor();\n\n $followers = $contributor->contributorFollower(Auth::user()->username);\n\n if (Input::get('page', false) && $request->ajax()) {\n return $followers;\n } else {\n return view('contributor.follower', compact('followers'));\n }\n }" ]
[ "0.6755336", "0.6454766", "0.6379214", "0.6374921", "0.6249094", "0.6215436", "0.6192749", "0.6173704", "0.61356986", "0.6090827", "0.6070063", "0.60652643", "0.60426235", "0.60274696", "0.5995998", "0.5931489", "0.5927734", "0.5917338", "0.5889872", "0.5874335", "0.581647", "0.57880163", "0.5744713", "0.56930614", "0.5662203", "0.56330854", "0.5626791", "0.56229526", "0.56211066", "0.5615032", "0.5590044", "0.55568004", "0.55484945", "0.553284", "0.5522247", "0.5520615", "0.551534", "0.55053365", "0.54926586", "0.54756534", "0.54578793", "0.54493535", "0.5448143", "0.54300106", "0.54255366", "0.54103386", "0.5394547", "0.53940415", "0.5380354", "0.5376197", "0.5375726", "0.53689224", "0.53590965", "0.53386027", "0.5320211", "0.531947", "0.52879345", "0.52833956", "0.52831525", "0.52817327", "0.5280994", "0.52595896", "0.5259081", "0.5251364", "0.52490896", "0.52351725", "0.52224153", "0.52137053", "0.52101696", "0.51973605", "0.51949424", "0.5190372", "0.51874155", "0.51827306", "0.51658785", "0.51658183", "0.51595485", "0.5155306", "0.5152413", "0.51511025", "0.5150753", "0.5140115", "0.5126491", "0.5123344", "0.5116197", "0.5108584", "0.5106837", "0.5106728", "0.51040274", "0.5101961", "0.5098517", "0.5092537", "0.5083927", "0.50810546", "0.507653", "0.5069009", "0.505307", "0.5048336", "0.50475377", "0.5044762" ]
0.6554968
1
Displays a single Follow model.
public function actionView($id) { return $this->render ( 'view', [ 'model' => $this->findModel ( $id ) ] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderFollow() {\n $this->checkAccess('user',true,true);\n\n $template = new Template;\n echo $template->render('header.html');\n echo $template->render('user/follow.html');\n echo $template->render('footer.html');\n\n //clear error status\n $this->f3->set('SESSION.haserror', '');\n }", "public function actionCreate() {\r\n\t\t$model = new Follow ();\r\n\t\t\r\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\r\n\t\t\treturn $this->redirect ( [ \r\n\t\t\t\t\t'view',\r\n\t\t\t\t\t'id' => $model->followID \r\n\t\t\t] );\r\n\t\t} else {\r\n\t\t\treturn $this->render ( 'create', [ \r\n\t\t\t\t\t'model' => $model \r\n\t\t\t] );\r\n\t\t}\r\n\t}", "public function actionIndex() {\r\n\t\t$searchModel = new FollowSearch ();\r\n\t\t$dataProvider = $searchModel->search ( Yii::$app->request->queryParams );\r\n\t\t\r\n\t\treturn $this->render ( 'index', [ \r\n\t\t\t\t'searchModel' => $searchModel,\r\n\t\t\t\t'dataProvider' => $dataProvider \r\n\t\t] );\r\n\t}", "public function actionFollowing()\n\t{\n\t\tif(!Yii::app()->user->isGuest)\n\t\t{\n\t\t\t$this->layout='front_layout';\n\t\t\tYii::app()->clientScript->registerCoreScript('jquery'); \n\t\t\t$id=Yii::app()->user->id;\n\t\t\t$criteria = new CDbCriteria();\n\t\t\t$criteria->condition = \"t.user_id=$id and exists(select * from photos where user_id=t.follow_id)\";\n\t\t\t$criteria->limit=2;\n\t\t\t$allusersphotos=UsersFollow::model()->with('follow', 'follow.userDetails', 'follow.photos')->findAll($criteria); \n\t\t\t$this->render('following', array('photos'=>$allusersphotos));\n\t\t}\n\t\telse\n\t\tYii::app()->end();\n\t}", "public function show()\r\n\t{\r\n\t\t\r\n\t\t$model = $this->getProfileView();\r\n\t\t$data = array('model'=> $model);\r\n\t\t\r\n\t\treturn $this->render($data);\r\n\t\t\r\n\t}", "public function index()\n {\n $title = 'Seguimiento';\n $follows = Auth::user()->follows()->with(['user'])->paginate(10);\n $followers = Auth::user()->followers()->with(['user'])->paginate(10);\n\n return view('app.follows.index', compact('follows','followers','title'));\n }", "public function indexAction()\n {\n $viewer = Engine_Api::_()->user()->getViewer();\n if( !Engine_Api::_()->core()->hasSubject() ) {\n return $this->setNoRender();\n }\n // Get subject and check auth\n $subject = Engine_Api::_()->core()->getSubject('event');\n if( !$subject->authorization()->isAllowed($viewer, 'view') ) {\n return $this->setNoRender();\n }\n\n // Must be a member\n// if( !$subject->membership()->isMember($viewer, true) )\n// {\n// return $this->setNoRender();\n// }\n\tif ($viewer->getIdentity() == 0) {\n\t\treturn $this->setNoRender();\n\t}\n \n // Build form\n $this->view->form = new Ynevent_Form_Follow();\n $followTable = Engine_Api::_()->getDbTable('follow','ynevent');\n $row = $followTable->getFollowEvent($subject->getIdentity(),$viewer->getIdentity());\n //$row = $subject->membership()->getRow($viewer);\n $this->view->viewer_id = $viewer->getIdentity();\n\n\t$r = Zend_Controller_Front::getInstance()->getRequest();\n\tif( $r->isPost() ) {\n\t if( !$row ) {\n\t\t $row = $followTable->createRow();\n\t\t $row->resource_id = $subject->getIdentity();\n\t\t $row->user_id = $viewer->getIdentity();\n\t\t $row->follow = 0;\n\t\t $row->save();\n\t } else {\n\t \t$row->follow = !($row->follow);\n\t \t$row->save();\n }\n\t}\n\t\n $this->view->follow = $row->follow;\n }", "protected function renderFollowing() {\n $auth = new \\tweeterapp\\auth\\TweeterAuthentification();\n $html = '<h2>Liste des utilisateurs suivis</h2><ul id=\"followees\">';\n $user = User::where('username','=',$auth->user_login)->first();\n $liste_following = $user->follows()->get();\n foreach($liste_following as $l) {\n $html .= ' <li>\n <div class=\"tweet\">\n <div class=\"tweet-text\"><a href=\"'.Router::urlFor('user',[\"id\" => $l->id]).'\">'.$l->fullname.'</a></div>\n </div>\n </li>';\n }\n $html .= '</ul>';\n return $html;\n }", "public function followers()\r\n\t{\r\n\t\t// Set the current page\r\n\t\t$data['current_page'] = 'followers';\r\n\t\t$data['user'] = $this->user;\r\n\r\n\t\t// Get follower history\r\n\t\t$data['follower_history'] = $this->people->get_follower_history($this->user['id']);\r\n\r\n\t\t// Load the page\r\n\t\t$this->load->view('layouts/header', array('page_title' => $this->user['username']));\r\n\t\t$this->load->view('profiles/followers', $data);\r\n\t\t$this->load->view('layouts/footer');\r\n\t}", "public function actionView()\n {\n $id = Yii::$app->user->id;\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }", "public function follow($name) {\n\t\t$this->load->model('Users_model');\n\t\t$this->Users_model->follow($name);\n\t\tredirect('user/view/'.$name, 'refresh'); // Redirect\n\t}", "public function viewFollowingList($username)\n\t{\n\t\t$data['user'] = User::whereRaw('username = ?', array($username))->first();\n\t}", "public function show($id)\n\t{\n if (Auth::check()) {\n\n $tweets = Tweet::where('user_id', '=', $id)->orderBy('created_at','desc')->get();\n $f = User::find($id)->friends->lists('name');\n $followers_list = User::find($id)->followers();\n $followers_name_list = array();\n foreach ($followers_list as $followr) {\n $followers_name_list[] = User::find($followr)->name;\n }\n $follower_count = sizeof($followers_list);\n\n $package = array(User::findOrFail($id), $f, $followers_name_list, $follower_count);\n if (Auth::user()->follows($id)) {\n return view('pages.profile.profile', ['idFriendsFollowersFollowCount' => $package], ['tweets' => $tweets]);\n } else\n return view('pages.profile.notfriend', ['idAndFriends' => $package]);\n } else {\n\n Flash::error('Must be logged in to view this page!');\n return redirect(url('/'));\n }\n\t}", "public function follows($username) {\n\n\t\t// TODO: to fix created_at and updated_at which is saving as NULL\n\t\t$user = $this->findByUserName($username);\n\n\t\treturn view('users.follows', [\n\t\t\t'user' => $user,\n\t\t\t'follows' => $user->follows,\n\t\t]);\n\t}", "protected function renderDashboardFollowers(){\n echo $this->sphere($this->data);\n $user = User::where('id','=',$this->data)->first();\n $html = '<h2>Liste des utilisateurs qui suivent '.$user->fullname.'</h2><ul id=\"followees\">';\n $liste_followers = $user->followedBy()->get();\n foreach($liste_followers as $follower) {\n $html .= ' <li>\n <div class=\"tweet\">\n <div class=\"tweet-text\"><a href=\"'.Router::urlFor('user',[\"id\" => $follower->id]).'\">'.$follower->fullname.'</a></div>\n </div>\n </li>';\n }\n $html .= '</ul>';\n return $html;\n }", "public function show(Ownership $ownership)\n {\n //\n }", "public function displayperson() {\r\n if (isset($_GET['id'])) {\r\n $display = $this->model->displayPerson($_GET['id']);\r\n }\r\n return $this->view('/company/displayperson', $display);\r\n }", "function bp_follow_screen_following() {\n\n\tdo_action( 'bp_follow_screen_following' );\n\n\t// ignore the template referenced here\n\t// 'members/single/following' is for older themes already using this template\n\t//\n\t// view bp_follow_load_template_filter() for more info.\n\tbp_core_load_template( 'members/single/following' );\n}", "protected function findModel($id) {\r\n\t\tif (($model = Follow::findOne ( $id )) !== null) {\r\n\t\t\treturn $model;\r\n\t\t} else {\r\n\t\t\tthrow new NotFoundHttpException ( 'The requested page does not exist.' );\r\n\t\t}\r\n\t}", "public function show()\n {\n $user_identifier = $this->session->userdata('identifier');\n $user_details = $this->user_m->read($user_identifier);\n $this->data['user_details'] = $user_details;\n $this->load_view('Profil Akun', 'user/profil');\n }", "public function getFollowId()\n {\n return $this->follow_id;\n }", "public function follower()\n {\n return $this->belongsTo(CommunityFacade::getUserClass(), 'follower_account_id');\n }", "public function show() {\n $view = $this->model->record($id);\n return view('persons/record', compact('view'));\n }", "public function actionProfile()\n {\n $this->layout = 'headbar';\n $model = new User();\n $model = User::find()->where(['id' => 1])->one();\n $name = $model->name;\n $email = $model->email;\n $mobile = $model->contact;\n return $this->render('profile', [\n 'model' => $model,\n 'name' => $name,\n 'email' => $email,\n 'mobile' => $mobile,\n ]);\n }", "public function home(){\n $follow = Follow::where('primary_id',Auth()->user()->id)->get();\n $posts = Post::latest()->get();\n // return $follow;\n return view('home',compact('follow','posts'));\n }", "public function actionView()\n {\n// return $this->render('view', [\n// 'model' => $this->findModel($id),\n// ]);\n\n if ($already_exists = RecordHelpers::userHas('user_profile')) {\n\n return $this->render('view', [\n\n 'model' => $this->findModel($already_exists),\n ]);\n\n } else {\n\n return $this->redirect(['create']);\n\n }\n }", "private function show_page()\n\t{\n\t\t$parse['user_link']\t= $this->_base_url . 'recruit/' . $this->_friends[0]['user_name'];\n\t\n\t\t$this->template->page ( FRIENDS_FOLDER . 'friends_view' , $parse );\t\n\t}", "public function actionUpdate($id) \r\n\r\n\t{\r\n\t\t$model = $this->findModel ( $id );\r\n\t\t\r\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\r\n\t\t\treturn $this->redirect ( [ \r\n\t\t\t\t\t'view',\r\n\t\t\t\t\t'id' => $model->followID \r\n\t\t\t] );\r\n\t\t} else {\r\n\t\t\treturn $this->render ( 'update', [ \r\n\t\t\t\t\t'model' => $model \r\n\t\t\t] );\r\n\t\t}\r\n\t}", "public function actionView()\n\t{\n\t\tif (!($model = $this->loadModel()))\n\t\t\treturn;\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "function showfollowing($id)\n\t{\n\t\t$this->load->model('user_model');\n\t\t\n\t\t$this->load->model('user_social_model');\n \t$data['user'] = $this->user_model->load($id);\n \t$data['social_list'] = $this->user_social_model->loadByUser($id);\n\t\t$data['users'] = $this->user_model->find_following($id);\n\t\t\n\t\t$data['user'] = $this->user_model->load($id);\n\t\t$this->load->model('item_model');\n $data['view_num'] = $this->item_model->get_sum_viewnum($id);\n $data['fav_num'] = $this->item_model->get_sum_favnum($id);\n $this->load->model('item_fav_model');\n\t\t$data['likes_num'] = $this->item_fav_model->count_item_favs(array('uid'=>$id));\n\t\t$this->load->model('item_model');\n\t\t$res= $this->item_model->find_items(array('user'=>$id),0);\n\t\t$data['works_num']= count($res);\n\t\t\t$taglist = Array();\n\t\t\tforeach($res as $item){\n\t\t\t\t$itemtaglist = explode(\" \",$item['tags']);\n\t\t\t\tforeach($itemtaglist as $tag){\n\t\t\t\t\tif(!in_array($tag,$taglist)){\n\t\t\t\t\t\tif($tag!='')\n\t\t\t\t\t\tarray_push($taglist,$tag);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t$data['tags'] = $taglist;\n\t\t$this->load->model('user_follow_model');\n\t\tif ($this->session->userdata('id')!=null){\n\t \t\t$data['follow'] = $this->user_follow_model->loadByUserAndFav($id,$this->session->userdata('id'));\n\t }\n\t\t\t$this->load->model('country_model');\n\t\t\t$country = $this->country_model->load($data['user']['countryCode']);\n\t\t\t$data['country_name'] = $country['full_name'];\n\t\t\t$data['nav']= 'profile';\n\t\t\t$data['feature']= 'following';\n\t\t$this->load->view('user/user_follow',$data);\n\t}", "function show() {\n // Process request with using of models\n $user = Service::get_authorized_user();\n // Make Response Data\n if ($user !== NULL) {\n $data = [\n 'profile' => $user,\n ];\n $view = 'user/show';\n return $this->render($view, $data);\n } else {\n return Application::error403();\n }\n}", "public function actionView()\n\t{\n\t\t$model = $this->loadModel();\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function ViewAction()\r\n\t{\r\n\t\t$this->View->author = $this->Author->select();\r\n\t}", "public function actionDisplay() {\r\n global $mainframe, $user; \r\n $tourID = Request::getVar('tourID',0);\r\n $model = Tournament::getInstance();\r\n $tour_detail = $model->getItem($tourID);\r\n $lists = $model->getLists($tourID, $tour_detail); \r\n \r\n $this->addBarTitle(\"Tournament: <small>$tour_detail->name</small>\", \"tournaments\"); \r\n $this->addIconToolbar(\"Apply\", Router::buildLink(\"gamesport\", array(\"view\"=>\"tournament\", \"layout\" => \"save\",\"tourID\"=>$tourID)), \"apply\");\r\n addSubMenuGameSportTour('tournament');\r\n \r\n $this->render('teamjoined', array('tour_detail'=> $tour_detail,'lists' => $lists));\r\n }", "public function followAction() {\n $this->validateRequestMethod('POST');\n// Set the translations for zend library.\n if (!Zend_Registry::isRegistered('Zend_Translate'))\n Engine_Api::_()->getApi('Core', 'siteapi')->setTranslate();\n\n Engine_Api::_()->getApi('Core', 'siteapi')->setView();\n\n //ONLY LOGGED IN USER CAN CREATE\n if (!$this->_helper->requireUser()->isValid())\n $this->respondWithError('unauthorized');\n\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 //GET VIEWER INFORMATION\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n //GET THE VALUE OF RESOURCE ID AND TYPE \n $resource_id = $wishlist_id;\n $resource_type = 'sitereview_wishlist';\n\n $isFollow = $wishlist->follows()->isFollow($viewer);\n $follow_id = empty($isFollow) ? 0 : 1;\n\n //GET FOLLOW TABLE\n $followTable = Engine_Api::_()->getDbTable('follows', 'seaocore');\n $follow_name = $followTable->info('name');\n\n //GET OBJECT\n $resource = Engine_Api::_()->getItem($resource_type, $resource_id);\n if (empty($follow_id)) {\n\n //CHECKING IF USER HAS MAKING DUPLICATE ENTRY OF LIKING AN APPLICATION.\n $follow_id_temp = $resource->follows()->isFollow($viewer);\n if (empty($follow_id_temp)) {\n\n if (!empty($resource)) {\n $follow_id = $followTable->addFollow($resource, $viewer);\n if ($viewer_id != $resource->getOwner()->getIdentity() && $resource->getOwner()->getIdentity()) {\n //ADD NOTIFICATION\n try {\n Engine_Api::_()->getDbtable('notifications', 'activity')->addNotification($resource->getOwner(), $viewer, $resource, 'follow_' . $resource_type, array());\n } catch (Exception $ex) {\n \n }\n if ($resource_type != 'siteevent_event') {\n //ADD ACTIVITY FEED\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\n if ($resource_type != 'sitepage_page' || $resource_type != 'sitebusiness_business' || $resource_type != 'sitegroup_group' || $resource_type != 'sitestore_store') {\n $action = $activityApi->addActivity($viewer, $resource, 'follow_' . $resource_type, '', array(\n 'owner' => $resource->getOwner()->getGuid(),\n ));\n } else {\n $action = $activityApi->addActivity($viewer, $resource, 'follow_' . $resource_type);\n }\n\n if (!empty($action))\n $activityApi->attachActivity($action, $resource);\n }\n }\n }\n }\n } else {\n if (!empty($resource)) {\n $followTable->removeFollow($resource, $viewer);\n\n if ($viewer_id != $resource->getOwner()->getIdentity()) {\n //DELETE NOTIFICATION\n $notification = Engine_Api::_()->getDbtable('notifications', 'activity')->getNotificationByObjectAndType($resource->getOwner(), $resource, 'follow_' . $resource_type);\n if ($notification) {\n $notification->delete();\n }\n\n //DELETE ACTIVITY FEED\n $action_id = Engine_Api::_()->getDbtable('actions', 'activity')\n ->select()\n ->from('engine4_activity_actions', 'action_id')\n ->where('type = ?', \"follow_$resource_type\")\n ->where('subject_id = ?', $viewer_id)\n ->where('subject_type = ?', 'user')\n ->where('object_type = ?', $resource_type)\n ->where('object_id = ?', $resource->getIdentity())\n ->query()\n ->fetchColumn();\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 }\n }\n }\n\n $this->successResponseNoContent('no_content', true);\n }", "public function show(ChatModel $chatModel)\n {\n //\n }", "function bp_follow_screen_activity_following() {\n\tbp_update_is_item_admin( is_super_admin(), 'activity' );\n\tdo_action( 'bp_activity_screen_following' );\n\tbp_core_load_template( apply_filters( 'bp_activity_template_following', 'members/single/home' ) );\n}", "public function actionView()\n {\n $id=(int)Yii::$app->request->get('id');\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }", "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "public function following()\n {\n return $this->belongsTo('App\\Models\\User','followed_userid','id');\n }", "public function display() {\n $data = $this->container->get('data');\n $people = $data->load('people');\n $this->render('people', ['people' => $people]);\n }", "public function actionView($id)\n {\n\n $model = User::find()->where(['_id' => $id])->limit(1)->one();\n\n return $this->render('view', [\n 'model' => $model,\n ]);\n }", "public function actionView()\n {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }", "public function actionView() {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }", "public function followUser($userId)\n {\n /**\n * This is to check if the session still have the data of the currently logged in user.\n * Only if the data is available the model function is accessed.\n * If not the user is sent to the login page. \n */\n $currentUserEmail = $this->session->userdata('email');\n if ($currentUserEmail == null) {\n $this->load->view('properties/login');\n } else {\n $this->load->model('FollowUser');\n $this->FollowUser->getEmailOfFollowingUser($userId);\n $this->load->model('FollowerPageService/GetFollowers');\n $userFollowers = $this->GetFollowers->getUserFollowersEmails();\n $returnArray = array(\n 'userFollowers' => $userFollowers\n );\n $this->load->view('properties/followers', $returnArray);\n }\n }", "public function show()\n {\n return view('profile.index');\n }", "public function setFollowId($var)\n {\n GPBUtil::checkString($var, True);\n $this->follow_id = $var;\n\n return $this;\n }", "public function viewAction()\n {\n $points = new Facepalm_Model_Points();\n $this->_helper->assertHasParameter('id');\n\n $pointId = $this->_getParam('id');\n $point = $points->find($pointId)->current();\n\n $this->_helper->assertResourceExists($point);\n\n #var_dump($point->toArray()); exit();\n $form = new Facepalm_Form_Comment();\n $form->getElement('point_id')->setValue($pointId);\n\n $this->view->point = $point;\n $this->view->form = $form;\n }", "public function actionView($id)\n {\n // $shareUser = ShareUser::findOne($id);\n // var_dump($shareUser->viewPeoples);\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }", "public function show(Member $member)\n {\n //\n }", "public function show(Member $member)\n {\n //\n }", "public function show(Member $member)\n {\n //\n }", "public function actionView()\n\t{\n\t\t$this->layout='';\n\t\t$model=$this->loadModel();\n\t\t$user = User::model()->findbyPk($model->user_id);\n\n\t\t$model->contract = $user->contract; \n\t\t$model->username = $user->username;\n\t\t$model->number = $model->id;\n\t\t\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}", "public function show(Fuentes $fuentes)\n {\n //\n }", "public function followedUser()\n {\n return $this->belongsTo('App\\User', 'followed_id');\n }", "public function getTypeAttribute()\n {\n return 'follow';\n }", "public function actionView($id)\n {\n \t$model = new User ();\n $model = User::find() ->where(['id' => $id])->one();\n \t\n //$user = User::find() ->where(['id' =>yii::$app->user->id])->one();\n \t//print_r(yii::$app->user->id);exit;\n \t\n \t $model = $this->findModel($id);\n if (!$model) {\n \t\tthrow new NotFoundHttpException('model not found');\n \t}\n return $this->render('view', [\n 'model' => $this->findModel($id),\n \t // 'model' => $model,\n \t\t ]);\n }", "public function follower(Request $request)\n {\n /*\n * --------------------------------------------------------------------------\n * Populating account followers\n * --------------------------------------------------------------------------\n * Retrieve followers 10 data per request, because we implement lazy\n * pagination via ajax so return json data when 'page' variable exist, and\n * return view if doesn't.\n */\n\n $contributor = new Contributor();\n\n $followers = $contributor->contributorFollower(Auth::user()->username);\n\n if (Input::get('page', false) && $request->ajax()) {\n return $followers;\n } else {\n return view('contributor.follower', compact('followers'));\n }\n }", "public function actionView()\r\n {\r\n $this->_userAutehntication();\r\n /*\r\n * Check if id was submitted via GET method \r\n */\r\n if(!isset($_GET['id']))\r\n $this->_sendResponse(500, 'Error: Parameter <b>id</b> is missing' );\r\n\r\n switch($_GET['model'])\r\n {\r\n /* Find respective model */\r\n case 'posts': \r\n $model = Post::model()->findByPk($_GET['id']);\r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Mode <b>view</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n if(is_null($model)) {\r\n $this->_sendResponse(404, 'No Post found with id '.$_GET['id']);\r\n } else {\r\n $this->_sendResponse(200, $this->_getEncodedData($_GET['model'], $model->attributes));\r\n }\r\n }", "public function actionProfile()\r\n\t{\r\n\t\t//disable jquery autoload\r\n\t\tYii::app()->clientScript->scriptMap=array(\r\n\t\t\t'jquery.js'=>false,\r\n\t\t);\r\n\t\t$model = $this->loadUser();\r\n\t $this->render('profile',array(\r\n\t \t'model'=>$model,\r\n\t\t\t'profile'=>$model->profile,\r\n\t ));\r\n\t}", "public function followerUser()\n {\n return $this->belongsTo('App\\User', 'follower_id');\n }", "public function View_My_Profile()\n\t{\n\t\t$this->_CheckLogged();\n\t\t\n\t\t$this->_processInsert($this->instructors_model->getMyPostId(),'view');\n\t}", "public function index()\n {\n $obj = new Friend($this->db);\n $friends = $obj->all_friends();\n // Load View File\n require './application/views/friends.php';\n }", "public function show($username)\n {\n //user\n $user = User::Where(['username' => $username])->get()->first();\n //post\n\n /* foreach ($user->followings()->get() as $follwers) {\n\n dd($follwers);\n }*/\n\n\n $posts = Post::whereUserId($user->id)->orderBy('created_at', 'desc')->paginate(5);\n\n return view('profile.show', compact('user', 'posts'));\n }", "public function index()\n {\n $user = Auth::user();\n $twitterAccount = $user->TwitterAccount;\n\n $twitter = new Twitter($user->id);\n $twitterProfile = $twitter->getUserProfile();\n\n return view('twitter')->with(compact('twitterAccount', 'twitterProfile'));\n }", "public function show(Actor $actor)\n {\n return view('actor.show', compact('actor'));\n }", "public function show(UserData $userData)\n {\n //\n }", "public function show()\n {\n return view('user::show');\n }", "public function show()\n {\n return view('user::show');\n }", "function doFollowButton($p_fbUser){\n\t\techo '<div class=\"fb-follow\" data-href=\"http://www.facebook.com/'. $p_fbUser .'\" data-width=\"100\" data-colorscheme=\"light\" data-layout=\"standard\" data-show-faces=\"true\"></div>';\n\n//echo '<iframe src=\"//www.facebook.com/plugins/follow?href=https%3A%2F%2Fwww.facebook.com%' .$p_fbUser. '&amp;layout=standard&amp;show_faces=true&amp;colorscheme=light&amp;width=450&amp;height=80\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:450px; height:80px;\" allowTransparency=\"true\"></iframe>';\n\t}", "public function show($family_id)\n {\n return view('MothersInfo.index')->with('family', Family::select('*')->where('id',$family_id)->get())->with('followups', FamilyFollowup::select('*')->where('family_id',$family_id)->get())->with('family_id',$family_id);\n }", "public function show(UserProfile $userProfile)\n {\n //\n }", "public function actionView($id)\n {\n\n //Init curl\n $curl = new curl\\Curl();\n \n // GET request to api\n $response = $curl->get(Yii::$app->params['showUser'] . '?id=' . $id);\n \n $record = json_decode($response, true);\n \n $model = new User([\n 'id' => $record['id'],\n 'name' => $record['name'],\n 'last_name' => $record['last_name'],\n 'group_id' => $record['team'],\n 'username' => $record['username'],\n 'created_at' => $record['created_at'],\n 'updated_at' => $record['updated_at'],\n ]);\n \n return $this->render('view', [\n 'model' => $model,\n ]);\n }", "public function actionView($id)\n {\n return $this->render('view', [\n 'model' => $this->findModel($id),\n //'model' => $this->findModel(Yii::$app->user->id),\n ]);\n }", "public function getOwnerFollows()\n {\n return $this->http->get('/users/%s/follows', 'self');\n }", "public function info(){\n $this->display('Main/Person/info') ;\n }", "public function following(Request $request)\n {\n /*\n * --------------------------------------------------------------------------\n * Populating account following\n * --------------------------------------------------------------------------\n * Retrieve following 10 data per request, because we implement lazy\n * pagination via ajax so return json data when 'page' variable exist, and\n * return view if doesn't.\n */\n\n $contributor = new Contributor();\n\n $following = $contributor->contributorFollowing(Auth::user()->username);\n\n if (Input::get('page', false) && $request->ajax()) {\n return $following;\n } else {\n return view('contributor.following', compact('contributor', 'following'));\n }\n }", "public function follow($username) {\n\t\tif (!$this->ion_auth->logged_in()) {\n\t\t\tredirect('auth/login','refresh');\n\t\t}\n\n\t\t//check if user exists\t\t\n\t\tif (!$this->ion_auth->username_check($username)) {\n\t\t\tredirect('errors/page_missing', 'refresh');\n\t\t}\n\n\t\t//logged in user\n\t\t$uid = $this->ion_auth->user()->row()->id;\n\n\t\t//peron to follow\n\t\t$user = $this->cache->model('User_model', 'get_user_info', array($username), 300); // keep for 5 minutes\n\n\t\tif ($uid === $user->id) {\n\t\t\tredirect('u/'.$username,'refresh');\n\t\t}\n\n\t\t$followExists = $this->Social_model->get_follow(array('follower_id'=>$uid,'following_id'=>$user->id));\n\n\t\tif ($followExists) {\n\t\t\t$this->Social_model->delete_follow(array('follower_id'=>$uid,'following_id'=>$user->id));\n\t\t\tredirect(base_url('u/'.$username));\n\t\t\t\n\t\t} else {\n\t\t\t$this->Social_model->add_follow(array('follower_id'=>$uid,'following_id'=>$user->id,'date_followed'=>time()));\n\t\t\tredirect(base_url('u/'.$username));\n\t\t}\n\t\t$this->cache->model('Social_model', 'get_followers', array(array('user_follows.following_id'=>$uid),'date_followed DESC', 15, 0), -1);\n\t}", "public function actionView($id)\n {\n return $this->render('pengumuman', ['model' => \\app\\models\\TaPengumuman::findOne(['id' => $id])]);\n }", "function followerUser(){\n\t\t\t$this->load->model('User_model');\n\t\t\t$userID = $_POST[\"id\"];\n\t\t\t$followerID = $_POST[\"follower\"];\n\t\t\t\n\t\t\tif($this->isFollowing($userID, $followerID))\n\t\t\t{\n\t\t\t\t$data = array('userID'=>$userID, 'following'=>$followerID);\n\t\t\t\t$query = $this->User_model->followUserModel($data);\n\t\t\t\tif($query)\n\t\t\t\t{\n\t\t\t\t\t$query = $this->db->query(\"SELECT * FROM users WHERE userID='$userID'\");\n\t\t\t\t\t$result = $query->result_array();\n\t\t\t\t\tforeach($result as $output)\n\t\t\t\t\t{\n\t\t\t\t\t\t$fname = $output[\"fname\"];\n\t\t\t\t\t\t$lname = $output[\"lname\"];\n\t\t\t\t\t\t$username = $output[\"username\"];\n\t\t\t\t\t}\n\t\t\t\t\t$link = base_url().'';\n\t\t\t\t\t$customMsg = '<i class=\"fa fa-user\"></i> <strong>'.$fname.' '.$lname.'</strong> is following you. Click to close';\n\t\t\t\t\t$this->setNotification($followerID, \"following\", $customMsg, $link);\n\t\t\t\t\techo 'done';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo 'error';\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo \"You already following user\";\n\t\t\t}\n\t\t}", "public function showProfile()\n {\n\t\t$user = User::all();\n\n return View::make('users', array('users' => $user));\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(UserList $list)\n {\n \n }", "public function ajaxFollow()\n\t{\n\t\t//get User's Id to followng or unfollow\n\t\t$userId = Input::get('userId');\n\n\t\t///Check if user has followed this user.\n\t\t$count = DB::table('follower')\n\t\t\t\t\t->whereRaw('follow_id = ?', array(Auth::id()))\n\t\t\t\t\t->whereRaw('user_id = ?', array($userId))\n\t\t\t\t\t->count();\n\n\t\t$action = null;\n\t\t//If not following, follow this user.\n\t\tif( $count == 0 )\n\t\t{\n\n\t\t\t//Add to Activities for \"follow\" action of this user\n\t\t\tActivities::create(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'user_id' => Auth::id(),\n\t\t\t\t\t\t\t\t'action' => 2,\n\t\t\t\t\t\t\t\t//Action 2 mean \"Follow\"\n\t\t\t\t\t\t\t\t'object_id' => $userId\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t));\n\n\t\t\tDB::table('follower')\n\t\t\t\t->insert(\n \t\t\t\t\tarray(\n \t\t\t\t\t'follow_id' => Auth::id(),\n \t\t\t\t\t'user_id' => $userId\n \t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t//Set the response is 1 when unfollow\n\t\t\t$action = 1;\n\n\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\tActivities::whereRaw('action = 2 and user_id = ?', array(Auth::id()))\n\t\t\t\t\t->whereRaw('object_id = ?', array($userId))\n\t\t\t\t\t->delete();\n\t\t\t\t\t\n\t\t//If has followed, unfollow.\t\n\t\t\tDB::table('follower')\n\t\t\t\t->whereRaw('follow_id = ?', array(Auth::id()))\n\t\t\t\t->whereRaw('user_id = ?', array($userId))\n \t\t\t->delete();\n \t\t//Set the response is 0 when unfollow\n \t\t$action=0;\n\t\t}\n\t\t//Return 1 if successful Follow and 0 if Unfollow\n return Response::json($action);\n\t}", "public function show()\n {\n return $this->model;\n }", "public function followers(){\n return $this->hasMany('App\\Models\\Follow','user_id_follower');\n }", "public function index()\n {\n return view('owner');\n }", "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 showAction() {\n $news = $this->newsRepository->findByUid($GLOBALS['TSFE']->id);\n $this->view->assign('news', $news)\n ->assign('settings', $this->settings);\n }", "public function show(){\r\r\n $news = $this->New->find($_GET['id']);\r\r\n $this->render('news.show', compact('news'));\r\r\n }", "public function actionShow($id)\n {\n $this->layout ='fb';\n $this->render('show',array(\n 'model'=>$this->loadModel($id),\n ));\n }", "public function social()\n {\n $record = Social::first();\n return view('admin.pages.social', compact('record'));\n }", "public function show( Track $track )\n {\n //\n }" ]
[ "0.6646272", "0.6589411", "0.64122516", "0.626218", "0.6257534", "0.60874385", "0.6042892", "0.5999705", "0.5973949", "0.5967226", "0.59414417", "0.58539456", "0.5846942", "0.58446413", "0.583881", "0.5823194", "0.581715", "0.57742155", "0.577225", "0.57584095", "0.57555795", "0.57073313", "0.56721413", "0.5670549", "0.5655855", "0.5651978", "0.5638922", "0.561197", "0.5602824", "0.55891436", "0.5586865", "0.5577661", "0.55675715", "0.5567457", "0.5555224", "0.5540039", "0.55394644", "0.5539428", "0.55121696", "0.55121696", "0.55121696", "0.55121696", "0.55121696", "0.54977226", "0.5484664", "0.5484497", "0.5483632", "0.54822594", "0.54704803", "0.54699695", "0.5467398", "0.5462945", "0.5438721", "0.5438158", "0.5438158", "0.5438158", "0.54371744", "0.5427604", "0.5425511", "0.54130477", "0.5407114", "0.54040116", "0.54028875", "0.5388935", "0.5373347", "0.5364719", "0.5364597", "0.5358228", "0.5356901", "0.53512865", "0.5351142", "0.53428584", "0.53428584", "0.5336764", "0.53352165", "0.53329664", "0.53218913", "0.5315196", "0.5313834", "0.5313713", "0.5312737", "0.5310904", "0.53099704", "0.529882", "0.5295729", "0.528522", "0.528522", "0.528522", "0.528522", "0.528522", "0.52828115", "0.5282339", "0.52802044", "0.5279594", "0.5278067", "0.52703536", "0.52649456", "0.52638525", "0.5262876", "0.5254053", "0.5253775" ]
0.0
-1
Creates a new Follow model. If creation is successful, the browser will be redirected to the 'view' page.
public function actionCreate() { $model = new Follow (); if ($model->load ( Yii::$app->request->post () ) && $model->save ()) { return $this->redirect ( [ 'view', 'id' => $model->followID ] ); } else { return $this->render ( 'create', [ 'model' => $model ] ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new Users();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->uid]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate() {\n $model = new Foro();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new ShareUser();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $user = User::findOne(['username' => $model->username ]) ;\n return $this->redirect(['site/view','id' => $user->id]);\n } else {\n return $this->render('knpr/create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n\n //显示创建资源表单页\n return view('/home/friend/create',['title'=>'添加友情链接']);\n }", "public function actionCreate() {\r\n $model = new Fltr();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "public function store()\n\t{\n\t\t$target_id = Input::get('target');\n\t\t$user_id = Auth::id();\n\t\t$params = array(\n\t\t\t'user_id' => Auth::id(),\n\t\t\t'target_id' => $target_id,\n\t\t);\n\t\t$follow = Follow::withTrashed($params)->where($params)->first();\n\n\t\tif ($follow === null) {\n\t\t\t$follow = new Follow($params);\n\t\t\t$follow->save();\n\t\t\tFeedManager::followUser($follow->user_id, $follow->target_id);\n\t\t} elseif ($follow->trashed()){\n\t\t\t$follow->restore();\n\t\t\tFeedManager::followUser($follow->user_id, $follow->target_id);\n\t\t}\n\t\treturn Redirect::to(Input::get('next'));\n\t}", "public function actionCreate()\n {\n $model = new Cuenta();\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new PerfilUsuario();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n\t\t$model=new User;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n\t{\n\t\t$model=new User;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new UserProfile();\n\n $model->user_id = Yii::$app->user->identity->id;\n\n\n $POST_VARIABLE = Yii::$app->request->post('Place');\n echo $POST_VARIABLE['first_name'];\n\n if ($already_exists = RecordHelpers::userHas('user_profile')) {\n return $this->render('view', [\n\n 'model' => $this->findModel($already_exists),\n ]);\n\n } elseif ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->getSession()->setFlash(\"success\", Yii::t('app', 'Profile successfully created!'));\n return $this->redirect(['view']);\n\n } else {\n// echo $model->user_id;\n return $this->render('create', [\n\n 'model' => $model,\n\n ]);\n }\n\n// if ($model->load(Yii::$app->request->post()) && $model->save()) {\n//\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('create', [\n// 'model' => $model,\n// ]);\n// }\n }", "public function actionCreate()\n {\n $model = new News();\n $author = Yii::$app->user->identity->username;\n\n if ($model->load(Yii::$app->request->post())){\n $model->setAuthor($author);\n if($model->save()){\n return $this->redirect('index');\n }\n }\n else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function follow_user(){\n\n\t\t$follow_user_data=array(\n\t\t\t'user_id'=>$this->session->userdata('usr_id'),\n\t\t\t'follow_user_id' => $this->input->post('id')\n\t\t);\n\n\t\treturn $this->db->insert('friends', $follow_user_data);\n\n\t}", "public function actionCreate()\n {\n $model = new UserFeeMaster();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n //$this->paymentUMoney($model);\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'userid' => Yii::$app->user->id,\n ]);\n }", "public function actionCreate()\n\t{\n\t\t//\n\t\t// if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\t\t// try {\n\t\t// $model->save();\n\t\t// Yii::$app->session->setFlash('alert', [\n\t\t// 'body' => Yii::$app->params['create-success'],\n\t\t// 'class' => 'bg-success',\n\t\t// ]);\n\t\t// } catch (\\yii\\db\\Exception $exception) {\n\t\tYii::$app->session->setFlash('alert', [\n\t\t\t'body' => Yii::$app->params['create-danger'],\n\t\t\t'class' => 'bg-danger',\n\t\t]);\n\n\t\t// }\n\t\treturn $this->redirect(['index']);\n\t\t// }\n\n\t\t// return $this->render('create', [\n\t\t// 'model' => $model,\n\t\t// ]);\n\t}", "public function actionCreate()\n {\n $model = new Users();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->redirect([\"site/register\"]);\n /*$this->render('/site/register', [\n 'model' => $model,\n ]);*/\n }\n }", "public function actionCreate()\n\t{\n\t\t$model=new Profile;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Profile']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Profile'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->user_id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new User();\n\n $profile = new UserProfile();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $userProfile = Yii::$app->request->post('UserProfile');\n $profile->user_id = $model->id;\n $profile->phone = $userProfile['phone'];\n $profile->firstname = $userProfile['firstname'];\n $profile->lastname = $userProfile['lastname'];\n $profile->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'profile' => $profile,\n ]);\n }", "public function actionCreate()\n {\n $model=new User('create');\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['User']))\n {\n $model->attributes=$_POST['User'];\n if($model->save())\n $this->redirect(array('/site/index'));\n }\n\n //Yii::app()->user->setFlash('success', Yii::t('user', '<strong>Congratulations!</strong> You have been successfully registered on our website! <a href=\"/\">Go to main page.</a>'));\n $this->render('create', compact('model'));\n }", "public function actionCreate()\n {\n $model = new ActivityDetail();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Member();\n $model->agreement = true;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) { //&& $model->save()\n// print_r($model->attributes);\n// exit();\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function store(Request $request)\n {/*\n $input = $request->all();\n $user = auth()->user();\n $idfollowing = $request->input('idfollowing');\n $Follow = new Follow();\n $Follow->user_id = $user->id;\n $Follow->idfollowing = $idfollowing;\n $Follow->save();\n */\n auth()->user()->addfollow(new Follow($request->only(['idfollowing'])));\n return response()->json(['code' => '200', 'result' => 'true']);\n }", "public function actionCreate()\n {\n \t /** @var ActiveRecord $model */\n \t $modelClass = static::modelClass();\n \t $model = new $modelClass();\n\n\t$viewFolder = '/';\n\t$viewName = 'create';\n\t$viewExtension = '.php';\n\t$viewFile = $this->getViewPath().$viewFolder.$viewName.$viewExtension;\n\t$viewPath = file_exists($viewFile) ? '' : $this->getDefaultViewPath(false);\n\t\n\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t$this->processData($model, 'create');\n\t\treturn $this->redirect(['view', 'id' => $model->getPrimaryKey()]);\n\t} else {\n\t\treturn $this->render($viewPath.$viewName, array_merge($this->commonViewData(), [\n\t\t\t'model' => $model,\n\t]));\n\t}\n }", "public\n function actionCreate()\n {\n $model = new Phforum();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\t{\n\t\t$model=new Users;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new Uprawnienia();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'konto_id' => $model->konto_id, 'podkategoria_id' => $model->podkategoria_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new User();\n if(null !== (Yii::$app->request->post()))\n {\n if($this->saveUser($model))\n {\n Yii::$app->session->setFlash('userUpdated');\n $this->redirect(['update', 'id' => $model->getId()]);\n return;\n }\n\n }\n\n return $this->render('@icalab/auth/views/user/create', ['model' => $model]);\n }", "public function actionCreate() {\n $model = new Stakeholder();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->datecreated = Date('Y-m-d h:i:sa');\n\n if ($model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n\t{\n\t\treturn view('friends.create');\n\t}", "public function create() {\n\t\t$model = new $this->model_class;\n\t\t$model->status = 3;\n\t\t$model->author_id = Session::get('wildfire_user_cookie');\n\t\t$model->url = time();\n\t\tif(Request::get(\"title\")) $model->title = Request::get(\"title\");\n\t\telse $model->title = \"Enter Your Title Here\";\n\t\t$this->redirect_to(\"/admin/content/edit/\".$model->save()->id.\"/\");\n\t}", "public function actionCreate()\n {\n $model = new Point();\n $model->create_at = time();\n $model->user_id = User::getCurrentId();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Manager();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this\n ->addFlashMessage('User created: ' . $model->login, self::FLASH_SUCCESS)\n ->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model=new User('admin');\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['User']))\n {\n $model->attributes=$_POST['User'];\n if($model->save())\n $this->redirect(array('index'));\n }\n\n $this->render('create',array(\n 'model'=>$model,\n ));\n }", "public function actionCreate()\n {\n $model = new RefJkel();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Debtor();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n //$locationModel = Location::find()->where(['location_id' => $model->location->id])->one();\n $locationModel = new Location();\n $locationModel->load(Yii::$app->request->post());\n $locationModel->save();\n $model->link('location', $locationModel);\n\n //$nameModel = Name::find()->where(['name_id' => $this->name->id])->one();\n $nameModel = new Name();\n $nameModel->load(Yii::$app->request->post());\n $nameModel->save();\n $model->link('name', $nameModel);\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n if (Yii::$app->request->isAjax) {\n return $this->renderAjax('create', [\n 'model' => $model,\n ]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }\n }", "public function follow_create(Request $request)\n {\n $helper = new Helpers();\n $input = $request->all();\n $request['main_title_en'] = trim($request['main_title_en']);\n $request['main_title_ar'] = trim($request['main_title_ar']);\n $request['description_en'] = trim($request['description_en']);\n $request['description_ar'] = trim($request['description_ar']);\n\n $this->validate($request,[\n 'main_title_en' =>'required|min:3|max:50',\n 'main_title_ar' =>'required|min:3|max:50',\n 'description_en' => 'required',\n 'description_ar' => 'required',\n ],[\n 'main_title_en.required' => 'Please enter the title',\n 'main_title_ar.required' => 'Please enter the title',\n 'description_en.required' => 'Please enter the description',\n 'description_ar.required' => 'Please enter the description'\n ]);\n $array = [\n 'main_title_en' => $request->get('main_title_en'),\n 'main_title_ar' => $request->get('main_title_ar'),\n 'description_en' => $request->get('description_en'),\n 'description_ar' => $request->get('description_ar'),\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 if(isset($request->id)) {\n $result = Follow::where('id', $request->id)->update($array);\n if($result) {\n Session::flash('message', 'Follow us updated successfully');\n Session::flash('alert-class', 'alert-success');\n } else {\n Session::flash('message', 'Unable to update Follow us!');\n Session::flash('alert-class', 'alert-danger');\n }\n }\n return redirect('follow/list/1');\n\n }", "public function create()\n {\n if(!isset($_GET['id'])){\n return redirect()->back();\n }\n\n $id = $_GET['id']; \n return view('admin.uf.create',['uf'=> new UF,'id'=>$id]); \n }", "public function actionCreate()\n {\n $model = new RedirectEntity();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->from_url_hash = md5($model->from_url);\n if ($model->save()) {\n return $this->redirect(['view', 'id' => $model->from_url_hash]);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function create()\n {\n $input = $request->all();\n $input['created_by'] = auth()->id();\n $input['updated_by'] = auth()->id();\n if ($this->userDetailModel->create($input)) {\n Session\n ::flash('flash_message', 'User details created successfully.');\n return redirect()->route('users.index');\n }\n return redirect()->back();\n }", "public function store(Follow $follow, Request $request)\n {\n\n if ($follow->followedBy($request->user())) {\n return response(null, 409);\n }\n $follow->followers()->create([\n 'user_id' => $request->user()->id,\n ]);\n return back();\n }", "public function actionCreate()\n\t{\n\t\t$model=new User;\n\t\t$guide = new Guide;\n\t\t\n\t\t$model->setScenario('common');\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\t$model->created_on = date('Y-m-d H:i:s');\n\t\t\t\n\t\t\tif(isset($_POST['User']['social_identifier']) && trim($_POST['User']['social_identifier']) != '')\n\t\t\t$model->setScenario('social');\n\t\t\telse\n\t\t\t$model->setScenario('normal');\n\t\t\tif($model->validate()){\n\t\t\t \n\t\t\t if($model->save()){\n\t\t\t\t\t if($model->role == '3')\n\t\t\t\t\t $this->redirect(array('guidedetails','id'=>$model->user_id));\n\t\t\t\t\t else if($model->role == '4')\n\t\t\t\t\t $this->redirect(array('iyerdetails','id'=>$model->user_id));\n\t\t\t\t\t else if($model->role == '2'){\n\t\t\t\t\t\t\t $this->redirect(array('regsuccesss','id'=>$model->user_id));\n\t\t\t\t }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t\t'guide'=>$guide,\n\t\t));\n\t}", "public function actionProfilecreate()\n {\n $model = new Profile();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->user_id]);\n } else {\n return $this->render('profilecreate', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Teacher();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new User();\n\n $model->load(['username' => 'foo',\n 'auth_key' => '46344hsgdsgsa8',\n 'password_hash' => 'adsfhsd6363',\n 'password_reset_token' => 'adsfhsd6363',\n 'email' => 'adsfhsd6363'\n ]);\n\n if ($model->load(Yii::$app->request->post())) {\n\n $arr_request = Yii::$app->request->post()['User'];\n\n $this->formInputDataValidation($arr_request, $model);\n\n $model->auth_key = Yii::$app->security->generateRandomString();\n\n $model->email = $arr_request['email'];\n\n $model->created_at = time();\n\n $model->updated_at = time();\n\n $model->username = $arr_request['username'];\n\n $model->password_hash = Yii::$app->security->generatePasswordHash($arr_request['password']);\n\n $model->status = 10;\n\n $model->save();\n\n return $this->render('view', [\n 'model' => $this->findModel($model->id),\n ]);\n\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Notification();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->notification_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Message();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'from' => $model->to_user_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n Yii::$app->getView()->params['title'] = '<i class=\"glyphicon glyphicon-edit\"></i> Пользователи: создать';\n $model = new User();\n\n if ($model->load(Yii::$app->request->post())) {\n $password = Yii::$app->security->generatePasswordHash($model->password);\n $model->password = $password;\n $date = Yii::$app->formatter->asDate($model->birthday, 'php:Y-m-d');\n $model->birthday=$date;\n if ($model->save()) {\n return $this->redirect(['index']);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n\t{\n\t\t$model = $this->loadModel();\n\n\t\tif(isset($_POST[get_class($model)]))\n\t\t{\n $model = $this->_prepareModel($model);\n if (Yii::app()->getRequest()->isAjaxRequest) {\n if($model->save())\n echo json_encode($model);\n else\n echo json_encode(array('modelName' => get_class($model),'errors' => $model->getErrors()));\n\n Yii::app()->end();\n }\n\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n\t{\n\t\t$model = new Post;\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save())\n\t\t{\n\t\t\treturn $this->redirect(['site/index']);\n\t\t}\n\t\t\n\t\techo $this->render('create', array(\n\t\t\t'model' => $model\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new Keep();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new DataUser();\n if(Yii::$app->request->isPost){\n $postdata=Yii::$app->request->post('postdata');\n $model->setAttributes($postdata,false);\n $model->created=date(\"Y-m-d H:i:s\");\n if($model->save()){\n return $this->redirect(['index']);\n }\n }\n \n return $this->render('create', []);\n }", "public function actionCreate()\n\t{\n\t\t$model=new UserAddForm();\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['UserAddForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['UserAddForm'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->data->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionCreate()\n {\n $model = new Loan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Amphur();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->amphurId]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Mylive();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->live_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Persyaratan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_persyaratan]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Position();\n $model->loadDefaultValues();\n if (strpos(Yii::$app->request->referrer, 'structure') !== false) {\n $referrer = Yii::$app->request->referrer;\n } else {\n $referrer = null;\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if (!empty(Yii::$app->request->post('referrer'))) {\n $referrer = explode('?',Yii::$app->request->post('referrer'));\n return $this->redirect([$referrer[0].'?id=position-'.$model->id]);\n }\n\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'referrer' => $referrer,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new ProfileModel();\n $model->scenario = Constants::SCENARIO_SIGNUP;\n\n $db = \\Yii::$app->db;\n $transaction = $db->beginTransaction();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //now insert the login credentials into teh authentication model\n $authModel = new AuthenticationModel();\n $authModel->isNewRecord = true;\n\n $authModel->USER_ID = $model->USER_ID;\n $authModel->PASSWORD = $model->PASSWORD;\n $authModel->ACCOUNT_AUTH_KEY = $model->ACCOUNT_AUTH_KEY;\n if ($authModel->save()) {\n //commit transaction\n $transaction->commit();\n //$this->redirect(['view', 'id' => $model->USER_ID]);\n $this->redirect(['//site/login']);\n } else {\n //roll back the transaction\n $model->PASSWORD = null; //clear the password field\n $model->REPEAT_PASSWORD = null; //clear the repeat password field\n $model->ACCOUNT_AUTH_KEY = null;\n $transaction->rollback();\n }\n }\n return $this->render('create', ['model' => $model,]);\n }", "public function actionCreate()\n\t{\n\t\tif(isset($_GET['layout'])){\n\t\t\t$this->layout = $_GET['layout'];\n\t\t}\n\t\t$model=new Users;\n\n\t\t$string = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\t\t$length = 6;\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\t$model->notification=1;\n\t\t\t$model->status=1;\n\n if($model->validate()){\n\n\t\t\t\tif($model->save()){\n\t\t\t\t\t$user_id = Yii::app()->db->lastInsertID;\n\n\t\t\t\t\t$user_login = new UserLogin;\n\t\t\t\t\t\t$user_login->username = $model->email;\n\t\t\t\t\t\t$user_login->role = \"Bouncer\";\n\t\t\t\t\t\t$user_login->user_id = $user_id;\n $user_login->latitude = \"0\";\n $user_login->longitude = \"0\";\n\t\t\t\t\t\t$user_login->display_name = $model->name;\n\t\t\t\t\t\t$user_login->salt = substr(str_shuffle($string), 0, $length);\n $user_login->created_by = Yii::app()->user->id;\n $user_login->password = md5($user_login->salt.$_POST['UserLogin']['password']);\n\t\t\t\t\t\t$user_login->created_date = strtotime(date('Y-m-d H:i:s'));\n\t\t\t\t\t$user_login->save();\n\n\t\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->render('create',array('model'=>$model));\n\t}", "public function actionCreate()\n\n {\n\n $model = new Orders();\n\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n\t\t\t\n\n\t\t\tYii::$app->session->setFlash('orders', 'Orders has been added successfully');\n\n return $this->redirect(['view', 'id' => $model->id]);\n\n } else {\n\n return $this->render('create', [\n\n 'model' => $model,\n\n ]);\n\n }\n\n }", "public function actionCreate()\n {\n $model = new TbTeach();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->teach_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Rents();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function follow(Request $request)\n {\n /*\n * --------------------------------------------------------------------------\n * Perform follow request\n * --------------------------------------------------------------------------\n * This operation only for authenticate user, a contributor follow another\n * contributor, populate the data and make sure there is no record following\n * from contributor A to B before then perform insert data.\n */\n\n if (Auth::check() && $request->ajax()) {\n $contributor_id = Auth::user()->id;\n\n $following_id = $request->input('id');\n\n $isFollowing = Follower::whereContributorId($contributor_id)\n ->whereFollowing($following_id)->count();\n\n if (!$isFollowing) {\n $follower = new Follower();\n\n $follower->contributor_id = $contributor_id;\n\n $follower->following = $following_id;\n\n if ($follower->save()) {\n $following = Contributor::findOrFail($following_id);\n\n /*\n * --------------------------------------------------------------------------\n * Create following activity\n * --------------------------------------------------------------------------\n * Create new instance of Activity and insert following activity.\n */\n\n Activity::create([\n 'contributor_id' => $contributor_id,\n 'activity' => Activity::followActivity(Auth::user()->username, $following->username)\n ]);\n\n if ($following->email_follow) {\n $follower->sendEmailNotification(Auth::user(), $following);\n }\n return response('success');\n }\n\n return response('failed', 500);\n }\n return response('success');\n } else {\n return response('restrict', 401);\n }\n }", "public function actionCreate()\n {\n $model = new Data();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->no]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function follow(User $user, Request $request)\n {\n\n Auth::user()->follows()->create([\n 'trader_id' => $user->id,\n 'percent_to_trader' => 10\n ]);\n flash()->overlay('Comment successfully created');\n\n return redirect(\"/app/dashboard\");\n\n }", "public function actionCreate()\n {\n $model = new Orders();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new WechatMenu();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new CompleteTask();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Test();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new NotetakingNotes();\n \n if (Yii::$app->user->can('createNote')){\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \n return $this->redirect(['view', 'user_id' => $model->user_id, 'id' => $model->id]);\n }\n \n return $this->render('create', [\n 'model' => $model,\n ]);\n }else $this->goBack();\n\n}", "public function actionCreate()\n {\n $model = new Accountholder();\n //$model = new SignupForm();\n \n if ($model->load(Yii::$app->request->post())) {\n //$model->createAccount();\n $model->save();\n Yii::$app->getSession()->setFlash('success', 'Create Account Holder Submmited Successfully');\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new NuevoUsuario();\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $LoginFrom = new LoginForm;\n $LoginFrom->password = $model->Clave;\n $LoginFrom->username = $model->NombreUsuario;\n if ($LoginFrom->login()){\n // provisoriamente lo inscribe al torneo programate para hacegurar el registro\n //$this->redirect(array('/torneo/inscripcion','idTorneo'=>1));\n $this->redirect(array('/site'));\n \n }else{\n $this->redirect(array('/site/login'));\n }\n }\n return $this->render('nuevousuario', [\n \n 'model' => $model,\n ]);\n \n\n \n }", "public function actionCreate()\n\t{\n\t\t$model=new eBayTargetAndTrack;\n\n $this->layout='';\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\n $this->layout='//layouts/column2';\n\t}", "public function actionCreate()\n\t{\n\t\t$model = new Route();\n\n\t\tif ($model->load(Yii::$app->request->post())) {\n\t\t\t$model->save();\n\t\t\treturn $this->redirect(['view', 'id' => $model->name]);\n\t\t} else {\n\t\t\treturn $this->render('create', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}", "public function actionCreate()\n {\n $model = new Proxy();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Proxy();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Service();\n if($model->load(Yii::$app->request->post()) ){\n $model->created_by=Yii::$app->user->id;\n $model->created_at=time();\n if ( $model->save()) {\n\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Photo();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //return $this->redirect(['view', 'id' => $model->id]);\n\t return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Actividad();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Takwim();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Admin();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Investor();\n\n if ($model->load(Yii::$app->request->post()) ) {\n\n $data = User::find()->where(['username'=>$model->username])->one();\n $data_e = User::find()->where(['email'=>$model->email])->one();\n\n if (empty($data->username) && empty($data_e->email)) {\n\n if ($model->createUser()) {\n Yii::$app->session->setFlash('success', \"Investor has been added\");\n return $this->redirect(['view', 'id' => $model->id]);\n }else{\n // print_r($model->getErrors() );die();\n // var_dump($model->errors);\n Yii::$app->session->setFlash('error', \"Failed to create Investor\");\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }else{\n Yii::$app->session->setFlash('error', \"UserName/Email has already been taken\");\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n\n\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function follow($user_id_followed) {\n $data = Array(\n \"created\" => Time::now(),\n \"user_id\" => $this->user->user_id,\n \"user_id_followed\" => $user_id_followed\n );\n\n # Do the insert\n DB::instance(DB_NAME)->insert('users_users', $data);\n\n # Send them back\n Router::redirect(\"/activities/users\");\n\n }", "public function actionCreate()\n\t{\n\t\t$this->addToTitle(\"Create Account\");\n\t\t$model=new User('create');\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\t$temp_passwd = $_POST['User']['password'];\n\t\t\t$temp_usernm = $_POST['User']['email'];\n\t\t\tif($model->validate()&&$model->save())\n\t\t\t{\n\t\t\t\t//log create new uesr\n\t\t\t\tYii::log(\"new user sign up, email:$model->email\");\n\t\t\t\t\n\t\t\t\t$emailServe = new EmailSending();\n\t\t\t\t$emailServe->sendEmailConfirm($model);\n\t\t\t\t\n\t\t\t\t$model->moveToWaitConfirm();\n\t\t\t\t$this->redirect(array('email/waitConfirm'));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array('model'=>$model));\n\t}", "public function actionCreate()\n {\n if(\\Yii::$app->user->isGuest) {\n \treturn $this->redirect(Yii::$app->params['default']);\n }\n\t\t\n\t\tif(\\Yii::$app->user->identity->jabatan !== \"Administrator\")\t {\n\t\t\treturn $this->redirect(Yii::$app->params['default'].'index.php/home');\t\n\t\t}\n\t\t\n $model = new Pengumuman();\n\t\t\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \t\\Yii::$app->getSession()->setFlash('success', \"Announcement is successfully created.\");\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new User;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n // получаем изображение для последующего сохранения\n $file = UploadedFile::getInstance($model, 'image');\n if ($file && $file->tempName) {\n $fileName = self::_saveFile($model, $file);\n if ($fileName) {\n $model->image = $fileName;\n } else {\n // уведомить пользователя, админа о невозможности сохранить файл\n }\n }\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n MainFunctions::register('Добавлен пользователь ' . $model->name);\n return $this->redirect(['view', 'id' => $model->_id]);\n } else {\n return $this->render('create', ['model' => $model]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Nomina();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Url();\n\n if ($this->request->isPost) {\n if ($model->load($this->request->post()) && $model->save()) {\n return $this->redirect(['view', 'idurl' => $model->idurl]);\n }\n } else {\n $model->loadDefaultValues();\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function addFollow(Request $request)\n {\n $json = [];\n\n $validator = Validator::make($request->all(), [\n 'user_id' => 'required|integer',\n ]);\n\n if ($validator->fails()) {\n\n $json['errors'] = $validator->errors()->all();\n\n return response()->json($json, 200);\n }\n \n $follow_id = $request->get('user_id');\n $current_user_id = authApi()->user()->id;\n\n \n if (!Users::where('id', '=', $follow_id)->exists()) {\n\n $json['message'] = 'This User Don\\'t Exists';\n $json['isFollowed'] = false;\n $json['data'] = [];\n\n return response()->json($json, 200);\n }\n\n if(Follow::where('user_id', $current_user_id)->where('followed_id', $follow_id)->first())\n {\n $json['message'] = 'You Are Already Followed This User';\n $json['isFollowed'] = true;\n $json['data'] = [];\n\n return response()->json($json, 200);\n }\n\n Follow::create([\n 'user_id' => $current_user_id,\n 'followed_id' => $follow_id\n ]);\n\n $json['message'] = 'Success Followed';\n $json['isFollowed'] = true;\n $json['data'] = [];\n\n return response()->json($json, 200);\n }", "public function actionCreate()\n {\n $model = new UserRegisterForm;\n \n //var_dump(Yii::app()->user);\n \n if(isset($_POST['UserRegisterForm']))\n {\n $model->attributes=$_POST['UserRegisterForm'];\n // validate user input and redirect to the previous page if valid\n if($model->validate())\n {\n $model->createUser();\n $this->redirect(Yii::app()->user->returnUrl);\n }\n }\n \n $this->render('create', array('model'=>$model));\n\n }", "public function create()\n {\n\n return view('admin.friendlinks.add',['title'=>'友情链接的添加页面']);\n }", "public function actionCreate()\n {\n $model = new File();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate() {\n $model = new Direction;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Direction'])) {\n $model->attributes = $_POST['Direction'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "public function actionCreate()\n {\n if (!One::app()->user->can('Create User')) {\n throw new ForbiddenHttpException('You are not authorized to access this page.');\n }\n\n $model = new User();\n\n if ($model->load(One::app()->request->post()) && $model->save()) {\n One::app()->session->setFlash('success', 'User created successfully.');\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function follow($name) {\n\t\t$this->load->model('Users_model');\n\t\t$this->Users_model->follow($name);\n\t\tredirect('user/view/'.$name, 'refresh'); // Redirect\n\t}" ]
[ "0.6710494", "0.6690616", "0.66585654", "0.66585654", "0.66585654", "0.66585654", "0.65761834", "0.6552931", "0.65009594", "0.6480906", "0.64251155", "0.64168197", "0.63638544", "0.6357716", "0.6357716", "0.62716305", "0.6268399", "0.6243951", "0.62140715", "0.6200901", "0.6176654", "0.61516", "0.61505264", "0.61483747", "0.6129724", "0.6125832", "0.6096312", "0.6091117", "0.60843873", "0.60813814", "0.6071962", "0.60717916", "0.60689384", "0.60652286", "0.6064146", "0.6050541", "0.604847", "0.6036919", "0.60356116", "0.60234606", "0.60186964", "0.60090256", "0.6001218", "0.6001204", "0.5999556", "0.59969324", "0.5986208", "0.5984914", "0.5974557", "0.5973808", "0.59665394", "0.59625816", "0.5958827", "0.59585965", "0.59500426", "0.59487236", "0.5935459", "0.5935032", "0.5930917", "0.59283715", "0.59218854", "0.59196407", "0.5919066", "0.5913297", "0.5911448", "0.5900465", "0.58985", "0.58925456", "0.5885248", "0.5877404", "0.5862746", "0.5860927", "0.58590376", "0.58588064", "0.5854613", "0.585121", "0.58491015", "0.5839415", "0.58303773", "0.58250344", "0.58250344", "0.5822867", "0.58182156", "0.5817303", "0.58042455", "0.58022517", "0.5802033", "0.5798989", "0.57989067", "0.57988834", "0.57890886", "0.5777327", "0.5775773", "0.57746387", "0.57726455", "0.576191", "0.5755082", "0.57547325", "0.57545", "0.57543236" ]
0.8833359
0
Updates an existing Follow model. If update is successful, the browser will be redirected to the 'view' page.
public function actionUpdate($id) { $model = $this->findModel ( $id ); if ($model->load ( Yii::$app->request->post () ) && $model->save ()) { return $this->redirect ( [ 'view', 'id' => $model->followID ] ); } else { return $this->render ( 'update', [ 'model' => $model ] ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdate()\n {\n if (!$model = $this->findModel()) {\n Yii::$app->session->setFlash(\"error\", Yii::t('modules/user', \"You are not logged in.\"));\n $this->goHome();\n } else if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash(\"success\", Yii::t('modules/user', \"Changes has been saved.\"));\n $this->refresh();\n } else {\n return $this->render('update', ['model' => $model,]);\n }\n }", "public function actionCreate() {\r\n\t\t$model = new Follow ();\r\n\t\t\r\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\r\n\t\t\treturn $this->redirect ( [ \r\n\t\t\t\t\t'view',\r\n\t\t\t\t\t'id' => $model->followID \r\n\t\t\t] );\r\n\t\t} else {\r\n\t\t\treturn $this->render ( 'create', [ \r\n\t\t\t\t\t'model' => $model \r\n\t\t\t] );\r\n\t\t}\r\n\t}", "public function actionUpdateUser()\n {\n\n\n if ($model = UserProfile::find()->where(['user_id' => Yii::$app->user->identity->id])->one()) {\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view']);\n\n } else {\n\n return $this->render('update', [\n\n 'model' => $model,\n\n ]);\n }\n\n } else {\n\n return $this->redirect(['create']);\n\n }\n\n\n// $model = $this->findModel($id);\n//\n// if ($model->load(Yii::$app->request->post()) && $model->save()) {\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('update', [\n// 'model' => $model,\n// ]);\n// }\n }", "public function actionUpdate()\n {\n $model = $this->loadModel();\n\n if (isset($_POST['User']))\n {\n $model->attributes = $_POST['User'];\n\n if ($model->save())\n {\n Yii::app()->user->setFlash(YFlashMessages::NOTICE_MESSAGE, Yii::t('user', 'Данные обновлены!'));\n\n $this->redirect(array('view', 'id' => $model->id));\n }\n }\n\n $this->render('update', array(\n 'model' => $model,\n ));\n }", "public function update()\r\n {\r\n if (isset($_POST[\"update\"])) {\r\n // Instance new Model (Song)\r\n $profile = new Profile();\r\n // do updateSong() from model/model.php\r\n $profile->breyta($_POST[\"nafn\"], $_POST[\"pass\"], $_POST[\"user\"]);\r\n }\r\n // where to go after song has been added\r\n header('location: ' . URL . 'profile/index');\r\n }", "public function update()\n {\n $userId = Helper::getIdFromUrl('user');\n\n // Save post data in $user\n $user = $_POST;\n \n // Save record to database\n UserModel::load()->update($user, $userId);\n\n View::redirect('user/' . $userId);\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->U_ID]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "public function update() {\n if($this->id == 0)\n return null; // can't update something without an ID\n\n $db = Db::instance(); // connect to db\n $q = sprintf(\"UPDATE `followers` SET\n `username` = $db->escape($this->user),\n `follower` = $db->escape($this->follower)\n WHERE `id` = $db->escape($this->id);\");\n\n $db->query($q); // execute query\n return $db->id; // return this object's ID\n }", "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionUpdate() {\n Yii::import('bootstrap.widgets.TbEditableSaver'); //or you can add import 'ext.editable.*' to config\n $es = new TbEditableSaver('Donneur'); // 'User' is classname of model to be updated\n $es->update();\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n /*if (isset($_POST['pk'])) {\n $model = $this->loadModel($_POST['pk']);\n $model->first_name = $_POST['first_name'];\n $model->save();\n // $this->redirect(array('view', 'id' => $model->id));\n }\n\n /* $this->render('update', array(\n 'model' => $model,\n ));*/\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->user_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function update(User $model);", "public function actionUpdate()\n {\n\t\t\t$id=7;\n $model = $this->findModel($id);\n $model->slug = \"asuransi\";\n $model->waktu_update = date(\"Y-m-d H:i:s\");\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->teach_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $session = \\yii::$app->session;\n $user_type = $session->get('type',-1);\n $model = $this->findModel($id);\n $user = $this->findUser($id);\n\n if ($model->load(Yii::$app->request->post())) {\n $user->id = $model->user_id;\n if($user->save())\n {\n if($model->save())\n {\n return $this->redirect(['view', 'id' => $model->user_id]);\n }\n }\n }\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if($model->creator_id==Yii::$app->user->identity->id){\n \n if ($model->load(Yii::$app->request->post()) && $model->save()){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('update', ['model' => $model,]);\n }\n\n else{\n return $this->redirect(['index']); \n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if($model->creator_id==Yii::$app->user->identity->id){\n \n if ($model->load(Yii::$app->request->post()) && $model->save()){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('update', ['model' => $model,]);\n }\n\n else{\n return $this->redirect(['index']); \n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->uid]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id) {\n\t\t$model = $this->findModel ( $id );\n\t\t\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\n\t\t\treturn $this->redirect ( [ \n\t\t\t\t\t'view',\n\t\t\t\t\t'id' => $model->id \n\t\t\t] );\n\t\t}\n\t\t\n\t\treturn $this->render ( 'update', [ \n\t\t\t\t'model' => $model \n\t\t] );\n\t}", "public function follow($name) {\n\t\t$this->load->model('Users_model');\n\t\t$this->Users_model->follow($name);\n\t\tredirect('user/view/'.$name, 'refresh'); // Redirect\n\t}", "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ref]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n\n // p($id);die;\n $model = $this->findModel($id);\n // p($model);die;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "protected function changeFollow()\n\t{\n\t\tif ( !\\IPS\\Member::loggedIn()->modPermission('can_modify_profiles') AND ( \\IPS\\Member::loggedIn()->member_id !== $this->member->member_id OR !$this->member->group['g_edit_profile'] ) )\n\t\t{\n\t\t\t\\IPS\\Output::i()->error( 'no_permission_edit_profile', '2C138/3', 403, '' );\n\t\t}\n\n\t\t\\IPS\\Session::i()->csrfCheck();\n\n\t\t\\IPS\\Member::loggedIn()->members_bitoptions['pp_setting_moderate_followers'] = ( \\IPS\\Request::i()->enabled == 1 ? FALSE : TRUE );\n\t\t\\IPS\\Member::loggedIn()->save();\n\n\t\tif( \\IPS\\Request::i()->isAjax() )\n\t\t{\n\t\t\t\\IPS\\Output::i()->json( 'OK' );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\\IPS\\Output::i()->redirect( $this->member->url(), 'follow_saved' );\n\t\t}\n\t}", "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Users']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Users'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //$locationModel = Location::find()->where(['location_id' => $this->location->id])->one();\n $locationModel = $model->location ? $model->location : new Location;\n //TODO: проверить, рефакторинг\n $locationModel->save();\n //$locationModel->link('debtor', $model);\n $model->link('location', $locationModel);\n $locationModel->load(Yii::$app->request->post());\n $locationModel->save();\n\n //$nameModel = Name::find()->where(['name_id' => $this->name->id])->one();\n $nameModel = $model->name ? $model->name : new Name;\n //TODO: проверить, рефакторинг\n $nameModel->save();\n $nameModel->link('debtor', $model);\n $nameModel->load(Yii::$app->request->post());\n $nameModel->save();\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n if (Yii::$app->request->isAjax) {\n return $this->renderAjax('update', [\n 'model' => $model,\n ]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n $model->start_date = date('d M Y', strtotime($model->start_date));\n if ($model->load(Yii::$app->request->post()) ) {\n\n if ($model->updateUser() ) {\n Yii::$app->session->setFlash('success', \"Investor has been updated\");\n return $this->redirect(['view', 'id' => $model->id]);\n }else{\n //var_dump($model->errors);die();\n Yii::$app->session->setFlash('error', \"Failed to update Investor\");\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n\n Yii::$app->session->setFlash('error', \"UserName/Email has already been taken\");\n return $this->render('create', [\n 'model' => $model,\n ]);\n\n\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n // if ($model->load(Yii::$app->request->post()) && $model->save()) {\n // return $this->redirect(['view', 'id' => $model->kamar_id]);\n // }\n if ($model->load(Yii::$app->request->post())) {\n // Yii::$app->creator->update($model);\n $model->updated_by = Yii::$app->user->identity->username;\n \t $model->updated_date = date(\"Y-m-d\");\n $model->save();\n return $this->redirect(['view', 'id' => $model->kamar_id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "public function actionUpdate()\n\t{\n\t if (!Yii::app()->user->checkAccess('admin')){\n\t\t\treturn $this->actionView();\n\t }\n\t\t$this->model = DrcUser::loadModel();\n\t\tif($this->model===null)\n\t\t\tthrow new CHttpException(404,'The requested user does not exist.');\n\t\t$this->renderView(array(\n\t\t\t'contentView' => '../drcUser/_edit',\n\t\t\t'contentTitle' => 'Update User Data',\n\t\t\t'createNew'=>false,\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('base/user/create') . '\"><i class=\"icon-plus\"></i> Add User </a>',\n\t\t\t'action'=>Yii::app()->createUrl(\"user/save\", array('username'=>$this->model->username)),\n\t\t));\n\t}", "public function actionUpdate($id) {\n\t\t$model = $this->findModel ( $id );\n\t\t\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\n\t\t\treturn $this->redirect ( [ \n\t\t\t\t\t'view','id' => $model->weid \n\t\t\t] );\n\t\t} else {\n\t\t\treturn $this->render ( 'update', [ \n\t\t\t\t\t'model' => $model \n\t\t\t] );\n\t\t}\n\t}", "public function update() {\n $data = $this->load($people);\n \n if(isset($_Post['people']))\n {\n $data->attributes=$_Post['people'];\n if($data->save())\n $this->redirect(array('view'=>$data->firstname,lastname));\n }\n \n $this->render('update',array('data'=>$data,));\n }", "public function updating($model)\n\t{\n\t}", "public function actionUpdate()\n {\n $model = $this->findModel(Yii::$app->request->post('id'));\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $model;\n }\n return $model->errors;\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_favorito]);\n\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "public function actionUpdate($id)\n {\n if(\\Yii::$app->user->isGuest) {\n \treturn $this->redirect(Yii::$app->params['default']);\n }\n\t\t\n\t\tif(\\Yii::$app->user->identity->jabatan !== \"Administrator\")\t {\n\t\t\t\\Yii::$app->getSession()->setFlash('warning', \"You have no privilege to update an announcement.\");\n\t\t\treturn $this->redirect(Yii::$app->params['default'].'index.php/home');\t\n\t\t}\n\t\t\n //$model = $this->findModel($id);\n\t\t$model=Pengumuman::findOne(['id'=>$id]);\n\t\t$model->tanggal=null;\n\t\tif(\\Yii::$app->user->identity->nik == $model->creator) {\n\n\t\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\t\t\\Yii::$app->getSession()->setFlash('success', \"Announcement is successfully updated.\");\n \treturn $this->redirect(['view', 'id' => $model->id]);\n \t} else {\n \treturn $this->render('update', [\n \t'model' => $model,\n \t]);\n \t}\n\t\t// }\n\t\t// else{\n\t\t\t// \\Yii::$app->getSession()->setFlash('danger', \"You have no privilege to update this announcement.\");\n\t\t\t// return $this->redirect('/propensi/web/index.php/pengumuman');\t\n\t\t}\n \n }", "public function actionUpdate($id)\r\n {\r\n $model = $this->findModel($id);\r\n\t\t//print_r(\"update mode\");exit;\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n // return $this->redirect(['view', 'id' => $model->id]);\r\n\t\t return $this->redirect(['index']);\r\n }\r\n\r\n return $this->renderAjax('update', [\r\n 'model' => $model,\r\n ]);\r\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save())\n {\n return $this->redirect(['index']);\n }\n else\n {\n //var_dump($model);\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n { \n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->a_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\t\t$user = User::model()->findByPk($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Profile']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Profile'];\n\t\t\t$user->attributes=$_POST['User'];\n\t\t\tif($model->save() && $user->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->user_id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t\t'user'=>$user,\n\t\t));\n\t}", "function followerUser(){\n\t\t\t$this->load->model('User_model');\n\t\t\t$userID = $_POST[\"id\"];\n\t\t\t$followerID = $_POST[\"follower\"];\n\t\t\t\n\t\t\tif($this->isFollowing($userID, $followerID))\n\t\t\t{\n\t\t\t\t$data = array('userID'=>$userID, 'following'=>$followerID);\n\t\t\t\t$query = $this->User_model->followUserModel($data);\n\t\t\t\tif($query)\n\t\t\t\t{\n\t\t\t\t\t$query = $this->db->query(\"SELECT * FROM users WHERE userID='$userID'\");\n\t\t\t\t\t$result = $query->result_array();\n\t\t\t\t\tforeach($result as $output)\n\t\t\t\t\t{\n\t\t\t\t\t\t$fname = $output[\"fname\"];\n\t\t\t\t\t\t$lname = $output[\"lname\"];\n\t\t\t\t\t\t$username = $output[\"username\"];\n\t\t\t\t\t}\n\t\t\t\t\t$link = base_url().'';\n\t\t\t\t\t$customMsg = '<i class=\"fa fa-user\"></i> <strong>'.$fname.' '.$lname.'</strong> is following you. Click to close';\n\t\t\t\t\t$this->setNotification($followerID, \"following\", $customMsg, $link);\n\t\t\t\t\techo 'done';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo 'error';\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo \"You already following user\";\n\t\t\t}\n\t\t}", "public function ajaxFollow()\n\t{\n\t\t//get User's Id to followng or unfollow\n\t\t$userId = Input::get('userId');\n\n\t\t///Check if user has followed this user.\n\t\t$count = DB::table('follower')\n\t\t\t\t\t->whereRaw('follow_id = ?', array(Auth::id()))\n\t\t\t\t\t->whereRaw('user_id = ?', array($userId))\n\t\t\t\t\t->count();\n\n\t\t$action = null;\n\t\t//If not following, follow this user.\n\t\tif( $count == 0 )\n\t\t{\n\n\t\t\t//Add to Activities for \"follow\" action of this user\n\t\t\tActivities::create(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'user_id' => Auth::id(),\n\t\t\t\t\t\t\t\t'action' => 2,\n\t\t\t\t\t\t\t\t//Action 2 mean \"Follow\"\n\t\t\t\t\t\t\t\t'object_id' => $userId\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t));\n\n\t\t\tDB::table('follower')\n\t\t\t\t->insert(\n \t\t\t\t\tarray(\n \t\t\t\t\t'follow_id' => Auth::id(),\n \t\t\t\t\t'user_id' => $userId\n \t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t//Set the response is 1 when unfollow\n\t\t\t$action = 1;\n\n\n\t\t}\n\t\telse\n\t\t{\n\n\t\t\tActivities::whereRaw('action = 2 and user_id = ?', array(Auth::id()))\n\t\t\t\t\t->whereRaw('object_id = ?', array($userId))\n\t\t\t\t\t->delete();\n\t\t\t\t\t\n\t\t//If has followed, unfollow.\t\n\t\t\tDB::table('follower')\n\t\t\t\t->whereRaw('follow_id = ?', array(Auth::id()))\n\t\t\t\t->whereRaw('user_id = ?', array($userId))\n \t\t\t->delete();\n \t\t//Set the response is 0 when unfollow\n \t\t$action=0;\n\t\t}\n\t\t//Return 1 if successful Follow and 0 if Unfollow\n return Response::json($action);\n\t}", "public function actionUpdate($id)\r\n {\r\n $model = $this->findModel($id);\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) \r\n {\r\n return $this->redirect(['view', 'id' => $model->idapresentacao]);\r\n } else {\r\n return $this->render('update', [\r\n 'model' => $model,\r\n\r\n ]);\r\n }\r\n }", "public function actionUpdate()\n\t{\n\t\t$model=$this->loadfiles();\n\t\tif(isset($_POST['Files']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Files'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('show','id'=>$model->id));\n\t\t}\n\t\t$this->render('update',array('model'=>$model));\n\t}", "public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load($_POST) && $model->save()) {\n // return $this->redirect(Url::previous());\n\t\t}\n return $this->render('update', [\n 'model' => $model,\n 'owner' => Owner::find()->all(),\n 'years' => $this->getYears(),\n ]);\n\t}", "public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}", "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id) {\r\n $model = $this->findModel($id);\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('update', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->name]);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}", "public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}", "function update(){\n\t\t$this->model->update();\n\t}", "public function actionUpdate()\n\t{\n\n\t\t//print_r (Yii::app()->user);\n\t\tif (Yii::app()->user->isAdmin){\n\t\t\t$this->layout = \"admin\";\n\t\t}\n\t\n\t\t$model=$this->loadarticles();\n\t\t$params=array('Articles'=>$model);\n//\t\tif(Yii::app()->user->checkAccess('updateOwnArticle',$params))\n//\t\t{\n//\t\t\t\n\t\t\tif(isset($_POST['Articles']))\n\t\t\t{\n\t\t\t\t$model->attributes=$_POST['Articles'];\n\t\t\t\tif($model->save()){\n\t\t\t\t\t$this->redirect(array('show','id'=>$model->id));\n\t\t\t\t}\n\t\t\t}\n//\t\t}else{\n//\t\t\techo \"no permissions\";\n//\t\t}\n\t\t$this->render('update',array('model'=>$model));\n\t}", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->No_]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n // $model->ReClave=$model->Clave;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->idUsuario]);\n }\n\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "public function actionUpdate($id)\n {\n if($this->isAuthenticate())\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) \n {\n return $this->redirect(['index','type' => $model->IdEntityType]);\n } else \n {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }\n }", "public function actionUpdate($id)\r\n {\r\n $model = $this->findModel($id);\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('update', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->US_ID]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function follow(Request $request)\n {\n /*\n * --------------------------------------------------------------------------\n * Perform follow request\n * --------------------------------------------------------------------------\n * This operation only for authenticate user, a contributor follow another\n * contributor, populate the data and make sure there is no record following\n * from contributor A to B before then perform insert data.\n */\n\n if (Auth::check() && $request->ajax()) {\n $contributor_id = Auth::user()->id;\n\n $following_id = $request->input('id');\n\n $isFollowing = Follower::whereContributorId($contributor_id)\n ->whereFollowing($following_id)->count();\n\n if (!$isFollowing) {\n $follower = new Follower();\n\n $follower->contributor_id = $contributor_id;\n\n $follower->following = $following_id;\n\n if ($follower->save()) {\n $following = Contributor::findOrFail($following_id);\n\n /*\n * --------------------------------------------------------------------------\n * Create following activity\n * --------------------------------------------------------------------------\n * Create new instance of Activity and insert following activity.\n */\n\n Activity::create([\n 'contributor_id' => $contributor_id,\n 'activity' => Activity::followActivity(Auth::user()->username, $following->username)\n ]);\n\n if ($following->email_follow) {\n $follower->sendEmailNotification(Auth::user(), $following);\n }\n return response('success');\n }\n\n return response('failed', 500);\n }\n return response('success');\n } else {\n return response('restrict', 401);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ID]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ID]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //return $this->redirect(['view', 'id' => $model->id]);\n\t return $this->redirect(['index']);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->no]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function update(){\n\t\t\t$record = $this->modelGetrenter_user();\n\t\t\tinclude \"Views/AccountUpdateView.php\";\n\t\t}", "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public\n function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['TDespachoCabecera']))\n\t\t{\n\t\t\t$model->attributes=$_POST['TDespachoCabecera'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id_despacho));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ( $model->load(Yii::$app->request->post()) && $model->save() ) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => (string)$model->_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()))\n {\n if($model->save())\n return $this->redirect(['view', 'id' => $model->id]);\n else\n var_dump($model->errors); die;\n }\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('update', 'Your Info Has Been Update');\n return $this->redirect(['update', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate() {\n $model = $this->loadModel();\n $modelAmbienteUso = new Ambiente_Uso;\n $modelUsuario = new Usuario();\n $modelAmbiente = new Ambiente();\n $modelPredio = new Predio();\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Alocacao'])) {\n $model->attributes = $_POST['Alocacao'];\n $a = $model->DT_DIA;\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->ID_ALOCACAO));\n }\n\n $this->render('update', array(\n 'model' => $model,\n 'modelAU' => $modelAmbienteUso,\n 'modelU' => $modelAmbienteUso,\n 'modelA' => $modelAmbiente,\n 'modelP' => $modelPredio\n ));\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->name]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->Id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n $this->layout=\"main\";\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this\n ->addFlashMessage('User updated: ' . $model->login, self::FLASH_SUCCESS)\n ->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('update', [\n 'model' => $model,\n ]);\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }", "public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }" ]
[ "0.6590642", "0.64405555", "0.643507", "0.633781", "0.6060133", "0.6056863", "0.60505575", "0.5966403", "0.5953536", "0.5914776", "0.5910345", "0.58988976", "0.58863664", "0.58778346", "0.58663815", "0.5860015", "0.5860015", "0.5850847", "0.5842669", "0.5830864", "0.58302057", "0.58237416", "0.5814482", "0.58096534", "0.58096534", "0.58096534", "0.5794193", "0.5788689", "0.57867295", "0.5781405", "0.57700247", "0.5769548", "0.57674605", "0.5767292", "0.5766145", "0.5760064", "0.575216", "0.5748882", "0.5748576", "0.57184726", "0.57141685", "0.5709325", "0.57091296", "0.57088196", "0.57044077", "0.57026803", "0.57017946", "0.57001853", "0.56987226", "0.5696916", "0.569508", "0.5693938", "0.56938607", "0.56829923", "0.5668995", "0.5665703", "0.5662328", "0.56594354", "0.565534", "0.5653584", "0.5653584", "0.56535345", "0.5652091", "0.56507623", "0.5641582", "0.5641582", "0.5641582", "0.5641582", "0.5641582", "0.5641582", "0.5641582", "0.5629793", "0.5629468", "0.56257766", "0.56253713", "0.562525", "0.5619945", "0.5619608", "0.5618038", "0.56178343", "0.56178343", "0.5617285", "0.5614236", "0.5614115", "0.5612862", "0.56128085", "0.56128085", "0.56128085", "0.56128085", "0.56128085", "0.56128085", "0.56128085", "0.56128085", "0.56128085", "0.56128085", "0.56128085", "0.56128085", "0.56128085", "0.56128085", "0.56128085" ]
0.7714606
0
Deletes an existing Follow model. If deletion is successful, the browser will be redirected to the 'index' page.
public function actionDelete($id) { $this->findModel ( $id )->delete (); return $this->redirect ( [ 'index' ] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n try {\n $this->findModel($id)->delete();\n } catch (StaleObjectException $e) {\n } catch (NotFoundHttpException $e) {\n } catch (\\Throwable $e) {\n }\n\n return $this->redirect(['index']);\n }", "public function actionDelete()\n {\n if ($post = Template::validateDeleteForm()) {\n $id = $post['id'];\n $this->findModel($id)->delete();\n }\n return $this->redirect(['index']);\n }", "public function actionDelete() {\n $model = new \\UsersModel();\n $login = $this->getParam('login');\n\n if ( $model->delete($login) ) {\n $this->flashMessage('Odstraněno', self::FLASH_GREEN);\n } else {\n $this->flashMessage('Záznam nelze odstranit', self::FLASH_RED);\n }\n\n $this->redirect('default');\n }", "public function actionDelete()\r\n {\r\n $this->_userAutehntication();\r\n\r\n switch($_GET['model'])\r\n {\r\n /* Load the respective model */\r\n case 'posts': \r\n $model = Post::model()->findByPk($_GET['id']); \r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Error: Mode <b>delete</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n /* Find the model */\r\n if(is_null($model)) {\r\n // Error : model not found\r\n $this->_sendResponse(400, sprintf(\"Error: Didn't find any model <b>%s</b> with ID <b>%s</b>.\",$_GET['model'], $_GET['id']) );\r\n }\r\n\r\n /* Delete the model */\r\n $response = $model->delete();\r\n if($response>0)\r\n $this->_sendResponse(200, sprintf(\"Model <b>%s</b> with ID <b>%s</b> has been deleted.\",$_GET['model'], $_GET['id']) );\r\n else\r\n $this->_sendResponse(500, sprintf(\"Error: Couldn't delete model <b>%s</b> with ID <b>%s</b>.\",$_GET['model'], $_GET['id']) );\r\n }", "public function actionDelete()\n {\n if (!$this->isAdmin()) {\n $this->getApp()->action403();\n }\n\n $request = $this->getApp()->getRequest();\n $id = $request->paramsNamed()->get('id');\n $model = $this->findModel($id);\n if (!$model) {\n $this->getApp()->action404();\n }\n\n $model->delete();\n\n return $this->back();\n }", "public function deleteFollow(Request $request)\n {\n $json = [];\n\n $validator = Validator::make($request->all(), [\n 'user_id' => 'required|integer',\n ]);\n\n if ($validator->fails()) {\n $json['errors'] = $validator->errors()->all();\n\n return response()->json($json, 200);\n }\n \n $follow_id = $request->get('user_id');\n $current_user_id = authApi()->user()->id;\n\n if (!Users::where('id', '=', $follow_id)->exists()) {\n\n $json['message'] = 'This User Don\\'t Exists';\n $json['isFollowed'] = false;\n $json['data'] = [];\n\n return response()->json($json, 200);\n }\n\n if(!$follow = Follow::where('user_id', $current_user_id)->where('followed_id', $follow_id)->first())\n {\n $json['message'] = 'You Don\\'t Follow This User';\n $json['isFollowed'] = false;\n $json['data'] = [];\n return response()->json($json, 200);\n }\n\n $follow->delete();\n\n $json['message'] = 'Success Cancel follow';\n $json['isFollowed'] = false;\n $json['data'] = [];\n\n return response()->json($json, 200);\n }", "function delete($idUsuario){\n $this->UsuarioModel->destroy($idUsuario);\n\n redirect(\"usuario\");\n\n\n }", "public function actionDelete($id)\n {\n \t\n \ttry{\n \t\t//$model = $this->findModel($id)->delete();\n \t\t$UserInfo = User::find()->where(['id' => $id])->one();\n \t\t$UserInfo->status = 0;\n \t\t$UserInfo->update();\n \t\tYii::$app->getSession()->setFlash('success', 'You are successfully deleted Nursing Home.');\n \t\n \t}\n \t \n \tcatch(\\yii\\db\\Exception $e){\n \t\tYii::$app->getSession()->setFlash('error', 'This Nursing Home is not deleted.');\n \t\n \t}\n // $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function deleteAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\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->delete();\n\t\t}\n\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName));\n\t}", "public function actionDelete()\n {\n $id= @$_POST['id'];\n if($this->findModel($id)->delete()){\n echo 1;\n }\n else{\n echo 0;\n }\n\n return $this->redirect(['index']);\n }", "public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n $this->findModel($id)->delete();\n }", "public function actionCreate() {\r\n\t\t$model = new Follow ();\r\n\t\t\r\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\r\n\t\t\treturn $this->redirect ( [ \r\n\t\t\t\t\t'view',\r\n\t\t\t\t\t'id' => $model->followID \r\n\t\t\t] );\r\n\t\t} else {\r\n\t\t\treturn $this->render ( 'create', [ \r\n\t\t\t\t\t'model' => $model \r\n\t\t\t] );\r\n\t\t}\r\n\t}", "public function unfollow_user(){\n\n\n\t\t$user_id=$this->session->userdata('usr_id');\n\t\t$follow_id=$this->input->post('id');\n\n\t\t$this->db->where('user_id', $user_id);\n\t\t$this->db->where('follow_user_id', $follow_id);\n\t\treturn $this->db->delete('friends');\n\n\t}", "public function deleteAction()\n {\n if ($this->isConfirmedItem($this->_('Delete %s'))) {\n $model = $this->getModel();\n $deleted = $model->delete();\n\n $this->addMessage(sprintf($this->_('%2$u %1$s deleted'), $this->getTopic($deleted), $deleted), 'success');\n $this->_reroute(array('action' => 'index'), true);\n }\n }", "public function actionDelete($id)\n {\n $model = new User;\n $model = $model::find()->where(['_id' => $id])->limit(1)->one();\n\n $model->delete();\n\n return $this->redirect(['index']);\n }", "public function deleteAction() {\n\t\t\t$this->_forward('index');\n\t\t}", "public function unfollow($params)\n {\n // Throw 401 if not logged in\n $token = $this->require_authentication();\n $currUser = $token->getUser()->getUserId();\n // Throw 401 if not logged in\n $id = $params['userId'];\n if ($id == null) {\n $this->error404($params[0]);\n }\n\n if(array_key_exists('ref', $_POST)) {\n $referrer = $_POST['ref'];\n } else {\n $referrer = '/users/all';\n }\n\n // Delete company model from DB\n $db = $this->getDBConn();\n $res = Following::deleteFollow($db, $currUser ,$id); // true if successful\n\n if ($res) {\n $this->addFlashMessage(\"Deleted following relationship!\", self::FLASH_LEVEL_SUCCESS);\n $this->redirect($referrer);\n } else {\n $this->addFlashMessage(\"Unknown error when deleting following relationship.\", self::FLASH_LEVEL_SERVER_ERR);\n $this->redirect($referrer);\n }\n }", "public function deleteFollowup($id){\n // Call deleteData() method of Page Model\n FamilyFollowup::deleteData($id);\n \n echo \"Delete successfully\";\n exit;\n }", "public function actionDelete()\n\t{\n\t parent::actionDelete();\n\t\t$model=$this->loadModel($_POST['id']);\n\t\t $model->delete();\n\t\techo CJSON::encode(array(\n 'status'=>'success',\n 'div'=>'Data deleted'\n\t\t\t\t));\n Yii::app()->end();\n\t}", "public function actionDelete()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\t$this->checkUser();\n\t\t$this->checkActivation();\n\t//\t$model = new Estate;\n\t\t\n\t\tif($model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$model=Estate::model()->findbyPk($_GET['id']);\n\t\t\tif($model===null)\n\t\t\t\tthrow new CHttpException(404, Yii::t('app', 'The requested page does not exist.'));\n\t\t}\n\t\t\n\t\tEstateImage::deleteAllImages($model->id);\t\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->tour);\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->image);\n\t\t\n\t\t$model->delete();\n\t\t\n\t\t\n\t\tModeratorLogHelper::AddToLog('deleted-estate-'.$model->id,'Удален объект #'.$model->id.' '.$model->title,null,$model->user_id);\n\t\t$this->redirect('/cabinet/index');\n\t\t\n\t}", "public function actionDelete()\n {\n if(isset($_POST['id'])){\n $id = $_POST['id'];\n $this->findModel($id)->delete();\n echo \"success\";\n }\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n if (Yii::$app->user->can('deleteFavorito')){\n $model->delete();\n }\n\n //Yii::$app->request->referrer => retorna a ultima página em que o utilizador esteve\n //se esta for != null então o redirect é feito para a página anteriror\n return $this->redirect(Yii::$app->request->referrer ?: Yii::$app->homeUrl);\n }", "public function destroy($follower_id,Request $request){\n\t\t$following = Follower::find($request->id);\n\t\tif (Auth::user() && Auth::user()->id == $following->user_id)\n\t\t{\n\t\t\tif(sizeof($following) > 0)\n\t\t\t{\n\t\t\t\t$following->follower->personal->no_followers -=1;\n\t\t\t\t$following->follower->personal->save();\n\t\t\t\t$following->delete();\n\t\t\t\tSession::put('done', 'unfollowed done');\n\t\t\t\treturn Redirect::back();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSession::put('error',\"something went wrong, please try again after while..\");\n\t\t\t\treturn Redirect::to('/errors/404');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSession::put('error', \"You are not authorize to do that, sorry for disapoint you, we are SECUIRE!!!\");\t\n\t\t\treturn Redirect::to('/errors/404');\n\t\t}\n\t}", "public function delete(){\n\t\t\t$id = $_GET['id'];\n\t\t\t$result = $this->userrepository->delete($id);\n\t\t\tif($result = true){\n\t\t\t\theader(\"Location: index.php/admin/index/delete\");\n\t\t\t}\n\t\t}", "public function actionDelete($id)\n {\n\t\t$model = $this->findModel($id);\n\n\t\t$model->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']); \n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']); \n }", "public function actionDelete($id) {\n\n $m = $this->findModel($id);\n //echo $m->user_id;\n $this->findModel($id)->delete();\n $user = new User;\n $userModel = $user::findOne($m->user_id);\n if ($userModel)\n $userModel->delete();\n // echo \"<br>\".$user->findAll(['id'=>$m->user_id]);\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id){\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n /*Yii::$app->authManager->revokeAll($id);\n $this->findModel($id)->delete();*/\n $model = $this->findModel($id);\n $model->status = User::STATUS_DELETED;\n $model->save(false);\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n // $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function DeleteAction()\r\n\t{\r\n\t\t// If form has been submitted\r\n\t\tif(isset($_GET['id']))\r\n\t\t{\r\n\t\t\t// Save data to table\r\n\t\t\t$this->View->status = $this->Author->delete($_GET['id']);\r\n\t\t}\r\n\t}", "public function actionDelete($id) {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n { \n\t\t$model = $this->findModel($id); \n $model->isdel = 1;\n $model->save();\n //$model->delete(); //this will true delete\n \n return $this->redirect(['index']);\n }", "public function actionDelete()\n {\n return $this->findModel(Yii::$app->request->post('id'))->delete(false);\n }", "public function actionDelete($id)\n\t{\n\t\t$model = $this->loadModel($id);\n\t\t\n\t\tif ($model) {\n\t\t\t$model->delete();\n\t\t}\n\n // if AJAX request (triggered by deletion via list grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));\n\t}", "public function deleteAction()\n {\n if (!Auth::loggedIn()) {\n return redirect('auth/login');\n }\n\n // Get first parameter from URL as comment $id.($this->params are from Controller)\n // $id = $this->params[0];\n $id = $this->getParam();\n\n // Call static function from Model which return comment object or null.\n $article = Article::findById($id);\n\n if (!$article) {\n return redirect();\n }\n\n if (!$article->canDelete()) {\n return redirect('articles/details/' . $article->id);\n }\n\n $comments = $article->getComments();\n\n // Delete each comment in the loop\n foreach ($comments as $comment) {\n $comment->delete();\n }\n\n // Delete article on the end\n $article->delete();\n\n set_alert('info', '<b>Success!</b> Your article has been deleted!');\n\n return redirect('articles');\n }", "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\t\treturn $this->redirect(['index']);\n\t}", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n if ($model->delete()) {\n $this->addFlashMessage('User deleted: ' . $model->login, self::FLASH_WARNING);\n }\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n $this->findUser($id)->delete();\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $model=$this->findModel ( $id );\n\t\t$model->is_delete=1;\n\t\t$model->save ();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n \n $model->delete();\n return $this->redirect([\n 'index'\n ]);\n }", "public function actionDelete($id)\n {\n $model=$this->findModel($id);\n $model->IsDelete=1;\n $model->save();\n Yii::$app->session->setFlash('success', \"Your message to display.\");\n return $this->redirect(['index']);\n }", "public function deleteAction() {\n\t\t// if($post->delete()) {\n\t\t// \tSession::message([\"Post <strong>$post->name</strong> deleted!\" , \"success\"]);\n\t\t// \tredirect_to('/posts/index');\n\t\t// } else {\n\t\t// \tSession::message([\"Error saving! \" . $error->get_errors() , \"success\"]);\n\t\t// }\n\t}", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n\t$model = static::findModel($id);\n\n\t$this->processData($model, 'delete');\n\n\t$model->delete();\n\n \treturn $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n $model->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n $model->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['site/knpr-manajemen-user']);\n }", "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $this->checkPermissionByModelsUserId($model->user_id);\n $model->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\r\n {\r\n if(file_exists($this->findModel($id)->path)){\r\n unlink($this->findModel($id)->path);\r\n }\r\n \r\n $this->findModel($id)->delete();\r\n \r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "public function delete()\n\t{\n\t\t// Check for request forgeries.\n\t\tJRequest::checkToken() or jexit(JText::_('JInvalid_Token'));\n\n\t\t// Get and sanitize the items to delete.\n\t\t$cid = JRequest::getVar('cid', null, 'post', 'array');\n\t\tJArrayHelper::toInteger($cid);\n\n\t\t// Get the model.\n\t\t$model = &$this->getModel('User');\n\n\t\t// Attempt to delete the item(s).\n\t\tif (!$model->delete($cid)) {\n\t\t\t$this->setMessage(JText::sprintf('USERS_MEMBER_DELETE_FAILED', $model->getError()), 'notice');\n\t\t}\n\t\telse {\n\t\t\t$this->setMessage(JText::sprintf('USERS_MEMBER_DELETE_SUCCESS', count($cid)));\n\t\t}\n\n\t\t// Redirect to the list screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_users&view=users', false));\n\t}", "public function delete()\n {\n if (!$this->current_user->has_permission('USER_DELETE')) {\n return redirect('user/search');\n }\n\n if ($this->input->is_post()) {\n $this->_api('user')->delete([\n 'id' => (int) $this->input->post('user_id')\n ]);\n }\n\n $this->_flash_message('ユーザーの退会処理が完了しました');\n return redirect('/user/search');\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n Login::find()->where(['username'=>$id])->one()->delete();\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n\t\t$this->findModel ( $id )->delete ();\n\t\t\n\t\treturn $this->redirect ( [ \n\t\t\t\t'index' \n\t\t] );\n\t}", "public function actionDelete($id) {\n\t\t$this->findModel ( $id )->delete ();\n\t\t\n\t\treturn $this->redirect ( [ \n\t\t\t\t'index' \n\t\t] );\n\t}", "public function actionDelete()\n {\n extract(Yii::$app->request->post());\n $this->findModel($list, $item)->delete();\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n Yii::$app->getSession()->setFlash('success','successful deleted');\n return $this->redirect(Yii::$app->request->referrer);\n //return $this->redirect(['index']);\n }", "public function delete()\n {\n Contest::destroy($this->modelId);\n $this->modalConfirmDeleteVisible = false;\n $this->resetPage();\n }", "public function delete(){\n\t\t$user_id = $this->input->post(\"user_id\");\n\t\t$username = $this->input->post(\"username\");\n\n\t\t$condition = array(\n\t\t\t\"user_id\" => $user_id\n\t\t);\n\n\t\t$this->load->model(\"User_model\", \"users\", true);\n\n\t\t$this->users->delete($condition);\n\n\t\t$toast = array('state' => true, 'msg' => $username.' is Deleted Successfully!');\n\t\t$this->session->set_flashdata('toast', $toast);\n\n\t\techo \"success\";\n\t}", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "public function actionDelete($rel_id)\n {\n /*$this->findModel($id)->delete();\n return $this->redirect(['index']);*/\n $model = $this->findModel($rel_id);\n $model->deleted = 1;\n if ($model->save()) {\n return $this->redirect(['index']);\n }\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }" ]
[ "0.6680721", "0.64890987", "0.6458703", "0.6439593", "0.6423458", "0.62801945", "0.625463", "0.6239073", "0.62099296", "0.62034047", "0.6178395", "0.6176088", "0.61753917", "0.61588204", "0.61492676", "0.61119884", "0.6074332", "0.6071773", "0.6064571", "0.6056524", "0.6054059", "0.6053923", "0.6028071", "0.5990957", "0.59892595", "0.596854", "0.596854", "0.59651154", "0.59631324", "0.5958381", "0.59579724", "0.59430027", "0.59430027", "0.59179896", "0.5916208", "0.59063566", "0.5904742", "0.5904742", "0.58867806", "0.5883844", "0.58838254", "0.5877857", "0.5877432", "0.5876498", "0.587363", "0.5865989", "0.58512455", "0.5846336", "0.58452404", "0.5842969", "0.5841942", "0.5834932", "0.5834932", "0.58274114", "0.5824381", "0.5821853", "0.58200055", "0.58123845", "0.58123845", "0.58123845", "0.58123845", "0.58122647", "0.58122647", "0.5810735", "0.5809293", "0.5808857", "0.58058333", "0.58058333", "0.5804086", "0.58004385", "0.578941", "0.5789355", "0.5787973", "0.5787973", "0.5787973", "0.5787973", "0.5787973", "0.5787973", "0.5787973", "0.5786919", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715", "0.57839715" ]
0.57973015
70
Finds the Follow model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
protected function findModel($id) { if (($model = Follow::findOne ( $id )) !== null) { return $model; } else { throw new NotFoundHttpException ( 'The requested page does not exist.' ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find($id)\n {\n return $this->model->with(['followers','following'])->find($id);\n }", "private function findModel($key)\n {\n if (null === $key) {\n throw new BadRequestHttpException('Key parameter is not defined in findModel method.');\n }\n\n $modelObject = $this->getNewModel();\n\n if (!method_exists($modelObject, 'findOne')) {\n $class = (new\\ReflectionClass($modelObject));\n throw new UnknownMethodException('Method findOne does not exists in ' . $class->getNamespaceName() . '\\\\' .\n $class->getShortName().' class.');\n }\n\n $result = call_user_func([\n $modelObject,\n 'findOne',\n ], $key);\n\n if ($result !== null) {\n return $result;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\n {\n if (($model = PatientFollowUpDetails::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public abstract function find($primary_key, $model);", "public function actionFind()\n\t{\n\t\t$requestedId = craft()->request->getParam('id');\n\t\t// build criteria to find model\n\t\t$criteria = craft()->elements->getCriteria(ElementType::Entry);\n\t\t$criteria->id = $requestedId;\n\t\t$criteria->limit = 1;\n\t\t\n\t\t// fire !\n\t\t$entries = $criteria->find();\n\t\t$entry = count($entries) > 0 ? $entries[0] : null;\n\n\t\t// redirect if possible\n\t\tif($entry && $entry->url) {\n\n\t\t\t// build new query, but remove id from query path\n\t\t\t$newLocation = $entry->url . ( craft()->request->getParam('L') ? '?L='.craft()->request->getParam('L') : '');\n\n\t\t\theader(\"HTTP/1.1 302 Found\"); \n\t\t\theader(\"Location: \" . $newLocation); \n\t\t\texit();\n\t\t}else{\n\t\t\theader(\"HTTP/1.1 404 Not Found\");\n\t\t\theader(\"Location: /404.html\"); \n\t\t\texit();\n\t\t}\n\n\t\tcraft()->end();\n\t}", "protected function findModel($id)\n\t{\n\t\tif (($model = Trailer::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}", "public function find($id){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Create a select query\n\t\t$query = \"SELECT \" . implode(\",\" , static::$columns).\" FROM \" . static::$tableName . \" WHERE id = :id\";\n\t\t//prepare the query\n\t\t$statement = $db->prepare($query);\n\t\t//bind the column id with :id\n\t\t$statement->bindValue(\":id\", $id);\n\t\t//Run the query\n\t\t$statement->execute();\n\n\t\t//Put the associated row into a variable\n\t\t$record = $statement->fetch(PDO::FETCH_ASSOC);\n\n\t\t//If there is not a row in the database with that id\n\t\tif(! $record){\n\t\t\tthrow new ModelNotFoundException();\n\t\t}\n\n\t\t//put the record into the data variable\n\t\t$this->data = $record;\n\t}", "public function findById() {\n // TODO: Implement findById() method.\n }", "public function find($id = null) {\n $argument = $id?? $this->request->fetch('id')?? null;\n return $this->model->find($argument);\n }", "protected function findModel($id)\n {\n if (($model = Picture::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404, \\Yii::t('The requested object does not exist or has been already deleted.'));\n }\n }", "public static function findModel($id='')\n {\n $model = static::find()->where(['id' => $id])->one();\n if ($model == null) {\n throw new \\yii\\web\\NotFoundHttpException(Yii::t('app',\"Page not found!\"));\n }\n return $model;\n }", "protected function findModel($id)\n {\n if (($model = Menu::findOne([ 'id' => $id ])) !== null)\n {\n return $model;\n }\n else\n {\n throw new HttpException(404, Yii::t('backend', 'The requested page does not exist.'));\n }\n }", "public function findById(string $modelId): ?Model;", "public static function find( $primaryKey )\n\t{\n\t\tself::init();\n\t\t\n\t\t// Select one item by primary key in Database\n\t\t$result = Database::selectOne(\"SELECT * FROM `\" . static::$table . \"` WHERE `\" . static::$primaryKey . \"` = ?\", $primaryKey);\t\t\n\t\tif( $result == null )\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// Create & return new object of Model\n\t\treturn self::newItem($result);\n\t}", "function find($id)\n{\n\t$model = $this->newModel(null);\n\treturn $model->find($id);\n}", "public function find(int $id): ?Model;", "public function find(int $id): ?Model;", "protected function findModel($id)\n {\n if (($model = PaidEmployment::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404);\n }\n }", "public function find($id)\n\t{\n\t\treturn $this->model->where(\"id\", \"=\", $id)->first();\n\t}", "public function find(DTO $dto): ?Model;", "protected function findModel($id)\n\t{\n if (($model = UserLevel::findOne($id)) !== null) {\n return $model;\n }\n\n\t\tthrow new \\yii\\web\\NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n\t}", "public function find($key)\n\t{\n\t\t$user = model('user')->find_user($key);\n\n\t\treturn $user ? UserModel::newWithAttributes(Arr::toArray($user)) : null;\n\t}", "protected function findModel($id)\n {\n if (($model = PostKey::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Referraltrackreceiving::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public function find($id){\n return $this->model->query()->findOrFail($id);\n }", "protected function findModel($id) {\n if (($model = Stakeholder::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = ShareUser::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function find($model, $id);", "public function findModel($class, $id)\n {\n $model = call_user_func([$class, 'findOne'], $id);\n if (!$model) {\n $this->raise404();\n }\n return $model;\n }", "protected function findModel($id)\n {\n if (($model = CoachPosts::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n\t\t$p = $this->primaryModel;\n if (($model = $p::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($order_id, $item_id, $shipping_id)\n{\nif (($model = CheckoutLink::findOne(['order_id' => $order_id, 'item_id' => $item_id, 'shipping_id' => $shipping_id])) !== null) {\nreturn $model;\n} else {\nthrow new NotFoundHttpException('The requested page does not exist.');\n}\n}", "protected function findPkSimple($key, ConnectionInterface $con)\n {\n $sql = 'SELECT follower_id, following_id FROM user_relations WHERE follower_id = :p0 AND following_id = :p1';\n try {\n $stmt = $con->prepare($sql);\n $stmt->bindValue(':p0', $key[0], PDO::PARAM_STR);\n $stmt->bindValue(':p1', $key[1], PDO::PARAM_STR);\n $stmt->execute();\n } catch (Exception $e) {\n Propel::log($e->getMessage(), Propel::LOG_ERR);\n throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), 0, $e);\n }\n $obj = null;\n if ($row = $stmt->fetch(\\PDO::FETCH_NUM)) {\n /** @var ChildUserRelations $obj */\n $obj = new ChildUserRelations();\n $obj->hydrate($row);\n UserRelationsTableMap::addInstanceToPool($obj, serialize([(null === $key[0] || is_scalar($key[0]) || is_callable([$key[0], '__toString']) ? (string) $key[0] : $key[0]), (null === $key[1] || is_scalar($key[1]) || is_callable([$key[1], '__toString']) ? (string) $key[1] : $key[1])]));\n }\n $stmt->closeCursor();\n\n return $obj;\n }", "public function find($id)\n {\n /** @var SFModel $model */\n foreach ($this as $model) {\n if ($model->Id == $id) {\n return $model;\n }\n }\n\n return null;\n }", "function fetch_or_404($class, $id)\n{\n $obj = call_user_func(array($class, 'fetch'), $id);\n if (!$obj) {\n throw new NotFoundException(); \n }\n return $obj;\n}", "protected function findModel($id)\r\n {\r\n if (($model = Announce::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "protected function findModel($id)\n {\n \tif (($model = User::findOne($id)) !== null) {\n \t\treturn $model;\n \t} else {\n \t\tthrow new NotFoundHttpException('The requested page does not exist.');\n \t}\n }", "protected function findModel($id)\n {\n if (($model = DrugTuri::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($masterlist_id)\n\t{\n\t\tif (($model = WiMasterlist::findOne($masterlist_id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}", "protected function findModel($id)\n {\n if (($model = Mark::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($key)\n {\n if (($model = NotificationsTemplate::find()->andWhere(['key'=>$key])->one()) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = SanPham::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public function find($id):Default_Model_Model{\n\n\n\t\t$result=$this->getDbTable()->find($id);\n\n\t\t//echo \"id=>$id\";\n\n\t\tif(0 == count($result)) return false;\n\n\t\t$row = $result->current();\n\t\t$object = $this->getModel($row->toArray ());\n\n\t\treturn $object;\n\n\t}", "protected function findModel($id)\n\t\t{\n\t\t\tif (($model = PhoneRecord::findOne($id)) !== null) {\n\t\t\t\treturn $model;\n\t\t\t}\n\t\t\t\n\t\t\tthrow new NotFoundHttpException(Yii::t('app', 'Запрашиваемая страница не существует.'));\n\t\t}", "public static function findOne($params=''){\n\t\t$activeModel = EntityManager::getEntityInstance(get_called_class());\n\t\t$arguments = func_get_args();\n\t\treturn call_user_func_array(array($activeModel, 'findFirst'), $arguments);\n\t}", "protected function findModel($id)\n {\n if (($model = PdmP44::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Prefix::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Kaohao::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\n {\n if (($model = Document::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('Страница не существует.');\n }", "public function getFollowId()\n {\n return $this->follow_id;\n }", "public function findById(int $id) : ?Model;", "protected function findModel($id)\n {\n if (($model = Nursinghomes::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id) {\r\n if (($model = Fltr::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "public function find($id)\n {\n return $this->model->findOrFail($id);\n }", "public function find($id)\n {\n return $this->model->findOrFail($id);\n }", "protected function findModel($id)\n {\n if (($model = CodeMember::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id) {\n\t\tif (($model = Notification::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t}\n\n\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t}", "public function findOr404()\n {\n $repository = $this->repository->getRepo()\n ->findAndReturn($this->thisRouteID())\n ->or404();\n\n return $repository;\n }", "protected function findModel($id)\n {\n if (($model = RefPembahasan::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n\t{\n\t\tif (($model = Route::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t}\n\t}", "protected function findModel($id)\n {\n if (($model = Buku::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\n {\n if (($model = Accountholder::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id) {\n\n\n if (($model = page::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function find($pk)\r\n {\r\n $row = $this->getTable()->find($pk);\r\n if(!$row){\r\n return false;\r\n }\r\n $sampleModel = new SampleModel();\r\n $this->_map($sampleModel, $row);\r\n return $sampleModel;\r\n }", "protected function findModel($id)\n\t{\n\t\tif (($model = RefFoods::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t}\n\n\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t}", "protected function findModel($id)\n {\n if (($model = TKaryawan::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = NursingRecord::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('你所请求的页面不存在');\n }\n }", "protected function findModel($id)\n {\n if (($model = LoanFund::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id) {\n if (($model = Users::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('yii','The requested page does not exist.'));\n }\n }", "protected function findModel($id)\n {\n if (($model = Favorito::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id) {\n\t\tif (($model = EntEmpleados::findOne ( $id )) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException ( 'The requested page does not exist.' );\n\t\t}\n\t}", "protected function findModel($id)\n {\n if (($model = KhoSanPham::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\r\n {\r\n if (($model = Usertable::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "public function findById($id)\n {\n return $this->model->with('user')->where('id', '=', $id)->first();\n }", "protected function findModel($id) {\n\t\tif (($model = Menu::findOne ( $id )) !== null) {\n\t\t\treturn $model;\n\t\t}\n\t\t\n\t\tthrow new NotFoundHttpException ( 'The requested page does not exist.' );\n\t}", "protected function findModel($id) {\n if (($model = Foro::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "private function _findModel($id)\n {\n $modelClass = $this->_getModelClass();\n\n if (($model = $modelClass::findOne($id)) === null) {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n\n return $model;\n }", "protected function findModel($rel_id)\n {\n if (($model = Custprojrel::findOne(['rel_id' => $rel_id])) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\r\n {\r\n if (($model = MenuToUser::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "public function findById ($id);", "public static function find($id, $key = 'id');", "protected function findModel($id)\n {\n if (($model = Amphur::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Fenhong::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id) {\n if (($model = Companyusers::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function findModel($id)\n {\n if ($this->findModel !== null) {\n return call_user_func($this->findModel, $id, $this);\n }\n\n /* @var $modelClass ActiveRecordInterface */\n $modelClass = $this->modelClass;\n $keys = $modelClass::primaryKey();\n if (count($keys) > 1) {\n $values = explode(',', $id);\n if (count($keys) === count($values)) {\n $model = $modelClass::findOne(array_combine($keys, $values));\n }\n } elseif ($id !== null) {\n $model = $modelClass::findOne($id);\n }\n\n if (isset($model)) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('error', Yii::t('error', Yii::t('error', '224002'), ['id' => $id])), 224002);\n }", "protected function findModel($id)\n {\n if (($model = SubAkun::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "protected function findModel($id)\n {\n if (($model = Financeiro::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\r\n {\r\n if (($model = Apresentacao::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "protected function findModel($id)\n {\n if (($model = User::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('app','SYSTEM_TEXT_PAGE_NOT_FOUND'));\n }\n }", "public static function getFollower($id) {\n $db = Db::instance(); // create db connection\n // build query\n $q = sprintf(\"SELECT * FROM `%s` WHERE `id` = %d;\",\n self::DB_TABLE,\n $id\n );\n $result = $db->query($q); // execute query\n if($result->num_rows == 0) {\n return null;\n } else {\n $row = $result->fetch_assoc(); // get results as associative array\n\n $follower = new Follower(); // instantiate\n $follower->id = $row['id'];\n $follower->username = $row['username'];\n $follower->follower = $row['follower'];\n\n return $follower; // return the member\n }\n }", "protected function findModel($project_ppi, $author_scopus_id)\n {\n if (($model = AuthorsProjectAuthorMatch::findOne(['project_ppi' => $project_ppi, 'author_scopus_id' => $author_scopus_id])) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "protected function findModel($id)\n {\n if (($model = BackendUser::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "public function find($primary)\n {\n if (isset($this->models[$primary])) {\n return $this->models[$primary];\n }\n\n return;\n }", "protected function findModel($id)\n {\n if (($model = SourceMessage::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Module::t('The requested page does not exist.'));\n }\n }", "public function findModel($id)\n {\n if (($model = Page::findOne($id)) !== null) \n {\n return $model;\n } \n else \n {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function firstOrFail()\n {\n $entity = $this->first();\n if ($entity) {\n return $entity;\n }\n /** @psalm-suppress UndefinedInterfaceMethod */\n throw new RecordNotFoundException(sprintf(\n 'Record not found in endpoint \"%s\"',\n $this->getRepository()->getName()\n ));\n }", "public function loadModel()\n {\n if ($this->_model === null) {\n if (isset($_GET['id'])) {\n if (Yii::app()->user->isGuest)\n //$condition='status='.Post::STATUS_PUBLISHED.' OR status='.Post::STATUS_ARCHIVED;\n $condition = '';\n else\n $condition = '';\n $this->_model = Object::model()->with(array('author','files'))->findByPk($_GET['id']);\n }\n if ($this->_model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $this->_model;\n }", "public function find($id)\n\t{\n\t\treturn Model::where('id', $id)->first();\n\t}", "protected function findModel($id)\n {\n if (($model = PemesananAmbulance::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public function findOne(string $attribute, string $value): ?Model;" ]
[ "0.615055", "0.6102527", "0.6024297", "0.59946686", "0.5903707", "0.5823651", "0.5813569", "0.5784466", "0.5740782", "0.5696516", "0.56860465", "0.5678777", "0.5674011", "0.565186", "0.56242853", "0.56193435", "0.56193435", "0.55957085", "0.55911", "0.55882806", "0.5578549", "0.5568008", "0.55371124", "0.55365217", "0.5521743", "0.5520893", "0.55201966", "0.5507465", "0.55030906", "0.5499705", "0.5496354", "0.54815924", "0.54645216", "0.54619884", "0.54514045", "0.54493", "0.54338723", "0.5429649", "0.5427438", "0.5424386", "0.5416263", "0.5409609", "0.54066175", "0.54047126", "0.54033273", "0.5398347", "0.5393666", "0.53807485", "0.5380587", "0.5378308", "0.53750646", "0.53676355", "0.53653723", "0.53645635", "0.53645635", "0.53619546", "0.5359938", "0.5358113", "0.535455", "0.5353594", "0.5353536", "0.5353454", "0.5351477", "0.5350445", "0.53452516", "0.53434515", "0.5343282", "0.53382885", "0.53370297", "0.533452", "0.53297263", "0.5329261", "0.5329235", "0.5320426", "0.53192747", "0.53178054", "0.5312858", "0.5311159", "0.53089553", "0.5307018", "0.5303346", "0.53029096", "0.5302847", "0.52957696", "0.5291079", "0.52907985", "0.5289573", "0.528845", "0.5286809", "0.52830124", "0.5279994", "0.52799296", "0.5279395", "0.5278153", "0.5277276", "0.5276786", "0.5274624", "0.52674794", "0.52671385", "0.5266635" ]
0.7197453
0
We declare the content of our items container
public function __construct() { // The blockGroup must match the first half of how we call the block $this->_blockGroup = 'yourmindourwork_storesquare'; // The controller must match the second half of how we call the block $this->_controller = 'adminhtml_manage_categories'; $this->_headerText = Mage::helper('yourmindourwork_storesquare')->__('Manage Categories'); parent::__construct(); $this->_removeButton('add'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render_content_items() {\n\t\tforeach ( (array) $this->get_content_items() as $content_item ) {\n\t\t\t$content_item->render();\n\t\t}\n\t}", "function set_items() { \n\n\t\t$this->items = $this->get_items();\n\n\t}", "public function items()\n {\n \n }", "public function items ()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "abstract protected function _getItems();", "abstract public function items();", "public function init(){\n parent::init();\n $this->registerAssets();\n $this->attachBehavior(\"linkCont\", new LinkContainerBehavior());\n \n echo CHtml::openTag( $this->containerTag, $this->getContainerOptions());\n echo CHtml::openTag($this->listTag, $this->getListOptions());\n \n // Remove invisible items\n $items = $this->removeInvisibleItems($this->items);\n \n // Render the items\n $count = count($items);\n foreach ($items as $index=>$item ) {\n echo CHtml::openTag($this->itemTag, $this->getItemOptions($item, $index, $count));\n $item['labelMarkup'] = $this->getLabel($item);\n $item['anchorOptions'] = $this->getAnchorOptions($item, $index, $count);\n $this->renderItem($item);\n echo CHtml::closeTag($this->itemTag);\n }\n }", "protected function _getItems(){\n\n\t\t// get parent\n\t\t$model = new Default_Model_ProjectImages();\n\t\t$parentModel = new Default_Model_Projects();\n\t\t$parent = $parentModel->findById($this->_session->id);\n\n\n\t\t// get the item list\n\t\t$model = new $this->_primaryModel;\n\t\t$items = $model->fetchNotTrashedByParentId($this->_session->id);\n\n\t\t// assign specific vars to the view\n\t\t$this->view->assign(array (\n\t\t\t'items' => $items,\n\t\t\t'parent' => $parent,\n//\t\t\t'title' => $items->getRow(0)->title\n\t\t\t'title' => \"TITLE\"\n\t\t));\n\t}", "function prepare_items() {\n\t\t\n\t\t// Get how many records per page to show\n\t\t$per_page\t= $this->per_page;\n\t\t\n\t\t// Get All, Hidden, Sortable columns\n\t\t$columns\t= $this->get_columns();\n\t\t$hidden \t= array();\n\t\t$sortable \t= $this->get_sortable_columns();\n\t\t\n\t\t// Get final column header\n\t\t$this->_column_headers = array($columns, $hidden, $sortable);\n\t\t\n\t\t// Get Data of particular page\n\t\t$data_res \t= $this->bdpp_display_styles_list();\n\t\t$data \t\t= $data_res['data'];\n\t\t\n\t\t// Get current page number\n\t\t$current_page = $this->get_pagenum();\n\t\t\n\t\t// Get total count\n\t\t$total_items = $data_res['total'];\n\t\t\n\t\t// Get page items\n\t\t$this->items = $data;\n\t\t\n\t\t// Register pagination options and calculations.\n\t\t$this->set_pagination_args( array(\n\t\t\t\t\t\t\t\t\t\t\t'total_items' => $total_items, // Calculate the total number of items\n\t\t\t\t\t\t\t\t\t\t\t'per_page' => $per_page, // Determine how many items to show on a page\n\t\t\t\t\t\t\t\t\t\t\t'total_pages' => ceil($total_items / $per_page)\t// Calculate the total number of pages\n\t\t\t\t\t\t\t\t\t\t));\n\t}", "public function containers()\n {\n }", "public function processContainer()\n {\n $class = \"container\";\n if ($this->hasFluid()) $class .= \"-fluid\";\n $this->add($this->createWrapper('div', ['class' => $class], $this->stringifyHeader() . $this->stringifyCollapse()));\n }", "public function renderListContent() {}", "public function prepare_items()\n\t\t {\n\t\t // How many records are to be shown on page\n\t\t\t\t$per_page = 20;\n\n\t\t\t\t// Columns array to be displayed\n\t\t $columns = $this->get_columns();\n\n\t\t // Columns array to be hidden\n\t\t $hidden = array();\n\n\t\t // List of sortable columns\n\t\t $sortable = $this->get_sortable_columns();\n\t\t \n\t\t // Create the array that is used by the class\n\t\t $this->_column_headers = array($columns, $hidden, $sortable);\n\t\t \n\t\t // Process bulk actions\n\t\t $this->process_bulk_action();\n\n\t\t \t// Current page\n\t\t $current_page = $this->get_pagenum();\n\n\t\t // Get contests\n\t\t $data = $this->getContests();\n\t\t \n\t\t // Total number of items\n\t\t $total_items = count($data);\n\t\t \n\t\t // Slice data for pagination\n\t\t $data = array_slice($data, (($current_page-1)*$per_page), $per_page);\n\t\t \n\t\t // Send processed data to the items property to be used\n\t\t $this->items = $data;\n\t\t \n\t\t // Register pagination options & calculations\n\t\t $this->set_pagination_args(array(\n\t\t 'total_items' => $total_items, //WE have to calculate the total number of items\n\t\t 'per_page' => $per_page, //WE have to determine how many items to show on a page\n\t\t 'total_pages' => ceil($total_items/$per_page) //WE have to calculate the total number of pages\n\t\t ));\n\t\t }", "public function frontend_element_items()\n {\n\t\t$this->items = array(\n\t\t\t'content' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_ELEMENT_TITLE'),\n\t\t\t\t\t'id' => 'el_title',\n\t\t\t\t\t'type' => 'text_field',\n\t\t\t\t\t'class' => 'jsn-input-xxlarge-fluid',\n\t\t\t\t\t'std' => JText::_('JSN_PAGEBUILDER_ELEMENT_IMAGE_ELEMENT_TITLE_STD'),\n\t\t\t\t\t'role' => 'title',\n\t\t\t\t\t'tooltip' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_ELEMENT_TITLE_DES')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_IMAGE_FILE'),\n\t\t\t\t\t'id' => 'image_file',\n\t\t\t\t\t'type' => 'select_media',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'class' => 'jsn-input-large-fluid',\n\t\t\t\t\t'tooltip' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_IMAGE_FILE_DES')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => JText::_('JSN_PAGEBUILDER_ELEMENT_IMAGE_ALT_TEXT'),\n\t\t\t\t\t'id' => 'image_alt',\n\t\t\t\t\t'type' => 'text_field',\n\t\t\t\t\t'class' => 'jsn-input-xxlarge-fluid',\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'tooltip' => JText::_('JSN_PAGEBUILDER_ELEMENT_IMAGE_ALT_TEXT_DES')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => JText::_('JSN_PAGEBUILDER_ELEMENT_IMAGE_IMAGE_SIZE'),\n\t\t\t\t\t'id' => 'image_size',\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'std' => 'fullsize',\n\t\t\t\t\t'options' => JSNPagebuilderHelpersType::getImageSize(),\n\t\t\t\t\t'tooltip' => JText::_('JSN_PAGEBUILDER_ELEMENT_IMAGE_IMAGE_SIZE_DES')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => JText::_('JSN_PAGEBUILDER_ELEMENT_IMAGE_CLICK_ACTION'),\n\t\t\t\t\t'id' => 'link_type',\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'std' => JSNPagebuilderHelpersType::getFirstOption(JSNPbImageHelper::getClickActionType()),\n\t\t\t\t\t'options' => JSNPbImageHelper::getClickActionType(),\n\t\t\t\t\t'tooltip' => JText::_('JSN_PAGEBUILDER_ELEMENT_IMAGE_CLICK_ACTION_DES'),\n\t\t\t\t\t'has_depend' => '1',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_URL'),\n\t\t\t\t\t'id' => 'image_type_url',\n\t\t\t\t\t'type' => 'text_field',\n\t\t\t\t\t'class' => 'jsn-input-xxlarge-fluid',\n\t\t\t\t\t'std' => 'http://',\n\t\t\t\t\t'tooltip' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_LINK_URL_DES'),\n\t\t\t\t\t'dependency' => array('link_type', '=', 'url')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_OPEN_IN'),\n\t\t\t\t\t'id' => 'open_in',\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'std' => JSNPagebuilderHelpersType::getFirstOption(JSNPbImageHelper::getOpenInOptions()),\n\t\t\t\t\t'options' => JSNPbImageHelper::getOpenInOptions(),\n\t\t\t\t\t'tooltip' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_OPEN_IN_DES'),\n\t\t\t\t\t'dependency' => array('link_type', '=', 'url')\n\t\t\t\t),\n\t\t\t),\n\t\t\t'styling' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'type' => 'preview',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_CONTAINER_STYLE'),\n\t\t\t\t\t'id' => 'image_container_style',\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'std' => JSNPagebuilderHelpersType::getFirstOption(JSNPagebuilderHelpersType::getContainerStyle()),\n\t\t\t\t\t'options' => JSNPagebuilderHelpersType::getContainerStyle(),\n\t\t\t\t\t'tooltip' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_CONTAINER_STYLE_DES')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_ALIGNMENT'),\n\t\t\t\t\t'id' => 'image_alignment',\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'std' => JSNPagebuilderHelpersType::getFirstOption(JSNPagebuilderHelpersType::getTextAlign()),\n\t\t\t\t\t'options' => JSNPagebuilderHelpersType::getTextAlign(),\n\t\t\t\t\t'tooltip' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_ALIGNMENT_DES')\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_MARGIN'),\n\t\t\t\t\t'container_class' => 'combo-group',\n\t\t\t\t\t'id' => 'image_margin',\n\t\t\t\t\t'type' => 'margin',\n\t\t\t\t\t'extended_ids' => array('image_margin_top', 'image_margin_right', 'image_margin_bottom', 'image_margin_left'),\n\t\t\t\t\t'tooltip' => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_MARGIN_DES')\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "function moduleContent()\t{\n\t\t$this->content .= $this->makeList();\n\t}", "public function frontend_element_items()\n {\n $this->items = array(\n 'content' => array(\n array(\n \"name\" => JText::_(\"JSN_PAGEBUILDER_DEFAULT_ELEMENT_ELEMENT_TITLE\"),\n \"id\" => \"el_title\",\n \"type\" => \"text_field\",\n \"class\" => \"jsn-input-xxlarge-fluid\",\n \"std\" => JText::_('JSN_PAGEBUILDER_ELEMENT_MARKET_ELEMENT_TITLE_STD'),\n \"role\" => \"title\",\n \"tooltip\" => JText::_(\"JSN_PAGEBUILDER_DEFAULT_ELEMENT_ELEMENT_TITLE_DES\")\n ),\n array(\n \"name\" => JText::_(\"JSN_PAGEBUILDER_DEFAULT_ELEMENT_TITLE\"),\n \"id\" => \"market_title\",\n \"type\" => \"text_field\",\n \"class\" => \"jsn-input-xxlarge-fluid\",\n \"std\" => JText::_('JSN_PAGEBUILDER_ELEMENT_MARKET_YAHOO'),\n ),\n array(\n 'id' => 'market_items',\n 'name' => JText::_('JSN_PAGEBUILDER_ELEMENT_MARKET_ITEMS'),\n 'type' => 'group',\n 'shortcode' => $this->config['shortcode'],\n 'sub_item_type' => 'JSNPBShortcodeMarketItem',\n 'sub_items' => array(\n array('std' => '[pb_market_item market_item_text=\"EUR/USD\" market_item_symbol_code=\"EURUSD=X\"]'),\n array('std' => '[pb_market_item market_item_text=\"USD/JPY\" market_item_symbol_code=\"USDJPY=X\"]'),\n array('std' => '[pb_market_item market_item_text=\"GBP/USD\" market_item_symbol_code=\"GBPUSD=X\"]'),\n ),\n 'label_item' => JText::_('JSN_PAGEBUILDER_ELEMENT_MARKET_ITEMS_LABEL'),\n ),\n ),\n 'styling' => array(\n array(\n 'type' => 'preview'\n ),\n array(\n 'name' => JText::_('JSN_PAGEBUILDER_ELEMENT_MARKET_CHOOSE_LAYOUT'),\n 'id' => 'market_layout',\n 'type' => 'radio',\n 'std' => self::PB_MARKET_TABLE_LAYOUT,\n 'options' => array(\n self::PB_MARKET_TABLE_LAYOUT => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_LAYOUT_TABLE'),\n self::PB_MARKET_CAROUSEL_LAYOUT => JText::_('JSN_PAGEBUILDER_DEFAULT_ELEMENT_LAYOUT_CAROUSEL'),\n ),\n 'has_depend' => '1'\n ),\n array(\n 'name' => JText::_('JSN_PAGEBUILDER_ELEMENT_MARKET_SLIDE_DIMENSION'),\n 'id' => 'market_slide_dimension',\n 'type' => 'select',\n 'std' => JSNPagebuilderHelpersType::getFirstOption(JSNPbMarketHelper::getMarketSlideDimensions()),\n 'options' => JSNPbMarketHelper::getMarketSlideDimensions(),\n 'dependency' => array('market_layout', '=', 'carousel'),\n ),\n array(\n 'name' => JText::_('JSN_PAGEBUILDER_ELEMENT_MARKET_SHOW_CAROUSEL_CONTROL'),\n 'id' => 'market_show_carousel_control',\n 'type' => 'radio',\n 'std' => JSNPagebuilderHelpersType::PB_HELPER_ANSWER_YES,\n 'options' => JSNPagebuilderHelpersType::getYesNoQuestion(),\n 'dependency' => array('market_layout', '=', 'carousel'),\n ),\n array(\n 'name' => JText::_('JSN_PAGEBUILDER_ELEMENT_MARKET_NUMBER_TO_SHOW'),\n 'id' => 'market_number_to_show',\n 'type' => 'text_number',\n 'std' => 3,\n 'validate' => 'number',\n ),\n array(\n 'name' => JText::_('JSN_PAGEBUILDER_ELEMENT_MARKET_CAROUSEL_AUTO_PLAY'),\n 'id' => 'market_auto_play_carousel',\n 'type' => 'radio',\n 'std' => JSNPagebuilderHelpersType::PB_HELPER_ANSWER_YES,\n 'options' => JSNPagebuilderHelpersType::getYesNoQuestion(),\n 'dependency' => array('market_layout', '=', 'carousel'),\n ),\n array(\n 'name' => JText::_('JSN_PAGEBUILDER_ELEMENT_MARKET_AUTOPLAY_SPEED'),\n 'id' => 'market_auto_play_speed',\n 'type' => 'text_number',\n 'std' => 3,\n 'validate' => 'number',\n ),\n array(\n 'name' => JText::_('JSN_PAGEBUILDER_ELEMENT_MARKET_SHOW_TIME_UPDATE'),\n 'id' => 'market_show_time_update',\n 'type' => 'radio',\n 'std' => JSNPagebuilderHelpersType::PB_HELPER_ANSWER_YES,\n 'options' => JSNPagebuilderHelpersType::getYesNoQuestion(),\n ),\n array(\n 'name' => JText::_('JSN_PAGEBUILDER_ELEMENT_MARKET_SHOW_MARKET_DATA'),\n 'id' => 'market_show_data',\n 'type' => 'checkbox',\n \"class\" => \"checkbox inline\",\n 'std' => JSNPbMarketHelper::getMarketDefaultDataType(),\n 'options' => JSNPbMarketHelper::getMarketDataType(),\n ),\n )\n );\n\n }", "public function backend_element_items()\n {\n $this->frontend_element_items();\n }", "public function backend_element_items()\n {\n $this->frontend_element_items();\n }", "public function available_items_template()\n {\n }", "function createItems($data) { ?>\n\t\t<div class=\"item active\">\n\t\t\t<img src=\"layout/gallery/default.png\" alt=\"<?= $data[$i][\"header\"] ?>\" \n\t\t\t\tstyle=\"height: 500px; margin-left: auto; margin-right: auto;\">\n\t\t\t<div class=\"carousel-caption custom-caption\">\n\t\t\t\t<h3>Chapter House</h3>\n\t\t\t\t<p>View of the house from 47th street.</p>\n\t\t\t</div> \n\t\t</div> <?PHP\n\t\tfor ($i = 0; $i < count($data); $i++) { ?>\n\t\t\t<div class=\"item\">\n\t\t\t\t<img src=\"layout/gallery/<?= $data[$i][\"id\"] ?>.png\" alt=\"<?= $data[$i][\"header\"] ?>\" \n\t\t\t\t\tstyle=\"height: 500px; margin-left: auto; margin-right: auto;\">\n\t\t\t\t<div class=\"carousel-caption custom-caption\">\n\t\t\t\t\t<h3><?= $data[$i][\"header\"]; ?></h3>\n\t\t\t\t\t<p><?= $data[$i][\"content\"]; ?></p>\n\t\t\t\t</div> \n\t\t\t</div> <?PHP\n\t\t}\n\t}", "function prepare_items() {\n\t\t$columns = $this->get_columns();\n\t\t$hidden = array();\n\t\t$sortable = $this->get_sortable_columns();\n\t\t$this->_column_headers = array( $columns, $hidden, $sortable );\n\n\t\t$ubc_di_sites = $this->ubc_di_get_assessment_results();\n\n\t\tusort( $ubc_di_sites, array( &$this, 'usort_reorder' ) );\n\n\t\t$per_page = 50;\n\t\t$current_page = $this->get_pagenum();\n\t\t$total_items = count( $ubc_di_sites );\n\t\t// only ncessary because we have sample data\n\t\t$ubc_di_sites_subset = array_slice( $ubc_di_sites, ( ( $current_page - 1 ) * $per_page ), $per_page );\n\t\t$this->set_pagination_args( array(\n\t\t\t'total_items' => $total_items, //WE have to calculate the total number of items\n\t\t\t'per_page' => $per_page, //WE have to determine how many items to show on a page\n\t\t) );\n\t\t$this->items = $ubc_di_sites_subset;\n\t}", "public function shop_item()\n {\n $this->el = new XTemplate($this->temp, $this->path);\n\n // for element that have wrapper and comment\n $this->el->assign('WRAPPER', $this->wrapper);\n $this->el->assign('LINK', $this->link);\n\n // scan all variables when using\n foreach ($this->shop_item as $key => $value) {\n\n // customize if need when more vars in html template *\n $this->el->assign('IMG', $value);\n\n // fixed loop\n $this->el->parse('shop_item');\n }\n\n // fixed out results\n echo $this->el->text('shop_item');\n\n }", "protected function __construct() {\r\n $this->items = $this->initItems();\r\n }", "protected function initItems()\n {\n if (is_null($this->_items)) {\n // Set the element classes\n $model = $this->getModel();\n $keys = $model->getKeys();\n\n foreach ($model->getItemNames() as $item) {\n if (($item == $this->receptionCodeItem) || in_array($item, $this->editItems)) {\n continue;\n }\n if (in_array($item, $this->exhibitItems)) {\n $model->set($item, 'elementClass', 'Exhibitor');\n } elseif (in_array($item, $this->hiddenItems)) {\n $model->set($item, 'elementClass', 'Hidden');\n } elseif (in_array($item, $keys)) {\n $model->set($item, 'elementClass', 'Hidden');\n } else {\n $model->set($item, 'elementClass', 'None');\n }\n }\n\n $this->_items = array_merge(\n $this->hiddenItems,\n $this->exhibitItems,\n array($this->receptionCodeItem),\n $this->editItems\n );\n }\n }", "protected function initItems()\n {\n if (is_null($this->_items)) {\n // Set the element classes\n $model = $this->getModel();\n $keys = $model->getKeys();\n\n foreach ($model->getItemNames() as $item) {\n if (($item == $this->receptionCodeItem) || in_array($item, $this->editItems)) {\n continue;\n }\n if (in_array($item, $this->exhibitItems)) {\n $model->set($item, 'elementClass', 'Exhibitor');\n } elseif (in_array($item, $this->hiddenItems)) {\n $model->set($item, 'elementClass', 'Hidden');\n } elseif (in_array($item, $keys)) {\n $model->set($item, 'elementClass', 'Hidden');\n } else {\n $model->set($item, 'elementClass', 'None');\n }\n }\n\n $this->_items = array_merge(\n $this->hiddenItems,\n $this->exhibitItems,\n array($this->receptionCodeItem),\n $this->editItems\n );\n }\n }", "public function display_items() {\n\t\t$wrap_class = str_replace( '_', '-', $this->parant_plugin_slug );\n\t\t?>\n\t\t<div id=\"wpaddons-io-wrap\" class=\"wrap <?php echo $wrap_class; ?>-wrap\">\n\n\t\t\t<?php\n\t\t\t// Get addon\n\t\t\t$addons = $this->get_addons();\n\n\t\t\t// Load the display template\n\t\t\tinclude_once( $this->view );\n\t\t\t?>\n\n\t\t</div>\n\t\t<?php\n\t}", "function items(){\n $data['content_page']='admin/items';\n $this->load->view('common/base_template',$data);\n }", "abstract protected function renderItems(): string;", "protected function _content_template() { ?>\r\n <# if ( settings.list.length ) { #>\r\n <div class=\"DSMCA__slide swiper-container\">\r\n <div class=\"swiper-wrapper\">\r\n <# _.each( settings.list, function( item ) { #>\t\r\n <div class=\"DSMCA__item_slide swiper-slide\">\r\n <img class=\"DSMCA__item-image\" src=\" {{ item.imagen.url }} \">\r\n <h5 class=\"DSMCA__item-title\"> {{{ item.titulo }}} </h5> \r\n </div>\r\n <# }); #>\t\r\n </div>\r\n <div class=\"swiper-button-prev\"></div>\r\n <div class=\"swiper-button-next\"></div>\r\n </div>\r\n <# } #>\r\n <?php\r\n }", "public function decorateContents()\n {\n $decoratedItems = array();\n\n foreach ($this->app['publishing.items'] as $item) {\n $this->app['publishing.active_item'] = $item;\n\n // filter the original item content before decorating it\n $event = new BaseEvent($this->app);\n $this->app->dispatch(Events::PRE_DECORATE, $event);\n\n // Do nothing to decorate the item\n\n $event = new BaseEvent($this->app);\n $this->app->dispatch(Events::POST_DECORATE, $event);\n\n // get again 'item' object because POST_DECORATE event can modify it\n $decoratedItems[] = $this->app['publishing.active_item'];\n }\n\n $this->app['publishing.items'] = $decoratedItems;\n }", "public function addContentItems($items = [])\n {\n //Loop on each item\n collect($items)->each(function ($item) {\n //Add each content to the Container\n $this->addSingleContentItem($item);\n });\n //Return object\n return $this;\n }", "function prepare_items() {\n\t\t$per_page\t= $this->per_page;\n\n\t\t// Get All, Hidden, Sortable columns\n\t\t$columns = $this->get_columns();\n\t\t$hidden = array();\n\t\t$sortable = $this->get_sortable_columns();\n\n\t\t// Get final column header\n\t\t$this->_column_headers\t= array( $columns, $hidden, $sortable );\n\n\t\t// Get Data of particular page\n\t\t$data_res \t= $this->display_used_vouchers();\n\t\t$data \t\t= $data_res['data'];\n\n\t\t// Get current page number\n\t\t$current_page = $this->get_pagenum();\n\n\t\t// Get total count\n\t\t$total_items = $data_res['total'];\n\n\t\t// Get page items\n\t\t$this->items = $data;\n\n\t\t// We also have to register our pagination options & calculations.\n\t\t$this->set_pagination_args( array(\n\t\t\t\t\t\t\t\t\t\t\t'total_items' => $total_items,\n\t\t\t\t\t\t\t\t\t\t\t'per_page' => $per_page,\n\t\t\t\t\t\t\t\t\t\t\t'total_pages' => ceil( $total_items/$per_page )\n\t\t\t\t\t\t\t\t\t\t) );\n }", "public function items()\n {\n $projects = new Item();\n $projects->select(\"*\")->select_func(\"DATE_FORMAT\", array(\"@create_date\", '[,]', '%d/%m/%Y'), 'create_date')\n ->where(array('type' => 1, 'status' => 0))\n ->order_by('create_date', 'desc')\n ->get();\n\n $breadcrumb = array(\n 'Home' => site_url('admin'),\n 'Curadoria' => \"#\",\n 'Projetos' => site_url('admin/curadoria/items')\n );\n\n $this->load->helper('html');\n\n $toview['items'] = $projects;\n\n $this->template->set_breadcrumb($breadcrumb);\n $this->template->load('admin', 'admin/curadoria/items', $toview);\n }", "public function prepare_items()\n {\n $per_page = 100;\n\n // define column headers\n $columns = $this->get_columns();\n $hidden = [];\n $sortable = $this->get_sortable_columns();\n $this->_column_headers = [$columns, $hidden, $sortable];\n\n // retrieve data\n $data = \\Podlove\\Model\\EpisodeAsset::all('ORDER BY position ASC');\n\n // get current page\n $current_page = $this->get_pagenum();\n // get total items\n $total_items = count($data);\n // extrage page for current page only\n $data = array_slice($data, ($current_page - 1) * $per_page, $per_page);\n // add items to table\n $this->items = $data;\n\n // register pagination options & calculations\n $this->set_pagination_args([\n 'total_items' => $total_items,\n 'per_page' => $per_page,\n 'total_pages' => ceil($total_items / $per_page),\n ]);\n }", "public function loadElements()\n {\n $objName = $this->addTextField(ItemDB::COL_NAME, _ITEM_NAME);\n $objName->setPlaceholder( _ITEM_NAME);\n $objName->setRequired(true);\n\n $objDesc = $this->addTextArea(ItemDB::COL_DESC, _ITEM_DESCRIPTION, 255);\n $objDesc->setPlaceholder(_ITEM_DESCRIPTION);\n\n $this->addHiddenField(ItemDB::COL_FEST_ID);\n\n $this->addButtonSubmit();\n $this->addButtonReset();\n $this->addButtonCancel();\n }", "protected abstract function initItems () : array;", "function carrinho(){\n\t\t\t$this->items = array();\n\t\t}", "function listContent()\n {\n }", "public function renderItems()\r\n {\r\n echo CHtml::openTag($this->itemsTagName,array('class'=>$this->itemsCssClass)).\"\\n\";\r\n $data=$this->dataProvider->getData();\r\n if(($n=count($data))>0)\r\n {\r\n /*\r\n * 原有实现在这里 已注释掉了\r\n $owner=$this->getOwner();\r\n $viewFile=$owner->getViewFile($this->itemView);\r\n $j=0;\r\n foreach($data as $i=>$item)\r\n {\r\n $data=$this->viewData;\r\n $data['index']=$i;\r\n $data['data']=$item;\r\n $data['widget']=$this;\r\n $owner->renderFile($viewFile,$data);\r\n if($j++ < $n-1)\r\n echo $this->separator;\r\n }\r\n */\r\n\r\n $j=0;\r\n foreach($data as $i=>$item)\r\n {\r\n $data=$this->viewData;\r\n $data['index']=$i;\r\n $data['data']=$item;\r\n $data['widget']=$this;\r\n\r\n if(is_string($this->itemRender)){\r\n call_user_func($this->itemRender,$data);\r\n } elseif(is_callable($this->itemRender,true)) {\r\n if(is_array($this->itemRender))\r\n {\r\n // an array: 0 - object, 1 - method name\r\n list($object,$method)=$this->itemRender;\r\n if(is_string($object))\t// static method call\r\n call_user_func($this->itemRender,$data);\r\n elseif(method_exists($object,$method))\r\n $object->$method($data);\r\n else\r\n throw new CException(Yii::t('yii','Event \"{class}\" is attached with an invalid itemRender \"{handler}\".',\r\n array('{class}'=>get_class($this), '{handler}'=>$this->itemRender[1])));\r\n }\r\n else // PHP 5.3: anonymous function\r\n call_user_func($this->itemRender,$data);\r\n }\r\n\r\n if($j++ < $n-1){\r\n echo $this->separator;\r\n }\r\n }\r\n\r\n }\r\n else\r\n $this->renderEmptyText();\r\n echo CHtml::closeTag($this->itemsTagName);\r\n }", "public function prepare_items()\r\n\t{\r\n\t\t$columns = $this->get_columns();\r\n\t\t$hidden = $this->get_hidden_columns();\r\n\t\t$sortable = $this->get_sortable_columns();\r\n\r\n\t\t$currentPage = $this->get_pagenum();\r\n\r\n\t\t$this->total = Lead::count();\r\n\t\t$data = Lead::take( $this->per_page )->skip( ( $currentPage - 1 ) * $this->per_page )\r\n\t\t ->get()->toArray();\r\n\r\n\t\t$this->set_pagination_args( [\r\n\t\t\t'total_items' => $this->total,\r\n\t\t\t'per_page' => $this->per_page\r\n\t\t] );\r\n\r\n\t\t$this->_column_headers = [ $columns, $hidden, $sortable ];\r\n\r\n\t\t$this->items = $data;\r\n\t}", "public function buildListDataContainers(): void\n {\n $this->addDataContainer(\n EntityListDataContainer::make('name')\n ->setLabel('Nom')\n ->setSortable()\n )->addDataContainer(\n EntityListDataContainer::make('pseudo')\n ->setLabel('Pseudo')\n ->setSortable()\n )->addDataContainer(\n EntityListDataContainer::make('role_id')\n ->setLabel('Rôle')\n ->setSortable()\n )->addDataContainer(\n EntityListDataContainer::make('created_at')\n ->setLabel('Inscrit le')\n ->setSortable()\n );\n }", "function content() {\r\n\t\t/* Reimplement this function in subclasses. */\r\n\t}", "public function &items();", "function container($params,$content,&$smarty,&$repeat) {\n\t\t$smarty->assign('title',$params['title']);\n\t\t$smarty->display('open_container.tpl');\n\t\techo($content);\n\t\t$smarty->display('close_container.tpl');\n\t}", "public function renderItems($items)\n {\n // TODO: Implement renderItems() method.\n }", "public function prepare_items() {\n\n\t\t$columns = $this->get_columns();\n\t\t$hidden = get_hidden_columns( $this->screen );\n \t\t$sortable = $this->get_sortable_columns();\n \t\t$this->_column_headers = array($columns, $hidden, $sortable);\n \t\t//$this->_column_headers = $this->get_column_info();\n\t\t/** Process bulk action */\n\t\t$this->process_bulk_action();\n\n\t\t$per_page = $this->get_items_per_page( 'transactions_per_page', 10 );\n\t\t$current_page = $this->get_pagenum();\n\t\t$total_items = self::record_count();\n\n\t\t$this->set_pagination_args( array(\n\t\t\t'total_items' => $total_items, //WE have to calculate the total number of items\n\t\t\t'per_page' => $per_page //WE have to determine how many items to show on a page\n\t\t));\n\n\t\t$this->items = self::get_customers( $per_page, $current_page );\n\t}", "function clsRecorditems()\r\n {\r\n\r\n global $FileName;\r\n $this->Visible = true;\r\n $this->Errors = new clsErrors();\r\n $this->ds = new clsitemsDataSource();\r\n $this->InsertAllowed = false;\r\n $this->UpdateAllowed = false;\r\n $this->DeleteAllowed = false;\r\n if($this->Visible)\r\n {\r\n $this->ComponentName = \"items\";\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n $this->description = new clsControl(ccsLabel, \"description\", \"Description\", ccsMemo, \"\", CCGetRequestParam(\"description\", $Method));\r\n $this->description->HTML = true;\r\n }\r\n }", "protected function initializeToolbarItems() {}", "public function getPageItems()\n {\n }", "public function prepare_items() {\n\t\t$column = $this->get_columns();\n\t\t$hidden = array();\n\t\t$sortable = $this->get_sortable_columns();\n\n\t\t$this->_column_headers = array( $column, $hidden, $sortable );\n\n\t\t$per_page = 20;\n\t\t$current_page = $this->get_pagenum();\n\t\t$offset = ( $current_page - 1 ) * $per_page;\n\n\t\t$args = array(\n\t\t\t'number' => $per_page,\n\t\t\t'offset' => $offset,\n\t\t);\n\n\t\tif ( isset( $_REQUEST['orderby'] ) && isset( $_REQUEST['order'] ) ) {\n\t\t\t$args['orderby'] = $_REQUEST['orderby'];\n\t\t\t$args['order'] = $_REQUEST['order'];\n\t\t}\n\n\t\t$this->items = Persistence::get( $args );\n\n\t\t$this->set_pagination_args(\n\t\t\tarray(\n\t\t\t\t'total_items' => Persistence::count(),\n\t\t\t\t'per_page' => $per_page,\n\t\t\t)\n\t\t);\n\t}", "public function meta_box_form_items() {\n include_once (SWPM_FORM_BUILDER_PATH . 'views/button_palette_metabox.php');\n }", "function __construct()\n {\n $this->items = [];\n }", "function prepare_items() {\n\t\tglobal $post;\n\n\t\t$this->regs = query_posts( \"post_parent={$post->ID}&post_type=ep_reg\" );\n\t\t$this->total_items = count( $this->regs );\n\t}", "public function getItems()\n {\n }", "public function prepare_items() {\n\t\t$per_page = $this->get_items_per_page( 'cert_dashboards_per_page', 1 );\n\t\t$this->items = self::get_cert_dashboards( $per_page );\n\t}", "public function prepare_items() {\n\n\t\t// Roll out each part.\n\t\t$columns = $this->get_columns();\n\t\t$hidden = $this->get_hidden_columns();\n\t\t$sortable = $this->get_sortable_columns();\n\t\t$dataset = $this->table_data();\n\n\t\t// Check for the action key value to filter.\n\t\tif ( ! empty( $_REQUEST['wbr-review-filter'] ) ) { // WPCS: CSRF ok.\n\t\t\t$dataset = $this->maybe_filter_dataset( $dataset );\n\t\t}\n\n\t\t// Handle our sorting.\n\t\tusort( $dataset, array( $this, 'sort_data' ) );\n\n\t\t// Load up the pagination settings.\n\t\t$paginate = 20;\n\t\t$item_count = count( $dataset );\n\t\t$current = $this->get_pagenum();\n\n\t\t// Set my pagination args.\n\t\t$this->set_pagination_args( array(\n\t\t\t'total_items' => $item_count,\n\t\t\t'per_page' => $paginate,\n\t\t\t'total_pages' => ceil( $item_count / $paginate ),\n\t\t));\n\n\t\t// Slice up our dataset.\n\t\t$dataset = array_slice( $dataset, ( ( $current - 1 ) * $paginate ), $paginate );\n\n\t\t// Do the column headers.\n\t\t$this->_column_headers = array( $columns, $hidden, $sortable );\n\n\t\t// Make sure we have the single action running.\n\t\t$this->process_single_action();\n\n\t\t// Make sure we have the bulk action running.\n\t\t$this->process_bulk_action();\n\n\t\t// Make sure we have the status change.\n\t\t$this->process_status_change();\n\n\t\t// And the result.\n\t\t$this->items = $dataset;\n\t}", "function build () {\n foreach ( $this->items as $item ) {\n if ( $item->isRoot() ) {\n $this->menu[]=$item;\n $this->appendChildren($item);\n }\n }\n reset ( $this->menu );\n }", "public function container();", "function getItems(){return $this->items;}", "public function content(): Collection\n {\n return $this->items->values();\n }", "private function renderItems() {\n\t\t$items = '';\n\t\tif ($this->feedElements['items']) {\n\t\t\tforeach ($this->feedElements['items'] as $item)\n\t\t\t\t$items .= $item->getNode();\n\t\t}\n\t\treturn $items;\n\t}", "public function getContainer()\n {\n //Return container\n return $this->contentListContainer;\n }", "function build($items) {\n\n\t\t\tif(isset($items['navs'])) {\n\n\t\t\t\t$this->register_navs($items['navs']);\n\n\t\t\t}\n\n\t\t\tif(isset($items['post_types'])) {\n\n\t\t\t\t$this->register_post_types($items['post_types']);\n\n\t\t\t}\n\n\t\t\tif(isset($items['metaboxes'])) {\n\n\t\t\t\tforeach($items['metaboxes'] as $metabox) {\n\n\t\t\t\t\t$meta_box = new MetaBox;\n\n\t\t\t\t\t$meta_box->init($metabox);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(isset($items['taxonomies'])) {\n\n\t\t\t\t$this->register_taxonomies($items['taxonomies']);\n\n\t\t\t}\n\n\t\t\tif(isset($items['taxonomy_metaboxes'])) {\n\n\t\t\t\tforeach($items['taxonomy_metaboxes'] as $taxonomy_metabox) {\n\n\t\t\t\t\t$taxonomy_metaboxes = new TaxonomyMetaBox;\n\n\t\t\t\t\t$taxonomy_metaboxes->init($taxonomy_metabox);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(isset($items['user_metaboxes'])) {\n\n\t\t\t\tforeach($items['user_metaboxes'] as $user_metabox) {\n\n\t\t\t\t\t$user_metaboxes = new UserMeta;\n\n\t\t\t\t\t$user_metaboxes->init($user_metabox);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(isset($items['visualcomposer'])) {\n\n\t\t\t\t$visualcomposer = new VisualComposer;\n\n\t\t\t\t$visualcomposer->init($items['visualcomposer']);\n\n\t\t\t}\n\n\t\t}", "public function __construct() {\n $this->items = [];\n }", "protected function setContent() {}", "private function printItems()\n {\n foreach ($this->items as $item) {\n $thisItems = $item->getElements();\n\n\n echo $this->startItem($thisItems['link']['content']);\n\n foreach ($thisItems as $feedItem) {\n echo $this->makeNode($feedItem['name'], $feedItem['content'], $feedItem['attributes']);\n }\n echo $this->endItem();\n }\n }", "public function renderItems() {\n\n \t $caption = $this->renderCaption();\n \t $columnGroup = $this->renderColumnGroup();\n \t $tableHeader = $this->showHeader ? $this->renderTableHeader() : false;\n \t $tableBody = $this->renderTableBody();\n \t $tableFooter = $this->showFooter ? $this->renderTableFooter() : false;\n \t $content = array_filter([\n \t$caption,\n \t$columnGroup,\n \t$tableHeader,\n \t$tableFooter,\n \t$tableBody,\n \t ]);\n\n\t return self::html()->tag('table', array('options' => $this->tableOptions, 'content' => implode(\"\\n\", $content)), $this->tableOptions);\n }", "public function get_content_items() {\n\n\t\t// Vars needed to get content items.\n\t\t$post_ids = (array) $this->get_data( 'curate', 'post_ids' );\n\t\t$total_ids_needed = absint( $this->get_setting( 'items' ) );\n\n\t\t// Add curated IDs to the used list.\n\t\t\\Unique_WP_Query_Manager::set_used_post_ids(\n\t\t\tarray_merge(\n\t\t\t\t\\Unique_WP_Query_Manager::$used_post_ids,\n\t\t\t\t$post_ids\n\t\t\t)\n\t\t);\n\n\t\t// Do we need backfill post ids?\n\t\t$disable_backfill = $this->get_setting( 'disable_backfill' );\n\n\t\tif ( ( count( $post_ids ) < $total_ids_needed ) && ! $disable_backfill ) {\n\t\t\t$backfill_post_ids = $this->get_backfill_post_ids( $total_ids_needed - count( $post_ids ) );\n\n\t\t\t// Merge backfill post ids.\n\t\t\tif ( ! empty( $backfill_post_ids ) ) {\n\t\t\t\t$post_ids = array_merge( $post_ids, $backfill_post_ids );\n\t\t\t}\n\t\t}\n\n\t\tif ( empty( $post_ids ) ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// Build an array of content_items based on the post_ids.\n\t\treturn array_filter(\n\t\t\tarray_map(\n\t\t\t\tfunction( $post_id ) {\n\t\t\t\t\t\treturn \\Civil_First_Fleet\\Component\\content_item()->set_post_id( absint( $post_id ) );\n\t\t\t\t},\n\t\t\t\t$post_ids\n\t\t\t)\n\t\t);\n\t}", "protected function filter_bar_content_template()\n {\n }", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "public function getItems();", "abstract protected function RenderContent();", "public abstract function printItemsWithContainer($containerTitle, ...$items);", "public function prepare_items() {\n\t\t/** Process bulk action */\n\t\t$this->process_bulk_action();\n\n\t\t$columns = $this->get_columns();\n $hidden = $this->get_hidden_columns();\n $sortable = $this->get_sortable_columns();\n $this->_column_headers = array($columns, $hidden, $sortable);\n\n\t\t$per_page = $this->get_items_per_page( 'posts_per_page', 20 );\n\t\t$current_page = $this->get_pagenum();\n\t\t$total_items = self::record_count();\n\n\t\t$this->set_pagination_args( [\n\t\t\t'total_items' => $total_items, //WE have to calculate the total number of items\n\t\t\t'per_page' => $per_page //WE have to determine how many items to show on a page\n\t\t] );\n\n\t\t$this->items = self::get_posts( $per_page, $current_page );\n\t}", "public function prepare_items() {\n\n\t\t\t$columns = $this->get_columns();\n\n\t\t\t$hidden = array(); // No hidden columns\n\n\t\t\t$sortable = $this->get_sortable_columns();\n\n\t\t\t$this->_column_headers = array( $columns, $hidden, $sortable );\n\n\n\n\t\t\t// Process bulk action\n\n\t\t\t$this->process_bulk_action();\n\n\n\n\t\t\t$current_page = $this->get_pagenum();\n\n\t\t\t$total_items = self::record_count();\n\n\n\n\t\t\t$this->items = self::get_topics( 20, $current_page );\n\n\n\n\t\t\t$this->set_pagination_args( [\n\n\t\t\t\t'total_items' => $total_items,\n\n\t\t\t\t'per_page' => 20\n\n\t\t\t] );\n\n\t\t}", "function template_item ($name, $content) {\n $item['name'] = $name;\n $item['content'] = $content;\n\n return $item;\n }", "public function MenuItemGroup()\n {\n $this->items = new ArrayList();\n }", "protected function newUpContainer($contentItems = [])\n {\n //New Up Container\n $this->contentListContainer = (new ContentListContainer($contentItems))->cleanContainer();\n }", "function get_default_items() {\n\t\t$items = array(\n\t\t\tarray(\n\t\t\t\t'_key' => 'category',\n\t\t\t\t'_visibility' => '',\n\t\t\t\t'show_in_grid' => 1,\n\t\t\t\t'show_in_list' => 1,\n\t\t\t\t'title' => __( 'Category', 'customify' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'_visibility' => '',\n\t\t\t\t'_key' => 'title',\n\t\t\t\t'title' => __( 'Title', 'customify' ),\n\t\t\t\t'show_in_grid' => 1,\n\t\t\t\t'show_in_list' => 1,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'_key' => 'rating',\n\t\t\t\t'_visibility' => '',\n\t\t\t\t'show_in_grid' => 1,\n\t\t\t\t'show_in_list' => 1,\n\t\t\t\t'title' => __( 'Rating', 'customify' ),\n\t\t\t),\n\n\t\t\tarray(\n\t\t\t\t'_key' => 'price',\n\t\t\t\t'_visibility' => '',\n\t\t\t\t'show_in_grid' => 1,\n\t\t\t\t'show_in_list' => 1,\n\t\t\t\t'title' => __( 'Price', 'customify' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'_key' => 'description',\n\t\t\t\t'_visibility' => '',\n\t\t\t\t'show_in_grid' => 0,\n\t\t\t\t'show_in_list' => 1,\n\t\t\t\t'title' => __( 'Short Description', 'customify' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'_key' => 'add_to_cart',\n\t\t\t\t'_visibility' => '',\n\t\t\t\t'show_in_grid' => 1,\n\t\t\t\t'show_in_list' => 1,\n\t\t\t\t'title' => __( 'Add To Cart', 'customify' ),\n\t\t\t),\n\t\t);\n\n\t\treturn apply_filters( 'customify/product-designer/body-items', $items );\n\t}", "protected function buildItemsFields(): void\n {\n $groupName = __(\"Items\");\n $isReadOnly = !Splash::isTravisMode();\n\n //====================================================================//\n // Order Line Description\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"name\")\n ->inList(\"items\")\n ->name(__(\"Item\"))\n ->group($groupName)\n ->microData(\"http://schema.org/partOfInvoice\", \"description\")\n ->association(\"name@items\", \"quantity@items\", \"subtotal@items\")\n ->isReadOnly($isReadOnly)\n ;\n //====================================================================//\n // Order Line Product Identifier\n $this->fieldsFactory()->create((string) self::objects()->encode(\"Product\", SPL_T_ID))\n ->identifier(\"product\")\n ->inList(\"items\")\n ->name(__(\"Product\"))\n ->group($groupName)\n ->microData(\"http://schema.org/Product\", \"productID\")\n ->association(\"name@items\", \"quantity@items\", \"subtotal@items\")\n ->isReadOnly($isReadOnly)\n ->isNotTested()\n ;\n //====================================================================//\n // Order Line Product SKU\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"sku\")\n ->inList(\"items\")\n ->name(__(\"SKU\"))\n ->microData(\"http://schema.org/Product\", \"sku\")\n ->group($groupName)\n ->isReadOnly()\n ;\n //====================================================================//\n // Order Line Quantity\n $this->fieldsFactory()->create(SPL_T_INT)\n ->identifier(\"quantity\")\n ->inList(\"items\")\n ->name(__(\"Quantity\"))\n ->group($groupName)\n ->microData(\"http://schema.org/QuantitativeValue\", \"value\")\n ->association(\"name@items\", \"quantity@items\", \"subtotal@items\")\n ->isReadOnly($isReadOnly)\n ;\n //====================================================================//\n // Order Line Discount\n $this->fieldsFactory()->create(SPL_T_DOUBLE)\n ->identifier(\"discount\")\n ->inList(\"items\")\n ->name(__(\"Percentage discount\"))\n ->group($groupName)\n ->microData(\"http://schema.org/Order\", \"discount\")\n ->association(\"name@items\", \"quantity@items\", \"subtotal@items\")\n ->isReadOnly($isReadOnly)\n ;\n //====================================================================//\n // Order Line Unit Price\n $this->fieldsFactory()->create(SPL_T_PRICE)\n ->identifier(\"subtotal\")\n ->inList(\"items\")\n ->name(__(\"Price\"))\n ->group($groupName)\n ->microData(\"http://schema.org/PriceSpecification\", \"price\")\n ->association(\"name@items\", \"quantity@items\", \"subtotal@items\")\n ->isReadOnly($isReadOnly)\n ;\n //====================================================================//\n // Order Line Tax Name\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->identifier(\"tax_name\")\n ->inList(\"items\")\n ->name(__(\"Tax name\"))\n ->microData(\"http://schema.org/PriceSpecification\", \"valueAddedTaxName\")\n ->group($groupName)\n ->association(\"name@items\", \"quantity@items\", \"subtotal@items\")\n ->isReadOnly()\n ;\n }", "private function loadItems()\n {\n if ($this->items === null) {\n $this->items = $this->storage->load();\n }\n }", "protected function _render()\n {\n $sidebar = $GLOBALS['injector']->getInstance('Horde_View_Sidebar');\n\n $container = 0;\n foreach ($this->_menu as $m) {\n /* Check for separators. */\n if ($m == 'separator') {\n $container++;\n continue;\n }\n\n $row = array(\n 'cssClass' => $m['icon'],\n 'url' => $m['url'],\n 'label' => $m['text'],\n 'target' => $m['target'],\n 'onclick' => $m['onclick'],\n );\n\n /* Item class and selected indication. */\n if (!isset($m['class'])) {\n /* Try to match the item's path against the current\n * script filename as well as other possible URLs to\n * this script. */\n if ($this->isSelected($m['url'])) {\n $row['selected'] = true;\n }\n } elseif ($m['class'] === '__noselection') {\n unset($m['class']);\n } elseif ($m['class'] === 'current') {\n $row['selected'] = true;\n } else {\n $row['class'] = $m['class'];\n }\n\n $sidebar->addRow($row);\n }\n\n return $sidebar;\n }", "public function __construct()\n {\n $this->items = new Collection;\n }", "public function __construct()\n {\n $this->items = new Collection;\n }", "public function do_head_items()\n {\n }" ]
[ "0.6861671", "0.6670791", "0.66198754", "0.6604895", "0.63540345", "0.63540345", "0.63540345", "0.63534623", "0.635337", "0.6330871", "0.6297411", "0.62823355", "0.62793195", "0.62624556", "0.61727804", "0.61476004", "0.6141902", "0.61406016", "0.61300355", "0.6097433", "0.60917586", "0.60741895", "0.60741895", "0.60417444", "0.6032212", "0.6028639", "0.6014995", "0.60030943", "0.6000503", "0.6000503", "0.5992139", "0.59759295", "0.59508467", "0.5925948", "0.5904333", "0.5887612", "0.5884352", "0.5879751", "0.5845255", "0.58424276", "0.58340967", "0.5815125", "0.58113253", "0.5783113", "0.577483", "0.5742362", "0.5678388", "0.56708807", "0.5666994", "0.5662464", "0.56599146", "0.564747", "0.5646591", "0.56452036", "0.56379294", "0.5636238", "0.56360185", "0.56174177", "0.5614925", "0.56110626", "0.5589405", "0.55875975", "0.558407", "0.55756855", "0.55755496", "0.55647504", "0.5560374", "0.5557006", "0.55556023", "0.555159", "0.554813", "0.55465996", "0.554206", "0.55130017", "0.5509141", "0.5509141", "0.5509141", "0.5509141", "0.5509141", "0.5509141", "0.5509141", "0.5509141", "0.5509141", "0.5509141", "0.5509141", "0.5509141", "0.5509141", "0.55080503", "0.550758", "0.5506041", "0.5503235", "0.5495042", "0.5478675", "0.54780483", "0.5467947", "0.54613566", "0.5454877", "0.54499364", "0.5446322", "0.5446322", "0.54399854" ]
0.0
-1
Processes a set of files.
public function countFiles(array $files, $countTests) { if ($countTests) { if ($this->output !== NULL) { $bar = new ezcConsoleProgressbar($this->output, count($files)); print "Preprocessing files\n"; } foreach ($files as $file) { $this->preProcessFile($file); if ($this->output !== NULL) { $bar->advance(); } } if ($this->output !== NULL) { print "\n\n"; } } $directories = array(); if ($this->output !== NULL) { $bar = new ezcConsoleProgressbar($this->output, count($files)); print "Processing files\n"; } foreach ($files as $file) { $directory = dirname($file); if (!isset($directories[$directory])) { $directories[$directory] = TRUE; } $this->countFile($file, $countTests); if ($this->output !== NULL) { $bar->advance(); } } if ($this->output !== NULL) { print "\n\n"; } $count = $this->count; if (!function_exists('bytekit_disassemble_file')) { unset($count['eloc']); } if (!$countTests) { unset($count['testClasses']); unset($count['testMethods']); } $count['directories'] = count($directories) - 1; $count['namespaces'] = count($this->namespaces); $count['classes'] = $count['abstractClasses'] + $count['concreteClasses']; $count['methods'] = $count['staticMethods'] + $count['nonStaticMethods']; $count['publicMethods'] = $count['methods'] - $count['nonPublicMethods']; $count['constants'] = $count['classConstants'] + $count['globalConstants']; if (isset($count['eloc']) && $count['eloc'] > 0) { $count['ccnByLoc'] = $count['ccn'] / $count['eloc']; } else if ($count['ncloc'] > 0) { $count['ccnByLoc'] = $count['ccn'] / $count['ncloc']; } if ($count['methods'] > 0) { if(isset($count['testMethods'])) { $countTestMethods = $count['testMethods']; } else { $countTestMethods = 0; } $count['ccnByNom'] = 1 + ($count['ccnMethods'] / ($count['methods'] - $countTestMethods)); } if ($count['classes'] > 0) { $count['nclocByNoc'] = $count['nclocClasses'] / $count['classes']; } if ($count['methods'] > 0) { $count['nclocByNom'] = $count['nclocClasses'] / $count['methods']; } return $count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function process(array $files);", "protected function processFileTree () {\n\t\t$files = $this->populateFileTree();\n\t\tforeach ($files as $file) {\n\t\t\t$this->processFile($file);\n\t\t}\n\t}", "public function parseFiles()\n {\n $this->files->each(function ($file) {\n $this->store[] = $this->getTree($this->parseFile($file), $file);\n });\n }", "public function parse (array $file_names);", "abstract public function processFile($fileName);", "public function processAll();", "private function set_files()\n\t\t{\n\t\t\t$this->files = Filesystem::ls(PATH_POSTS, '*', 'xml', false, false, true);\n\t\t\t$this->files_count = count( $this->files );\n\t\t}", "abstract public function traverse(array $files);", "protected function processChangedAndNewFiles() {}", "final protected function transformFiles(&$files)\n {\n // ... transform?\n }", "public function process()\n {\n $allChunkFiles = glob($this->directoryPath);\n $now = now()->toDateTimeString();\n\n foreach ($allChunkFiles as $key => $chunkPart) {\n $this->batch->add(new ProcessCsvZones($chunkPart, $now));\n }\n }", "function transformManyFiles($files)\n{\n $proc = createInkyProcessor();\n foreach ($files as $k => $file) {\n yield $k => transformWithProcessor($proc, loadTemplateFile($file));\n }\n}", "public function batch_process( $files_to_process ) {\n\t\tif ( ! empty( $files_to_process ) && is_array( $files_to_process ) ) {\n\t\t\t$this->save_on_shutdown = true;\n\n\t\t\t$this->background_process->push_to_queue( $files_to_process );\n\t\t}\n\t}", "public function processJsonFiles(){\n $filesList = $this->getFileList();\n foreach ($filesList as $key => $file) {\n //do this at your will\n if( !preg_match('/.json/', $file['Key'] ) ){\n continue;\n }\n $fileContents = $this->getFile($file['Key']);\n $fileProcessed = $this->processFile($fileContents);\n $this->saveFile($file['Key'], $fileProcessed);\n }\n }", "protected function removeFiles() {}", "public function process(array $processRequests);", "public static function organizeFiles(): void\n\t{\n\t\t$files = [];\n\n\t\t// named file set\n\t\tforeach ($_FILES as $name => $info) {\n\t\t\t$files_count = count($info['name']);\n\t\t\t$files[$name] = array_fill(0, $files_count, []);\n\n\t\t\t// file in an info field\n\t\t\tfor ($i = 0; $i < $files_count; $i++) {\n\t\t\t\t// info field\n\t\t\t\tforeach ($info as $key => $values)\n\t\t\t\t\t$files[$name][$i][$key] = $values[$i];\n\t\t\t}\n\t\t}\n\n\t\t// update files\n\t\t$_FILES = $files;\n\t}", "function _themepacket_process_filenames(&$files) {\n foreach ($files as $key => $file) {\n \n // This key isn't very useful so we remove it for the sake of keeping our\n // data as simple as possible.\n unset($files[$key]->name);\n \n $data = themepacket_parse_filename($file->filename);\n \n // Derive the path of the file\n $data['path'] = str_replace('/' . $file->filename, '', $file->uri);\n \n $files[$key] = array_merge($data, (array)$file);\n }\n}", "public function run( array $patchFiles ) {\n\t\tforeach ( $patchFiles as $file ) {\n\t\t\t$matches = $this->processFile($file);\n\t\t}\n\t}", "protected function _FILES()\n\t{\n\t\t\n\t}", "public function files();", "public function files();", "public function files();", "function _fillFiles()\n\t{\n\t\t// directory from which we import (real path)\n\t\t$importDirectory = ereg_replace(\n\t\t\t\t\"^(.*)/$\", \n\t\t\t\t'\\1', \n\t\t\t\tereg_replace(\"^(.*)/$\", '\\1', $_SERVER[\"DOCUMENT_ROOT\"]) . $this->from);\n\t\t\n\t\t// when running on windows we have to change slashes to backslashes\n\t\tif (runAtWin()) {\n\t\t\t$importDirectory = str_replace(\"/\", \"\\\\\", $importDirectory);\n\t\t}\n\t\t$this->_files = array();\n\t\t$this->_depth = 0;\n\t\t$this->_postProcess = array();\n\t\t$this->_fillDirectories($importDirectory);\n\t\t// sort it so that webEdition files are at the end (that templates know about css and js files)\n\t\t\n\n\t\t$tmp = array();\n\t\tforeach ($this->_files as $e) {\n\t\t\tif ($e[\"contentType\"] == \"folder\") {\n\t\t\t\tarray_push($tmp, $e);\n\t\t\t}\n\t\t}\n\t\tforeach ($this->_files as $e) {\n\t\t\tif ($e[\"contentType\"] != \"folder\" && $e[\"contentType\"] != \"text/webedition\") {\n\t\t\t\tarray_push($tmp, $e);\n\t\t\t}\n\t\t}\n\t\tforeach ($this->_files as $e) {\n\t\t\tif ($e[\"contentType\"] == \"text/webedition\") {\n\t\t\t\tarray_push($tmp, $e);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->_files = $tmp;\n\t\t\n\t\tforeach ($this->_postProcess as $e) {\n\t\t\tarray_push($this->_files, $e);\n\t\t}\n\t}", "public function cleanFiles()\n { \n $this->zip();\n // $this->unzip();\n\n if (!empty($this->files)) {\n foreach ($files as $file) {\n $this->clean($file);\n }\n }\n }", "private function _process_files()\n\t{\n\t\t// Tar files are written in 512 byte chunks\n\t\t$blocks = strlen($this->data) / 512 - 1;\n\t\t$this->_offset = 0;\n\n\t\t// While we have blocks to process\n\t\twhile ($this->_offset < $blocks)\n\t\t{\n\t\t\t$this->_read_current_header();\n\n\t\t\t// Blank record? This is probably at the end of the file.\n\t\t\tif (empty($this->_current['filename']))\n\t\t\t{\n\t\t\t\t$this->_offset += 512;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If its a directory, lets make sure it ends in a /\n\t\t\tif ($this->_current['type'] == 5 && substr($this->_current['filename'], -1) !== '/')\n\t\t\t{\n\t\t\t\t$this->_current['filename'] .= '/';\n\t\t\t}\n\n\t\t\t// Figure out what we will do with the data once we have it\n\t\t\t$this->_determine_write_this();\n\n\t\t\t// Read the files data, move the offset to the start of the following 512 block\n\t\t\t$size = ceil($this->_current['size'] / 512);\n\t\t\t$this->_current['data'] = substr($this->data, ++$this->_offset << 9, $this->_current['size']);\n\t\t\t$this->_offset += $size;\n\n\t\t\t// We can write this file or return its data or ...\n\t\t\tif ($this->_write_this && $this->destination !== null)\n\t\t\t{\n\t\t\t\t$this->_write_this_file();\n\n\t\t\t\tif ($this->_skip)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($this->_found)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (substr($this->_current['filename'], -1) !== '/')\n\t\t\t{\n\t\t\t\t$this->return[] = array(\n\t\t\t\t\t'filename' => $this->_current['filename'],\n\t\t\t\t\t'md5' => md5($this->_current['data']),\n\t\t\t\t\t'preview' => substr($this->_current['data'], 0, 100),\n\t\t\t\t\t'size' => $this->_current['size'],\n\t\t\t\t\t'formatted_size' => byte_format($this->_current['size']),\n\t\t\t\t\t'skipped' => false,\n\t\t\t\t\t'crc' => $this->_crc_check,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "public function action_tagsrecalcfiles()\n {\n $tagsArray = array();\n $allTags = Constructor_Dao_Tag::getAllTags();\n foreach($allTags as $_tag){\n $tagsArray[$_tag['crc']] = $_tag['id'];\n }\n \n $allFiles = Constructor_Dao_File::get_by_name('');\n /**\n * @var Constructor_Dao_File\n */\n $file;\n \n $sqlDelete = 'DELETE FROM `'.Constructor_Dao_Tag::$_tableItems.'` WHERE `item_type` = \"'.Constructor_Dao_Tag::ITEM_TYPE_FILE.'\"';\n DB::query(Database::DELETE, $sqlDelete)->execute();\n \n foreach($allFiles as $file){\n $tagsToAssign = array();\n $parts = explode('.', $file->title);\n $prevTagId = 0;\n foreach($parts as $part){\n $crc = sprintf(\"%u\",crc32(mb_strtolower(trim($part))));\n if (array_key_exists($crc, $tagsArray)){\n $tagId = $tagsArray[$crc];\n $tag = Constructor_Dao_Tag::get_by_id($tagId);\n if ($tag->parent_tag_id == $prevTagId){\n $tagsToAssign[] = $tag->id;\n $prevTagId = $tag->id;\n }\n }\n }\n if (!empty($tagsToAssign)){\n Constructor_Dao_Tag::removeAllTagsFromItem($file->uid, Constructor_Dao_Tag::ITEM_TYPE_FILE);\n foreach($tagsToAssign as $_tagId){\n Constructor_Dao_Tag::addTagToItem($file->uid, Constructor_Dao_Tag::ITEM_TYPE_FILE, $_tagId);\n }\n }\n }\n // all ok\n $this->json_data = array('result' => true);\n }", "abstract public function run(array $files, array $destinations);", "function processFiles($itemnumber, $aOCRData, $aDirectories, $sLogFile)\r\n{\r\n\t$aResults = array();\r\n\t$htmdirectory = $aDirectories['htm'];\r\n\t//$tifdirectory = $aDirectories['tif'];\r\n\t$ocrdonedirectory = $aDirectories['postocr'];\r\n\t$skippeddirectory = $aDirectories['skipped'];\r\n\t$readydirectory = $aDirectories['ready'];\r\n\r\n\t$tifdirectory = $ocrdonedirectory;\r\n\r\n\t//check if a directory for this itemnumber exists; if not, create it\r\n\t$itemdirectory = $readydirectory . '\\\\' . $itemnumber . '\\\\';\r\n\techo \"itemdir is $itemdirectory <br><br>\\n\";\r\n\r\n\tif (!(@opendir($itemdirectory))) {\r\n\t\ttry {\r\n\t\t\tmkdir($itemdirectory, 0755);\r\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t\t\techo 'could not create a directory for this item ' . \"\\n\";\r\n\t\t\t$warning = 'Het systeem kon geen directory maken om de bestanden te plaatsen ' . \"\\n\";\r\n\t\t\t$lfh = fopen($sLogFile, 'a');\r\n\t\t\t$errorline = date(\"Y m d H:m\") . $warning;\r\n\t\t\tfwrite($lfh, $errorline);\r\n\t\t\tfclose($lfh);\r\n\r\n\t\t\t$aResults['error'] = $warning;\r\n\t\t\treturn $aResults;\r\n\t\t}\r\n\t}\r\n\r\n\t//for each page in the item: process htm and tif file\r\n\tforeach ($aOCRData as $sScannumber=>$bOcr) {\r\n\t\t$filenamebase = $itemnumber . sprintf(\"%04d\", $sScannumber);\r\n\r\n //process htm and tif file\r\n\t\tif ($bOcr == '1') {\r\n\t\t\t//update htm and write updated file to Ready\r\n\r\n $htmfile = $htmdirectory . '\\\\' . $filenamebase . '.htm';\r\n\t\t\t$contents = file_get_contents($htmfile);\r\n\t\t\t$markedup = '';\r\n \t\t$endhead = '/<\\/head>/i';\r\n \t\t$newmeta = '<meta name=\"bookid\" content=\"' . $itemnumber . '\">' . \"\\n\" . '</head>';\r\n \t\t$markedup = preg_replace($endhead, $newmeta, $contents);\r\n\r\n\t\t\t$newfile = $itemdirectory. sprintf(\"%04d\", $sScannumber) . '.htm';\r\n\t\t\t//echo 'updating text to ' . $newfile . \"\\n\";\r\n\t\t\t$updateresult = file_put_contents($newfile, $markedup);\r\n\t\t\t//some checking on result?\r\n\r\n\r\n\t\t\t//remove old htm file\r\n\t\t\t//drastic way of removing file, as simple unlink will not always work\r\n\t\t\twhile (is_file($htmfile) == TRUE) {\r\n\t\t\t\tchmod($htmfile, 0666);\r\n\t\t\t\tunlink($htmfile);\r\n\t\t\t}\r\n\r\n\t\t\t//move tif file to Ready\r\n\t\t\t$tiffile = $tifdirectory . '\\\\' . $filenamebase . '.tif';\r\n\t\t\t$destination = $itemdirectory . '\\\\' . $filenamebase . '.tif';\r\n\t\t\t//echo 'move ocred from ' . $tiffile . 'to ' . $destination . \"<br>\\n\";\r\n\t\t\t$result = @rename($tiffile, $destination);\r\n\t\t\t//check on result\r\n\t\t\tif ($result != 1) {\r\n\t\t\t\t$lfh = fopen($sLogFile, 'a');\r\n\t\t\t\t$errorline = date(\"Y m d H:m \") . \" kon niet schrijven naar $destination <br>\\n\";\r\n\t\t\t\tfwrite($lfh, $errorline);\r\n\t\t\t\tfclose($lfh);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse { //no htm, so just move tif file\r\n $tiffile = $skippeddirectory . '\\\\' . $filenamebase . '.tif';\r\n $destination = $itemdirectory . '\\\\' . $filenamebase . '.tif';\r\n $result = 'b';\r\n\r\n //make sure the tif file exists\r\n if (!(file_exists($tiffile))) {\r\n $aResults['message'] = 'Het boek is niet compleet ik mis ' . $filenamebase . '.tif';\r\n\t\t\t$aResults['result'] = '0';\r\n }\r\n else {\r\n\t\t\t$result = @rename($tiffile, $destination);\r\n\t\t\t//echo 'move from ' . $tiffile . ' to ' . $destination . ' - ' . $result . \"<br>\\n\";\r\n\r\n\t\t\t//check on result\r\n\t\t\tif ($result != 1) {\r\n $lfh = fopen($sLogFile, 'a');\r\n $errorline = date(\"Y m d H:m \") . \" kon niet schrijven naar $destination <br> \\n\";\r\n fwrite($lfh, $errorline);\r\n fclose($lfh);\r\n\t\t\t}\r\n }\r\n\t\t}\r\n\t}\r\n\r\n\treturn $aResults;\r\n}", "function set_files(&$files){\n $this->_files = $files;\n }", "public function files() {\n\t\t$files = $this->ApiFile->fileList($this->path);\n\t\t$this->set('files', $files);\n\t}", "function set_file_objs($file_objs) {\n $this->file_objs = $file_objs;\n $this->update_files = 1;\n }", "protected function removeFiles()\n {\n assert(valid_num_args());\n\n $remove = new RemoveProcess($this->config, $this->env, $this->output);\n $remove->execute();\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 }", "abstract public function process($image, $actions, $dir, $file);", "function outputFiles($path)\n{\n // totalOutput contains 2 arrays - valid (for valid file types), invalid (for unsupported file types)\n $totalOutput = [\"valid\" => [], \"invalid\" => []];\n $totalExecOutput = [];\n $internsSubmitted = 0;\n\n // Check directory exists or not\n if (file_exists($path) && is_dir($path)) {\n // Scan the files in this directory\n $result = scandir($path);\n // Filter out the current (.) and parent (..) directories\n $files = array_diff($result, array('.', '..'));\n if (count($files) > 0) {\n // Loop through return array\n foreach ($files as $file) {\n $filePath = \"$path/$file\";\n // increase the internsSubmitted\n $internsSubmitted += 1;\n if (is_file($filePath)) {\n // Split the filename\n $fileExtension = getFileExtension($file);\n if ($fileExtension) {\n switch ($fileExtension) {\n case 'js':\n $scriptOut = run_script(\"node $filePath 2>&1\", \"Javascript\", $file);\n array_push($totalExecOutput, $scriptOut);\n break;\n\n case 'py':\n $scriptOut = run_script(\"python3 $filePath 2>&1\", \"Python\", $file);\n array_push($totalExecOutput, $scriptOut);\n break;\n\n case 'php':\n $scriptOut = run_script(\"php $filePath 2>&1\", \"PHP\", $file);\n array_push($totalExecOutput, $scriptOut);\n break;\n\n default:\n $scriptOut = [];\n $properResponse = \"Files with .\" . $fileExtension . \" extension are not supported!\";\n $scriptOut['output'] = $properResponse;\n $scriptOut['name'] = \"null\";\n $scriptOut['file'] = $file;\n $scriptOut['id'] = \"null\";\n $scriptOut['email'] = \"null\";\n $scriptOut['language'] = \"null\";\n $scriptOut['status'] = \"fail\";\n array_push($totalOutput['invalid'], $scriptOut);\n break;\n }\n }\n }\n }\n }\n }\n foreach ($totalExecOutput as $execOutput) {\n $processedOutput = analyzeScript($execOutput[0], $execOutput[1], $execOutput[2]);\n array_push($totalOutput['valid'], $processedOutput);\n }\n list($totalPass, $totalFail) = getPassedAndFailed($totalOutput);\n return array($totalOutput, $internsSubmitted, $totalPass, $totalFail);\n}", "function prepareFiles($filterIdFiles = null)\r{\r global $files, $preparedFiles, $preparedFilesIndirect;\r $preparedFiles = [];\r $preparedFilesIndirect = [];\r\r foreach ($files as $file) {\r if ($filterIdFiles === null || in_array($file->id, $filterIdFiles))\r prepareFile($file);\r }\r\r foreach ($files as $file) {\r if ($filterIdFiles === null || in_array($file->id, $filterIdFiles))\r prepareFileIndirect($file);\r }\r}", "public function analyzeFileList(\n CodeBase $code_base,\n array $file_path_list\n ) {\n $file_count = count($file_path_list);\n\n // This first pass parses code and populates the\n // global state we'll need for doing a second\n // analysis after.\n foreach ($file_path_list as $i => $file_path) {\n CLI::progress('parse', ($i+1)/$file_count);\n $this->parseFile($code_base, $file_path);\n }\n\n // Take a pass over all classes verifying various\n // states now that we have the whole state in\n // memory\n $this->analyzeClasses($code_base);\n\n // Take a pass over all functions verifying\n // various states now that we have the whole\n // state in memory\n $this->analyzeFunctions($code_base);\n\n // Once we know what the universe looks like we\n // can scan for more complicated issues.\n foreach ($file_path_list as $i => $file_path) {\n CLI::progress('analyze', ($i+1)/$file_count);\n $this->analyzeFile($code_base, $file_path);\n }\n\n // Emit all log messages\n Log::display();\n }", "function processFiles($cmdParts,$theField)\t{\n\t\t// First, make an array with the filename and file reference, whether the file is just uploaded or a preview\n\t\t$filesArr = array();\n\n\t\tif (is_string($this->dataArr[$theField]))\t{\t\t// files from preview.\n\t\t\t$tmpArr = explode(',',$this->dataArr[$theField]);\n\t\t\treset($tmpArr);\n\t\t\twhile(list(,$val)=each($tmpArr))\t{\n\t\t\t\t$valParts = explode('|',$val);\n\t\t\t\t$filesArr[] = array (\n\t\t\t\t\t'name'=>$valParts[1],\n\t\t\t\t\t'tmp_name'=>PATH_site.'typo3temp/'.$valParts[0]\n\t\t\t\t);\n\t\t\t}\n\t\t} elseif (is_array($_FILES['FE'][$this->theTable][$theField]['name']))\t{\t// Files from upload\n\t\t\treset($_FILES['FE'][$this->theTable][$theField]['name']);\n\t\t\twhile(list($kk,$vv)=each($_FILES['FE'][$this->theTable][$theField]['name']))\t{\n\t\t\t\tif ($vv)\t{\n\t\t\t\t\t$tmpFile = t3lib_div::upload_to_tempfile($_FILES['FE'][$this->theTable][$theField]['tmp_name'][$kk]);\n\t\t\t\t\tif ($tmpFile)\t{\n\t\t\t\t\t\t$this->unlinkTempFiles[]=$tmpFile;\n\t\t\t\t\t\t$filesArr[] = array (\n\t\t\t\t\t\t\t'name'=>$vv,\n\t\t\t\t\t\t\t'tmp_name'=>$tmpFile\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} elseif (is_array($_FILES['FE']['name'][$this->theTable][$theField]))\t{\t// Files from upload\n\t\t\treset($_FILES['FE']['name'][$this->theTable][$theField]);\n\t\t\twhile(list($kk,$vv)=each($_FILES['FE']['name'][$this->theTable][$theField]))\t{\n\t\t\t\tif ($vv)\t{\n\t\t\t\t\t$tmpFile = t3lib_div::upload_to_tempfile($_FILES['FE']['tmp_name'][$this->theTable][$theField][$kk]);\n\t\t\t\t\tif ($tmpFile)\t{\n\t\t\t\t\t\t$this->unlinkTempFiles[]=$tmpFile;\n\t\t\t\t\t\t$filesArr[] = array (\n\t\t\t\t\t\t\t'name'=>$vv,\n\t\t\t\t\t\t\t'tmp_name'=>$tmpFile\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Then verify the files in that array; check existence, extension and size\n\t\t//$this->dataArr[$theField]='';\n\t\t//unset($this->dataArr[$theField]);\n\n\t\t$finalFilesArr=array();\n\t\tif (count($filesArr))\t{\n\t\t\t$extArray = t3lib_div::trimExplode(';',strtolower($cmdParts[1]),1);\n\t\t\t$maxSize = intval($cmdParts[3]);\n\t\t\treset($filesArr);\n\t\t\twhile(list(,$infoArr)=each($filesArr))\t{\n\t\t\t if ($infoArr['name']) {\n\t\t\t\t$fI = pathinfo($infoArr['name']);\n\t\t\t\tif (t3lib_div::verifyFilenameAgainstDenyPattern($fI['name']))\t{\n\t\t\t\t\tif (!count($extArray) || in_array(strtolower($fI['extension']), $extArray))\t{\n\t\t\t\t\t\t$tmpFile = $infoArr['tmp_name'];\n\t\t\t\t\t\tif (@is_file($tmpFile))\t{\n\t\t\t\t\t\t\tif (!$maxSize || filesize($tmpFile)<$maxSize*1024)\t{\n\t\t\t\t\t\t\t\t$finalFilesArr[]=$infoArr;\n\t\t\t\t\t\t\t} else\t{\n\t\t\t\t\t\t\t\tdebug('Size is beyond '.$maxSize.' kb ('.filesize($tmpFile).' bytes) and the file cannot be saved.');\n\t\t\t\t\t\t\t\t$this->failure=1;\n\t\t\t\t\t\t\t\t$this->failureMsg[$theField][].=sprintf($this->metafeeditlib->getLL('error_file_size',$this->conf),$maxSize,filesize($tmpFile));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->failure=1;\n\t\t\t\t\t\t\t$this->failureMsg[$theField][].=sprintf($this->metafeeditlib->getLL('error_file_upload',$this->conf),$vv,$tmpFile);\n\t\t\t\t\t\t};\n\t\t\t\t\t} else \t{\n\t\t\t\t\t\t$this->failure=1;\n\t\t\t\t\t\t$this->failureMsg[$theField][].=sprintf($this->metafeeditlib->getLL('error_file_extension',$this->conf),$fI['extension']);\n\n\t\t\t\t\t}\n\t\t\t\t} else\t{\n\t\t\t\t\t$this->failure=1;\n\t\t\t\t\t$this->failureMsg[$theField][].=$this->metafeeditlib->getLL('error_file_pattern',$this->conf);\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Copy the files in the resulting array to the proper positions based on preview/non-preview.\n\n\t\treset($finalFilesArr);\n\t\t$fileNameList=array();\n\t\twhile(list(,$infoArr)=each($finalFilesArr))\t{\n\t\t\tif ($this->isPreview())\t{\t\t// If the form is a preview form (and data is therefore not going into the database...) do this.\n\t\t\t\t$this->createFileFuncObj();\n\t\t\t\t$fI = pathinfo($infoArr['name']);\n\t\t\t\t$tmpFilename = $this->theTable.'_'.t3lib_div::shortmd5(uniqid($infoArr['name'])).'.'.$fI['extension'];\n\t\t\t\t$theDestFile = $this->fileFunc->getUniqueName($this->fileFunc->cleanFileName($tmpFilename), PATH_site.'typo3temp/');\n\t\t\t\tt3lib_div::upload_copy_move($infoArr['tmp_name'],$theDestFile);\n\t\t\t\t// Setting the filename in the list\n\t\t\t\t$fI2 = pathinfo($theDestFile);\n\t\t\t\t$fileNameList[] = $fI2['basename'].'|'.$this->removeaccents($infoArr['name']);\n\t\t\t} else {\n\t\t\t\t$this->createFileFuncObj();\n\t\t\t\t//CBY ...$GLOBALS['TSFE']->includeTCA();\n\t\t\t\tt3lib_div::loadTCA($this->theTable);\n\t\t\t\t$theF=substr($theField,0,strlen($theField)-5);\n\n\t\t\t\tif (is_array($GLOBALS['TCA'][$this->theTable]['columns'][$theF]))\t{\n\t\t\t\t\t$uploadPath = $GLOBALS['TCA'][$this->theTable]['columns'][$theF]['config']['uploadfolder'];\n\t\t\t\t}\n\t\t\t\tif ($uploadPath)\t{\n\t\t\t\t\t$theDestFile = $this->fileFunc->getUniqueName($this->fileFunc->cleanFileName($infoArr['name']), PATH_site.$uploadPath);\n\t\t\t\t\tt3lib_div::upload_copy_move($infoArr['tmp_name'],$theDestFile);\n\t\t\t\t\t\t// Setting the filename in the list\n\t\t\t\t\t$fI2 = pathinfo($theDestFile);\n\t\t\t\t\t$fileNameList[] = $fI2['basename'];\n\t\t\t\t\t$this->filesStoredInUploadFolders[]=$theDestFile;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->failure=1;\n\t\t\t\t\t\t\t\t\t\t$this->failureMsg[$theField][]=$this->metafeeditlib->getLL('error_no_upload_path',$this->conf);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Implode the list of filenames\n\t\t\t$this->dataArr[$theField] = implode(',',$fileNameList);\n\t\t}\n\t\tif ($this->failure) {\n\t\t\t$this->markerArray['###EVAL_ERROR_FIELD_'.$theField.'###'] = is_array($this->failureMsg[$theField]) ? implode('<br />',$this->failureMsg[$theField]) : '';\n\t\t\t$this->markerArray['###CSS_ERROR_FIELD_'.$theField.'###']='tx-metafeedit-form-field-error ';\n\t\t\t$this->markerArray['###EVAL_ERROR###'] = $this->metafeeditlib->makeErrorMarker($this->conf,$this->metafeeditlib->getLL('error_occured',$this->conf));\n\t\t}\t\n\t}", "public function countFiles($arrayOfValidFileTypes){\n // http://php.net/manual/en/class.recursivedirectoryiterator.php\n\n $ritit = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->wrkDir), RecursiveIteratorIterator::CHILD_FIRST); \n $r = array(); \n foreach ($ritit as $splFileInfo) { \n $path = $splFileInfo->isDir() \n ? array($splFileInfo->getFilename() => array()) \n : array($splFileInfo->getFilename()); \n\n for ($depth = $ritit->getDepth() - 1; $depth >= 0; $depth--) { \n $path = array($ritit->getSubIterator($depth)->current()->getFilename() => $path); \n } \n $r = array_merge_recursive($r, $path); \n }\n \n // count up only the valid files\n foreach($r as $key => $filename){\n if (is_array($filename) && !empty($filename)){\n foreach($filename as $key => $file){\n if(is_array($file) && !empty($file)){\n $this->countFiles($arrayOfValidFileTypes);\n }\n elseif(empty($file)){\n }\n else{\n $extension = explode(\".\",$file);\n $extension = $extension[1];\n if(in_array($extension,$arrayOfValidFileTypes)){\n $this->fileCount++;\n }\n }\n }\n }\n elseif(empty($filename)){\n }\n else{\n $extension = explode(\".\",$filename);\n $extension = $extension[1];\n if(in_array($extension,$arrayOfValidFileTypes)){\n $this->fileCount++;\n }\n }\n }\n return $this->fileCount;\n }", "public function findFiles();", "protected function processFiles(): array\n {\n $allFields = $this->request->getPostData();\n\n $validator = $this->validation();\n\n $files = [];\n foreach ($this->request->getUploadedFiles() as $file) {\n //validate this current file\n $errors = $validator->validate([\n 'file' => [\n 'name' => $file->getName(),\n 'type' => $file->getType(),\n 'tmp_name' => $file->getTempName(),\n 'error' => $file->getError(),\n 'size' => $file->getSize(),\n ]\n ]);\n\n /**\n * @todo figure out why this failes\n */\n if (!defined('API_TESTS')) {\n if (count($errors)) {\n foreach ($errors as $error) {\n throw new UnprocessableEntityException((string) $error);\n }\n }\n }\n\n $fileSystem = Helper::upload($file);\n\n //add settings\n foreach ($allFields as $key => $settings) {\n $fileSystem->set($key, $settings);\n }\n\n $files[] = $fileSystem;\n }\n\n return $files;\n }", "public function process() {\n $this->migrate_course_files();\n // todo $this->migrate_site_files();\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 }", "public function getProcessedFiles(): Collection\n {\n return $this->files->filter(function (File $file) {\n return $file->getStatus() === File::FILE_DONE;\n });\n }", "private function loop_through_files_and_fire_hook() {\n\t\t$plugin_dir = dirname( app()->plugin_file );\n\n\t\t$recursive_dir = new \\RecursiveDirectoryIterator( $plugin_dir );\n\n\t\tforeach ( new \\RecursiveIteratorIterator( $recursive_dir ) as $file => $file_obj ) {\n\t\t\tif ( ! is_string( $file ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( ! app()->is_our_file( $file ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Do something to this file.\n\t\t\t *\n\t\t\t * @author Aubrey Portwood <[email protected]>\n\t\t\t * @since 2.0.0\n\t\t\t *\n\t\t\t * @param string $file The file.\n\t\t\t */\n\t\t\tdo_action( 'wp_kickstart_file', $file );\n\t\t}\n\t}", "public function createByFiles($files_array = array(), $customHeaders = array()){\n\t\t$_api = new API('',true);\n\t\t$response = $this->createByType($files_array, $_api, 'FILES', $customHeaders);\n\t\t$response_success = $response['response']['Success'];\n\t\t$success_processes = array();\n\t\tforeach ($response_success as $process_response){\n\t\t\tarray_push($success_processes, new CopyleaksProcess($process_response['ProcessId'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$process_response['CreationTimeUTC'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->loginToken->authHeader(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->typeOfService,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$process_response['Filename']));\n\t\t}\n\t\t$response_errors = $response['response']['Errors'];\n\t\t$errors = array();\n\t\tforeach ($response_errors as $process_response){\n\t\t\tarray_push($errors, new Errorhandler((int)$process_response['ErrorCode'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $process_response['ErrorMessage'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $process_response['Filename']));\n\t\t}\n\t\treturn array($success_processes, $errors);\n\t}", "public function checkFiles($files){\n\t\t$continuousCounter = 0;\n\t\twhile($continuousCounter<count($files)){\n\t\t\tif(file_exists(self::$subDir.$files[$continuousCounter]))\n\t\t\t\tUpload::setExistingFileInfo($continuousCounter);\n\t\t\t$continuousCounter++;\n\t\t}\n\t}", "function setupMulti($file, &$cuefile, &$files_used, &$trash) {\n // initialize\n $files = array();\n\n if (file_exists($file)) {\n $cuefile = file($file, FILE_IGNORE_NEW_LINES);\n if ( $cuefile === FALSE )\n logp(\"error,exit1\",\"FATAL ERROR in setupMulti: could not read file '{$file}'. Exit\");\n } else\n logp(\"error,exit1\",\"FATAL ERROR in setupMulti: could not find file '{$file}'. Exit\");\n\n // multi check [-]1\n if(preg_match(\"/( ?)(-?)1.cue$/\", $file, $matches)){\n // set base title\n $base_title = substr($file, 0, -strlen($matches[1] . $matches[2] . \"1.cue\"));\n // bookkeeping\n $files_used[] = $file;\n $trash[] = $file;\n\n // log cuefile\n logp(\"log\",\"Processing multi disc cuefile '{$file}'\");\n\n // get artist and album\n if ( ($artist = getCueInfo(\"artist\",$file,$cuefile)) === FALSE ) return FALSE;\n if ( ($album = getCueInfo(\"album\",$file,$cuefile)) === FALSE ) return FALSE;\n $dir = $artist . \"/\" . $album;\n\n // check that directory exists\n if (! is_dir($dir)) {\n logp(\"error\", array(\n \"ERROR in setupMulti: artist/album directory does not exist. Skipping album.\",\n \" Dir: '{$dir}'\"));\n return FALSE;\n }\n\n // loop until a sequence number of file doesn't exist\n // k=1 is no end on file. k=0 is finishing loop\n $k = 2;\n $endCheck = 0;\n while ( $k > 0 ) {\n if ($k == 1) $ends=array(\"\"); else $ends=array($k,\"-{$k}\");\n foreach($ends as $end) {\n $nfile = $base_title . $end . \".cue\";\n if ( file_exists($base_title . $end . \".cue\")) {\n // reset endCheck\n $endCheck = 0;\n // break from foreach\n break;\n }\n else $nfile = \"\";\n }\n\n // check if file:\n // No file causes end state process:\n // - first bump increment and make sure there isn't a file there\n // endCheck=1\n // - then look for no-end on file, which often terminates set\n // endCheck=2\n // - If endCheck is 2, then set k=0 to terminate\n //\n // Otherwise if file, process that file\n // Note that k must be set to 0 with in the else if k=1 to terminate\n\n if ( $nfile == \"\")\n if ( $endCheck == 0) {$k++; $endCheck = 1; }\n elseif ( $endCheck == 1 ) {$k=1; $endCheck = 2; }\n else $k=0;\n else {\n // if k==1, then set to 0 to terminate; otherwise increment.\n if ($k == 1) $k=0; else $k++;\n\n // read file\n logp(\"log\",\"Adding multi disc file '{$nfile}'\");\n\n $ncuefile = file($nfile, FILE_IGNORE_NEW_LINES);\n if ( $ncuefile === FALSE )\n logp(\"error,exit1\",\"FATAL ERROR in setupMulti: could not read file '{$nfile}'. Exit\");\n\n // check for matching artist and album\n if ( ($nartist = getCueInfo(\"artist\",$file,$cuefile)) === FALSE ) return FALSE;\n if ( ($nalbum = getCueInfo(\"album\",$file,$cuefile)) === FALSE ) return FALSE;\n if ( $nartist != $artist || $nalbum != $album ) {\n logp(\"error\", array(\n \"ERROR: artist or album in cue sheet does not match that of multi master. Skipping\",\n \" Master artist: '{$artist}'\",\n \" Master album: '{$album}'\",\n \" File artist: '{$nartist}'\",\n \" File album: '{$nalbum}'\",\n \" File: '{$nfile}'\"\n ));\n return FALSE;\n }\n\n // add REM separator\n $cuefile[] = \"REM Next CD\";\n\n // iterate through each line of file, find first FILE directive\n $fileFound = FALSE;\n foreach($ncuefile as $nline) {\n // mark when we get to FILE\n if (preg_match( '/^\\a*FILE/', $nline )) $fileFound = TRUE;\n\n if ($fileFound === TRUE ) $cuefile[] = $nline;\n } // end of foreach\n\n // add to files used, trash\n $files_used[] = $nfile;\n $trash[] = $nfile;\n\n } // end of else nfile (!= \"\")\n } // end of while K\n } // end of preg_match [-]1\n else\n // did not match for multi file format - error\n logp(\"error,exit1\", array(\n \"FATAL ERROR in setupMulti: beginning file not of the form *[-]1.cue\",\n \" File: '{$file}'\"));\n\n return TRUE;\n}", "public function handleUploads()\n\t{\n\t\t// Iterate over all received files\n\t\t$this->processFiles($this->httpRequest->getFiles());\n\t\treturn true; // Skip all next\n\t}", "public function process_s3_files( $files_to_process, $saved_files = null ) {\n\t\tif ( empty( $files_to_process ) || ! is_array( $files_to_process ) ) {\n\t\t\treturn $files_to_process;\n\t\t}\n\n\t\tif ( is_null( $saved_files ) ) {\n\t\t\t$saved_files = $this->as3cf->get_files();\n\t\t}\n\t\t$enqueued_files = $this->as3cf->get_enqueued_files();\n\n\t\t$bucket = $this->as3cf->get_setting( 'bucket' );\n\t\t$region = $this->as3cf->get_setting( 'region' );\n\t\t$s3client = $this->as3cf->get_s3client( $region );\n\n\t\t$count = 0;\n\t\t$batch_limit = apply_filters( 'as3cf_assets_file_process_batch_limit', 100 );\n\t\t$time_limit = apply_filters( 'as3cf_assets_file_process_batch_time_limit', 10 ); // Seconds\n\t\t$throttle_period = 1000000 * apply_filters( 'as3cf_assets_seconds_between_file_uploads', 0 ); // Microseconds\n\n\t\t$finish_time = time() + $time_limit;\n\t\t$files_copied = 0;\n\t\t$files_removed = 0;\n\n\t\tforeach ( $files_to_process as $key => $file ) {\n\t\t\t$count++;\n\t\t\t// Batch or time limit reached.\n\t\t\tif ( $count > $batch_limit || time() >= $finish_time ) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tswitch ( $file['action'] ) {\n\t\t\t\tcase 'remove':\n\t\t\t\t\t$this->as3cf->remove_file_from_s3( $region, $bucket, $file );\n\n\t\t\t\t\t$path = $this->as3cf->get_file_absolute_path( $file['url'] );\n\t\t\t\t\t$type = pathinfo( $path, PATHINFO_EXTENSION );\n\t\t\t\t\t$files_removed++;\n\t\t\t\t\tunset( $enqueued_files[ $type ][ $path ] );\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'copy':\n\t\t\t\t\t// Ensure location type has been supplied\n\t\t\t\t\tif ( ! isset( $file['type'] ) ) {\n\t\t\t\t\t\t$file = $this->get_location_type( $file );\n\t\t\t\t\t}\n\n\t\t\t\t\t$location_key = $this->as3cf->get_location_key( $file );\n\n\t\t\t\t\tif ( ! isset( $saved_files[ $location_key ][ $file['file'] ] ) ) {\n\t\t\t\t\t\t// If for some reason we don't have the file saved\n\t\t\t\t\t\t// in the scanned files array anymore, don't copy it\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t// If the file has been removed or moved before the batch was processed, skip it.\n\t\t\t\t\tif ( ! file_exists( $file['file'] ) ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t\t$details = $saved_files[ $location_key ][ $file['file'] ];\n\t\t\t\t\t$body = file_get_contents( $file['file'] );\n\t\t\t\t\t$gzip_body = $this->as3cf->maybe_gzip_file( $file['file'], $details, $body );\n\n\t\t\t\t\tif ( is_wp_error( $gzip_body ) ) {\n\t\t\t\t\t\t$s3_info = $this->as3cf->copy_file_to_s3( $s3client, $bucket, $file['file'], $details );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$s3_info = $this->as3cf->copy_body_to_s3( $s3client, $bucket, $gzip_body, $details, true );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( is_wp_error( $s3_info ) ) {\n\t\t\t\t\t\t$this->as3cf->handle_failure( $file['file'], 'upload' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$details['s3_version'] = $details['local_version'];\n\t\t\t\t\t\t$details['s3_info'] = $s3_info;\n\n\t\t\t\t\t\t$saved_files[ $location_key ][ $file['file'] ] = $details;\n\t\t\t\t\t\t$files_copied++;\n\n\t\t\t\t\t\t// Maybe remove file from upload failure queue\n\t\t\t\t\t\tif ( $this->as3cf->is_failure( 'upload', $file['file'] ) ) {\n\t\t\t\t\t\t\t$this->as3cf->remove_failure( 'upload', $file['file'] );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Maybe remove file from gzip failure queue\n\t\t\t\t\t\tif ( ! is_wp_error( $gzip_body ) && $this->as3cf->is_failure( 'gzip', $file['file'] ) ) {\n\t\t\t\t\t\t\t$this->as3cf->remove_failure( 'gzip', $file['file'] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tunset( $files_to_process[ $key ] );\n\n\t\t\t// Let the server breathe a little.\n\t\t\tusleep( $throttle_period );\n\t\t}\n\n\t\t// If we have copied files to S3 update our saved files array\n\t\tif ( $files_copied > 0 ) {\n\t\t\tforeach ( $saved_files as $location_files ) {\n\t\t\t\t$this->as3cf->save_files( $location_files );\n\t\t\t}\n\t\t}\n\n\t\t// If we have removed files from S3, update enqueued files array\n\t\tif ( $files_removed > 0 ) {\n\t\t\t$this->as3cf->save_enqueued_files( $enqueued_files );\n\t\t}\n\n\t\t// Return remainder of files to process, empty array means all processed.\n\t\treturn $files_to_process;\n\t}", "public function files( array $files )\n\t{\n\t\t// we need to reset the last change timestamp because we might add new files\n\t\t$this->reset_last_change();\n\t\t\n\t\tforeach( $files as $file )\n\t\t{\n\t\t\tif ( !$this->is_absolute_path( $source ) )\n\t\t\t{\n\t\t\t\t$file = static::$storage.$file;\n\t\t\t}\n\t\t\t\n\t\t\t$this->sources[] = $file;\n\t\t}\n\t}", "public function collectInfoFiles()\r\n {\r\n $files_found = $this->findFiles($this->destination_dir, array('md', '1st', 'txt'));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }", "function scan_files( ){\n\n // List of all the audio files found in the directory and sub-directories\n $audioFileArray = array();\n\n // List of filenames already handled during the scan. To detect dupe filenames.\n $alreadyhandledFileArray = array();\n\n // Make list of all files in db to remove non existent files\n $DBaudioFileArray = array();\n foreach ( $this->get_list_of_files()->fetchAll() as $row ) {\n $DBaudioFileArray[] = $row['filename'];\n }\n\n // Prepare variables for file urls\n //$base_dir = dirname(dirname(realpath($this->filedirectorypath))); // Absolute path to your installation, ex: /var/www/mywebsite\n $doc_root = preg_replace(\"!{$_SERVER['SCRIPT_NAME']}$!\", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www\n $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n $port = $_SERVER['SERVER_PORT'];\n $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n $domain = $_SERVER['SERVER_NAME'];\n // variables for file urls\n\n // Create recursive dir iterator which skips dot folders\n $dir = new RecursiveDirectoryIterator( $this->filedirectorypath , FilesystemIterator::SKIP_DOTS);\n\n // Flatten the recursive iterator, consider only files, no directories\n $it = new RecursiveIteratorIterator($dir);\n\n // Find all the mp3 files\n foreach ($it as $fileinfo) {\n if ($fileinfo->isFile() && !strcmp($fileinfo->getExtension(), \"mp3\")) {\n $audioFileArray[] = $fileinfo;\n\n //Warning: files with same md5key in different folders will not be inserted into the db.\n //print md5_file($fileinfo) . \"<br />\\n\";\n }\n }\n\n foreach ($audioFileArray as $key => $fileinfo) {\n\n $filename = $fileinfo->getFilename();\n\n //For each file found on disk remove entry from list from DB\n // if any left at the end, they are files that no longer are present on the drive.\n //print \"unsetting: \" . $filename . \"<br>\";\n unset($DBaudioFileArray[array_search($filename,$DBaudioFileArray,true)]);\n\n // check file not in db\n if( !$this->is_file_in_db( $filename ) ) {\n\n //decode filename date if named according to our naming scheme\n $date = $this->decode_filename($filename);\n\n // Build file url based on server path\n $filepath = realpath($fileinfo->getRealPath());\n $base_url = preg_replace(\"!^{$doc_root}!\", '', $filepath); # ex: '' or '/mywebsite'\n $full_url = \"$protocol://{$domain}{$disp_port}{$base_url}\"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc.\n\n //print $filename . \" - \" . $full_url . \"<br />\\n\";\n\n //insert audiofile in db for first time\n $this->insert_new_file_into_db( $filename, $full_url, $fileinfo->getRealPath(), $fileinfo->getSize(), $date );\n\n $alreadyhandledFileArray[$key] = $filename;\n\n } else {\n // if file in alreadyhandled array, then duplicate named files have been found\n // how to check for duplicate file names?\n // if we're here then the name has already ben added to the db (but maybe during a previous run)\n //we still need to look for the file in the alreadyhandledFileArray\n if( in_array($filename, $alreadyhandledFileArray) ){\n // flag file\n $this->flag_file($filename, \"Il y a 2 ou plusieurs fichiers audio avec le même nom dans le dossier audio du serveur ftp. Veuillez changer les noms ou supprimer les doublons.\");\n }\n }\n\n\n }\n\n // If there are files from the database that weren't found in the audio folder,\n // flag them and add a comment stating that the file can no longer be found.\n if( count($DBaudioFileArray) ){\n //print_r($DBaudioFileArray);\n foreach($DBaudioFileArray as $key => $fn){\n $this->flag_file($fn, \"Le fichier en question n'est plus présent dans le dossier audio du serveur ftp. Il faut le supprimer de la base de données.\");\n $this->set_file_not_new($fn);\n }\n }\n\n return true;\n }", "public function getFiles ();", "function _load_files(&$app, &$c) {\n\t\t$files = $c->param('app.view_http.request.files');\n\t\tif (is_array($files)) {\n\t\t\tforeach($files as $k => $file) {\n\t\t\t\tif (is_array($file['size'])) {\n\t\t\t\t\tfor($i=0;$i<count($file['size']);$i++) {\n\t\t\t\t\t\tif (($file['size'][$i] > 0) && (!empty($file['tmp_name'][$i])))\n\t\t\t\t\t\t\t$this->_http->addFile($file['name'][$i], $file['tmp_name'][$i], $file['type'][$i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tif (($file['size'] > 0) && (!empty($file['tmp_name'])))\n\t\t\t\t\t\t$this->_http->addFile($file['name'], $file['tmp_name'], $file['type']);\n\t\t\t}\n\t\t}\n\t}", "public function files($index){\n $this->httpRequest->files($index);\n }", "public static function getProcessors()\n {\n $folders = array(\n 'DB',\n 'Row',\n );\n $prefix = APPLICATION_PATH . '/CSVRunner/Processor/';\n $suffix = '/*.php';\n $folders = array_map(function ($e) use ($prefix, $suffix) {return $prefix . $e . $suffix;}, $folders);\n $files = array_map('basename', call_user_func_array('array_merge', array_map('glob', $folders)));\n $files = array_map(function ($e) {return str_replace('.php', '', $e);}, $files);\n $files = array_unique($files);\n $files = array_filter($files, function ($e) {return $e !== 'Abstract';});\n return $files;\n }", "abstract public function search($files, array $includedFiles);", "public function lookForFiles()\n\t{\n\t\t$this->_jobOptions = [];\n\n\t\tforeach ($this->getProject()->jobs as $job) {\n\t\t\tif ($job->paramountProjectJob instanceof ParamountProjectJob){\n\n\t\t\t\t$this->setProjectJob($job);\n\n\t\t\t\t$this->buildJobOptionsForService();\n\t\t\t}\n\t\t}\n\n\t}", "protected function scanFiles(array $paths): void\n {\n // Get current path and display section title\n $path = current($paths);\n $this->getOutputStyle()->section('Analysing: ' . $path);\n\n // Analyses options\n $executeAll = $this->hasOptionsAllOrNone(...array_keys($this->analyses));\n\n // Analyse files within the path\n foreach ($this->analyses as $option => $analyse) {\n // Skip unwanted analyse\n if (!$executeAll && !$this->option($option)) {\n continue;\n }\n\n $callback = $title = '';\n extract($analyse, EXTR_OVERWRITE);\n\n // Is it composer.lock file\n $isComposerLock = strpos($path, 'composer.lock');\n $hasComposerLock = file_exists(rtrim($path, '/') . '/composer.lock');\n\n // Skip analyseSecurityChecker if path is not for composer.lock\n // else, Skip all other analysers if the path if for composer.lock\n if ('analyseSecurityChecker' === $callback && false === $isComposerLock && !$hasComposerLock) {\n continue;\n }\n if ('analyseSecurityChecker' !== $callback && false !== $isComposerLock) {\n continue;\n }\n\n // Title\n $this->getOutputStyle()->block('[ ' . $title . ' ]', null, 'fg=magenta');\n\n // Analyse output\n $this->{$callback}($path);\n }\n\n // Move to the next parameter\n if (next($paths)) {\n $this->scanFiles($paths);\n }\n }", "public function testFiles() {\n\t\t$repoSrc = ROOT . DS . 'src';\n\n\t\t$this->shell->args = [$repoSrc];\n\n\t\t$files = $this->shell->Stage->files();\n\t\tforeach ($files as &$file) {\n\t\t\t$file = str_replace(DS, '/', substr($file, strlen($repoSrc) + 1));\n\t\t}\n\n\t\t$expected = [\n\t\t\t'Shell/UpgradeShell.php',\n\t\t\t'Shell/Task/BaseTask.php',\n\t\t\t'Shell/Task/RenameCollectionsTask.php',\n\t\t\t'Shell/Task/NamespacesTask.php',\n\t\t\t'Shell/Task/StageTask.php',\n\t\t\t'Shell/Task/TestsTask.php',\n\t\t\t'Shell/Task/AppUsesTask.php',\n\t\t\t'Shell/Task/FixturesTask.php',\n\t\t\t'Shell/Task/RenameClassesTask.php',\n\t\t\t'Shell/Task/MethodNamesTask.php',\n\t\t\t'Shell/Task/MethodSignaturesTask.php',\n\t\t\t'Shell/Task/HelperTrait.php',\n\t\t\t'Shell/Task/ChangeTrait.php',\n\t\t\t'Shell/Task/LocationsTask.php',\n\t\t\t'Shell/Task/I18nTask.php',\n\t\t\t'Shell/Task/SkeletonTask.php',\n\t\t\t'Shell/Task/TemplatesTask.php',\n\t\t\t'Shell/Task/ModelToTableTask.php',\n\t\t\t'Shell/Task/CleanupTask.php',\n\t\t\t'Shell/Task/PrefixedTemplatesTask.php',\n\t\t\t'Shell/Task/CustomTask.php',\n\t\t\t'Shell/Task/LocaleTask.php',\n\t\t\t'Shell/Task/UrlTask.php',\n\t\t\t'Shell/Task/TableToEntityTask.php',\n\t\t\t'Shell/Task/FixtureLoadingTask.php',\n\t\t\t'Shell/Task/FixtureCasingTask.php',\n\t\t];\n\n\t\tforeach ($expected as $file) {\n\t\t\t$this->assertTrue(in_array($file, $files, true), 'The files to process should be all files in the src folder - ' . $file);\n\t\t}\n\t}", "public function getProcessedAndNewFiles(): Collection\n {\n return $this->files->filter(function (File $file) {\n return in_array($file->getStatus(), [FILE::FILE_NEW, FILE::FILE_DONE, FILE::FILE_IN_QUEUE]);\n });\n }", "public function upload($files)\r\n {\r\n $storage = new \\Upload\\Storage\\FileSystem($this->upload_dir);\r\n\r\n $uploaded_files = [];\r\n\r\n foreach($files as $key => $value){\r\n $file = new \\Upload\\File($key, $storage);\r\n\r\n $new_filename = uniqid();\r\n $file->setName($new_filename);\r\n\r\n // Validate file upload\r\n // MimeType List => http://www.iana.org/assignments/media-types/media-types.xhtml\r\n $file->addValidations(array(\r\n\r\n //You can also add multi mimetype validation\r\n # We support commonly used MIME type extensions\r\n new \\Upload\\Validation\\Mimetype(array(\r\n 'image/png',\r\n 'image/jpeg',\r\n 'image/gif',\r\n 'application/pdf',\r\n 'text/csv',\r\n 'text/plain', # .txt\r\n 'application/msword', # .doc\r\n 'application/vnd.ms-excel', # .xls\r\n 'application/vnd.ms-powerpoint', # .ppt\r\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', # .xlsx\r\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', # .docx\r\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation', # .pptx\r\n )),\r\n // Ensure file is no larger than 5M (use \"B\", \"K\", M\", or \"G\")\r\n // new \\Upload\\Validation\\Size('20M')\r\n ));\r\n\r\n\r\n try{\r\n $file->upload();\r\n\r\n $uploaded_files[$key] = $file->getNameWithExtension();\r\n }\r\n catch(\\Exception $e){\r\n return $e->getMessage();\r\n }\r\n }\r\n\r\n return $uploaded_files;\r\n\r\n }", "public function setFiles($files)\n {\n if (is_array($files))\n $this->files = collect($files);\n else\n $this->files = $files;\n }", "public function getMultiple(array $filepaths);", "abstract public function process();", "abstract public function process();", "abstract public function process();", "private function processImageStack() {\n\n foreach($this->imagePath as $imagePath) {\n $this->processSingleImage($imagePath);\n }\n }", "abstract protected function process();", "abstract protected function process();", "abstract protected function process();", "abstract protected function process();", "public function process($files, $filters)\n {\n ob_start();\n\n foreach ($files as $media => $_files) {\n\n $to_load = array();\n\n foreach ($_files as $file => $options) {\n switch ($options['src']) {\n case FileSource::EXTERNAL:\n // if the inject content is not empty, we should push it into 1 file to cache\n $this->filterFiles($to_load, $media, $filters);\n\n printf($this->filePattern, $media, $file);\n break;\n case FileSource::INLINE:\n // if we encounter inline, we must first print out the other local files requested before it\n $this->filterFiles($to_load, $media, $filters);\n\n echo $options['inline'];\n break;\n default:\n $to_load[] = $file;\n\n }\n }\n\n $this->filterFiles($to_load, $media, $filters);\n }\n\n $result = ob_get_clean();\n\n return $result;\n }", "public function addMultiple(array $arrFiles): void\n {\n foreach ($arrFiles as $strFile)\n {\n $this->add($strFile);\n }\n }", "private function loadSubmissionFiles() {\n $submitter_id = $this->graded_gradeable->getSubmitter()->getId();\n $gradeable = $this->graded_gradeable->getGradeable();\n $course_path = $this->core->getConfig()->getCoursePath();\n $config = $gradeable->getAutogradingConfig();\n\n // Get the path to load files from (based on submission type)\n $dirs = $gradeable->isVcs() ? ['submissions', 'checkout'] : ['submissions'];\n\n\n foreach ($dirs as $dir) {\n $this->meta_files[$dir] = [];\n $this->files[$dir][0] = [];\n\n $path = FileUtils::joinPaths($course_path, $dir, $gradeable->getId(), $submitter_id, $this->version);\n\n // Now load all files in the directory, flattening the results\n $submitted_files = FileUtils::getAllFiles($path, [], true);\n foreach ($submitted_files as $file => $details) {\n if (substr(basename($file), 0, 1) === '.') {\n $this->meta_files[$dir][$file] = $details;\n }\n else {\n $this->files[$dir][0][$file] = $details;\n }\n }\n // If there is only one part (no separation of upload files),\n // be sure to set the \"Part 1\" files to the \"all\" files\n if ($config->getNumParts() === 1 && !$config->isNotebookGradeable()) {\n $this->files[$dir][1] = $this->files[$dir][0];\n }\n\n $part_names = $config->getPartNames();\n $notebook_model = null;\n if ($config->isNotebookGradeable()) {\n $notebook_model = $config->getUserSpecificNotebook($submitter_id);\n\n $part_names = range(1, $notebook_model->getNumParts());\n }\n\n // A second time, look through the folder, but now split up based on part number\n foreach ($part_names as $i => $name) {\n foreach ($submitted_files as $file => $details) {\n $dir_name = \"part{$i}/\";\n $index = $i;\n if ($config->isNotebookGradeable() && isset($notebook_model->getFileSubmissions()[$i])) {\n $dir_name = $notebook_model->getFileSubmissions()[$i][\"directory\"];\n $index = $name;\n }\n\n if (substr($file, 0, strlen($dir_name)) === $dir_name) {\n $this->files[$dir][$index][substr($file, strlen($dir_name))] = $details;\n }\n }\n }\n }\n }", "function fileNeedsProcessing() ;", "protected function auto_register_files()\r\n\t\t{\r\n\t\t\t// initialize variables\r\n\t\t\t$level = 0;\r\n\t\t\t\r\n\t\t\t// look through each director\r\n\t\t\tforeach( $this->paths as $i => $path )\r\n\t\t\t{\r\n\t\t\t\t// initialize variables\r\n\t\t\t\t$j \t\t= $level + 1001;\r\n\t\t\t\t$files \t= glob( \"{$path}*\" . self::REAL_EXT );\r\n\t\t\t\t$len \t= strlen( self::REAL_EXT );\r\n\t\t\t\t\r\n\t\t\t\tforeach( $files as $f )\r\n\t\t\t\t{\r\n\t\t\t\t\t// determine handle\r\n\t\t\t\t\t$file_name \t= substr( $f, 0, strlen( $f ) - $len );\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( strpos( $file_name, $this->local ) !== false )\r\n\t\t\t\t\t\t$file_name = substr( $file_name, strlen( $this->local ) );\r\n\t\t\t\t\t\r\n\t\t\t\t\t$handle \t= $i == self::ROOT_PATH ? strtoupper( self::ROOT_PATH ) . \"_\" : \"\";\r\n\t\t\t\t\t$handle \t.= preg_replace( \"/[^\\w]/\", \"_\", strtoupper( $file_name ) );\r\n\t\t\t\t\tdefine( $handle, $handle );\r\n\t\t\t\t\t/* The old page id number define( $handle . '_PAGEID', $j );*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t// get rid of system directories\r\n\t\t\t\t\tif ( strpos( $file_name, $this->local ) !== false )\r\n\t\t\t\t\t\t$file_name = substr( $file_name, strlen( $this->local ) );\r\n\t\t\t\t\t\r\n\t\t\t\t\t// define properties\r\n\t\t\t\t\t$this->files[ $handle ] = $file_name;\r\n\t\t\t\t\t$this->urls[ $handle ] = $this->url . str_replace( \"\\\\\", \"/\", $file_name );\r\n\t\t\t\t\t$j++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// increment for next path\r\n\t\t\t\t$level += 1000;\r\n\t\t\t\t$j = 1;\r\n\t\t\t}\r\n\t\t}", "private function set_files_by_published()\n\t\t{\n\t\t\t$this->files = Filesystem::ls(PATH_POSTS, '*.*.*.*.NULL.*.*.*.*.*.*', 'xml', false, false, true);\n\t\t\t$this->files_count = count( $this->files );\n\t\t}", "protected abstract function process();", "public function uploadFiles($files, $unique = null)\n {\n foreach ($files as $file) {\n\n // Upload file\n $this->uploadFile($file, $unique);\n }\n }", "protected function _scan_files()\n\t{\n\t\t$terms = array();\n\n\t\t$parser = new PHPParser_Parser(new PHPParser_Lexer);\n\n\t\tforeach ($this->_list_files(array('views', 'classes')) as $file)\n\t\t{\n\t\t\t$statements = $parser->parse(file_get_contents($file));\n\n\t\t\t$terms = Arr::merge($terms, $this->_get_terms_from_statements($statements));\n\t\t}\n\n\t\treturn $terms;\n\t}", "function add_file_objs($file_objs) {\n array_merge($this->file_objs, $file_objs);\n $this->update_files = 1;\n }", "function addFileSet(FileSet $fileset)\n\t{\n\t\t$this->filesets[] = $fileset;\n\t}", "public function getFiles() {}", "protected function register_files()\r\n\t\t{\r\n\t\t\t// register paths\r\n\t\t\t$this->paths[ self::ROOT_INDEX ] = $this->local;\r\n\t\t\t$this->register_ini( $this->paths[ self::ROOT_INDEX ] . self::REGISTRY_FILE );\r\n\t\t\t\t\r\n\t\t\tforeach( $this->path_follow as $index => $p )\r\n\t\t\t{\r\n\t\t\t\t// put together local path names\r\n\t\t\t\t$this->paths[ $index ] = $this->local . $p . DIRECTORY_SEPARATOR;\r\n\t\t\t\t\r\n\t\t\t\t// look for registries to assign id's to\r\n\t\t\t\t$this->register_ini( $this->paths[ $index ] . self::REGISTRY_FILE, $p, $p, $index );\r\n\t\t\t}\r\n\t\t}", "private function processFile() {\n if ($this->isFileAllowed()) {\n $path_parts = pathinfo($this->filepath);\n $extention = $path_parts['extension'];\n\n $classes = get_declared_classes();\n\n foreach($classes as $class) {\n $reflect = new \\ReflectionClass($class);\n if($reflect->implementsInterface('App\\\\Classes\\\\IFileFormat')) {\n if ($extention === $class::getFileExtension()) {\n $fileFormat = new $class($this->filepath);\n $this->charsCount = $fileFormat->getCharactersCount();\n $this->wordsCount = $fileFormat->getWordsCount();\n }\n }\n }\n }\n }", "public function getFiles();", "public function getFiles();", "public function getFiles();", "public function enumerateFiles($callback);", "public function process(): void {\n if($this->shouldCache() && $this->hasCache()) {\n $this->restoreCache();\n\n return;\n }\n\n $folders = [];\n foreach($this->sources_to_parse as $source_to_parse) {\n $folder = $source_to_parse->getFolderToParse();\n if(!isset($folders[$folder])) {\n $folders[$folder] = [\n 'extensions' => [],\n 'flags' => [],\n ];\n }\n $folders[$folder]['extensions'] = [...$folders[$folder]['extensions'], ...$source_to_parse->getExtensions()];\n $folders[$folder]['flags'] = [...$folders[$folder]['flags'], ...$source_to_parse->getFlags()];\n }\n\n foreach($folders as $folder => $folder_sources) {\n $folder_sources['extensions'] = array_values(array_unique($folder_sources['extensions']));\n $folder_sources['flags'] = array_values(array_unique($folder_sources['flags']));\n $code_data = $this->analyzer->parseFolder($folder, $folder_sources);\n $this->info_data[] = $code_data;\n $i = count($this->info_data) - 1;\n foreach($folder_sources['flags'] as $flag) {\n if(!isset($this->info_data_flag_refs[$flag])) {\n $this->info_data_flag_refs[$flag] = [];\n }\n $this->info_data_flag_refs[$flag][] = $i;\n }\n $this->flags = [...$this->flags, ...$folder_sources['flags']];\n }\n $this->flags = array_values(array_unique($this->flags));\n\n if($this->shouldCache()) {\n file_put_contents(\n $this->file_cache,\n \"<?php\\n\\nreturn \" .\n var_export([\n 'info_data' => $this->info_data,\n 'info_data_flag_refs' => $this->info_data_flag_refs,\n ], true) . ';',\n );\n }\n }", "public function generateXmlFiles()\n\t{\n\t\t// Sitemaps\n\t\t$this->generateSitemap();\n\n\t\t// HOOK: add custom jobs\n\t\tif (isset($GLOBALS['TL_HOOKS']['generateXmlFiles']) && is_array($GLOBALS['TL_HOOKS']['generateXmlFiles']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['generateXmlFiles'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->{$callback[0]}->{$callback[1]}();\n\t\t\t}\n\t\t}\n\n\t\t// Also empty the page cache so there are no links to deleted files\n\t\t$this->purgePageCache();\n\n\t\t// Add a log entry\n\t\t$this->log('Regenerated the XML files', __METHOD__, TL_CRON);\n\t}", "function addFiles($files /*Only Pass Array*/) {\t\t\n\t\t$dirs = array();\n\t\t$directory = 'Plugins/';\n\t\tif ($handle = opendir($directory)) {\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif ($file != '.' and $file != '..' and is_dir($directory.$file)) {\n\t\t\t\t\t$dirs[] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($handle);\n\n\t\tforeach($files as $file) {\n\t\t\tif (is_file($file)) { //directory check\n\t\t\t\tforeach($dirs as $dir) {\n\t\t\t\t\t$dirName = 'Plugins/' . $dir;\n\t\t\t\t\t$fileName = substr($file, 0, -3);\n\t\t\t\t\t\n\t\t\t\t\tif($dirName == $fileName) {\n\t\t\t\t\t\t$this->zipDirectory($dirName,$dirName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$data = implode(\"\",file($file));\n\t\t\t\t$this->addFile($data,$file);\n\t\t\t}\n }\n }", "protected function postProcessArray() {\n foreach (self::$files as $key => $item) {\n // remove link from tree nodes\n if (in_array($item['id'], self::$_treenodes)) {\n self::$files[$key]['href'] = ModUtil::url('DocTastic', $this->userType, 'view');\n }\n if ($item['parent_id'] == 0) continue;\n // remove entries with disallowed extensions\n if (in_array(FileUtil::getExtension($item['name']), $this->_disallowedExtensions)) {\n unset(self::$files[$key]);\n }\n }\n }", "private function setup_files() {\n $this->record_progress(\n \"Step 6: Preparing files for further analysis\");\n\n $path_new_input = $this->path_new_input;\n $path_spliceman = $this->path_spliceman;\n $path_RBPs_new = $this->path_RBPs_new;\n $path_errors = $this->path_errors;\n\n exec(\"perl\\\n /var/www/html/spliceman_beta/scripts/setup_spliceman_RBP_files.pl\\\n /var/www/html/spliceman_beta/genome_data/hg19.fa\\\n '$path_new_input'\\\n '$path_spliceman'\\\n '$path_RBPs_new'\\\n '$path_errors'\", \n $output, \n $return);\n\n if ($return) {\n $this->pipeline_error(\n \"Error in pipeline, please contact administrator\n and provide step 6\");\n }\n if (count($output) > 0) {\n $this->pipeline_error($output);\n }\n }", "function set_filenames($filename_array)\n\t{\n\t\tif (!is_array($filename_array))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach($filename_array as $handle => $filename)\n\t\t{\n\t\t\t$this->set_filename($handle, $filename);\n\t\t}\n\n\t\treturn true;\n\t}", "public abstract function getNewFiles();", "abstract protected function _process();" ]
[ "0.77582103", "0.70163983", "0.6596464", "0.61006147", "0.60283935", "0.59699124", "0.5954716", "0.59486204", "0.5942486", "0.5822106", "0.579859", "0.57939965", "0.57690424", "0.5746909", "0.5735797", "0.570958", "0.5706699", "0.5652778", "0.5652521", "0.56487125", "0.56454706", "0.56454706", "0.56454706", "0.56206495", "0.56088275", "0.56080836", "0.55869865", "0.5548422", "0.5477199", "0.54639095", "0.5460645", "0.5459102", "0.54543155", "0.5414805", "0.5408277", "0.53606266", "0.5312047", "0.5304208", "0.5299865", "0.5297546", "0.52778006", "0.5269602", "0.52534056", "0.52459043", "0.5245186", "0.52190465", "0.5217863", "0.5202162", "0.51931685", "0.5192178", "0.5188677", "0.51738876", "0.51662993", "0.51640767", "0.5157512", "0.5157488", "0.51574796", "0.51557004", "0.5154247", "0.51427704", "0.51407725", "0.5140756", "0.5136633", "0.5135564", "0.5129638", "0.5126269", "0.51107633", "0.51107633", "0.51107633", "0.5108737", "0.5107777", "0.5107777", "0.5107777", "0.5107777", "0.5098276", "0.50942063", "0.50908905", "0.50838006", "0.5079133", "0.50787556", "0.50697947", "0.5059251", "0.5058344", "0.5056151", "0.5055569", "0.5051689", "0.50507194", "0.50487816", "0.5046688", "0.5046688", "0.5046688", "0.5045148", "0.503517", "0.5034391", "0.5032569", "0.502702", "0.5018068", "0.5015262", "0.5006657", "0.50049126" ]
0.51431054
59
Preprocesses a single file.
public function preProcessFile($filename) { $tokens = token_get_all(file_get_contents($filename)); $numTokens = count($tokens); $namespace = FALSE; for ($i = 0; $i < $numTokens; $i++) { if (is_string($tokens[$i])) { continue; } list ($token, $value) = $tokens[$i]; switch ($token) { case T_NAMESPACE: { $namespace = $this->getNamespaceName($tokens, $i); } break; case T_CLASS: { $className = $this->getClassName($namespace, $tokens, $i); if (isset($tokens[$i+4]) && is_array($tokens[$i+4]) && $tokens[$i+4][0] == T_EXTENDS) { $parent = $this->getClassName( $namespace, $tokens, $i + 4 ); } else { $parent = NULL; } $this->classes[$className] = $parent; } break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function pre_process() {}", "public function prepareFile()\n {\n // TODO: Implement prepareFile() method.\n }", "public function preProcess();", "public function preProcess();", "protected function preProcess() {}", "abstract protected function _preProcess();", "function fileNeedsProcessing() ;", "public function fileNeedsProcessing() {}", "protected function _preload() {\n }", "function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}", "static protected function _preProcess($rows, $params = array()) {\n\t\t$return = array();\n\t\tforeach($rows as $row => &$file) {\n\t\t\tself::log($row);\n\t\t\tif (!file_exists($file)) {\n\t\t\t\tself::log('Cache file not found');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$_ = '';\n\t\t\t$_file = $file;\n\t\t\t$contents = file_get_contents($file);\n\n\t\t\tif (file_exists($file . '.preprocessed')) {\n\t\t\t\tself::log(\"File $file.preprocessed exists\");\n\t\t\t} else {\n\t\t\t\t$contents = preg_replace(\"@<script[^>]*>.*?</script>@s\", '', $contents);\n\t\t\t\t$contents = preg_replace(\"@\\s*<!--.*?-->\\s*@s\", '', $contents);\n\t\t\t\tfile_put_contents($file . '.preprocessed', $contents);\n\t\t\t\t$contents = `tidy -asxhtml -utf8 -modify --break-before-br y --clean y --drop-empty-paras y --drop-font-tags y -i --quiet y --tab-size 4 --wrap 1000 - < $file.preprocessed 2>/dev/null`;\n\n\t\t\t\tself::log(\"Writing $file.preprocessed\");\n\t\t\t\tfile_put_contents($file . '.preprocessed', $contents);\n\t\t\t}\n\t\t\t$return[$row] = 'processed';\n\t\t}\n\t\treturn $return;\n\t}", "abstract public function processFile($fileName);", "public function preUpload()\n {\n if (null !== $this->getFile()) {\n // do whatever you want to generate a unique name\n $filename = sha1(uniqid(mt_rand(), true));\n $this->path = $filename.'.'.$this->getFile()->guessExtension();\n }\n }", "function _stageFile() {\n\t\t$this->_moveFile($this->_processingPath, $this->_stagePath, $this->_claimedFilename);\n\t}", "public function preUpload()\n {\n if (null !== $this->file) {\n // do whatever you want to generate a unique name\n $filename = sha1(uniqid(mt_rand(), true));\n $this->path = $filename.'.'.$this->file->guessExtension();\n $this->fileName = $this->file->getClientOriginalName();\n $this->size = $this->file->getSize();\n $this->type = $this->file->getMimeType();\n $this->uploadDate = new \\DateTime('now');\n }\n }", "public function fileStart(): void;", "protected function _preProcess(\\SetaPDF_Core_Document $pdfDocument) {}", "public static function prepare_files($file_name, $directory_path){\n if(!file_exists(\"$directory_path\" . \"/\" . \"$file_name\" . \".in\")){ # .in file\n touch(\"$directory_path\" . \"/\" . \"$file_name\" . \".in\");\n }\n if(!file_exists(\"$directory_path\" . \"/\" . \"$file_name\" . \".out\")){\n touch(\"$directory_path\" . \"/\" . \"$file_name\" . \".out\");\n }\n if(!file_exists(\"$directory_path\" . \"/\" . \"$file_name\" . \".rc\")){\n touch(\"$directory_path\" . \"/\" . \"$file_name\" . \".rc\");\n exec('echo \"0\" >' . \"$directory_path\" . \"/\" . \"$file_name\" . \".rc\");\n }\n }", "public function prepareFile($file)\r\n {\r\n $this->file = $file;\r\n\r\n return !!$this->file;\r\n }", "public function prepareToUpload(): void\n {\n if (!$this->hasFile()) {\n return;\n }\n\n // do whatever you want to generate a unique name\n $filename = sha1(uniqid(mt_rand(), true));\n if ($this->namePrefix !== null) {\n $filename = Uri::getUrl($this->namePrefix) . '_' . $filename;\n }\n $this->fileName = $filename . '.' . $this->getFile()->guessExtension();\n }", "function tidy_parse_file($filename, $config = null, $encoding = null, $use_include_path = false) {}", "function import_start( $file ) {\n\t\tif ( ! is_file($file) ) {\n\t\t\techo '<p><strong>发生错误</strong><br />';\n\t\t\techo $file.' 文件不存在</p>';\n\t\t\t$this->footer();\n\t\t\tdie();\n\t\t}\n\n\t\t$import_data = $this->parse( $file );\n\n\t\tif ( is_wp_error( $import_data ) ) {\n\t\t\techo '<p><strong>发生错误</strong><br />';\n\t\t\techo esc_html( $import_data->get_error_message() ) . '</p>';\n\t\t\t$this->footer();\n\t\t\tdie();\n\t\t}\n\n\t\t$this->posts = $import_data['posts'];\n\t\t$this->terms = $import_data['terms'];\n\t\t$this->categories = $import_data['categories'];\n\t\t$this->tags = $import_data['tags'];\n\n\t\twp_defer_term_counting( true );\n\t\twp_defer_comment_counting( true );\n\n\t\tdo_action( 'import_start' );\n\t}", "public function pre()\n {}", "protected function _initProcessor()\n {\n $this->_processor = Processor::getInstance();\n $paramPath = $this->_input->getArgument('path');\n\n // If path cannot be loaded, exit immediately\n if (!$paramPath) {\n return;\n }\n\n $path = new Path($paramPath, getcwd(), $this->_baseDirectory);\n\n if ($path->isValid()) {\n $this->_processor->setPath($path);\n\n if (!$this->_input->getOption('ignore-manifest')) {\n $this->_manifest->load($path);\n // Check if we've some preprocessor task to complete\n $this->_runProcessors(Processor::PRE_PROCESSORS);\n }\n }\n }", "public function preUpload()\n {\n if (null === $this->file) {\n return;\n }\n // stocke l'extension\n $this->url = $this->file->guessExtension();\n // génère alt de <img>\n $this->alt = $this->file->getClientOriginalName();\n }", "abstract public function preprocessInputStream(string $input): void;", "public function loadHeader(): void\n {\n $this->openFile('r');\n\n $header = $this->getLine(false);\n --$this->line; // because we don't want to count header line\n\n $this->initializeHeader($header);\n }", "public static function preRenderFile($element) {\n $element = parent::preRenderFile($element);\n if (isset($element['#exo_config_file_required'])) {\n $element['#required'] = $element['#exo_config_file_required'];\n }\n return $element;\n }", "function import( $file ) {\n\t\tadd_filter( 'import_post_meta_key', array( $this, 'is_valid_meta_key' ) );\n\t\tadd_filter( 'http_request_timeout', array( &$this, 'bump_request_timeout' ) );\n\n\t\t$this->import_start( $file );\n\n\t\twp_suspend_cache_invalidation( true );\n\t\t$this->process_categories();\n\t\t$this->process_tags();\n\t\t$this->process_terms();\n\t\t$this->process_posts();\n\t\twp_suspend_cache_invalidation( false );\n\n\t\t$this->import_end();\n\t}", "public function preProcess($object);", "function _pre() {\n\n\t}", "protected function preRun()\n {\n if (@class_exists('Plugin_PreRun') &&\n in_array('Iface_PreRun', class_implements('Plugin_PreRun'))) {\n $preRun = new Plugin_PreRun();\n $preRun->process();\n }\n }", "function tidy_repair_file($filename, $config = null, $encoding = null, $use_include_path = false) {}", "protected function parseVersionFile(): void\n {\n if (! file_exists($this->version_file)) {\n return;\n }\n\n // Read file in as an array & remove any empty lines\n $version_parts = array_filter(explode(\"\\n\", @file_get_contents($this->version_file)));\n\n // First line is the version\n if (empty($version_parts) or ! $this->parseVersion(array_shift($version_parts))) {\n return;\n }\n\n // Next line is branch/pre release\n $pre_release = array_shift($version_parts);\n\n $this->pre_release = ($pre_release !== 'master') ? $pre_release : null;\n\n // Is there anything left in the file for meta?\n if (empty($version_parts)) {\n return;\n }\n\n // Everything left is the meta, so concatenate it with .'s & replace the spaces with _'s\n $this->meta = preg_replace('/\\\\s+/u', '_', implode('.', $version_parts));\n }", "public function addStartingFile(string $filepath): void\n {\n if (!file_exists($filepath) && $this->auto_create_files) {\n file_put_contents($filepath, '/* Nothing here yet */');\n }\n\n if (!file_exists($filepath)) {\n throw new Exception(sprintf('SCSS-Stragint File %s not exists.', $filepath));\n }\n\n $this->startingPoint = $filepath;\n }", "function remove_first_line ($filename) {\n $file = file($filename);\n $output = $file[0];\n unset($file[0]);\n $return=implode(\"\",$file);\n return $return;\n}", "protected function preProcessTemplateSource($templateSource)\n {\n foreach ($this->renderingContext->getTemplateProcessors() as $templateProcessor) {\n $templateSource = $templateProcessor->preProcessSource($templateSource);\n }\n return $templateSource;\n }", "public function repairFile($filename, $config = null, $encoding = null, $use_include_path = false) {}", "public function setHeadFile($file)\n {\n $this->file_head = $file;\n }", "protected function beforeProcess() {\n }", "public function preProcess(ProcessEvent $event) {\n $GLOBALS['feeds_test_events'][] = (__METHOD__ . ' called');\n }", "protected function processSourceFile(SplFileInfo $file) {\n $code = file_get_contents($file);\n $amfphpUrlMarkerPos = strpos($code, '/**ACG_AMFPHPURL_**/');\n if ($amfphpUrlMarkerPos !== false) {\n $code = str_replace('/**ACG_AMFPHPURL_**/', $this->amfphpEntryPointUrl, $code);\n file_put_contents($file, $code);\n }\n $fileName = $file->getFilename();\n if (strpos($fileName, self::_SERVICE_) !== false) {\n $this->generateServiceFiles($code, $file);\n } else {\n $processed = $this->searchForBlocksAndApplyProcessing($code, self::SERVICE, 'processServiceListBlock');\n if ($processed) {\n file_put_contents($file, $processed);\n }\n }\n }", "public function generatePage_preProcessing() {}", "private function _preLoadReset() {\n\t\t$this->_amountProcessedLines = $this->_amountReadLines = 0;\n\t\t$this->_linesInvalidSize = $this->_lines = [];\n\t}", "private function lookForPreMinifiedAsset()\n {\n $min_path = (string)Str::s($this->file->getRealPath())->replace\n (\n '.'.$this->file->getExtension(),\n '.min.'.$this->file->getExtension()\n );\n\n if (!file_exists($min_path)) return false;\n\n return file_get_contents($min_path);\n }", "private function loadFile()\n\t{\n\t\tif( empty($this->content) ) {\n\t\t\tif( empty($this->file) ) {\n\t\t\t\tthrow new Exception('Which file should I parse, you ...!');\n\t\t\t} else {\n\t\t\t\tif( strtolower( $this->file->getExtension() ) == 'zip' ) {\n\t\t\t\t\t$this->content = $this->handleZipFile( $this->file );\n\t\t\t\t} else {\n\t\t\t\t\t$this->content = $this->file->getContents();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function parseFile($filename, $config = null, $encoding = null, $use_include_path = false) {}", "function import($file , $load_time = 0, $on_init = false)\r\n\t{\r\n\t\treturn parent::import($file, $load_time);\r\n\t}", "protected function setupFile($originalFile, $cacheFile)\n {\n if (count($this->filters) > 0) {\n $this->checkNumberOfAllowedFilters($cacheFile);\n if ($this->options['checkReferrer']) {\n $this->checkReferrer();\n }\n }\n\n if (! file_exists($originalFile)) {\n // If we are using a placeholder and that exists, use it!\n if ($this->placeholder && file_exists($this->placeholder)) {\n $originalFile = $this->placeholder;\n }\n }\n\n parent::setupFile($originalFile, $cacheFile);\n }", "public static function preProcessFileKliqBooth(Filesobject $file) {\r\n\t\t$fh \t\t\t\t= new Filehandler();\r\n\t\t$fh->table \t\t\t= 'apptbl_files';\r\n\t\t$objUserDb \t\t\t= Appdbmanager::getUserConnection();\r\n $dbh \t\t\t\t= new Db($objUserDb);\r\n \t// Store the file record in DB\r\n \tLogger::info(\"Saving the file into DB\");\r\n \t$file \t\t\t\t= self::saveFileToDBkliqBooth($file,$fh->table); \r\n \t$file->file_path \t= $fh->createStoreKey($file); \r\n \t$dbh->execute(\"update \".$fh->table.\" set file_path = '\".$file->file_path.\"' where file_id = '\".$file->file_id.\"'\");\r\n }", "public function beforeAnalyzeFile(\n CodeBase $code_base,\n Context $context,\n string $file_contents,\n Node $node\n ): void;", "protected function preCommitSetup() :void\n {\n $url = \"https://raw.githubusercontent.com/EngagePHP/pre-commit/master/setup.sh\";\n $content = file_get_contents($url);\n $path = app_path('setup.sh');\n\n Storage::put($path, $content);\n\n chmod($path, 0751); //rwxr-x--x\n }", "public function testPreprocess()\n {\n $container = $this->createClient(array('environment' => 'test2'))->getContainer();\n $preprocess = new ProfilePreprocess($container, array(\n 'anu_style_proxy.test_profile_preprocessor' => array(),\n ));\n $profile = new Profile(array('test' => 'value'), array());\n $preprocess->preprocess($profile);\n $this->assertEquals('preprocess', $profile->get('test_profile_preprocessor'));\n }", "public function startIncluding($fileName)\n\t{\n\t\t$thisHandler = array($this, 'handle');\n\n\t\t$oldHandler = set_error_handler($thisHandler);\n\t\tif ($oldHandler === $thisHandler) {\n\t\t\trestore_error_handler();\n\t\t}\n\t\tarray_push($this->files, $fileName);\n\t}", "protected function initFileLoader() \n\t{\n\t\t$this->fileLoader = new FileLoader();\n\t}", "public function preExec()\n {\n }", "function my_pre_add_callback($p_event, &$p_header)\r\n{\r\n\tglobal $files;\r\n\r\n\t$p_header['stored_filename']=$files[$p_header['stored_filename']]['title'];\r\n\treturn 1;\r\n}", "public static function import_process() {}", "function onBeforeFileAction(&$man, $action, $file1, $file2) {\r\n\t\treturn true;\r\n\t}", "protected function prepareFile($file)\n {\n return ltrim(str_replace('\\\\', '/', $file), '/');\n }", "public static function prepend($filename, $content)\n\t{\n\t\tif (!file_exists($filename)) {\n\t\t\tself::$errorsArray[$filename] = \"$filename not found in \" . dirname($filename);\n\t\t\treturn false;\n\t\t}\n\n\t\t$fileContent = self::readFile($filename);\n\t\t$data = $content . \"\\n\" . $fileContent;\n\n\t\tself::writeFile($filename, $data);\n\t}", "public function preUpload()\n {\n $this->name = str_replace(' ', '-', $this->alt) . uniqid() . \".\" . $this->fichier->guessExtension();\n }", "protected function preprocessInternal()\n\t{\n\t\t// void\n\t}", "function ProcessFile($srcFilePath, $options = null)\n\t{\t\t\n\t\t$this->OriginalFileName = $srcFilePath;\n\t\t$fileParts = pathinfo($srcFilePath);\n\t\t\n\t\tif (file_exists($srcFilePath))\n\t\t{\n\t\t\t$this->GetFileImageSize($srcFilePath);\n\t\t\t\n\t\t\t$fileFolder = $fileParts['dirname'];\n\t\t\t$destinationFolder = $this->addFolderSlash($fileFolder);\n\t\t\t$this->FileExtension = $fileParts['extension'];\n\t\t\t\n\t\t\t$this->processActions($srcFilePath, $destinationFolder.$fileParts['filename'], $options);\n\t\t}\n\t\telse \n\t\t\t$this->lastError = 'error_file_not_exists';\n\t}", "abstract protected function _preHandle();", "protected function createPreCommit() :void\n {\n $this->preCommitConfig();\n $this->preCommitSetup();\n }", "function load_file($path){\n\tif (!file_exists($path)) system_die('File reading error - \"' . $path . '\"', 'Template->load_file');\n\t$this->template = @file($path);\n\tunset($this->result);\n\t$this->filename = $path;\n}", "public function prepareFile() {\n\t\t// Check if the file do exists\n\t\tif (!is_dir($this->filedir)) {\n\t\t\t// Create empty directory for the userexport\n\t\t\tif (!mkdir($this->filedir, 0755)) {\n\t\t\t\t// Creating the directory failed\n\t\t\t\tthrow new Exception(elgg_echo('userexport:error:nofiledir'));\n\t\t\t}\n\t\t}\n\n\t\t// Delete any existing file\n\t\tunlink($this->filename);\n\t}", "public function generatePreviews(File $file, array $specifications, $mimeType = null);", "public function handleSource()\n {\n if (is_dir($this->source) && file_exists(\"{$this->source}/_build/\")) {\n copy(\"{$this->source}/_build/build.config.sample.php\", \"{$this->source}/_build/build.config.php\");\n copy(\"{$this->source}/_build/build.properties.sample.php\", \"{$this->source}/_build/build.properties.php\");\n // @TODO check pcntl_fork\n passthru(\"php {$this->source}/_build/transport.core.php\");\n } else if (file_exists($this->source)) {\n $isZip = is_resource(zip_open($this->source));\n if ($isZip) {\n $zip = new \\ZipArchive();\n if ($zip->open($this->source) === true) {\n $path = pathinfo($this->source, PATHINFO_DIRNAME);\n $file = pathinfo($this->source, PATHINFO_BASENAME);\n // Extract in same folder\n $extracted = $zip->extractTo($path);\n if ($extracted) {\n // Cleanup file name to get the extracted folder name\n $extractedFolder = str_replace(array(\n '.zip', '-advanced', '-sdk'\n ), '', $file);\n // Make our newly extract folder our source\n $this->source = $path .'/'. $extractedFolder;\n }\n $zip->close();\n }\n }\n }\n }", "protected function preprocessData() {}", "public function inc($file){\n\t\t$filename = basename($file);\n\t\tif ($content = $this->read(filename)){\n\t\t\treturn false;\n\t\t}\n\t\tob_start();\n\t\trequire $file;\n\t\t$content = ob_set_clear();\n\t\t$this->write($filename, $content);\n\t\treturn true;\n\t}", "protected function _preExec()\n {\n }", "public function rewind()\n {\n fseek($this->file, 0);\n $this->currentLine = fgets($this->file);\n $this->currentKey = 0;\n }", "public function prepareImport();", "public function import_file( array $file, $skip_sleep = false, $import_ignored = false ) {\n\n\t\t/**\n\t\t * Filter whether to proceed with importing a prospective file.\n\t\t *\n\t\t * Returning a false value to the filter will short-circuit processing of the import file.\n\t\t *\n\t\t * @param bool $display Whether to proceed with importing the file. Default true.\n\t\t * @param array $file File data\n\t\t */\n\t\tif ( ! apply_filters( 'wp_parser_pre_import_file', true, $file ) )\n\t\t\treturn;\n\n\t\t// Maybe add this file to the file taxonomy\n\t\t$slug = sanitize_title( str_replace( '/', '_', $file['path'] ) );\n\n\t\t$term = $this->insert_term( $file['path'], $this->taxonomy_file, array( 'slug' => $slug ) );\n\n\t\tif ( is_wp_error( $term ) ) {\n\t\t\t$this->errors[] = sprintf( 'Problem creating file tax item \"%1$s\" for %2$s: %3$s', $slug, $file['path'], $term->get_error_message() );\n\t\t\treturn;\n\t\t}\n\n\t\t// Detect deprecated file\n\t\t$deprecated_file = false;\n\t\tif ( isset( $file['uses']['functions'] ) ) {\n\t\t\t$first_function = $file['uses']['functions'][0];\n\n\t\t\t// If the first function in this file is _deprecated_function\n\t\t\tif ( '_deprecated_file' === $first_function['name'] ) {\n\t\t\t\t// Set the deprecated flag to the version number\n\t\t\t\t$deprecated_file = $first_function['deprecation_version'];\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Force to define deprecated file\n\t\t * Use for not import and delete post if exists\n\t\t */\n\t\tif ( ! $deprecated_file ) {\n\t\t\t/**\n\t\t\t * Filter for define WordPress deprecated files\n\t\t\t * Use regex format\n\t\t\t *\n\t\t\t * @var array\n\t\t\t *\n\t\t\t * @return array\n\t\t\t */\n\t\t\t$deprecated_regex_files = (array) apply_filters( 'wp_parser_deprecated_files', array() );\n\t\t\tif ( count( $deprecated_regex_files ) ) {\n\t\t\t\t$deprecated_regex_files = '@(' . implode( '|', $deprecated_regex_files ) . ')$@';\n\t\t\t\tif ( preg_match( $deprecated_regex_files, $file['path'] ) ) {\n\t\t\t\t\t$deprecated_file = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Store file meta for later use\n\t\t$this->file_meta = array(\n\t\t\t'docblock' => $file['file'], // File docblock\n\t\t\t'term_id' => $file['path'], // Term name in the file taxonomy is the file name\n\t\t\t'deprecated' => $deprecated_file, // Deprecation status\n\t\t);\n\n\t\t// TODO ensures values are set, but better handled upstream later\n\t\t$file = array_merge( array(\n\t\t\t'functions' => array(),\n\t\t\t'classes' => array(),\n\t\t\t'hooks' => array(),\n\t\t\t'constants' => array(),\n\t\t), $file );\n\n\t\t$count = 0;\n\n\t\tforeach ( $file['functions'] as $function ) {\n\t\t\t$this->import_function( $function, 0, $import_ignored );\n\t\t\t$count++;\n\n\t\t\tif ( ! $skip_sleep && 0 == $count % 10 ) { // TODO figure our why are we still doing this\n\t\t\t\tsleep( 3 );\n\t\t\t}\n\t\t}\n\n\t\tforeach ( $file['classes'] as $class ) {\n\t\t\t$this->import_class( $class, $import_ignored );\n\t\t\t$count++;\n\n\t\t\tif ( ! $skip_sleep && 0 == $count % 10 ) {\n\t\t\t\tsleep( 3 );\n\t\t\t}\n\t\t}\n\n\t\tforeach ( $file['hooks'] as $hook ) {\n\t\t\t$this->import_hook( $hook, 0, $import_ignored );\n\t\t\t$count++;\n\n\t\t\tif ( ! $skip_sleep && 0 == $count % 10 ) {\n\t\t\t\tsleep( 3 );\n\t\t\t}\n\t\t}\n\n\t\tforeach ( $file['constants'] as $constant ) {\n\t\t\t$this->import_constant( $constant, 0, $import_ignored );\n\t\t\t$count++;\n\n\t\t\tif ( ! $skip_sleep && 0 == $count % 10 ) {\n\t\t\t\tsleep( 3 );\n\t\t\t}\n\t\t}\n\n\t\tif ( 'wp-includes/version.php' === $file['path'] ) {\n\t\t\t$this->import_version( $file );\n\t\t}\n\t}", "public function process($filepath) {\r\n\t\t$array = pathinfo($filepath);\r\n\r\n\t\tswitch ($array[\"extension\"] ) {\r\n\r\n\t\t\tcase \"csv\":\r\n\t\t\tcase \"txt\":\r\n\t\t\t\tMage::getModel('clearandfizzy_enhancedcms/import_page_csv')->process($filepath);\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tMage::throwException(\"File is of unknown format, cannot process to import\");\r\n\t\t\tbreak;\r\n \t\t} // end\r\n\r\n\t}", "public function __construct($file);", "public function beforeSave()\n {\n $fileService = $this->getCustomizationService();\n $fileService->prepareFile($this);\n $fileService->save($this);\n return parent::beforeSave();\n }", "public function onBuildFromIterator(PreBuildFromIteratorEvent $event)\n {\n $event->setIterator(\n new ProcessorIterator(\n $event->getIterator(),\n $this->processor,\n $event->getBase()\n )\n );\n }", "public function firstLine(){\n return $this->file[0] ?? '';\n }", "protected function processFileTree () {\n\t\t$files = $this->populateFileTree();\n\t\tforeach ($files as $file) {\n\t\t\t$this->processFile($file);\n\t\t}\n\t}", "public function create_from_file($file);", "protected function loadFile(SplFileInfo $file)\n {\n $path = $this->shimsDirectory . $file->getRelativePath() . '/' . $file->getFilename();\n\n require $path;\n }", "function loadFile($src){\n if(file_exists($src) && is_readable($src))\n {\n include $src;\n if(isset($CONFIG)) $this->add($CONFIG);\n }\n }", "public function boot(): void\n {\n foreach (self::FILES as $file) {\n $file = __DIR__.\"/../../overrides/$file\";\n\n if (! file_exists($file)) {\n throw ShouldNotHappen::fromMessage(sprintf('File [%s] does not exist.', $file));\n }\n\n require_once $file;\n }\n }", "public function setInFile(PhingFile $inFile)\n {\n $this->inFile = $inFile;\n }", "private function _processImportFile($fileFullPath) {\n\n $objFileops = new Fileops();\n $objFileops->setEventTime(new \\DateTime())\n ->setAction('I')\n ->setDeleted(0)\n ->setRecs(0)\n ->setErrors(0)\n ->setFilename($fileFullPath)\n ->setCustomerNew(0)\n ->setCustomerUpdate(0)\n ->setOrderUpdate(0)\n ->setStatus(Fileops::$STATUS_IMPORTING);\n\n $result = $this->_getMd5($fileFullPath);\n if($result['status'] === false) {\n throw new Exception($result['data']);\n }\n $this->md5 = $result['data'];\n $objFileops->setMd5($this->md5);\n\n// //--- Check md5 against database, continue if file already imported\n// $md5IsUnique = $this->getRepo('Fileops')->md5isUnique($objFileops->getMd5());\n// if($md5IsUnique !== true) {\n// //md5 already exists. This file has already been processed\n// die(\"File has already been imported: \" .$fileFullPath);\n// }\n\n //--- Read file into array\n $result = $this->getRepo('Fileops')->readFile($fileFullPath);\n\n if($result['status'] === false) {\n throw new Exception($result['data']);\n }\n $aryImport = $result['data'];\n $objFileops->setRecs(count($aryImport));\n\n //--- Process Customer Recs\n $result = $this->_importCustomers($aryImport);\n if($result['status'] === false) {\n throw new Exception($result['data']);\n }\n $objFileops->setCustomerNew($result['data']['customerNew'])\n ->setCustomerUpdate($result['data']['customerUpdate']);\n\n //--- Process Order Recs\n $result = $this->_importOrders($aryImport);\n if($result['status'] === false) {\n throw new Exception($result['data']);\n }\n $objFileops->setOrderNew($result['data']['orderNew'])\n ->setOrderUpdate($result['data']['orderUpdate']);\n\n\n //--- Save Import record\n $objFileops->setStatus(Fileops::$STATUS_SUCCESS);\n $this->persistEntity($objFileops);\n $this->flushEntities();\n\n $result = array('status' => true,\n 'data' => $objFileops);\n return $result;\n }", "private function setup_files() {\n $this->record_progress(\n \"Step 6: Preparing files for further analysis\");\n\n $path_new_input = $this->path_new_input;\n $path_spliceman = $this->path_spliceman;\n $path_RBPs_new = $this->path_RBPs_new;\n $path_errors = $this->path_errors;\n\n exec(\"perl\\\n /var/www/html/spliceman_beta/scripts/setup_spliceman_RBP_files.pl\\\n /var/www/html/spliceman_beta/genome_data/hg19.fa\\\n '$path_new_input'\\\n '$path_spliceman'\\\n '$path_RBPs_new'\\\n '$path_errors'\", \n $output, \n $return);\n\n if ($return) {\n $this->pipeline_error(\n \"Error in pipeline, please contact administrator\n and provide step 6\");\n }\n if (count($output) > 0) {\n $this->pipeline_error($output);\n }\n }", "private function prepareFiles() {\n $zip = new ZipArchive;\n if ($zip->open(self::PARSE_DIR . '/' . self::ARCHIVE_FILENAME) === TRUE) {\n $zip->extractTo($this->tmpFolder);\n $zip->close();\n } else {\n $this->errors[] = 'Невозможно распаковать архив!';\n }\n }", "private function import_start()\n\t{\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\t//check for form tampering\n\t\t$this->inp\t= JFactory::getApplication()->input;\n\t\t$files\t\t= $this->inp->files;\n\t\t$this->file\t= reset($files->getArray());\t\t\t//first (and only) file\n\t\t$this->ok\t= !empty($this->file);\t\t\t\t//file ok?\n\t\treturn\t\t$this->ok;\n\t}", "public static function preInit(&$metadata = array())\r\n\t{\r\n\t}", "public function loadFromFile($file)\n {\n \n }", "protected static function pre_processing ($tag, &$attributes) { }", "function _claimNextFile() {\n\t\t$stageDir = opendir($this->_stagePath);\n\t\t$processingFilePath = false;\n\n\t\twhile($filename = readdir($stageDir)) {\n\t\t\tif ($filename == '..' || $filename == '.' ||\n\t\t\t\tin_array($filename, $this->_stagedBackFiles)) continue;\n\n\t\t\t$processingFilePath = $this->_moveFile($this->_stagePath, $this->_processingPath, $filename);\n\t\t\tbreak;\n\t\t}\n\n\t\tif ($processingFilePath) {\n\t\t\t$this->_claimedFilename = $filename;\n\t\t\treturn $processingFilePath;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public static function beforeSaveFile($args)\n {\n if (!$args['insert']) {\n return;\n }\n\n $file = $args['record'];\n\n // Return if the file does not have a \".zip\" file extension. This is\n // needed because ZipArchive::open() sometimes opens files that are not\n // ZIP archives.\n if (!preg_match('/\\.zip$/', $file->filename)) {\n return;\n }\n\n $za = new ZipArchive;\n\n // Skip this file if an error occurs. ZipArchive::open() will return\n // true if valid, error codes otherwise.\n if (true !== $za->open($file->getPath())) {\n return;\n }\n\n // Base64 decode each file in the archive if needed.\n for ($i = 0; $i < $za->numFiles; $i++) {\n $stat = $za->statIndex($i);\n // Filenames that end with \"%ZB64\" are Base64 encoded.\n if (preg_match('/%ZB64$/', $stat['name'])) {\n // Remove \"%ZB64\" prior to decoding.\n $name = preg_replace('/%ZB64$/', '', $stat['name']);\n // Base64 decode the filename and rename the file.\n $name = base64_decode($name);\n $za->renameIndex($i, $name);\n }\n }\n\n $za->close();\n }", "public function Trasmetti($file);", "public function preUpload()\n{ \n if (null !== $this->file) {\n // do whatever you want to generate a unique name\n $filename =$this->getName(); //sha1(uniqid(mt_rand(), true));\n $this->path = $filename.'.'.$this->file->guessExtension();\n }\n}", "public function submissionBeforeSave() {\r\n\r\n // get the uploaded file information\r\n if (($userfile = $this->get('file')) && is_array($userfile)) {\r\n // get file name\r\n $ext = $this->app->filesystem->getExtension($userfile['name']);\r\n $base_path = JPATH_ROOT . '/' . $this->_getUploadPath() . '/';\r\n $file = $base_path . $userfile['name'];\r\n $filename = basename($file, '.'.$ext);\r\n\r\n $i = 1;\r\n while (JFile::exists($file)) {\r\n $file = $base_path . $filename . '-' . $i++ . '.' . $ext;\r\n }\r\n\r\n if (!JFile::upload($userfile['tmp_name'], $file)) {\r\n throw new AppException('Unable to upload file.');\r\n }\r\n\r\n\t\t\t$this->app->zoo->putIndexFile(dirname($file));\r\n\r\n $this->set('file', $this->app->path->relative($file));\r\n $this->_updateFileSize();\r\n }\r\n }", "protected function setUp(): void\n {\n /** @var File $file */\n parent::setUp();\n TestAssetStore::activate('UsedOnTableTest');\n $path = dirname(__DIR__) . '/Forms/fixtures/testfile.txt';\n $content = file_get_contents($path ?? '');\n $file = File::get()->find('Name', 'testfile.txt');\n $file->setFromString($content, $file->generateFilename());\n }" ]
[ "0.67868865", "0.656404", "0.6375926", "0.6375926", "0.6336333", "0.59913945", "0.5682006", "0.5598894", "0.5500019", "0.5481329", "0.5469868", "0.5438111", "0.54293764", "0.54011875", "0.5364747", "0.53627974", "0.53394", "0.53046113", "0.53012323", "0.52606666", "0.5254927", "0.52462006", "0.5245424", "0.5235205", "0.52099085", "0.5201049", "0.5184443", "0.5178906", "0.51754755", "0.51732606", "0.51286423", "0.5094089", "0.50931895", "0.5091553", "0.5088444", "0.50731826", "0.5054128", "0.50491506", "0.50476307", "0.5039426", "0.5035384", "0.50148755", "0.49853212", "0.49820498", "0.4976191", "0.4975348", "0.49708343", "0.4960537", "0.4951911", "0.49443176", "0.49306682", "0.4911571", "0.4899522", "0.48932403", "0.48865834", "0.4886579", "0.48862055", "0.48659", "0.48657432", "0.48552147", "0.48484913", "0.48464376", "0.4826538", "0.48160058", "0.48137546", "0.4804311", "0.48016283", "0.47853366", "0.47753128", "0.47599003", "0.47398838", "0.4721906", "0.4713395", "0.46984178", "0.46786663", "0.46774164", "0.46727082", "0.46676204", "0.46545592", "0.46477637", "0.4637214", "0.46283367", "0.46224642", "0.46185103", "0.46017238", "0.45983952", "0.45950365", "0.45816436", "0.4579668", "0.45722502", "0.45708576", "0.45671624", "0.45661992", "0.45654464", "0.45646095", "0.45639348", "0.45624608", "0.45597455", "0.45592067", "0.45568216" ]
0.54709435
10
Processes a single file.
public function countFile($filename, $countTests) { $buffer = file_get_contents($filename); $tokens = token_get_all($buffer); $numTokens = count($tokens); $loc = substr_count($buffer, "\n"); unset($buffer); $nclocClasses = 0; $cloc = 0; $blocks = array(); $currentBlock = FALSE; $namespace = FALSE; $className = NULL; $functionName = NULL; $testClass = FALSE; for ($i = 0; $i < $numTokens; $i++) { if (is_string($tokens[$i])) { if (trim($tokens[$i]) == '?') { if (!$testClass) { if ($className !== NULL) { $this->count['ccnMethods']++; } $this->count['ccn']++; } } if ($tokens[$i] == '{') { if ($currentBlock == T_CLASS) { $block = $className; } else if ($currentBlock == T_FUNCTION) { $block = $functionName; } else { $block = FALSE; } array_push($blocks, $block); $currentBlock = FALSE; } else if ($tokens[$i] == '}') { $block = array_pop($blocks); if ($block !== FALSE && $block !== NULL) { if ($block == $functionName) { $functionName = NULL; } else if ($block == $className) { $className = NULL; $testClass = FALSE; } } } continue; } list ($token, $value) = $tokens[$i]; if ($className !== NULL) { if ($token != T_COMMENT && $token != T_DOC_COMMENT) { $nclocClasses += substr_count($value, "\n"); } } switch ($token) { case T_NAMESPACE: { $namespace = $this->getNamespaceName($tokens, $i); if (!isset($this->namespaces[$namespace])) { $this->namespaces[$namespace] = TRUE; } } break; case T_CLASS: case T_INTERFACE: case T_TRAIT: { $className = $this->getClassName( $namespace, $tokens, $i ); $currentBlock = T_CLASS; if ($token == T_TRAIT) { $this->count['traits']++; } else if ($token == T_INTERFACE) { $this->count['interfaces']++; } else { if ($countTests && $this->isTestClass($className)) { $testClass = TRUE; $this->count['testClasses']++; } else { if (isset($tokens[$i-2]) && is_array($tokens[$i-2]) && $tokens[$i-2][0] == T_ABSTRACT) { $this->count['abstractClasses']++; } else { $this->count['concreteClasses']++; } } } } break; case T_FUNCTION: { $currentBlock = T_FUNCTION; if (is_array($tokens[$i+2]) && $tokens[$i+2][0] == T_STRING) { $functionName = $tokens[$i+2][1]; } else if ($tokens[$i+2] == '&' && is_array($tokens[$i+3]) && $tokens[$i+3][0] == T_STRING) { $functionName = $tokens[$i+3][1]; } else { $currentBlock = 'anonymous function'; $functionName = 'anonymous function'; $this->count['anonymousFunctions']++; } if ($currentBlock == T_FUNCTION) { if ($className === NULL) { $this->count['functions']++; } else { $static = FALSE; $visibility = T_PUBLIC; for ($j = $i; $j > 0; $j--) { if (is_string($tokens[$j])) { if ($tokens[$j] == '{' || $tokens[$j] == '}') { break; } continue; } if (isset($tokens[$j][0])) { switch ($tokens[$j][0]) { case T_PRIVATE: { $visibility = T_PRIVATE; } break; case T_PROTECTED: { $visibility = T_PROTECTED; } break; case T_STATIC: { $static = TRUE; } break; } } } if ($testClass && strpos($functionName, 'test') === 0 && $visibility == T_PUBLIC && !$static) { $this->count['testMethods']++; } else if (!$testClass) { if ($static) { $this->count['staticMethods']++; } else { $this->count['nonStaticMethods']++; } if ($visibility != T_PUBLIC) { $this->count['nonPublicMethods']++; } } } } } break; case T_CURLY_OPEN: { $currentBlock = T_CURLY_OPEN; array_push($blocks, $currentBlock); } break; case T_DOLLAR_OPEN_CURLY_BRACES: { $currentBlock = T_DOLLAR_OPEN_CURLY_BRACES; array_push($blocks, $currentBlock); } break; case T_IF: case T_ELSEIF: case T_FOR: case T_FOREACH: case T_WHILE: case T_CASE: case T_CATCH: case T_BOOLEAN_AND: case T_LOGICAL_AND: case T_BOOLEAN_OR: case T_LOGICAL_OR: { if (!$testClass) { if ($className !== NULL) { $this->count['ccnMethods']++; } $this->count['ccn']++; } } break; case T_COMMENT: case T_DOC_COMMENT: { $cloc += substr_count($value, "\n") + 1; } break; case T_CONST: { $this->count['classConstants']++; } break; case T_STRING: { if ($value == 'define') { $this->count['globalConstants']++; } } break; } } $this->count['loc'] += $loc; $this->count['nclocClasses'] += $nclocClasses; $this->count['cloc'] += $cloc; $this->count['ncloc'] += $loc - $cloc; $this->count['files']++; if (function_exists('bytekit_disassemble_file')) { $this->count['eloc'] += $this->countEloc($filename, $loc); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function processFile($fileName);", "private function processFile() {\n if ($this->isFileAllowed()) {\n $path_parts = pathinfo($this->filepath);\n $extention = $path_parts['extension'];\n\n $classes = get_declared_classes();\n\n foreach($classes as $class) {\n $reflect = new \\ReflectionClass($class);\n if($reflect->implementsInterface('App\\\\Classes\\\\IFileFormat')) {\n if ($extention === $class::getFileExtension()) {\n $fileFormat = new $class($this->filepath);\n $this->charsCount = $fileFormat->getCharactersCount();\n $this->wordsCount = $fileFormat->getWordsCount();\n }\n }\n }\n }\n }", "function ProcessFile($srcFilePath, $options = null)\n\t{\t\t\n\t\t$this->OriginalFileName = $srcFilePath;\n\t\t$fileParts = pathinfo($srcFilePath);\n\t\t\n\t\tif (file_exists($srcFilePath))\n\t\t{\n\t\t\t$this->GetFileImageSize($srcFilePath);\n\t\t\t\n\t\t\t$fileFolder = $fileParts['dirname'];\n\t\t\t$destinationFolder = $this->addFolderSlash($fileFolder);\n\t\t\t$this->FileExtension = $fileParts['extension'];\n\t\t\t\n\t\t\t$this->processActions($srcFilePath, $destinationFolder.$fileParts['filename'], $options);\n\t\t}\n\t\telse \n\t\t\t$this->lastError = 'error_file_not_exists';\n\t}", "private function processFile($file) {\n\t\tglobal $IP;\n\t\t$file = \"$IP/$file\";\n\n\t\techo \"\\nPROCESSING $file\\n\";\n\t\tif ( !is_file($file) ) {\n\t\t\techo $file . \" not found\\n\";\n\t\t\treturn;\n\t\t}\n\t\t$classNameInfo = $this->getClassName( $file );\n\t\tif ( !$classNameInfo ) {\n\t\t\techo(\"$file is not a class\\n\");\n\t\t\treturn;\n\t\t}\n\n\t\t$qClass = $classNameInfo['namespace'] . '\\\\' . $classNameInfo['class'];\n\t\t$unstableMethods= $this->getUnstableMethods( $qClass );\n\t\t$extensionUsages = $this->queryCodeSearch( $classNameInfo['class'] );\n\t\tif ( !$extensionUsages ) {\n\t\t\techo \"no matches\\n\";\n\t\t\treturn;\n\t\t}\n\t\t$this->getExtensionInfo( $extensionUsages, $unstableMethods, $qClass );\n\t}", "function fileNeedsProcessing() ;", "public function process($filepath) {\r\n\t\t$array = pathinfo($filepath);\r\n\r\n\t\tswitch ($array[\"extension\"] ) {\r\n\r\n\t\t\tcase \"csv\":\r\n\t\t\tcase \"txt\":\r\n\t\t\t\tMage::getModel('clearandfizzy_enhancedcms/import_page_csv')->process($filepath);\r\n\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tMage::throwException(\"File is of unknown format, cannot process to import\");\r\n\t\t\tbreak;\r\n \t\t} // end\r\n\r\n\t}", "public function processFile(\\SplFileInfo $file)\n {\n $name = $file->getFilename();\n\n // ignore underscore files\n if ($name[0] == '_') {\n return;\n }\n\n // ignore dot files\n if ($name[0] == '.') {\n return;\n }\n\n // ignore non test files\n if (strpos($name, 'Test.php') === false) {\n return;\n }\n\n $this->includeFile($name);\n $class_name = str_replace('Test.php', 'Test', $name);\n\n $test_case = new $class_name;\n $methods = $test_case->getTestMethods();\n foreach ($methods as $method) {\n $this->_runMethod($test_case, $method);\n }\n }", "protected function processSourceFile(SplFileInfo $file) {\n $code = file_get_contents($file);\n $amfphpUrlMarkerPos = strpos($code, '/**ACG_AMFPHPURL_**/');\n if ($amfphpUrlMarkerPos !== false) {\n $code = str_replace('/**ACG_AMFPHPURL_**/', $this->amfphpEntryPointUrl, $code);\n file_put_contents($file, $code);\n }\n $fileName = $file->getFilename();\n if (strpos($fileName, self::_SERVICE_) !== false) {\n $this->generateServiceFiles($code, $file);\n } else {\n $processed = $this->searchForBlocksAndApplyProcessing($code, self::SERVICE, 'processServiceListBlock');\n if ($processed) {\n file_put_contents($file, $processed);\n }\n }\n }", "function processFile( $entry ) {\n\t\t$name = $this->sanitiseTitle( $entry['ns'], $entry['title'] );\n\n\t\t# Check if file already exists.\n\t\t# NOTE: wfFindFile() checks foreign repos too. Use local repo only\n\t\t# newFile skips supression checks\n\t\t$file = $this->localRepo->newFile( $name );\n\t\tif ( $file->exists() ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\t$this->output( \"Processing {$name}: \" );\n\t\t$count = 0;\n\n\t\tforeach ( $entry['imageinfo'] as $fileVersion ) {\n\t\t\t# Api returns file revisions from new to old.\n\t\t\t# WARNING: If a new version of a file is uploaded after the start of the script\n\t\t\t# (or endDate), the file and all its previous revisions would be skipped,\n\t\t\t# potentially leaving pages that were using the old image with redlinks.\n\t\t\t# To prevent this, we'll skip only more recent versions, and mark the first\n\t\t\t# one before the end date as the latest\n\t\t\tif ( !$count && wfTimestamp( TS_MW, $fileVersion['timestamp'] ) > $this->endDate ) {\n\t\t\t\t#return 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t# Check for Wikia's videos\n\t\t\tif ( $this->isWikiaVideo( $fileVersion ) ) {\n\t\t\t\t$this->output( \"...this appears to be a video, skipping it.\\n\" );\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif ( $count > 0 ) {\n\t\t\t\t$status = $this->oldUpload( $name, $fileVersion );\n\t\t\t} else {\n\t\t\t\t$status = $this->newUpload( $name, $fileVersion );\n\t\t\t}\n\n\t\t\tif ( $status->isOK() ) {\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t\tif ( $count == 1 ) {\n\t\t\t$this->output( \"1 revision\\n\" );\n\t\t} else {\n\t\t\t$this->output( \"$count revisions\\n\" );\n\t\t}\n\n\t\treturn $count;\n\t}", "public function process(array $files);", "public function fileNeedsProcessing() {}", "protected abstract function process();", "public static function process() {}", "public function parseFile(string $filename);", "public function parse($file);", "public function parse($file);", "public abstract function process();", "abstract public function process();", "abstract public function process();", "abstract public function process();", "public function processFile() {\n\t\tif (!$this->_unpacked) {\n\t\t\t$jinput = JFactory::getApplication()->input;\n\t\t\t$csvilog = $jinput->get('csvilog', null, null);\n\t\t\tjimport('joomla.filesystem.file');\n\t\t\tjimport('joomla.filesystem.archive');\n\t\t\t$this->fp = true;\n\t\t\t$this->linepointer = 1;\n\t\t\t$this->data = new ODSParser();\n\t\t\t// First we need to unpack the zipfile\n\t\t\t$unpackfile = $this->_unpackpath.'/ods/'.basename($this->filename).'.zip';\n\t\t\t$importfile = $this->_unpackpath.'/ods/content.xml';\n\n\t\t\t// Check the unpack folder\n\t\t\tJFolder::create($this->_unpackpath.'/ods');\n\n\t\t\t// Delete the destination file if it already exists\n\t\t\tif (JFile::exists($unpackfile)) JFile::delete($unpackfile);\n\t\t\tif (JFile::exists($importfile)) JFile::delete($importfile);\n\n\t\t\t// Now copy the file to the folder\n\t\t\tJFile::copy($this->filename, $unpackfile);\n\n\t\t\t// Extract the files in the folder\n\t\t\tif (!JArchive::extract($unpackfile, $this->_unpackpath.'/ods')) {\n\t\t\t\t$csvilog->AddStats('incorrect', JText::_('COM_CSVI_CANNOT_UNPACK_ODS_FILE'));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// File is always called content.xml\n\t\t\telse $this->filename = $importfile;\n\n\t\t\t// Read the data to process\n\t\t\tif (!$this->data->read($this->filename)) return false;\n\n\t\t\t// Set the unpacked to true as we have unpacked the file\n\t\t\t$this->_unpacked = true;\n\t\t}\n\n\t\t// All good return true\n\t\treturn true;\n\t}", "abstract protected function process();", "abstract protected function process();", "abstract protected function process();", "abstract protected function process();", "abstract public static function process(File $file, int $imageType, int $width, int $height): string;", "protected static function file()\n {\n }", "public function process();", "public function process();", "public function process();", "public function process();", "public function onFileTap($file);", "protected function processFileTree () {\n\t\t$files = $this->populateFileTree();\n\t\tforeach ($files as $file) {\n\t\t\t$this->processFile($file);\n\t\t}\n\t}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "protected function _process() {}", "abstract protected function _process();", "abstract protected function _process();", "public function readFileByPart($file, $process, $chunk = 32768, $delimiter = \"\\n\"){\n $fileReader = new FileReader();\n $fileReader->readFileByPart($file, $process, $chunk, $delimiter);\n }", "abstract protected function extract($file, $path);", "public function process(File $phpcsFile, $stackPtr)\r\n {\r\n // nothing to do here and will never be called\r\n }", "protected function process()\n {}", "protected function fileProcess($value) {\n $value = (array) file_load($value);\n return array(\n 'id' => $value['fid'],\n 'self' => file_create_url($value['uri']),\n 'filemime' => $value['filemime'],\n 'filesize' => $value['filesize'],\n 'width' => $value['width'],\n 'height' => $value['height'],\n 'styles' => $value['image_styles'],\n );\n }", "public function read($file);", "abstract protected function readFile( $fileName );", "function process() {\r\n }", "public function parse($file){\n $this->fileReader->open($file);\n $this->registerCallback();\n $this->fileReader->parse($file);\n $this->fileReader->close($file);\n }", "protected function openFile() {}", "public function handle($file) {\n $this->file = $file;\n\n $result = $this->iterateImages();\n\n return $result;\n }", "abstract protected function readFile($filename);", "public function process() {}", "public function process() {}", "public function process() {}", "public function process() {}", "public function fileStart(): void;", "private function loadFile()\n\t{\n\t\tif( empty($this->content) ) {\n\t\t\tif( empty($this->file) ) {\n\t\t\t\tthrow new Exception('Which file should I parse, you ...!');\n\t\t\t} else {\n\t\t\t\tif( strtolower( $this->file->getExtension() ) == 'zip' ) {\n\t\t\t\t\t$this->content = $this->handleZipFile( $this->file );\n\t\t\t\t} else {\n\t\t\t\t\t$this->content = $this->file->getContents();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function process(File $file, CodeElementInterface $element, CodeElementInterface $parentElement): void;", "public static function process_file_upload( $file, $post_id = 0 )\n\t{\n\t\trequire_once( ABSPATH . 'wp-admin' . '/includes/image.php' );\n\t\trequire_once( ABSPATH . 'wp-admin' . '/includes/file.php' );\n\t\trequire_once( ABSPATH . 'wp-admin' . '/includes/media.php' );\n\n\t\t$attachment_id = media_handle_upload( $file, $post_id );\n\t\treturn $attachment_id;\n\t}", "public function readFileByPart($file, $process, $chunk = 32768, $delimiter = \"\\n\"){\n $fseekPos = 0;\n $handle = fopen($file, \"r\");\n while(!feof($handle)){\n fseek($handle, $fseekPos);\n if(($content = fread($handle, $chunk)) !== false){\n $contentLength = strrpos($content, $delimiter);\n $content = substr($content, 0, $contentLength);\n $process($content);\n $fseekPos = $fseekPos + $contentLength + 1;\n }\n }\n\n fclose($handle);\n }", "public function updateFile(File $file): void;", "public static function processFile( string $src, ) : array {\n\t\t$mime\t= static::adjustMime( $src );\n\t\t\n\t\treturn [\n\t\t\t'src'\t\t=> $src,\n\t\t\t'mime'\t\t=> $mime,\n\t\t\t'filename'\t=> \\basename( $src ),\n\t\t\t'filesize'\t=> \\filesize( $src ),\n\t\t\t'description'\t=> '',\n\t\t\t\n\t\t\t// Process thumbnail if needed\n\t\t\t'thumbnail'\t=>\n\t\t\t\t\\in_array( $mime, static::$thumbnail_types ) ? \n\t\t\t\tstatic::createThumbnail( $src, $mime ) : ''\n\t\t];\n\t}", "public function read($file) {\n\t}", "abstract public function process($image, $actions, $dir, $file);", "protected function _openFile($filename) {}", "public static function renderFile();", "public function processFile(\\SplFileInfo $file): ContentInterface\n {\n if ( ! $file->isFile() ) {\n throw new BloomException('Provided file object points not to a file');\n }\n\n return $this->process(file_get_contents($file->getPathname()));\n }", "public function process(File $phpcsFile, $stackPtr)\n {\n $filename = $phpcsFile->getFilename();\n if ($filename === 'STDIN') {\n return;\n }\n\n $filename = basename($filename);\n $lowercaseFilename = strtolower($filename);\n if ($filename !== $lowercaseFilename) {\n $data = [\n $filename,\n $lowercaseFilename,\n ];\n $error = 'Filename \"%s\" doesn\\'t match the expected filename \"%s\"';\n $phpcsFile->addError($error, $stackPtr, 'NotFound', $data);\n $phpcsFile->recordMetric($stackPtr, 'Lowercase filename', 'no');\n } else {\n $phpcsFile->recordMetric($stackPtr, 'Lowercase filename', 'yes');\n }\n\n // Ignore the rest of the file.\n return ($phpcsFile->numTokens + 1);\n\n }", "final function getFile();", "public function processFile($strFile) {\n\t\tif($this->haveTime()) {\n\t\t\t$strExt = toUpper(pathinfo($strFile, PATHINFO_EXTENSION));\n\t\t\t$bExtensionChecked = !is_array($this->arExt) || empty($this->arExt) || in_array($strExt, $this->arExt);\n\t\t\tif($bExtensionChecked && is_callable($this->mCallbackFile)){\n\t\t\t\treturn call_user_func_array($this->mCallbackFile, [$this, $strFile]);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn static::RESULT_CONTINUE;\n\t}", "private static function file()\n {\n $files = ['File', 'Filesystem'];\n $folder = static::$root.'Filesystem'.'/';\n\n self::call($files, $folder);\n\n $files = ['FileNotFoundException', 'DirectoryNotFoundException'];\n $folder = static::$root.'Filesystem/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function single($file = false)\n {\n $this->layout = 'ajax';\n if (!$file) {\n $this->render('nofiles');\n\n return;\n }\n file_put_contents(LOGS.'mh-uploads.log', date('Y-m-d H:i > ').'[Single] '.$this->computeFileLocation($file).chr(10), FILE_APPEND);\n $this->set('path', $this->computeFileLocation($file));\n }", "public function support($file);", "public function process() {\n }", "public function process() {\n }", "public function process() {\n }", "abstract public function getContent($file);", "function OnGetFileObject($file){\n\tGetFileFromDatabase($file);\t\n\tif ($file->scanned != 1){\n\t\tScanFileOnVirusTotal($file);\n\t}\n\tif ($file->ck_scanned == -1){\t\t//Waiting for a result\n\t\tGetFileResultsOnCuckoo($file);\n\t}\n}", "function hcpu_catch_file_request() {\n\tif ( ! isset( $_GET['hc-get-file'] ) ) {\n\t\treturn;\n\t}\n\n\t// Serve file or redirect to login.\n\tif ( is_user_member_of_blog() ) {\n\t\thcpu_serve_file();\n\t} else {\n\t\tbp_do_404();\n\t}\n}", "protected function processChangedAndNewFiles() {}", "function upload_handler( $file ) {\n\t\t$this->add_ping( 'uploads', array( 'upload' => str_replace( $this->resolve_upload_path(), '', $file['file'] ) ) );\n\t\treturn $file;\n\t}", "public function getHandle( $file );", "abstract public function store(File $file);", "protected function isFile() {}", "public function process() {\n\t\t\n\t\t//Validate the upload\n\t\ttry {\n\t\t\t$this->validate();\n\t\t} catch(Exception $e) {\n\t\t\tthrow $e;\n\t\t}\n\t\t\n\t\t$filename = $this->getFilename();\n\t\t\n\t\t$full_path = $this->path . $filename;\n\t\t\n\t\t$uploaded = move_uploaded_file($this->file['tmp_name'], $full_path);\n\t\t\n\t\tif($uploaded === false) {\n\t\t\tthrow new Exception('Upload failed', '403');\n\t\t}\n\t\t\n\t\treturn $filename;\n\t\t\n\t}", "function visitPhpFile(\\SplFileInfo $file, MessageCatalogue $catalogue, array $ast)\r\n {\r\n // TODO: Implement visitPhpFile() method.\r\n }", "public function file($act, $file) {\n\n // read file:\n\n function read($file) {\n\n $handle = fopen($file, 'r');\n\n $data = fread($handle, filesize($file));\n\n fclose($handle);\n\n return $data;\n }\n \n switch ($act) {\n case 'read':\n return read($file);\n break;\n \n default:\n return read($file);\n break;\n }\n\n }", "public function process($path, Request $request);", "private function _processImportFile($fileFullPath) {\n\n $objFileops = new Fileops();\n $objFileops->setEventTime(new \\DateTime())\n ->setAction('I')\n ->setDeleted(0)\n ->setRecs(0)\n ->setErrors(0)\n ->setFilename($fileFullPath)\n ->setCustomerNew(0)\n ->setCustomerUpdate(0)\n ->setOrderUpdate(0)\n ->setStatus(Fileops::$STATUS_IMPORTING);\n\n $result = $this->_getMd5($fileFullPath);\n if($result['status'] === false) {\n throw new Exception($result['data']);\n }\n $this->md5 = $result['data'];\n $objFileops->setMd5($this->md5);\n\n// //--- Check md5 against database, continue if file already imported\n// $md5IsUnique = $this->getRepo('Fileops')->md5isUnique($objFileops->getMd5());\n// if($md5IsUnique !== true) {\n// //md5 already exists. This file has already been processed\n// die(\"File has already been imported: \" .$fileFullPath);\n// }\n\n //--- Read file into array\n $result = $this->getRepo('Fileops')->readFile($fileFullPath);\n\n if($result['status'] === false) {\n throw new Exception($result['data']);\n }\n $aryImport = $result['data'];\n $objFileops->setRecs(count($aryImport));\n\n //--- Process Customer Recs\n $result = $this->_importCustomers($aryImport);\n if($result['status'] === false) {\n throw new Exception($result['data']);\n }\n $objFileops->setCustomerNew($result['data']['customerNew'])\n ->setCustomerUpdate($result['data']['customerUpdate']);\n\n //--- Process Order Recs\n $result = $this->_importOrders($aryImport);\n if($result['status'] === false) {\n throw new Exception($result['data']);\n }\n $objFileops->setOrderNew($result['data']['orderNew'])\n ->setOrderUpdate($result['data']['orderUpdate']);\n\n\n //--- Save Import record\n $objFileops->setStatus(Fileops::$STATUS_SUCCESS);\n $this->persistEntity($objFileops);\n $this->flushEntities();\n\n $result = array('status' => true,\n 'data' => $objFileops);\n return $result;\n }", "public function read_file() {\t\t\r\n\t\t$file = $this->filepath;\r\n\t\t\r\n\t\tif(file_exists($file)) {\r\n\t\t\t$this->_content = file_get_contents($file);\t\r\n\t\t} \r\n\t}", "public function handle()\n {\n // and should exist on the server. If we can find a matching partial file, we're\n // good and we'll resume that.\n if(PartialFile::exists($this->patch())) {\n $this->file = PartialFile::find($this->patch());\n return;\n }\n\n // Sometimes the client actually did upload the last chunk but didn't receive\n // a successful confirmation, and is retrying. If we can find a matching completed\n // file we'll use it, and will tell the client that it's all good.\n if(File::exists($this->patch())) {\n $this->file = File::find($this->patch());\n return;\n }\n\n // If we found no matching file at all, I'm not really sure what happened.\n // Maybe the client stalled, and sat for hours before hitting retry, and\n // the partial file was already cleaned up? In any event, we have to treat\n // it as a new upload that is just starting.\n $this->file = PartialFile::initialize($this->patch());\n }", "public function handleUploadFile() {\n\t\t$this->templateName = 'Upload.latte';\n\n\t\t$this->storage->addFile($_FILES['upload']['tmp_name'], $_FILES['upload']['name']);\n\n\t\t$this->template->url = $this->template->basePath . '/' . $this->storage->getBaseUrl() . '/' . $_FILES['upload']['name'];\n\t\t$this->template->message = 'Soubor byl nahrán';\n\t\t$this->template->setFile(__DIR__ . '/templates/' . $this->templateName);\n\t\t$this->template->render();\n\t\t$this->getPresenter()->terminate();\n\t}", "public function fileInfo() {\n $this->file = file_load($this->fid);\n\n // Creating an array of stream wrappers that will be removed.\n $streams = array();\n foreach (stream_get_wrappers() as $stream) {\n $streams[] = $stream . '://';\n }\n\n // Generate the folder name by the unique URI of the file.\n $file_name = str_replace($streams, '', $this->file->uri);\n $folder_name = str_replace(array('.', '_'), '-', $file_name);\n\n $files_folder = variable_get('file_public_path', conf_path() . '/files');\n\n $this->filePath = $files_folder . '/' . $file_name;\n $this->extractPath = $files_folder . '/' . $folder_name;\n }", "public function file(){\n\t\theader('Content-Type: image/'.$this->extension);\n\t\tdie( readfile( $this->path ) );\n\t}", "function OnFileUploaded($file) {\n\tAddFileToDatabase($file);\n\tScanFileOnVirusTotal($file);\n}", "function actionSource() {\r\n\r\n\t\t\t// Get the basename of the file\r\n\t\t\t$file = $_GET['id'];\r\n\r\n\t\t\t// Filepath should start with the directory of this file\r\n\t\t\t$basePath = strtolower( dirname( __FILE__ ) );\r\n\t\t\t$filePath = strtolower( dirname( realpath( $_GET['id'] ) ) );\r\n\r\n\t\t\t// Check if the file is in the right directory\r\n\t\t\tif ( substr( $filePath, 0, strlen( $basePath ) ) != $basePath ) {\r\n\t\t\t\t$this->forward( 'default' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check if the file exists\r\n\t\t\tif ( ! is_file( $file ) ) {\r\n\t\t\t\t$this->forward( 'default' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Show the highlighted source\r\n\t\t\t$this->template->assign( 'file', $file );\r\n\t\t\t$this->template->assign( 'source', highlight_file( $file, 1 ) );\r\n\r\n\t\t\t// Output the template\r\n\t\t\t$this->template->display();\r\n\r\n\t\t}", "function process() ;", "public function openFile() {\n $this->file = fopen($this->_dir . $this->_filename,\"r\");\n }", "public function process_file() {\n //\n $done = false;\n $error = '';\n //\n $filelist = directory_map('/var/lib/mysql-files/uploads/', 1);\n //\n // returns the table selected in the drop down\n //\n $table_name = $this->input->post('tablename');\n //\n // returns the array position of the selected item on the \n // dropdown list\n $fileno = $this->input->post('filename');\n //\n // get text as an array of strings, the dropdown returns a number\n //\n $textarray = $this->read_text($filelist[$fileno]);\n //\n // gets the first line of the text file\n //\n $text_line = $textarray[0];\n //\n $return_value = $this->check_import_match($table_name, $text_line);\n //\n // get list of table columns\n //\n $filepath = '/var/lib/mysql-files/uploads/'.$filelist[$fileno];\n // \n // loads a list of table names into an array\n //\n $tables = $this->load_table_names();\n // send back to import page with message\n if ($return_value === 0) { \n $this->data_driver->load_data($table_name, $filepath);\n //\n $message = 'Your data has been successfully imported';\n // this checks that new users have a role assigned\n $this->check_access_type();\n }\n else\n {\n $message = $return_value; \n }\n // call page\n $this->call_page($tables, $filelist, $message);\n }", "abstract public function setContentFromFile($file);", "public function render($file);" ]
[ "0.76176465", "0.6176209", "0.60963434", "0.6084515", "0.5917527", "0.5866858", "0.57628286", "0.5755351", "0.57450217", "0.574126", "0.57246053", "0.5718934", "0.5716071", "0.5714241", "0.5708811", "0.5708811", "0.57027876", "0.5702447", "0.5702447", "0.5702447", "0.5621347", "0.56047213", "0.56047213", "0.56047213", "0.56047213", "0.55977064", "0.5595158", "0.55940175", "0.55940175", "0.55940175", "0.55940175", "0.55909497", "0.5577339", "0.55556726", "0.55556726", "0.55556726", "0.55556726", "0.5541489", "0.5541489", "0.55365014", "0.55228317", "0.55159783", "0.5513498", "0.55122954", "0.5511471", "0.54968715", "0.5494326", "0.54752207", "0.5474565", "0.5472642", "0.5440203", "0.5430484", "0.54302275", "0.54302275", "0.54302275", "0.54284286", "0.5410961", "0.5377822", "0.5376916", "0.53666013", "0.53642195", "0.5355085", "0.5353625", "0.5314176", "0.530596", "0.5280413", "0.52602", "0.52426267", "0.52366775", "0.5223434", "0.5221743", "0.5199782", "0.519567", "0.5176527", "0.5176527", "0.5176527", "0.5174632", "0.5171529", "0.51549405", "0.5152", "0.51468813", "0.51437634", "0.5122639", "0.51210505", "0.512059", "0.511205", "0.51052874", "0.5099379", "0.5089079", "0.5079653", "0.50788015", "0.5078748", "0.5078016", "0.507799", "0.5076647", "0.50716615", "0.5064695", "0.5017675", "0.5004807", "0.500424", "0.49846813" ]
0.0
-1
Counts the Executable Lines of Code (ELOC) using Bytekit.
protected function countEloc($filename, $loc) { $bytecode = @bytekit_disassemble_file($filename); if (!is_array($bytecode)) { return 0; } $lines = array(); foreach ($bytecode['functions'] as $function) { foreach ($function['raw']['opcodes'] as $opline) { if ($opline['lineno'] <= $loc && !isset($this->opcodeBlacklist[$opline['opcode']]) && !isset($lines[$opline['lineno']])) { $lines[$opline['lineno']] = TRUE; } } } return count($lines); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getNumExecutableLines();", "abstract public function getLinesOfCode();", "function lines(){\n\t$string = shell_exec(\"find . -name '*.php' -not -path './securimage/*' -not -path './phpmyadmin/*' -not -path './jpgraph/*' | xargs wc -l\");\n\tpreg_match_all('/[0-9]+/',$string,$matches);\n\t$linesofcode = $matches[0][count($matches[0])-1];\n\treturn $linesofcode;\n}", "abstract public function getNumExecutedLines();", "public function countLines();", "public function getLineCount() {}", "public function getLinesCount();", "public function testExecutableLines() {\n\t\tdo {\n\t\t\t// These lines should be ignored\n\t\t\t//\n\n\t\t\t/* And these as well are ignored */\n\n\t\t\t/**\n\t\t\t * Testing never proves the absence of faults,\n\t\t\t * it only shows their presence.\n\t\t\t * - Dijkstra\n\t\t\t */\n\t\t} while (false);\n\n\t\t$result = Inspector::executable($this, ['methods' => __FUNCTION__]);\n\t\t$expected = [__LINE__ - 1, __LINE__, __LINE__ + 1];\n\t\t$this->assertEqual($expected, $result);\n\t}", "public function import_get_nb_of_lines($file)\n\t{\n // phpcs:enable\n return dol_count_nb_of_line($file);\n }", "protected function _getNewLineCode()\n {\n return count($this->_lines) + 1;\n }", "public function getNumberOfEffectiveCodeLines()\n {\n return $this->numberOfEffectiveCodeLines;\n }", "public function countFile($filename, $countTests)\n {\n $buffer = file_get_contents($filename);\n $tokens = token_get_all($buffer);\n $numTokens = count($tokens);\n $loc = substr_count($buffer, \"\\n\");\n\n unset($buffer);\n\n $nclocClasses = 0;\n $cloc = 0;\n $blocks = array();\n $currentBlock = FALSE;\n $namespace = FALSE;\n $className = NULL;\n $functionName = NULL;\n $testClass = FALSE;\n\n for ($i = 0; $i < $numTokens; $i++) {\n if (is_string($tokens[$i])) {\n if (trim($tokens[$i]) == '?') {\n if (!$testClass) {\n if ($className !== NULL) {\n $this->count['ccnMethods']++;\n }\n\n $this->count['ccn']++;\n }\n }\n\n if ($tokens[$i] == '{') {\n if ($currentBlock == T_CLASS) {\n $block = $className;\n }\n\n else if ($currentBlock == T_FUNCTION) {\n $block = $functionName;\n }\n\n else {\n $block = FALSE;\n }\n\n array_push($blocks, $block);\n\n $currentBlock = FALSE;\n }\n\n else if ($tokens[$i] == '}') {\n $block = array_pop($blocks);\n\n if ($block !== FALSE && $block !== NULL) {\n if ($block == $functionName) {\n $functionName = NULL;\n }\n\n else if ($block == $className) {\n $className = NULL;\n $testClass = FALSE;\n }\n }\n }\n\n continue;\n }\n\n list ($token, $value) = $tokens[$i];\n\n if ($className !== NULL) {\n if ($token != T_COMMENT && $token != T_DOC_COMMENT) {\n $nclocClasses += substr_count($value, \"\\n\");\n }\n }\n\n switch ($token) {\n case T_NAMESPACE: {\n $namespace = $this->getNamespaceName($tokens, $i);\n\n if (!isset($this->namespaces[$namespace])) {\n $this->namespaces[$namespace] = TRUE;\n }\n }\n break;\n\n case T_CLASS:\n case T_INTERFACE:\n case T_TRAIT: {\n $className = $this->getClassName(\n $namespace, $tokens, $i\n );\n $currentBlock = T_CLASS;\n\n if ($token == T_TRAIT) {\n $this->count['traits']++;\n }\n\n else if ($token == T_INTERFACE) {\n $this->count['interfaces']++;\n }\n\n else {\n if ($countTests && $this->isTestClass($className)) {\n $testClass = TRUE;\n $this->count['testClasses']++;\n } else {\n if (isset($tokens[$i-2]) &&\n is_array($tokens[$i-2]) &&\n $tokens[$i-2][0] == T_ABSTRACT) {\n $this->count['abstractClasses']++;\n } else {\n $this->count['concreteClasses']++;\n }\n }\n }\n }\n break;\n\n case T_FUNCTION: {\n $currentBlock = T_FUNCTION;\n\n if (is_array($tokens[$i+2]) &&\n $tokens[$i+2][0] == T_STRING) {\n $functionName = $tokens[$i+2][1];\n }\n\n else if ($tokens[$i+2] == '&' &&\n is_array($tokens[$i+3]) &&\n $tokens[$i+3][0] == T_STRING) {\n $functionName = $tokens[$i+3][1];\n }\n\n else {\n $currentBlock = 'anonymous function';\n $functionName = 'anonymous function';\n $this->count['anonymousFunctions']++;\n }\n\n if ($currentBlock == T_FUNCTION) {\n if ($className === NULL) {\n $this->count['functions']++;\n } else {\n $static = FALSE;\n $visibility = T_PUBLIC;\n\n for ($j = $i; $j > 0; $j--) {\n if (is_string($tokens[$j])) {\n if ($tokens[$j] == '{' || $tokens[$j] == '}') {\n break;\n }\n\n continue;\n }\n\n if (isset($tokens[$j][0])) {\n switch ($tokens[$j][0]) {\n case T_PRIVATE: {\n $visibility = T_PRIVATE;\n }\n break;\n\n case T_PROTECTED: {\n $visibility = T_PROTECTED;\n }\n break;\n\n case T_STATIC: {\n $static = TRUE;\n }\n break;\n }\n }\n }\n\n if ($testClass &&\n strpos($functionName, 'test') === 0 &&\n $visibility == T_PUBLIC &&\n !$static) {\n $this->count['testMethods']++;\n }\n\n else if (!$testClass) {\n if ($static) {\n $this->count['staticMethods']++;\n } else {\n $this->count['nonStaticMethods']++;\n }\n\n if ($visibility != T_PUBLIC) {\n $this->count['nonPublicMethods']++;\n }\n }\n }\n }\n }\n break;\n\n case T_CURLY_OPEN: {\n $currentBlock = T_CURLY_OPEN;\n array_push($blocks, $currentBlock);\n }\n break;\n\n case T_DOLLAR_OPEN_CURLY_BRACES: {\n $currentBlock = T_DOLLAR_OPEN_CURLY_BRACES;\n array_push($blocks, $currentBlock);\n }\n break;\n\n case T_IF:\n case T_ELSEIF:\n case T_FOR:\n case T_FOREACH:\n case T_WHILE:\n case T_CASE:\n case T_CATCH:\n case T_BOOLEAN_AND:\n case T_LOGICAL_AND:\n case T_BOOLEAN_OR:\n case T_LOGICAL_OR: {\n if (!$testClass) {\n if ($className !== NULL) {\n $this->count['ccnMethods']++;\n }\n\n $this->count['ccn']++;\n }\n }\n break;\n\n case T_COMMENT:\n case T_DOC_COMMENT: {\n $cloc += substr_count($value, \"\\n\") + 1;\n }\n break;\n\n case T_CONST: {\n $this->count['classConstants']++;\n }\n break;\n\n case T_STRING: {\n if ($value == 'define') {\n $this->count['globalConstants']++;\n }\n }\n break;\n }\n }\n\n $this->count['loc'] += $loc;\n $this->count['nclocClasses'] += $nclocClasses;\n $this->count['cloc'] += $cloc;\n $this->count['ncloc'] += $loc - $cloc;\n $this->count['files']++;\n\n if (function_exists('bytekit_disassemble_file')) {\n $this->count['eloc'] += $this->countEloc($filename, $loc);\n }\n }", "public function countLines()\n {\n\n return count($this->file_array);\n }", "function __getExecutableLines($content) {\n\t\tif (is_array($content)) {\n\t\t\t$manager =& CodeCoverageManager::getInstance();\n\t\t\t$result = array();\n\t\t\tforeach ($content as $file) {\n\t\t\t\t$result[$file] = $manager->__getExecutableLines(file_get_contents($file));\n\t\t\t}\n\t\t\treturn $result;\n\t\t}\n\t\t$content = h($content);\n\t\t// arrays are 0-indexed, but we want 1-indexed stuff now as we are talking code lines mind you (**)\n\t\t$content = \"\\n\" . $content;\n\t\t// // strip unwanted lines\n\t\t$content = preg_replace_callback(\"/(@codeCoverageIgnoreStart.*?@codeCoverageIgnoreEnd)/is\", array('CodeCoverageManager', '__replaceWithNewlines'), $content);\n\t\t// strip php | ?\\> tag only lines\n\t\t$content = preg_replace('/[ |\\t]*[&lt;\\?php|\\?&gt;]+[ |\\t]*/', '', $content);\n\n\t\t// strip lines that contain only braces and parenthesis\n\t\t$content = preg_replace('/[ |\\t]*[{|}|\\(|\\)]+[ |\\t]*/', '', $content);\n\t\t$result = explode(\"\\n\", $content);\n\t\t// unset the zero line again to get the original line numbers, but starting at 1, see (**)\n\t\tunset($result[0]);\n\t\treturn $result;\n\t}", "public function numLines()\n {\n if($this->state['numlines']) {\n return $this->state['numlines'];\n } else {\n $numRows = self::numRowsInFile($this->vars['ifn']);\n if($numRows < 100){\n $numRows = self::numRowsInFileAccurate($this->vars['ifn'],$this->vars['delimiter'], $this->vars['quotechar'], $this->vars['escapechar']);\n }\n $this->state['numlines'] = $numRows;\n return $this->state['numlines'];\n }\n }", "function countAddedLines()\n {\n }", "public function countFile($filename, $countTests): void\n {\n if ($countTests) {\n $this->preProcessFile($filename);\n }\n\n $buffer = file_get_contents($filename);\n $this->collector->incrementLines(substr_count($buffer, \"\\n\"));\n $tokens = token_get_all($buffer);\n $numTokens = count($tokens);\n\n unset($buffer);\n\n $this->collector->addFile($filename);\n\n $blocks = [];\n $currentBlock = false;\n $namespace = false;\n $className = null;\n $functionName = null;\n $testClass = false;\n $this->collector->currentClassReset();\n $isLogicalLine = true;\n $isInMethod = false;\n\n for ($i = 0; $i < $numTokens; $i++) {\n if (is_string($tokens[$i])) {\n $token = trim($tokens[$i]);\n\n if ($token === ';') {\n if ($isLogicalLine) {\n if ($className !== null && !$testClass) {\n $this->collector->currentClassIncrementLines();\n\n if ($functionName !== null) {\n $this->collector->currentMethodIncrementLines();\n }\n } elseif ($functionName !== null) {\n $this->collector->incrementFunctionLines();\n }\n\n $this->collector->incrementLogicalLines();\n }\n $isLogicalLine = true;\n } elseif ($token === '?' && !$testClass) {\n if ($className !== null) {\n $this->collector->currentClassIncrementComplexity();\n $this->collector->currentMethodIncrementComplexity();\n }\n\n $this->collector->incrementComplexity();\n } elseif ($token === '{') {\n if ($currentBlock === T_CLASS) {\n $block = $className;\n } elseif ($currentBlock === T_FUNCTION) {\n $block = $functionName;\n } else {\n $block = false;\n }\n\n $blocks[] = $block;\n\n $currentBlock = false;\n } elseif ($token === '}') {\n $block = array_pop($blocks);\n\n if ($block !== false && $block !== null) {\n if ($block === $functionName) {\n $functionName = null;\n\n if ($isInMethod) {\n $this->collector->currentMethodStop();\n $isInMethod = false;\n }\n } elseif ($block === $className) {\n $className = null;\n $testClass = false;\n $this->collector->currentClassStop();\n $this->collector->currentClassReset();\n }\n }\n }\n\n continue;\n }\n\n [$token, $value] = $tokens[$i];\n\n switch ($token) {\n case T_NAMESPACE:\n $namespace = $this->getNamespaceName($tokens, $i);\n $this->collector->addNamespace($namespace);\n $isLogicalLine = false;\n\n break;\n\n case T_CLASS:\n case T_INTERFACE:\n case T_TRAIT:\n if (!$this->isClassDeclaration($tokens, $i)) {\n break;\n }\n\n $this->collector->currentClassReset();\n $this->collector->currentClassIncrementComplexity();\n $className = $this->getClassName($namespace, $tokens, $i);\n $currentBlock = T_CLASS;\n\n if ($token === T_TRAIT) {\n $this->collector->incrementTraits();\n } elseif ($token === T_INTERFACE) {\n $this->collector->incrementInterfaces();\n } else {\n if ($countTests && $this->isTestClass($className)) {\n $testClass = true;\n $this->collector->incrementTestClasses();\n } else {\n $classModifierToken = $this->getPreviousNonWhitespaceNonCommentTokenPos($tokens, $i);\n\n if ($classModifierToken !== false &&\n $tokens[$classModifierToken][0] === T_ABSTRACT\n ) {\n $this->collector->incrementAbstractClasses();\n } elseif (\n $classModifierToken !== false &&\n $tokens[$classModifierToken][0] === T_FINAL\n ) {\n $this->collector->incrementFinalClasses();\n } else {\n $this->collector->incrementNonFinalClasses();\n }\n }\n }\n\n break;\n\n case T_FUNCTION:\n $prev = $this->getPreviousNonWhitespaceTokenPos($tokens, $i);\n\n if ($tokens[$prev][0] === T_USE) {\n break;\n }\n\n $currentBlock = T_FUNCTION;\n\n $next = $this->getNextNonWhitespaceTokenPos($tokens, $i);\n\n if ($tokens[$next] === '&' || (is_array($tokens[$next]) && $tokens[$next][1] === '&')) {\n $next = $this->getNextNonWhitespaceTokenPos($tokens, $next);\n }\n\n if (is_array($tokens[$next]) &&\n $tokens[$next][0] === T_STRING) {\n $functionName = $tokens[$next][1];\n } else {\n $currentBlock = 'anonymous function';\n $functionName = 'anonymous function';\n $this->collector->incrementAnonymousFunctions();\n }\n\n if ($currentBlock === T_FUNCTION) {\n if ($className === null &&\n $functionName !== 'anonymous function') {\n $this->collector->incrementNamedFunctions();\n } else {\n $static = false;\n $visibility = T_PUBLIC;\n\n for ($j = $i; $j > 0; $j--) {\n if (is_string($tokens[$j])) {\n if ($tokens[$j] === '{' ||\n $tokens[$j] === '}' ||\n $tokens[$j] === ';') {\n break;\n }\n\n continue;\n }\n\n if (isset($tokens[$j][0])) {\n switch ($tokens[$j][0]) {\n case T_PRIVATE:\n $visibility = T_PRIVATE;\n\n break;\n\n case T_PROTECTED:\n $visibility = T_PROTECTED;\n\n break;\n\n case T_STATIC:\n $static = true;\n\n break;\n }\n }\n }\n\n if ($testClass &&\n $this->isTestMethod($functionName, $visibility, $static, $tokens, $i)) {\n $this->collector->incrementTestMethods();\n } elseif (!$testClass) {\n $isInMethod = true;\n $this->collector->currentMethodStart();\n\n $this->collector->currentClassIncrementMethods();\n\n if (!$static) {\n $this->collector->incrementNonStaticMethods();\n } else {\n $this->collector->incrementStaticMethods();\n }\n\n if ($visibility === T_PUBLIC) {\n $this->collector->incrementPublicMethods();\n } elseif ($visibility === T_PROTECTED) {\n $this->collector->incrementProtectedMethods();\n } elseif ($visibility === T_PRIVATE) {\n $this->collector->incrementPrivateMethods();\n }\n }\n }\n }\n\n break;\n\n case T_CURLY_OPEN:\n $currentBlock = T_CURLY_OPEN;\n $blocks[] = $currentBlock;\n\n break;\n\n case T_DOLLAR_OPEN_CURLY_BRACES:\n $currentBlock = T_DOLLAR_OPEN_CURLY_BRACES;\n $blocks[] = $currentBlock;\n\n break;\n\n case T_IF:\n case T_ELSEIF:\n case T_FOR:\n case T_FOREACH:\n case T_WHILE:\n case T_CASE:\n case T_CATCH:\n case T_BOOLEAN_AND:\n case T_LOGICAL_AND:\n case T_BOOLEAN_OR:\n case T_LOGICAL_OR:\n if (!$testClass) {\n if ($isInMethod) {\n $this->collector->currentClassIncrementComplexity();\n $this->collector->currentMethodIncrementComplexity();\n }\n\n $this->collector->incrementComplexity();\n }\n\n break;\n\n case T_COMMENT:\n case T_DOC_COMMENT:\n // We want to count all intermediate lines before the token ends\n // But sometimes a new token starts after a newline, we don't want to count that.\n // That happened with /* */ and /** */, but not with // since it'll end at the end\n $this->collector->incrementCommentLines(substr_count(rtrim($value, \"\\n\"), \"\\n\") + 1);\n\n break;\n case T_CONST:\n $possibleScopeToken = $this->getPreviousNonWhitespaceNonCommentTokenPos($tokens, $i);\n\n if ($possibleScopeToken !== false &&\n in_array($tokens[$possibleScopeToken][0], [T_PRIVATE, T_PROTECTED], true)\n ) {\n $this->collector->incrementNonPublicClassConstants();\n } else {\n $this->collector->incrementPublicClassConstants();\n }\n\n break;\n\n case T_STRING:\n if ($value === 'define') {\n $this->collector->incrementGlobalConstants();\n\n $j = $i + 1;\n\n while (isset($tokens[$j]) && $tokens[$j] !== ';') {\n if (is_array($tokens[$j]) &&\n $tokens[$j][0] === T_CONSTANT_ENCAPSED_STRING) {\n $this->collector->addConstant(str_replace('\\'', '', $tokens[$j][1]));\n\n break;\n }\n\n $j++;\n }\n } else {\n $this->collector->addPossibleConstantAccesses($value);\n }\n\n break;\n\n case T_DOUBLE_COLON:\n case T_OBJECT_OPERATOR:\n $n = $this->getNextNonWhitespaceTokenPos($tokens, $i);\n $nn = $this->getNextNonWhitespaceTokenPos($tokens, $n);\n\n if ($n && $nn &&\n isset($tokens[$n][0]) &&\n ($tokens[$n][0] === T_STRING ||\n $tokens[$n][0] === T_VARIABLE) &&\n $tokens[$nn] === '(') {\n if ($token === T_DOUBLE_COLON) {\n $this->collector->incrementStaticMethodCalls();\n } else {\n $this->collector->incrementNonStaticMethodCalls();\n }\n } else {\n if ($token === T_DOUBLE_COLON &&\n $tokens[$n][0] === T_VARIABLE) {\n $this->collector->incrementStaticAttributeAccesses();\n } elseif ($token === T_OBJECT_OPERATOR) {\n $this->collector->incrementNonStaticAttributeAccesses();\n }\n }\n\n break;\n\n case T_GLOBAL:\n $this->collector->incrementGlobalVariableAccesses();\n\n break;\n\n case T_VARIABLE:\n if ($value === '$GLOBALS') {\n $this->collector->incrementGlobalVariableAccesses();\n } elseif (isset($this->superGlobals[$value])) {\n $this->collector->incrementSuperGlobalVariableAccesses();\n }\n\n break;\n\n case T_USE:\n case T_DECLARE:\n $isLogicalLine = false;\n\n break;\n }\n }\n }", "abstract public function getInstructionSize();", "function lcs () {\r\n\t$lcs = 0;\r\n foreach ($this->edits as $edit) {\r\n if ($edit->type == 'copy')\r\n $lcs += sizeof($edit->orig);\r\n }\r\n\treturn $lcs;\r\n }", "function ozh_wbsu_get_number_of_lines($file_to_read) {\n $file = new \\SplFileObject($file_to_read, 'r');\n $file->seek(PHP_INT_MAX);\n return ($file->key() + 1);\n}", "public static function linesCount($path)\n\t{\n\t\t$lines = 0;\n\t\tif (stripos(php_uname(), 'windows') !== false) {\n\t\t\t$handle = fopen($path, 'rb');\n\t\t\twhile (!feof($handle)) {\n\t\t\t\t$lines += substr_count(fread($handle, 8192), \"\\n\");\n\t\t\t}\n\t\t\tfclose($handle);\n\t\t} else {\n\t\t\t$lines = intval(exec(\"wc -l '$path'\"));\n\t\t}\n\t\treturn $lines;\n\t}", "public function getBlockCount();", "public function lcs() {\n $lcs = 0;\n foreach ($this->edits as $edit) {\n if ($edit->type == 'copy') {\n $lcs += sizeof($edit->orig);\n }\n }\n return $lcs;\n }", "function CountExecs($db, $sql, $inputarray) {\r\n\tglobal $EXECS; /** @see variables.php */\r\n\r\n\tif (!is_array($inputarray)) $EXECS++;\r\n\t# handle 2-dimensional input arrays\r\n\telse if (is_array(reset($inputarray))) $EXECS += sizeof($inputarray);\r\n\telse $EXECS++;\r\n}", "public function add_instr()\n {\n $this->instructions++; \n }", "public function numLines() {\r\n\t\treturn $this->lines;\r\n\t}", "public function getExecutableCode(): string;", "public function countLines()\n {\n return count(explode(PHP_EOL, $this->text));\n }", "static function getTotalExec() {\n return static::$total_exec;\n }", "function linesNeedingCoverage($filename)\n{\n\t$outLines=array();\n\t$content=file_get_contents($filename);\n\t$lines=explode(\"\\n\",$content);\n\t$number=0;\n\tforeach ($lines as $line)\n\t{\n\t\t$number++;\n\t\tif (needCoverage($line))\n\t\t\t$outLines[]=$number;\n\t}\n\treturn $outLines;\n}", "function getCountLinesInFile($filePath){\n if (file_exists($filePath)){\n $count = 0;\n $handler = fopen($filePath, 'r');\n while( !feof($handler)){\n fgets($handler);\n $count++;\n }\n fclose( $handler);\n return $count;\n }\n return \"getCountLinesInFile error\";\n }", "public function getLineNumber(){\n if( $this->index ){\n return substr_count($this->input, \"\\n\", 0, $this->index) + 1;\n }\n return 1;\n }", "function fileLines($file)\n{\n\t$linecount=0;\n\t$handle = fopen($file, \"r\");\n\twhile(!feof($handle)){\n\t\t$line = fgets($handle, 4096);\n\t\t$linecount = $linecount + substr_count($line, PHP_EOL);\n\t}\n\treturn $linecount;\n}", "public function numCOI() {\r\n $numCOI = 0;\r\n foreach($this->coi AS $coi) {\r\n if($coi->hasDeclarations() == true) {\r\n $numCOI++;\r\n }\r\n }\r\n return $numCOI;\r\n }", "public function getLineNumber();", "public function getLineNumber();", "public function getTotalLines() {\n\t\t\n\t\tif(filesize($this->logFilename) < $this->chunkSize) {\n\t\t\t$data = file($this->logFilename); \n\t\t\treturn count($data); \n\t\t}\n\t\t\n\t\tif(!$fp = fopen($this->logFilename, \"r\")) return 0;\n\t\t$totalLines = 0;\n\n\t\twhile(!feof($fp)) { \n\t\t\t$data = fread($fp, $this->chunkSize);\n\t\t\t$totalLines += substr_count($data, \"\\n\"); \n\t\t}\n\t\t\n\t\tfclose($fp); \n\t\t\n\t\treturn $totalLines;\n\t}", "private function countChunks()\r\n {\r\n\t\t$this->icc_chunks = ceil($this->icc_size / ((float) (self::MAX_BYTES_IN_MARKER - self::ICC_HEADER_LEN)));\r\n }", "private function getFileCount()\n {\n $this->seek($this->offset + 4);\n\n return $this->readLong();\n }", "public function getLongestLineNumberLength(): int\n {\n return 0;\n }", "public function getProcessedCount();", "protected function get_line_len()\n {\n return count($this->buffer);\n }", "public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)\n {\n\n$cliValues = $phpcsFile->phpcs->cli->getCommandLineValues();\n$dh = $cliValues['files'][0];\n\n\n$cadena=$dh;\n$this->contadorReal=$this->contadorReal+1;\n$this->recorrerDirectorio($cadena);\n\n\tif ($this->noEntrar==false){\n\t\n\t$this->contadorIrreal=1;\n}else{\n$this->contadorIrreal=$this->contadorReal+1;\n}\n\t\tif($this->noMostrarMensaje==false){\n\t\t\tif($this->contadorReal>$this->contadorIrreal){\n\t\t\t \t$error = 'No se tienen los tres compoenentes Yii Modelo Vista y Controlador; found %s';\n\t\t\t\tif($this->vista==false){\n \t\t\t$data=\"Falta Vista\";\n\t\t\t\t}\n\t\t\t\tif($this->modelo==false){\n \t\t\t$data=\"Falta Modelo\";\n\t\t\t\t}if($this->controlador==false){\n \t\t\t$data=\"Falta Controlador\";\n\t\t\t\t}\n \t\t$phpcsFile->addError($error, null, 'Found', $data);\n\n\t\t\t\t$this->noMostrarMensaje=true;\n\t\t\t}\n\t\t}\n\t\n\n}", "function count_the_lines($name) {\n $file_name = $name;\n $number_of_lines = count(file($file_name));\n return $number_of_lines;\n}", "private static function showCodeLines($file, $line){\n $text=\"\";\n $fileContent = file_get_contents($file);\n $lines = explode(\"\\n\",$fileContent);\n $nLines = Pokelio_Global::getConfig(\"EXCEPTION_SHOW_CODE_LINES\", 'Pokelio');\n $startLine=$line-$nLines;\n if($startLine<1){\n $startLine=1;\n }\n $endLine=$line+$nLines;\n if($endLine>sizeof($lines)){\n $endLine=sizeof($lines);\n }\n $text.= \" Code:\".\"\\n\";\n for($iLine=$startLine;$iLine<=$endLine;$iLine++){\n if($iLine==$line){\n $text.= \" !!!----> \";\n }else{\n $text.= \" \";\n }\n $text.= substr(\" \".$iLine,-4);\n $text.= \" \";\n $text.= str_replace(\"\\n\",\"\",$lines[$iLine-1]).\"\\n\";\n }\n return $text;\n }", "function runkit_lint($code)\n{\n}", "final private function _methodLineNumber ($classOrObject, $method) {\n\t\t$ref = new ReflectionMethod($classOrObject, $method);\n\t\treturn $ref->getStartLine();\n\t}", "function countDeletedLines()\n {\n }", "public function getNumGlyphs() {}", "public function getNumGlyphs() {}", "public function getLineInfoListCount() {\n return $this->count(self::LINE_INFO_LIST);\n }", "public function countUsed()\n {\n }", "protected static function get_model_lines(){\n\n\t\treturn count(file(static::$models_dir.'/'.static::$table.EXT));\n\t}", "public static function computeLineOffsetMap(string $contents): array\n {\n // start of line 1 is the 0th byte\n $offsets = [0, 0];\n $offset = 0;\n while (($next = \\strpos($contents, \"\\n\", $offset)) !== false) {\n $offset = $next + 1;\n $offsets[] = $offset;\n }\n $offsets[] = \\strlen($contents);\n return $offsets;\n }", "public static function mainCodes()\n {\n return static::MAIN_CODES;\n }", "public function actionChakan()\n {\n\t\t// while(!feof($file))\n\t\t// {\n\t\t// \t// echo fgets($file). \"<br />\";\n\t\t// \t$wenjian=fgets($file);\n\t\t// \t$tihuan2=preg_split('/\\s+/', $wenjian,4);\n\t\t// \tprint_r($tihuan2);\n\t\t// }\n\t\t// fclose($file);\n\t\t$jin=\\Yii::$app->db;\n\t\t$command=$jin->createCommand('SELECT COUNT(id) FROM xxy_ip');\n\t\t$postCount = $command->queryScalar();\n\t\techo $postCount;\n }", "function nbLine($req) {\r\n $crs = $this->query($req) ;\r\n return count($crs->fetchAll()) ;\r\n }", "public function count(): int\n {\n return $this->blocks->count();\n }", "public function writeAllLines(string ...$bytes): int\n {\n return $this->writeAll(...Vec\\map($bytes, static fn(string $bytes): string => $bytes . \"\\n\"));\n }", "protected function _getSloc($file)\n {\n $analyser = new Analyser();\n $results = $analyser->countFiles(array($file), false);\n\n // lloc = Logical Lines of Code\n return $results['lloc'];\n }", "public function getCode()\n {\n if ( $this->isInternal() ) {\n $code = '/* ' . $this->getName() . ' is an internal function.'\n . ' Therefore the source code is not available. */';\n } else {\n $filename = $this->getFileName();\n\n $start = $this->getStartLine();\n $end = $this->getEndLine();\n\n $offset = $start - 1;\n $length = $end - $start + 1;\n \n $lines = array_slice( file( $filename ), $offset, $length );\n\n if ( strpos( trim( $lines[0] ), 'function' ) !== 0 ) {\n $lines[0] = substr( $lines[0], strpos( $lines[0], 'function' ) );\n }\n\n $code = implode( '', $lines );\n }\n return $code;\n }", "public function getLine(): int\n {\n return $this->node->start_lineno;\n }", "public function testLineIntrospection() {\n\t\t$backup = error_reporting();\n\t\terror_reporting(E_ALL);\n\n\t\t$result = Inspector::lines(__FILE__, [__LINE__ - 4]);\n\t\t$expected = [__LINE__ - 5 => \"\\tpublic function testLineIntrospection() {\"];\n\t\t$this->assertEqual($expected, $result);\n\n\t\t$result = Inspector::lines(__CLASS__, [18]);\n\t\t$expected = [18 => 'class InspectorTest extends \\lithium\\test\\Unit {'];\n\t\t$this->assertEqual($expected, $result);\n\n\t\t$lines = 'This is the first line.' . PHP_EOL . 'And this the second.';\n\t\t$result = Inspector::lines($lines, [2]);\n\t\t$expected = [2 => 'And this the second.'];\n\t\t$this->assertEqual($expected, $result);\n\n\t\t$this->assertException('/(Missing argument 2|Too few arguments.*1 passed.*2 expected)/', function() {\n\t\t\tInspector::lines('lithium\\core\\Foo');\n\t\t});\n\t\t$this->assertNull(Inspector::lines(__CLASS__, []));\n\n\t\terror_reporting($backup);\n\t}", "public function getExitCode()\n {\n return $this->errorCounter;\n }", "private function detectCopiedCode(array $changesets) {\n // See PHI944. If the total number of changed lines is excessively large,\n // don't bother with copied code detection. This can take a lot of time and\n // memory and it's not generally of any use for very large changes.\n $max_size = 65535;\n\n $total_size = 0;\n foreach ($changesets as $changeset) {\n $total_size += ($changeset->getAddLines() + $changeset->getDelLines());\n }\n\n if ($total_size > $max_size) {\n return;\n }\n\n $min_width = 30;\n $min_lines = 3;\n\n $map = array();\n $files = array();\n $types = array();\n foreach ($changesets as $changeset) {\n $file = $changeset->getFilename();\n foreach ($changeset->getHunks() as $hunk) {\n $lines = $hunk->getStructuredOldFile();\n foreach ($lines as $line => $info) {\n $type = $info['type'];\n if ($type == '\\\\') {\n continue;\n }\n $types[$file][$line] = $type;\n\n $text = $info['text'];\n $text = trim($text);\n $files[$file][$line] = $text;\n\n if (strlen($text) >= $min_width) {\n $map[$text][] = array($file, $line);\n }\n }\n }\n }\n\n foreach ($changesets as $changeset) {\n $copies = array();\n foreach ($changeset->getHunks() as $hunk) {\n $added = $hunk->getStructuredNewFile();\n $atype = array();\n\n foreach ($added as $line => $info) {\n $atype[$line] = $info['type'];\n $added[$line] = trim($info['text']);\n }\n\n $skip_lines = 0;\n foreach ($added as $line => $code) {\n if ($skip_lines) {\n // We're skipping lines that we already processed because we\n // extended a block above them downward to include them.\n $skip_lines--;\n continue;\n }\n\n if ($atype[$line] !== '+') {\n // This line hasn't been changed in the new file, so don't try\n // to figure out where it came from.\n continue;\n }\n\n if (empty($map[$code])) {\n // This line was too short to trigger copy/move detection.\n continue;\n }\n\n if (count($map[$code]) > 16) {\n // If there are a large number of identical lines in this diff,\n // don't try to figure out where this block came from: the analysis\n // is O(N^2), since we need to compare every line against every\n // other line. Even if we arrive at a result, it is unlikely to be\n // meaningful. See T5041.\n continue;\n }\n\n $best_length = 0;\n\n // Explore all candidates.\n foreach ($map[$code] as $val) {\n list($file, $orig_line) = $val;\n $length = 1;\n\n // Search backward and forward to find all of the adjacent lines\n // which match.\n foreach (array(-1, 1) as $direction) {\n $offset = $direction;\n while (true) {\n if (isset($copies[$line + $offset])) {\n // If we run into a block above us which we've already\n // attributed to a move or copy from elsewhere, stop\n // looking.\n break;\n }\n\n if (!isset($added[$line + $offset])) {\n // If we've run off the beginning or end of the new file,\n // stop looking.\n break;\n }\n\n if (!isset($files[$file][$orig_line + $offset])) {\n // If we've run off the beginning or end of the original\n // file, we also stop looking.\n break;\n }\n\n $old = $files[$file][$orig_line + $offset];\n $new = $added[$line + $offset];\n if ($old !== $new) {\n // If the old line doesn't match the new line, stop\n // looking.\n break;\n }\n\n $length++;\n $offset += $direction;\n }\n }\n\n if ($length < $best_length) {\n // If we already know of a better source (more matching lines)\n // for this move/copy, stick with that one. We prefer long\n // copies/moves which match a lot of context over short ones.\n continue;\n }\n\n if ($length == $best_length) {\n if (idx($types[$file], $orig_line) != '-') {\n // If we already know of an equally good source (same number\n // of matching lines) and this isn't a move, stick with the\n // other one. We prefer moves over copies.\n continue;\n }\n }\n\n $best_length = $length;\n // ($offset - 1) contains number of forward matching lines.\n $best_offset = $offset - 1;\n $best_file = $file;\n $best_line = $orig_line;\n }\n\n $file = ($best_file == $changeset->getFilename() ? '' : $best_file);\n for ($i = $best_length; $i--; ) {\n $type = idx($types[$best_file], $best_line + $best_offset - $i);\n $copies[$line + $best_offset - $i] = ($best_length < $min_lines\n ? array() // Ignore short blocks.\n : array($file, $best_line + $best_offset - $i, $type));\n }\n\n $skip_lines = $best_offset;\n }\n }\n\n $copies = array_filter($copies);\n if ($copies) {\n $metadata = $changeset->getMetadata();\n $metadata['copy:lines'] = $copies;\n $changeset->setMetadata($metadata);\n }\n }\n\n }", "public function getLine_numbers()\n\t{\n\t\treturn $this->getParser()->line_numbers;\n\t}", "function getLineOfCode($tokens,$stackPtr)\n {\n try {\n // Get the line Start position.//\n $startPos = $stackPtr;\n while (\n $tokens[$startPos]['line'] == $tokens[$stackPtr]['line'] \n && $startPos > 0\n ) {\n $startPos--;\n }\n if ($startPos == 0) {\n $startPos--;\n }\n \n //Get the line ending position.//\n $endPos = $stackPtr;\n while (\n $tokens[$endPos]['line'] == $tokens[$stackPtr]['line'] \n && $endPos < sizeof($tokens)-1\n ) {\n $endPos++;\n }\n $lineCode='';\n //Get the line content from startPosition to EndPosition.//\n for ($i = $startPos + 1; $i < $endPos; $i++) {\n if ($tokens[$i]['code'] == T_COMMENT ) {\n continue;\n }\n $lineCode .= ($tokens[$i]['content']);\n // Remove the WhiteSpace for first content only.//\n if ($i == $startPos) {\n $lineCode = trim($lineCode);\n }\n }\n $lineCode = trim(str_replace(\"%\", \"%%\", $lineCode));\n \n return $lineCode;\n } catch (Exception $e){\n echo \"Exception found for Function - \".$tokens[$stackPtr]['code'];\n exit;\n }\n }", "public function getAmountProcessedLines(): int {\n\t\treturn $this->_amountProcessedLines;\n\t}", "public static function counter() {}", "function __construct(){\n $this->stdin = fopen('php://stdin', 'r');\n $this->commentsNumber = 0;\n do{\n $line = utf8_encode($this->readLine()); //mozna ne encode tady musim otestovat\n if(preg_match('/#/', $line)){\n $this->iterateComments();\n } \n $line = preg_replace('/\\s*/','', $line); \n }while($line == null && !feof($this->stdin));\n if(strtolower($line) != \".ippcode18\"){\n exit(21);\n }\n }", "protected function _generateCoverageCommandLine()\n {\n $coverage = xdebug_get_code_coverage();\n ksort($coverage);\n\n foreach ($coverage as $file => $lines) {\n $this->_addToCoverageList($file, $lines);\n }\n\n foreach ($this->_coverage as $file => $lines) {\n $coverage = $this->_addToCoverage($file, $lines);\n $sizes[] = strlen($file);\n }\n\n $tracker = Tracker::getInstance();\n\n $file_pad = max($sizes) + 4;\n $pad = 10;\n\n $header = str_pad('FILE', $file_pad) . str_pad('LINES', $pad) . str_pad('COVERED', $pad) . str_pad('PERCENT', $pad). \"\\n\";\n $tracker->output($header, 'white', 'black', true);\n\n $tracker->output(str_pad('All', $file_pad));\n $tracker->output(str_pad($tracker->getTotalLines(), $pad));\n $tracker->output(str_pad($tracker->getCoveredLines(), $pad));\n $total_coverage = $tracker->getTotalCoverage();\n $tracker->output(str_pad($total_coverage, $pad), $this->_getColorForCoverage($total_coverage));\n $tracker->output(\"\\n\");\n\n foreach ($tracker->getCoverages() as $coverage) {\n $tracker->output(str_pad($coverage->getFile(), $file_pad));\n $tracker->output(str_pad($coverage->getLineCount(), $pad));\n $tracker->output(str_pad($coverage->getCoveredLineCount(), $pad));\n $total_coverage = $coverage->getPercentCovered();\n $tracker->output(str_pad($total_coverage, $pad), $this->_getColorForCoverage($total_coverage));\n $tracker->output(\"\\n\");\n }\n $tracker->output(\"\\n\");\n }", "public function getLinesToCache()\n {\n $value = $this->_config->get('dataprocessing/general/cache_lines');\n\n if ($value === null) {\n $value = 200;\n }\n\n return (int)$value;\n }", "function guestbook_count_entries() {\r\n \tif(guestbook_open_for_read() === FALSE) {\t// Aquires shared lock on guestbook file\r\n \t\treturn 0;\r\n \t}\r\n \t$raw_entries = @file(guestbook_file_path());\r\n \tguestbook_close();\t// Releases shared lock \r\n \tif($raw_entries === FALSE) {\r\n \t\treturn 0;\r\n \t}\r\n \t\r\n \t// Return size of entry array\r\n \treturn sizeof($raw_entries);\r\n\r\n}", "public function getMaxSizeOfInstructions() {}", "public function testGetBatchesCount()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function hit_count() {\n\t$file = fopen('count92.txt', 'r'); \n\t\n\t// Read current value in the fle count.\n\t$current = fread($file, filesize('count92.txt'));\n\tfclose($file);\n\n\t// Increment the current value in the file.\n\techo $current += 1;\n\n\t// rewrite the value into the file\n\t$file = fopen('count92.txt', 'w');\n\tfwrite($file, $current);\n\tfclose($file);\n}", "private function doCountBin()\n {\n /** @var string $bitset */\n $bitset = $this->bitset;\n $count = 0;\n $byteLen = \\strlen($bitset);\n for ($bytePos = 0; $bytePos < $byteLen; ++$bytePos) {\n if ($bitset[$bytePos] === \"\\0\") {\n // fast skip null byte\n continue;\n }\n\n $ord = \\ord($bitset[$bytePos]);\n if ($ord & 0b00000001) ++$count;\n if ($ord & 0b00000010) ++$count;\n if ($ord & 0b00000100) ++$count;\n if ($ord & 0b00001000) ++$count;\n if ($ord & 0b00010000) ++$count;\n if ($ord & 0b00100000) ++$count;\n if ($ord & 0b01000000) ++$count;\n if ($ord & 0b10000000) ++$count;\n }\n return $count;\n }", "function gttn_tpps_file_len($fid) {\n $file = file_load($fid);\n $location = drupal_realpath($file->uri);\n $extension = gttn_tpps_get_path_extension($location);\n $count = 0;\n $options = array(\n 'count' => &$count,\n );\n if ($extension == 'vcf') {\n $options['skip_prefix'] = '#';\n }\n gttn_tpps_file_iterator($fid, 'gttn_tpps_file_len_helper', $options);\n return $count;\n}", "public function getLineupCount()\n {\n return $this->count(self::_LINEUP);\n }", "public function getLineupCount()\n {\n return $this->count(self::_LINEUP);\n }", "public function writeLine(string $bytes): int\n {\n return $this->write($bytes . \"\\n\");\n }", "private static function Init()\n\t{\n\t\t$usageBefore = memory_get_usage();\n\t\n\t\tif (!file_exists(self::$path)) {\n\t\t\tthrow new Exception(\"Browscap binary data file does not exists. Convert it first!\");\n\t\t}\n\t\n\t\t$handle = fopen(self::$path, \"rb\");\n\t\t\n\t\tself::$contentOffsets = [ ];\t\t\n\t\t\n\t\t$buff = fread($handle, 4);\n\t\t$contentCount = unpack(\"N\", $buff)[1];\n\t\n\t\tfor ($i = 0; $i < $contentCount; $i ++) {\n\t\t\t\n\t\t\t$subkey = fread($handle, 2);\n\t\t\t\t\n\t\t\t$buff = fread($handle, 8);\n\t\t\t$data = unpack(\"Noffset/Ncount\", $buff);\n\n\t\t\tself::$contentOffsets[$subkey] = $data[\"offset\"] . \"\\t\" . $data[\"count\"];\n\t\t}\n\t\t\n\t\tself::$detailOffsets = [ ];\n\t\t\n\t\t$buff = fread($handle, 4);\n\t\t$detailCount = unpack(\"N\", $buff)[1];\n\t\t\n\t\tfor ($i = 0; $i < $detailCount; $i++) {\n\t\t\t\n\t\t\t$subkey = fread($handle, 3);\n\t\t\t\n\t\t\t$buff = fread($handle, 8);\n\t\t\t$data = unpack(\"Noffset/Ncount\", $buff);\n\t\t\t\n\t\t\tself::$detailOffsets[$subkey] = $data[\"offset\"] . \"\\t\" . $data[\"count\"];\n\t\t}\n\t\t\n\t\tfclose($handle);\n\t\n\t\t\n\t\t$used = memory_get_usage() - $usageBefore;\n\t\n\t\t__::Debug(\"Browscap memory consumption: \" . $used . \" bytes\");\n\t}", "private function makeLines()\n\t{\n\t\t$line = 1;\n\t\t/** @var Token $token */\n\t\tforeach ($this->tokens as $token)\n\t\t{\n\t\t\t$token->line = $line;\n\t\t\tif (preg_match_all(\"/\\\\n/\", $token->text, $m))\n\t\t\t{\n\t\t\t\t$line += count($m[0]);\n\t\t\t}\n\t\t}\n\t}", "function logcount() {\n\tglobal $cursor;\n\techo $cursor->count() . PHP_EOL;\n}", "function test363() : int {\n return ast\\parse_code(22, []);\n}", "public function countBlockFiles() {\n $blockfiles = 0;\n $log = $this->logger();\n $settings = $this->settings();\n \n $blockdir = $settings['data']['rawdata'];\n if (! file_exists($blockdir) ) {\n $log->error(\"Data directory does not exist, exiting: \" . $blockdir);\n return false;\n }\n\n // Only dive one level deep, add recursion later ...\n $files = scandir($blockdir);\n foreach ($files as $f) {\n $fullpath = $blockdir . '/' . $f;\n if ($f == \".\" || $f == \"..\" || 0 === filesize($fullpath)) {\n continue;\n }\n $blockfiles ++;\n }\n return $blockfiles;\n }", "function CountCachedExecs($db, $secs2cache, $sql, $inputarray) {\r\n\tglobal $CACHED; $CACHED++; /** @see variables.php */\r\n}", "function charCounter($c, array $grid): int {\n $total = 0;\n $h = count($grid);\n $w = count($grid[array_keys($grid)[0]]);\n $y0 = min(array_keys($grid));\n $x0 = min(array_keys($grid[array_keys($grid)[0]]));\n for ($y = $y0; $y < $y0 + $h; $y++) {\n for ($x = $x0; $x < $x0 + $w; $x++) {\n if ($grid[$y][$x] === $c) {\n $total++;\n }\n }\n }\n return $total;\n }", "public function enterNode(Node $node)\n {\n $startLineOfNode = $node->getAttribute('startLine');\n if ($startLineOfNode !== $this->currentLineNumber) {\n $this->currentLineNumber = $startLineOfNode;\n $this->numberOfEffectiveCodeLines ++;\n\n // Class statements may contain the @extensionScannerIgnoreFile statements\n if ($node instanceof Class_) {\n $comments = $node->getAttribute('comments');\n if (!empty($comments)) {\n foreach ($comments as $comment) {\n if (strstr($comment->getText(), '@extensionScannerIgnoreFile') !== false) {\n $this->isCurrentFileIgnored = true;\n break;\n }\n }\n }\n }\n\n // First node of line may contain the @extensionScannerIgnoreLine comment\n $comments = $node->getAttribute('comments');\n if (!empty($comments)) {\n foreach ($comments as $comment) {\n if (strstr($comment->getText(), '@extensionScannerIgnoreLine') !== false) {\n $this->numberOfIgnoreLines ++;\n break;\n }\n }\n }\n }\n }", "public function getMaxInstructionDefs() {}", "function iterateInstruction(){\n $this->instructionNumber += 1;\n }", "protected static function getMaxLineNumber($lines)\n {\n if (!is_array($lines)) {\n $lines = [$lines];\n }\n\n $number = 0;\n\n foreach ($lines as $foo => $line) {\n substr_count($line, \"\\n\") > $number and\n $number = substr_count($line, \"\\n\");\n }\n\n return $number;\n }", "function spectra_block_txcount ($blockhash)\n\t{\n\t\t$tx_list = mysqli_getset ($GLOBALS[\"tables\"][\"tx\"], \"`in_block` = '\".$blockhash.\"'\");\n\t\t\n\t\treturn count ($tx_list[\"data\"]);\n\t}", "public function getOpposCount()\n {\n return $this->count(self::_OPPOS);\n }", "public function getOpposCount()\n {\n return $this->count(self::_OPPOS);\n }", "public function getOpposCount()\n {\n return $this->count(self::_OPPOS);\n }", "static private function numTextLines($st) {\r\n// Temporary -1\r\n $i=-1;\r\n\r\n if ($i == -1) {\r\n return 1;\r\n } else {\r\n $tmpResult = 0;\r\n while ($i != -1) {\r\n $tmpResult++;\r\n $st = $st->substring($i + 1);\r\n $i = $st->indexOf(Language::getString(\"LineSeparator\"));\r\n }\r\n if ($st->length() != 0) {\r\n $tmpResult++;\r\n }\r\n return $tmpResult;\r\n }\r\n }", "public function getEntryCount() {}", "abstract public function getNumTestedMethods();", "function get_commit_num() {\n $query = $this->db->get('commit');\n return $query->num_rows();\n }" ]
[ "0.6819805", "0.64122343", "0.6325718", "0.60390526", "0.5917712", "0.5889832", "0.5578459", "0.55134743", "0.5501132", "0.5403971", "0.53762025", "0.52682596", "0.52467686", "0.52174526", "0.51249135", "0.5114899", "0.5085061", "0.50835973", "0.50371027", "0.5030325", "0.49947765", "0.49365124", "0.4913829", "0.48992997", "0.48802695", "0.48786545", "0.48571634", "0.48465887", "0.48457664", "0.48290828", "0.48278186", "0.4800085", "0.47978202", "0.47908947", "0.47887737", "0.47887737", "0.4784442", "0.47537407", "0.4719037", "0.4708142", "0.47045815", "0.4684176", "0.46600905", "0.4647397", "0.46333656", "0.46243262", "0.46191952", "0.46158075", "0.4578788", "0.4578788", "0.45785132", "0.45688805", "0.45439082", "0.45283413", "0.4526093", "0.45201257", "0.4511706", "0.45081908", "0.45024672", "0.45012528", "0.4499553", "0.44963732", "0.44874528", "0.448603", "0.4479526", "0.44785795", "0.44749334", "0.4466953", "0.44426414", "0.44426414", "0.44293785", "0.44291425", "0.4427774", "0.44194943", "0.44180784", "0.44121778", "0.44096303", "0.43987682", "0.4384739", "0.43847203", "0.43845633", "0.4369445", "0.43602917", "0.43551084", "0.43372375", "0.4335847", "0.4335471", "0.43260315", "0.43227944", "0.43128076", "0.43116927", "0.4307871", "0.42953897", "0.42952734", "0.42952734", "0.42952734", "0.4293047", "0.42889786", "0.4288579", "0.4283154" ]
0.601023
4
Create a new controller instance.
public function __construct(\Illuminate\Http\Request $request) { $this->middleware('auth'); $this->permit=$request->attributes->get('permit'); $this->configs=$request->attributes->get('configs'); $this->attachment = new FileManager; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "public function controller()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n if ($method == 'GET') {\n $this->getController();\n };\n if ($method == 'POST') {\n check_csrf();\n $this->createController();\n };\n }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Display a listing of the resource.
public function index() { // $productSpecs = CepSpecificationProducts::all(); return view("product_specifications.index",compact('productSpecs')); }
{ "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 {\n $modules = Module::all();\n return Resource::collection($modules);\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 // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\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 $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 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 $this->indexPage('list-product', 'List Product');\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "function listing() {\r\n\r\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "public function _index(){\n\t $this->_list();\n\t}", "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 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 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 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 actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446377", "0.7361922", "0.72984487", "0.7248631", "0.7162871", "0.7148215", "0.7131838", "0.71028054", "0.7102395", "0.70988023", "0.7048243", "0.6993516", "0.6989079", "0.69341344", "0.69001913", "0.6899167", "0.68920904", "0.6887188", "0.68661547", "0.6849159", "0.683002", "0.6801792", "0.6796645", "0.67952746", "0.678579", "0.6760132", "0.6741144", "0.67304057", "0.6726034", "0.6723304", "0.6723304", "0.6723304", "0.67188966", "0.67061126", "0.67046595", "0.67042124", "0.6664004", "0.6663109", "0.66603667", "0.66595376", "0.6656908", "0.66536283", "0.6648508", "0.6619696", "0.66191936", "0.66145146", "0.66056865", "0.6600895", "0.66007215", "0.6593214", "0.6587006", "0.6585572", "0.6584028", "0.65802413", "0.65751636", "0.6574276", "0.6572553", "0.65703243", "0.6569474", "0.6563628", "0.6563418", "0.65516967", "0.655156", "0.65460885", "0.65367365", "0.6533626", "0.6533064", "0.6527408", "0.65251255", "0.6524834", "0.65202224", "0.6517302", "0.65167385", "0.6516062", "0.65148616", "0.6506742", "0.65018", "0.6501768", "0.6494415", "0.64921784", "0.6486631", "0.6485237", "0.6484199", "0.64841217", "0.6479556", "0.6478558", "0.6469807", "0.646858", "0.64683306", "0.6466808", "0.64637285", "0.64616066", "0.6458575", "0.6457558", "0.64535207", "0.64534074", "0.64524984", "0.64491946", "0.6448726", "0.6447211", "0.64461327" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // $ps_products = CepProducts::where("prod_status",1)->select('prod_id','prod_name')->get(); $all_ps_products = array(); $all_ps_products[""] = "Select"; foreach($ps_products as $prod) $all_ps_products[$prod->prod_id] = $prod->prod_name; $alphaRange=array_combine(range('1','26'),range('A','Z')); $languages = CepLanguages::where('lang_status',1)->get(); $languages_array = array(); $languages_array[""] = "Select"; foreach ($languages as $language){ $languages_array[$language->lang_code]=$language->lang_name; } return view("product_specifications.create",compact('all_ps_products','alphaRange','languages_array')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store() { // $productSpecs = Request::all(); $validate = Validator::make($productSpecs,[ 'specprod_product_id' => 'required', 'specprod_item_id' => 'required', 'specprod_usage' => 'required', 'specprod_language_code' => 'required', 'specprod_technical_info' => 'required', 'specprod_reference_id' => 'required', 'specprod_description' => 'required', 'specprod_url' => 'required|unique:cep_specification_products', ]); if($validate->fails()){ return redirect()->back()->withErrors($validate->errors()); } if(Input::hasFile('files')){ $files=Input::file('files'); $productSpecs['specprod_attachment_id'] = $this->attachment->createAttachment(array('att_type'=>'product-specifications')); foreach($files as $key=>$fl){ //echo "<pre>"; print_r ($appointments['files'][$key]); //exit; $this->attachment->uploadAttachmentFiles($fl,$productSpecs['specprod_attachment_id']); } } if(isset($productSpecs['universal_id'])) $productSpecs['specprod_url'] = preg_replace('/\d+/','DD',$productSpecs['specprod_url']); $masterSpecs = array( 'spec_type' => 'product', 'spec_created_date' => Carbon::now(), 'spec_created_by' => Auth::id() ); $master = CepSpecificationMasters::create($masterSpecs); $productSpecs['specprod_spec_id'] = $master->spec_id; CepSpecificationProducts::create($productSpecs); return redirect('product-specifications'); }
{ "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) { // $ps_products = CepProducts::where("prod_status",1)->select('prod_id','prod_name')->get(); $all_ps_products = array(); $all_ps_products[""] = "Select"; foreach($ps_products as $prod) $all_ps_products[$prod->prod_id] = $prod->prod_name; $alphaRange=array_combine(range('1','26'),range('A','Z')); $productSpecs = CepSpecificationProducts::where("specprod_id",$id)->first(); $languages = CepLanguages::all(); $languages_array = array(); $languages_array[""] = "Select"; foreach ($languages as $language){ $languages_array[$language->lang_code]=$language->lang_name; } $prd_attachment = CepAttachmentFiles::where('attfiles_attachment_id',$productSpecs['specprod_attachment_id'])->get(); return count($productSpecs) ? view("product_specifications.show",compact('all_ps_products','alphaRange','productSpecs','languages_array','prd_attachment')) : abort(404); }
{ "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) { // $ps_products = CepProducts::where("prod_status",1)->select('prod_id','prod_name')->get(); $all_ps_products = array(); $all_ps_products[""] = "Select"; foreach($ps_products as $prod) $all_ps_products[$prod->prod_id] = $prod->prod_name; $alphaRange=array_combine(range('1','26'),range('A','Z')); $productSpecs = CepSpecificationProducts::where("specprod_id",$id)->first(); $languages = CepLanguages::all(); $languages_array = array(); $languages_array[""] = "Select"; foreach ($languages as $language){ $languages_array[$language->lang_code]=$language->lang_name; } $prd_attachment = CepAttachmentFiles::where('attfiles_attachment_id',$productSpecs['specprod_attachment_id'])->get(); return count($productSpecs) ? view("product_specifications.edit",compact('all_ps_products','alphaRange','productSpecs','languages_array','prd_attachment')) : abort(404); }
{ "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()\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($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 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() {\n return view('routes::edit');\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($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($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($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 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 return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::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 $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($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(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\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 edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "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.7855416", "0.769519", "0.72748375", "0.724256", "0.7173659", "0.7064689", "0.70549816", "0.6985127", "0.6949479", "0.69474626", "0.694228", "0.6929372", "0.6903047", "0.6899655", "0.6899655", "0.688039", "0.68649715", "0.68618995", "0.68586665", "0.68477386", "0.68366665", "0.6812782", "0.6807947", "0.68078786", "0.6803727", "0.6796845", "0.67935634", "0.67935634", "0.67894953", "0.67862976", "0.67815566", "0.6777874", "0.67700446", "0.6764179", "0.6747784", "0.6747784", "0.67476946", "0.6746584", "0.67417157", "0.67370653", "0.6727131", "0.6714694", "0.66953164", "0.6693583", "0.6690321", "0.66898996", "0.6689058", "0.66865313", "0.6684526", "0.66717213", "0.6670211", "0.6666833", "0.6666833", "0.66633433", "0.6663041", "0.6661699", "0.6658396", "0.6657984", "0.665473", "0.6644314", "0.66343915", "0.6633082", "0.6629606", "0.6629606", "0.6620677", "0.6620635", "0.66180485", "0.66171867", "0.6612161", "0.6610249", "0.660762", "0.6597593", "0.6596027", "0.6595597", "0.65925545", "0.65920216", "0.65896076", "0.65822965", "0.6581996", "0.65817595", "0.65770084", "0.65768373", "0.6575926", "0.65713066", "0.6569505", "0.656938", "0.65680295", "0.65636957", "0.65636957", "0.65624565", "0.65597314", "0.6559697", "0.65576696", "0.65573514", "0.65564495", "0.6556307", "0.655628", "0.65558994", "0.6549784", "0.6549675", "0.65461886" ]
0.0
-1
Update the specified resource in storage.
public function update($id) { // $productSpecs = Request::only('specprod_product_id','specprod_item_id','specprod_usage','specprod_technical_info','specprod_reference_id','specprod_description','specprod_url','specprod_status','specprod_spec_id','specprod_language_code','specprod_attachment_id'); $validate = Validator::make($productSpecs,[ 'specprod_product_id' => 'required', 'specprod_item_id' => 'required', 'specprod_usage' => 'required', 'specprod_language_code' => 'required', 'specprod_technical_info' => 'required', 'specprod_reference_id' => 'required', 'specprod_description' => 'required', 'specprod_url' => 'required|unique:cep_specification_products,specprod_url,'.$id.',specprod_id', ]); if($validate->fails()){ return redirect()->back()->withErrors($validate->errors()); } if(Input::hasFile('files')){ $files=Input::file('files'); if($productSpecs['specprod_attachment_id'] == 0) $productSpecs['specprod_attachment_id'] = $this->attachment->createAttachment(array('att_type'=>'product-specifications')); foreach($files as $key=>$fl){ //echo "<pre>"; print_r ($appointments['files'][$key]); //exit; $this->attachment->uploadAttachmentFiles($fl,$productSpecs['specprod_attachment_id']); } } $masterSpecs = array( 'spec_updated_by' => Auth::id() ); CepSpecificationMasters::where('spec_id', $productSpecs['specprod_spec_id'])->update($masterSpecs); CepSpecificationProducts::where('specprod_id', $id)->update($productSpecs); return redirect('product-specifications'); }
{ "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) { // if(!$this->permit->crud_general_specifications_delete) return redirect('accessDenied'); $ids = explode("-",$id); CepSpecificationProducts::where('specprod_id', $ids[0])->delete(); CepSpecificationMasters::where('spec_id', $ids[1])->delete(); return redirect('product-specifications'); }
{ "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
20060602 Renamed function from st_add_st_link() to st_add_feed_link()
function st_add_feed_link($content) { if (is_feed()) { $content .= st_link(); } return $content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function the_feed_link($anchor, $feed = '')\n {\n }", "function automatic_feed_links($add = \\true)\n {\n }", "function addFeed($feed,$url,$return=true);", "function comments_link_feed()\n {\n }", "public function feed_link() {\n\t\t$post_title = self::feed_title();\n\t\t$feed_link = LivePress_Updater::instance()->get_current_post_feed_link();\n\n\t\tif ( count( $feed_link ) > 0 ) {\n\t\t\t$tag = '<link rel=\"alternate\" type=\"' . esc_attr( feed_content_type( 'rss2' ) ) . '\" ';\n\t\t\t$tag .= 'title=\"' . esc_attr( get_bloginfo( 'name' ) ) . ' &raquo; ' . esc_attr( $post_title ) . '\" ';\n\t\t\t$tag .= 'href=\"' . esc_url( $feed_link[0] ) . '\" />' . \"\\n\";\n\t\t\techo $tag;\n\t\t}\n\t}", "function get_feed_link($feed = '')\n {\n }", "function rsd_link()\n {\n }", "function addLink($url)\n{\n $url = simplexml_load_file($url);\n return $url->channel;\n}", "function feed_links_extra($args = array())\n {\n }", "protected function addLinks()\n {\n }", "public function set_link($link) \n\t{\n\t\tif($this->version == RSS2 || $this->version == RSS1)\n\t\t{\n\t\t\t$this->add_element('link', $link);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->add_element('link','',array('href'=>$link));\n\t\t\t$this->add_element('id', zajlib_feed::uuid($link,'urn:uuid:'));\n\t\t} \n\t\t\n\t}", "function feed_process_link($feed, $camp) {\n\t\n\t//detect encoding mbstring\n\tif(! function_exists('mb_detect_encoding')){\n\t\t echo '<br><span style=\"color:red;\">mbstring PHP extension that is responsible for text encoding is not installed,Install it. You may get encoding problems.</span>';\t\t\n\t}\n\t\n\t//php-xml check\n\tif(! function_exists('simplexml_load_string')){\n\t\techo '<br><span style=\"color:red;\">php-xml PHP extension that is responsible for parsing XML is not installed. Please <a href=\"https://stackoverflow.com/questions/38793676/php-xml-extension-not-installed\">install it</a> and try again</span>';\n\t}\n\t\n\t// ini\n\tif( stristr($camp->camp_general, 'a:') ) $camp->camp_general=base64_encode($camp->camp_general);\n\t$camp_general=unserialize( base64_decode( $camp->camp_general));\n\t$camp_general=array_map('wp_automatic_stripslashes', $camp_general);\n\t$camp_opt = unserialize ( $camp->camp_options );\n\t\n\t// Feed extraction method old format adaption\n\tif(in_array('OPT_FEED_CUSTOM_R', $camp_opt)){\n\t\t$camp_general['cg_feed_custom_regex'] = array($camp_general['cg_feed_custom_regex'],$camp_general['cg_feed_custom_regex2']);\n\t}\n\t\n\tif(in_array('OPT_FEED_CUSTOM', $camp_opt)){\n\t\t\n\t\t$camp_general['cg_feed_extraction_method'] = 'css';\n\t\t\n\t\t$camp_general['cg_custom_selector'] = array($camp_general['cg_custom_selector'] , $camp_general['cg_custom_selector2'] , $camp_general['cg_custom_selector3'] );\n\t\t$camp_general['cg_feed_custom_id'] = array($camp_general['cg_feed_custom_id'] , $camp_general['cg_feed_custom_id2'] , $camp_general['cg_feed_custom_id3'] );\n\t\t\n\t\t$cg_feed_css_size = array();\n\t\t$cg_feed_css_size[] = in_array('OPT_SELECTOR_SINGLE', $camp_options) ? 'single' : 'all' ;\n\t\t$cg_feed_css_size[] = in_array('OPT_SELECTOR_SINGLE2', $camp_options) ? 'single' : 'all' ;\n\t\t$cg_feed_css_size[] = in_array('OPT_SELECTOR_SINGLE3', $camp_options) ? 'single' : 'all' ;\n\t\t$camp_general['cg_feed_css_size'] = $cg_feed_css_size;\n\t\t\n\t\t$cg_feed_css_wrap = array();\n\t\t$cg_feed_css_wrap[] = in_array('OPT_SELECTOR_INNER',$camp_options) ? 'inner' : 'outer' ;\n\t\t$cg_feed_css_wrap[] = in_array('OPT_SELECTOR_INNER2',$camp_options) ? 'inner' : 'outer' ;\n\t\t$cg_feed_css_wrap[] = in_array('OPT_SELECTOR_INNER3',$camp_options) ? 'inner' : 'outer' ;\n\t\t$camp_general['cg_feed_css_wrap'] = $cg_feed_css_wrap;\n\t\t\n\t}\n\t\n\t\n\tif(isset($camp_general['cg_feed_extraction_method'])){\n\t\tswitch ($camp_general['cg_feed_extraction_method']) {\n\t\t\t\n\t\t\tcase 'summary':\n\t\t\t\t$camp_opt[] = 'OPT_SUMARRY_FEED';\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'css':\n\t\t\t\t$camp_opt[] = 'OPT_FEED_CUSTOM';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'auto':\n\t\t\t\t$camp_opt[] = 'OPT_FULL_FEED';\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'regex':\n\t\t\t\t$camp_opt[] = 'OPT_FEED_CUSTOM_R';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'visual':\n\t\t\t\t$camp_opt[] = 'OPT_FEED_CUSTOM';\n\t\t\t\t$camp_general['cg_feed_extraction_method'] = 'css';\n\t\t\t\t\n\t\t\t\t$camp_general['cg_feed_custom_id'] = $camp_general['cg_feed_visual'];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$cg_feed_css_size = array();\n\t\t\t\t$cg_feed_css_wrap = array();\n\t\t\t\t$cg_custom_selector = array();\n\t\t\t\t\n\t\t\t\tforeach ($camp_general['cg_feed_visual'] as $singleVisual){\n\t\t\t\t\t$cg_feed_css_size[] = 'single';\n\t\t\t\t\t$cg_feed_css_wrap[] = 'outer';\n\t\t\t\t\t$cg_custom_selector[] = 'xpath';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$camp_general['cg_feed_css_size'] = $cg_feed_css_size;\n\t\t\t\t$camp_general['cg_feed_css_wrap'] = $cg_feed_css_wrap;\n\t\t\t\t$camp_general['cg_custom_selector'] = $cg_custom_selector;\n\t\t\t\t\n\t\t\t\t\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t}\n\t\n\tif(in_array('OPT_STRIP_CSS', $camp_opt) && ! is_array($camp_general['cg_feed_custom_strip_id'])){ \n\t\t\n\t\t$cg_feed_custom_strip_id[] = $camp_general['cg_feed_custom_strip_id'];\n\t\t$cg_feed_custom_strip_id[] = $camp_general['cg_feed_custom_strip_id2'];\n\t\t$cg_feed_custom_strip_id[] = $camp_general['cg_feed_custom_strip_id3'];\n\t\t\n\t\t$cg_custom_strip_selector[] = $camp_general['cg_custom_strip_selector'];\n\t\t$cg_custom_strip_selector[] = $camp_general['cg_custom_strip_selector2'];\n\t\t$cg_custom_strip_selector[] = $camp_general['cg_custom_strip_selector3'];\n\t\t\n\t\t$cg_feed_custom_strip_id = array_filter($cg_feed_custom_strip_id);\n\t\t$cg_custom_strip_selector = array_filter($cg_custom_strip_selector);\n\t\t\n\t\t$camp_general['cg_feed_custom_strip_id'] = $cg_feed_custom_strip_id;\n\t\t$camp_general['cg_custom_strip_selector'] = $cg_custom_strip_selector;\n\t\t\n\t}\n\n\t$feedMd5 = md5($feed);\n\t$isItemsEndReached = get_post_meta ( $camp->camp_id , $feedMd5.'_isItemsEndReached',1);\n\t$lastProcessedFeedUrl = get_post_meta ( $camp->camp_id , $feedMd5.'_lastProcessedFeedUrl',1);\n\t$lastFirstFeedUrl = get_post_meta ( $camp->camp_id , $feedMd5.'_lastFirstFeedUrl',1);\n\t\n\t// check last time adition\n\t$feed = trim ( $feed );\n\t$myfeed = addslashes ( $feed );\n\t\n\t//removed @ v3.24\n\t/*\n\t$query = \"select * from {$this->wp_prefix}automatic_feeds_list where feed='$myfeed' and camp_id = '$camp->camp_id' limit 1\";\n\t$feeds = $this->db->get_results ( $query );\n\t$feed_o = $feeds [0];\n\t*/\n\n\t// report processed feed\n\t$this->log ( 'Process Feed', '<a href=\"' . $feed . '\">' . $feed . '</a>' );\n\n\t// If force feed\n\t\n\tif(in_array('OPT_FEED_FORCE', $camp_opt)){\n\t\n\t\tif(! function_exists('wp_automatic_force_feed')){\n\t\t\tadd_action('wp_feed_options', 'wp_automatic_force_feed', 10, 1);\n\t\t\tfunction wp_automatic_force_feed($feed) {\n\t\t\t\t$feed->force_feed(true);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Wrong feed length fix\n\tif( ! function_exists('wp_automatic_setup_curl_options') ){\n\t\t//feed timeout\n\t\tfunction wp_automatic_setup_curl_options( $curl ) {\n\t\t\tif ( is_resource( $curl ) ) {\n\t\t\t\t//curl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Expect:' ) );\n\t\t\t}\n\t\t}\n\t}\n\n\t\n\t \n\t// loading SimplePie\n\tinclude_once (ABSPATH . WPINC . '/feed.php');\n\t\n\t\n\n\t// Add action to fix the problem of curl transfer closed without complete data\n\tadd_action( 'http_api_curl', 'wp_automatic_setup_curl_options' );\n\tif( ! function_exists('wp_automatic_wp_feed_options') ){\n\t\tfunction wp_automatic_wp_feed_options($args){\n\n\t\t\t$args->set_useragent('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/41.0.2272.76 ');\n\t\t\t\t\n\t\t}\n\t\tadd_action('wp_feed_options','wp_automatic_wp_feed_options');\n\t}\n\n\t\n\t\n\t// Trim returned feed content because some feed add empty spaces before feed content \n\tif(!function_exists('wp_automatic_trim_feed_content')){\n\t\tfunction wp_automatic_trim_feed_content($args){\n\t\t\t\n\t\t\t \n\t\t\t$args['body'] = trim($args['body']);\n\t\t\t\n\t\t\t//$args['body'] = preg_replace('{article/(\\d+?)/}' , \"article/$1wpp/\", trim($args['body']) ) ; \n\t\t\t\n\t\t\treturn $args;\n\t\t}\n\t}\n\t\n\t\n\tadd_filter('http_response', 'wp_automatic_trim_feed_content');\n\n\tif(stristr($feed, 'news.google') && ! function_exists('wp_automatic_feed_options') ){\n\t\t\n\t\t// Fix Google news image stripped\n\t\t echo '<br>Google news feed found, disabling sanitization...';\n\t\t\n\t\tfunction wp_automatic_feed_options( $feed) {\n\t\t\n\t\t\t$feed->set_sanitize_class( 'SimplePie_Sanitize' );\n\t\t\t$feed->sanitize = new SimplePie_Sanitize;\n\t\t\n\t\t}\n\t\tadd_action( 'wp_feed_options', 'wp_automatic_feed_options' );\n\t}\n\t\n\t\n\t \n\t// If proxified download the feed content to a test file for\n\t//exclude multipage scraper as it is already a local feed /wp-content/uploads/277d7822fe5662e66d660a42eaae4910_837.xml\n\t$localFeed = '';\n\tif($this->isProxified && ! ( stristr( $feed , '.xml' ) && stristr( $feed , 'wp-content' ) ) ){\n\t\t//downloading the feed content \n\t\t//print_r( $this->download_file\n\t\t$downloadedFileUrl = $this->download_file($feed,'.html');\n\t\t\n\t\tif(trim($downloadedFileUrl) != ''){\n\t\t\t echo '<br>Feed downloaded using a proxy '.$downloadedFileUrl;\n\t\t\t$localFeed = $downloadedFileUrl.'?key='.md5(trim($feed));\n\t\t}\n\t\t\n\t\t\n\t}\n\t \n\t\n\t//fix ssl verification\n\tadd_filter( 'https_ssl_verify', '__return_false' );\n \n\t// Fetch feed content\n\tif(trim($localFeed) == ''){\n\t\t$rss = fetch_feed ( stripslashes( $feed ) );\n\t}else{\n\t\t echo '<br>Loaded locally';\n\t\t$rss = fetch_feed ($localFeed);\n\t}\n\t \n\tif(trim($rss->raw_data) == ''){\n\t\t echo '<br>Feed was loaded from cache';\n\t}else{\n\t\t echo '<br>Feed was freshly loaded from the source';\n\t}\n\t\n\t \n\t \n\t// Remove added filter\n\tremove_filter('http_response', 'wp_automatic_trim_feed_content');\n\n\tif (! is_wp_error ( $rss )){ // Checks that the object is created correctly\n\t\t// Figure out how many total items there are, but limit it to 5.\n\t\t$maxitems = $rss->get_item_quantity ();\n\t\t\n\t\t// Build an array of all the items, starting with element 0 (first element).\n\t\t$rss_items = $rss->get_items ( 0, $maxitems );\n\t\t\n\t\t//feed name \n\t\t$res['feed_name'] = $rss->get_title();\n\t\t \n\t\t//remove the expect again as it makes jetpack publicize to not work\n\t\tremove_action('http_api_curl', 'wp_automatic_setup_curl_options');\n\t\t\t\n\t\t\t\n\t}else{\n\t\t$error_string = $rss->get_error_message();\n\t\t echo '<br><strong>Error:</strong>' . $error_string ;\n\t}\n\t\n\tif (!isset($maxitems) || $maxitems == 0)\n\t\treturn false;\n\telse\n\t\t\t\n\t//reverse order if exists\n\tif(in_array('OPT_FEED_REVERSE', $camp_opt)){\n\t\t echo '<br>Reversing order';\n\t\t$rss_items = array_reverse($rss_items);\n\t}\n\n\t// Loop through each feed item and display each item as a hyperlink.\n\t$i = 0;\n\t$i2 = 0; // refer to items number in feed\n\t \n\tforeach ( $rss_items as $item ) :\n\t\n\t \n\t$url = esc_url ( $item->get_permalink () );\n\t$original_url = $url; // used for exclusion because the effective_url may change below\n\t\n\t//google news links correction \n\tif(stristr($url, 'news.google')){\n\t\t$urlParts = explode('url=', $url);\n\t\t$correctUrl = $urlParts[1];\n\t\t$url = $correctUrl;\n\t\t\n\t}\n\t\n\t//Google alerts links correction\n\tif(stristr($feed\t, 'alerts/feeds') && stristr($feed, 'google')){\n\t\tpreg_match('{url\\=(.*?)[&]}', $url,$urlMatches);\n\t\t$correctUrl = $urlMatches[1];\n\t\t\n\t\tif( trim($correctUrl) != '' ){\n\t\t\t$url =$correctUrl;\n\t\t}\n\t}\n\t\n\t//check if no new links: the last first url is the same\n\tif($i2 == 0){\n\t\t\n\t\tif($isItemsEndReached == 'yes'){\n\t\t\t\n\t\t\t//Last time there were no new links check if the case didn't change\n\t\t\tif( $lastFirstFeedUrl == md5($url) ){\n\t\t\t\t\n\t\t\t\t//still no new links stop checking now\n\t\t\t\t echo '<br>First url in the feed:'.$url;\n\t\t\t\t echo '<br>This link was the same as the last time we did not find new links so ... skipping till new posts get added <a href=\"#\" class=\"wp_automatic_ajax\" data-action=\"wp_automatic_ajax\" data-function=\"forget_lastFirstFeedUrl\" data-data=\"'.$feedMd5.'\" data-camp=\"'.$camp->camp_id.'\" >Forget this fact Now</a>.';\n\t\t\t\t\n\t\t\t\t//delete transient cache\n\t\t\t\tdelete_transient('feed_'.$feedMd5);\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t//new links found remove the isItemsEndReached flag\n\t\t\t\tdelete_post_meta($camp->camp_id,$feedMd5.'_isItemsEndReached');\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\t//Record first feed url\n\tif($i2 == 0){\n\t\tupdate_post_meta ( $camp->camp_id , $feedMd5.'_lastFirstFeedUrl',md5($url));\n\t}\n\t\n\t// one more link, increase index2\n\t$i2++;\n\t\t\n\tif(trim($url) == ''){\n\t\t echo '<br>item have no url skipping';\n\t\tcontinue;\n\t}\n\n\t// current post url\t\n\t echo '<br>Post url: '.$url;\n\t\n\t// post date\n\t$wpdate= $item->get_date ( \"Y-m-d H:i:s\");\n\t$publish_date = get_date_from_gmt($wpdate);\n\t echo '<br>- Published: '.$wpdate ;\n\t\n\t// post categories \n\t$cats= ($item->get_categories());\n\n\t// separate categories with commas\t\n\t$cat_str = '';\n\tif(isset($cats)){\n\t\tforeach($cats as $cat ){\n\t\t\tif(trim($cat_str) != '') $cat_str.= ',';\n\t\t\t$cat_str.= $cat->term;\n\t\t}\n\t}\n\t\t\n\t// fix empty titles\n\tif(trim($item->get_title ()) == ''){\n\t\t echo '<--Empty title skipping';\n\t\tcontinue;\n\t}\n\t\n\t//&# encoded chars\n\tif(stristr($url, '&#')){\n\t\t$url = html_entity_decode($url);\n\t}\n\t\t\n\t// check if execluded link due to exact match does not exists\n\tif( $this->is_execluded($camp->camp_id, $url)){\n\t\t echo '<-- Excluded link';\n\t\tcontinue;\n\t}\n\t\t\n\t// check if older than minimum date\n\tif($this->is_link_old($camp->camp_id, strtotime($wpdate) )){\n\t\t echo '<--old post execluding...';\n\t\tcontinue;\n\t}\n\t\t\n\t// check media images\n\tunset($media_image_url);\n\t$enclosures = $item->get_enclosures();\n\t\n\t $i=0;\n\tforeach ($enclosures as $enclosure){\n\n\t\tif(trim($enclosure->type) != ''){\n\t\t\n\t\t\t$enclosure_link = $enclosure->link;\n\t\t\t\n\t\t\t$res ['enclosure_link_'.$i] = $enclosure_link;\n\t\t\t\n\t\t\tif(isset($enclosure->type) && stristr($enclosure->type, 'image') && isset($enclosure->link) ){\n\t\t\t\t$media_image_url = $enclosure->link;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$i++;\n\t}\n\t\n\t\n\t\n\t\n\t// Duplicate check\n\tif (! $this->is_duplicate($url) ) {\n\n\t\t echo '<-- new link';\n\t \n\t\t$title = strip_tags( $item->get_title () );\n\t\t\n\t\t//fix &apos;\n\t\t$title = str_replace('&amp;apos;', \"'\", $title);\n\t\t$title = str_replace('&apos;', \"'\", $title);\n\t \n\t\t \n\t\t \n\t\t//check if there is a post published with the same title\n\t\tif(in_array('OPT_FEED_TITLE_SKIP',$camp_opt) ){\n\t\t\tif($this->is_title_duplicate($title,$camp->camp_post_type)){\n\t\t\t\t echo '<-- duplicate title skipping..';\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\n\t\t$i ++;\n\t\t\n\t\t// Date\n\t\t$date = $item->get_date ( 'j F Y g:i a' );\n\t\t$wpdate= $item->get_date ( \"Y-m-d H:i:s\");\n \t\n\t\t// post content\n\t\t$html = $item->get_content ();\n \n\t\t$postAuthor = $item->get_author();\n\t\t@$authorName = $postAuthor->name;\n\t\t\n\t\tif(trim($authorName) == ''){\n\t\t\t@$authorName = $postAuthor->email;\n\t\t}\n\t\t\n\t\tif(trim($authorName) == ''){\n\t\t\t@$authorName = $postAuthor->link;\n\t\t}\n\t\t\n\t\t$res['author'] = $authorName;\n\t\t@$res['author_link'] = $postAuthor->link;\n \n\t\t//source domain\n\t\t$res['source_domain'] = $parse_url = parse_url($url, PHP_URL_HOST );\n\t \t\n\t\t//encoded URL\n\t\t$res['source_url_encoded'] = urlencode($url);\n\t\t\n\t\t// If empty content make content = title\n\t\tif(trim($html) == ''){\n\t\t\tif( trim($title) != '' ) $html =$title;\n\t\t}\n\t\t\n\t\t// loging the feeds \n\t\t$md5 = md5 ( $url );\n\t\t \n\n\t\t//if not image escape it\n\t\t$res ['cont'] = $html;\n\t\t$res ['original_content']=$html;\n\t\t$res ['title'] = $title;\n\t\t$res ['original_title'] = $title;\n\t\t$res ['matched_content'] = $html;\n\t\t$res ['source_link'] = $url;\n\t\t$res ['publish_date'] = $publish_date;\n\t\t$res ['wpdate']=$wpdate;\n\t\t$res ['cats'] = $cat_str;\n\t\t$res ['tags'] = '';\n\t\t$res ['enclosure_link'] = isset( $enclosure_link ) ? $enclosure_link : '' ;\n\t\t\n\t\t\n\t\t\n\t\t//custom atributes\n\t\t$arr=array();\n\t\t$arrValues = array_values($item->data['child']);\n\t\t\n\t\tforeach ($arrValues as $arrValue){\n\t\t\tif(is_array($arrValue)){\n\t\t\t\t$arr = array_merge($arr,$arrValue);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$res['attributes'] = $arr;\n\n\t\t$og_title_enabled = in_array('OPT_FEED_OG_TTL', $camp_opt) || ( isset($camp_general['cg_ml_ttl_method']) && trim($camp_general['cg_ml_ttl_method']) != 'auto' ) ;\n\t\t\n\t\t \n\t\t// original post content \n\t\tif ( in_array('OPT_FULL_FEED',$camp_opt) || in_array ( 'OPT_FEED_CUSTOM', $camp_opt ) || in_array ( 'OPT_FEED_CUSTOM_R', $camp_opt ) || in_array ( 'OPT_ORIGINAL_META', $camp_opt ) || in_array ( 'OPT_ORIGINAL_CATS', $camp_opt ) || in_array ( 'OPT_ORIGINAL_TAGS', $camp_opt ) || in_array ( 'OPT_ORIGINAL_AUTHOR', $camp_opt ) || in_array ( 'OPT_FEED_PTF', $camp_opt ) || in_array ( 'OPT_FEEDS_OG_IMG', $camp_opt ) || $og_title_enabled ) {\n\t\t\n\t\t\techo '<br>Loading original post content ...';\n\t\t\t\n\t\t\t//get content\n\t\t\t$x='error';\n\t\t\tcurl_setopt ( $this->ch, CURLOPT_HTTPGET, 1 );\n\t\t\tcurl_setopt ( $this->ch, CURLOPT_URL, trim ( html_entity_decode( $url ) ));\n\t\t\t\n\t\t\t//encoding\n\t\t\tif(in_array('OPT_FEED_ENCODING' , $camp_opt )){\n\t\t\t\techo '<br>Clearing encoding..';\n\t\t\t\tcurl_setopt($this->ch, CURLOPT_ENCODING , \"\");\n\t\t\t}\n\t\t\t\n\t\t\t// Source page html\n\t\t\ttimer_start();\n\t\t\t$original_cont = $this->curl_exec_follow ( $this->ch );\n\t\t\t$x = curl_error ( $this->ch );\n\t\t \t\n\t\t\techo ' <--' . strlen($original_cont) . ' chars returned in ' . timer_stop() . ' seconds';\n\t\t\t\n\t\t\t//converting encoding\n\t\t\tif(in_array('OPT_FEED_CONVERT_ENC', $camp_opt) ){\n\t\t\t\techo '<br>Converting encoding from '.$camp_general['cg_feed_encoding']. ' to utf-8';\n\t\t\t\t$original_cont = iconv( trim($camp_general['cg_feed_encoding']).'//IGNORE' , \"UTF-8//IGNORE\", $original_cont );\n\t\t\t}\n\t\t\t\n\t\t\t//fix images\n\t\t\t$original_cont = $this->fix_relative_paths($original_cont, $url);\n\t\t\t\n\t\t\t//fix lazy loading\n\t\t\tif(in_array('OPT_FEED_LAZY',$camp_opt)){\n\t\t\t\t\n\t\t\t\t$cg_feed_lazy = trim($camp_general['cg_feed_lazy']);\n\t\t\t\t\n\t\t\t\tif( $cg_feed_lazy == '' ) $cg_feed_lazy = 'data-src';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tpreg_match_all('{<img .*?>}s', $original_cont,$imgsMatchs);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$imgsMatchs = $imgsMatchs[0];\n\t\t\t\t\n\t\t\t\tforeach($imgsMatchs as $imgMatch){\n\t\t\t\t\t\n\t\t\t\t\tif(stristr($imgMatch,$cg_feed_lazy )){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$newImg = $imgMatch;\n\t\t\t\t\t\t$newImg = preg_replace('{ src=\".*?\"}', '', $newImg);\n\t\t\t\t\t\t$newImg = str_replace($cg_feed_lazy, 'src', $newImg);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$original_cont = str_replace($imgMatch, $newImg, $original_cont);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$original_cont = $this->lazy_loading_auto_fix( $original_cont );\n\t\t\t}\n\t\t\t\n\t\t\n\t\t}//end-content-extraction\n\t\t\n\t\t\n\n\t\t// FULL CONTENT\n\t\tif ( in_array ( 'OPT_FULL_FEED', $camp_opt ) ) {\n\t\t\t \t\n\t\t\t \n\t\t\t// test url\n\t\t\t//$url =\"http://news.jarm.com/view/75431\";\n\t\t\t\t \n\t\t\t\n\t\t\t//get scripts\n\t\t\t$postponedScripts = array();\n\t\t\tpreg_match_all('{<script.*?</script>}s', $original_cont , $scriptMatchs);\n\t\t\t$scriptMatchs = $scriptMatchs[0];\n\t\t\t\n\t\t\t\n\t\t\tforeach ($scriptMatchs as $singleScript){\n\t\t\t\tif( stristr($singleScript, 'connect.facebook')){\n\t\t\t\t\t$postponedScripts[] = $singleScript;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$original_cont = str_replace($singleScript, '', $original_cont);\n\t\t\t}\n \t\t\t\n \t\t\t \n\t\t\t$x = curl_error ( $this->ch );\n\t\t\t$url = curl_getinfo($this->ch, CURLINFO_EFFECTIVE_URL);\n\t\t\t\n\t\t\t \n\t\t\t\t\n\t\t\t// Redability instantiate\n\t\t\trequire_once 'inc/wp_automatic_readability/wp_automatic_Readability.php';\n\t\t\t\n\t\t\t$wp_automatic_Readability = new wp_automatic_Readability ( $original_cont, $url );\n\t\t\t\n\t\t\t$wp_automatic_Readability->debug = false;\n\t\t\t$result = $wp_automatic_Readability->init ();\n\t\t\t\t\n\t\t\tif ($result) {\n\t\t\t\t\n\t\t\t\t// Redability title\n\t\t\t\t$title = $wp_automatic_Readability->getTitle ()->textContent;\n\t\t\t\t\n\t\t\t\t// Redability Content\n\t\t\t\t$content = $wp_automatic_Readability->getContent ()->innerHTML;\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t//twitter embed fix\n\t\t\t\tif(stristr($content, 'twitter.com') && ! stristr($content, 'platform.twitter')){\n\t\t\t\t\t$content.='<script async src=\"//platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>';\n\t\t\t\t}\n\n\t\t\t\t// Remove wp_automatic_Readability attributes\n\t\t\t\t$content = preg_replace('{ wp_automatic_Readability\\=\".*?\"}s', '', $content);\n\t\t\t\t\n\t\t\t\t// Fix iframe if exists\n\t\t\t\tpreg_match_all('{<iframe[^<]*/>}s', $content,$ifrMatches);\n\t\t\t\t$iframesFound = $ifrMatches[0];\n\t\t\t\t\n\t\t\t\tforeach ($iframesFound as $iframeFound){\n\t\t\t\t\t\n\t\t\t\t\t$correctIframe = str_replace('/>','></iframe>',$iframeFound);\n\t\t\t\t\t$content = str_replace($iframeFound, $correctIframe, $content);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//add postponed scripts \n\t\t\t\tif(count($postponedScripts) > 0 ){\n\t\t\t\t\t$content.= implode('', $postponedScripts);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t// Cleaning redability for better memory\n\t\t\t\tunset($wp_automatic_Readability);\n\t\t\t\tunset($result);\n\t\t\t\t\t\n\t\t\t\t// Check existence of title words in the content\n\t\t\t\t$title_arr=explode(' ', $title);\n\n\t\t\t\t$valid='';\n\t\t\t\t$nocompare=array('is','Is','the','The','this','This','and','And','or','Or','in','In','if','IF','a','A','|','-');\n\t\t\t\tforeach($title_arr as $title_word){\n\t\t\t\t\t\n\t\t\t\t\tif(strlen($title_word) > 3){\n\t\t\t\t\t\n\t\t\t\t\t\tif(! in_array($title_word, $nocompare) && preg_match('/\\b'. preg_quote(trim($title_word),'/') .'\\b/ui', $content)){\n\t\t\t\t\t\t\t echo '<br>Word '.$title_word .' exists';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t// echo $content;\n\t\t\t\t\t\t\t$valid='yeah';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t echo '<br>Word '.$title_word .' does not exists';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif(trim($valid) != ''){\n\n\t\t\t\t\t$res ['cont'] = $content;\n\t\t\t\t\t$res ['matched_content'] = $content;\n\t\t\t\t\t$res ['og_img'] = '';\n\t\t\t\t\t\n\t\t\t\t\tif(! in_array('OPT_FEED_TITLE_NO', $camp_opt)){\n\t\t\t\t\t\t$res ['title'] = $title;\n\t\t\t\t\t\t$res['original_title'] = $title;\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t\t// let's find og:image may be the content we got has no image\n\t\t\t\t\tpreg_match('{<meta[^<]*?property=[\"|\\']og:image[\"|\\'][^<]*?>}s', $html,$plain_og_matches);\n\n\t\t\t\t\tif( isset($plain_og_matches[0]) && @stristr($plain_og_matches[0], 'og:image')){\n\t\t\t\t\t\tpreg_match('{content=[\"|\\'](.*?)[\"|\\']}s', $plain_og_matches[0],$matches);\n\t\t\t\t\t\t$og_img = $matches[1];\n\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(trim($og_img) !=''){\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t$res ['og_img']=$og_img ;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}// If og:image\n \t\n\t\t\t\t}else{\n\t\t\t\t\t echo '<br>Can not make sure if the returned content is the full content.. using excerpt instead.';\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t echo '<br>Looks like we couldn\\'t find the full content. :( returning summary';\n\t\t\t}\n\t\t\t\n\t\t// Class or ID extraction\n\t\t\n\t\t}elseif(in_array ( 'OPT_FEED_CUSTOM', $camp_opt )){\n\t\t\t\t \n\t\t\t\n\t\t\t// Load dom\n\t\t\trequire_once 'inc/class.dom.php';\n\t\t\t$wpAutomaticDom = new wpAutomaticDom($original_cont);\n\t\t\t\n\t\t\t\n\t\t\t$cg_custom_selector=$camp_general['cg_custom_selector'];\n\t\t\t$cg_feed_custom_id =$camp_general['cg_feed_custom_id'];\n\t\t\t$cg_feed_custom_id=array_filter($cg_feed_custom_id);\n\t\t\t$cg_feed_css_size = $camp_general['cg_feed_css_size'];\n\t\t\t$cg_feed_css_wrap = $camp_general['cg_feed_css_wrap'];\n\n\t\t\techo '<br>Extracting content from original post for ';\n\t\t\t\n\t\t\t\t \n\t\t\t//test url\n\t\t\t//$url = \"http://news.jarm.com/view/75431\";\n\t\t\t$wholeFound = '';\n\t\t\tif(1){\n \t\t\t\t$i=0;\n\t\t\t\tforeach ($cg_feed_custom_id as $cg_selecotr_data){\n\t\t\t\t\t\n\t\t\t\t\t$cg_selector = $cg_custom_selector[$i];\n\t\t\t\t\t$cg_feed_css_size_s = $cg_feed_css_size[$i];\n\t\t\t\t\t$cg_feed_css_wrap_s = $cg_feed_css_wrap[$i];\n\t\t\t\t\t\n\t\t\t\t\techo '<br>'.$cg_selector . ' = \"'.$cg_selecotr_data.'\"';\n\t\t\t\t\t\n\t\t\t\t\tif( $cg_feed_css_wrap_s == 'inner' ){\n\t\t\t\t\t\t$inner = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$inner = false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif($cg_selector == 'xpath'){\n\t\t\t\t\t\t$ret= $wpAutomaticDom->getContentByXPath( stripslashes( $cg_selecotr_data ) ,$inner);\n\t\t\t\t\t\t \n\t\t\t\t\t}elseif($cg_selector == 'class'){\n\t\t\t\t\t\t$ret= $wpAutomaticDom->getContentByClass( $cg_selecotr_data,$inner);\n\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t}elseif($cg_selector== 'id'){\n\t\t\t\t\t\t$ret= $wpAutomaticDom->getContentByID( $cg_selecotr_data,$inner);\n\t\t\t\t\t}\n\t\n\t\t\t\t\t$extract='';\n\t\n\t\t\t\t\tforeach ($ret as $itm ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t $extract.= $itm;\n\t\n\t\t\t\t\t\tif( $cg_feed_css_size_s == 'single'){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t \n\t\t\t\t\t$rule_num = $i +1;\n\t\t\t\t\t$res['rule_'.$rule_num] = $extract;\n\t\t\t\t\t$res['rule_'.$rule_num.'_plain'] = strip_tags( $extract );\n\t\t\t\t\t\n\t\t\t\t\tif(trim($extract) == ''){\n\t\t\t\t\t\t echo '<br>Nothing found to extract for this rule' ;\n\t\t\t\t\t\t \n\t\t\t\t\t}else{\n\t\t\t\t\t\t echo ' <-- ' . strlen($extract) .' chars extracted';\n\t\t\t\t\t\t $wholeFound = (trim($wholeFound) == '' ) ? $extract : $wholeFound.'<br>'.$extract;\n\t\t\t\t\t\t \n\t\t\t\t\t}\n \t\t\t\t\t$i++;\n\t\t\t\t}\t\n\t\t\t\tif(trim($wholeFound) != ''){\n\t\t\t\t\t$res ['cont'] = $wholeFound;\n\t\t\t\t\t$res ['matched_content'] = $wholeFound;\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t echo '<br>could not parse the content returning summary' ;\n\t\t\t}\n\t\t\t\n\t\t// REGEX EXTRACT\t\n\t\t}elseif(in_array ( 'OPT_FEED_CUSTOM_R', $camp_opt )){\n\t\t\t\t\n\t\t\techo '<br>Extracting content using REGEX ';\n\t\t\t$cg_feed_custom_regex = $camp_general['cg_feed_custom_regex'];\n\t\t\t\n\t\t\t$finalmatch = '';\n\t\t\t\t\n\t\t\tforeach ($cg_feed_custom_regex as $cg_feed_custom_regex_single){\n\t\t\t\n\t\t\t$cg_feed_custom_regex_single = html_entity_decode( $cg_feed_custom_regex_single );\n \t\t\t\t\n\t\t\tif(trim($cg_feed_custom_regex_single) != '' ){\n\n\t\t\t\t$finalmatch2 = '';\n\n\t\t\t\t//we have a regex\n\t\t\t\techo '<br>Regex :'. htmlspecialchars($cg_feed_custom_regex_single);\n\n\n\t\t\t\t//extracting\n\t\t\t\tif(trim($original_cont) !=''){\n\t\t\t\t\tpreg_match_all('{'.$cg_feed_custom_regex_single.'}is', $original_cont,$matchregex);\n\t\t\t\t\t\t\n\t\t\t\t\tfor( $i=1 ; $i < count($matchregex);$i++ ){\n\n\t\t\t\t\t\tforeach($matchregex[$i] as $newmatch){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(trim($newmatch) !=''){\n\t\t\t\t\t\t\t\tif(trim($finalmatch) !=''){\n\t\t\t\t\t\t\t\t\t$finalmatch.='<br>'.$newmatch;\n\t\t\t\t\t\t\t\t\t$finalmatch2.='<br>'.$newmatch;\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$finalmatch.=$newmatch;\n\t\t\t\t\t\t\t\t\t$finalmatch2.=$newmatch;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\techo '<-- '.strlen($finalmatch2) .' chars found';\n\t\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\techo '<br>Can not load original content.';\n\t\t\t\t}\n \n\n\t\t\t}//rule not empty\n\n\t\t\t}//foreach rule\n\t\t\t\n\t\t\tif(trim($finalmatch) != ''){\n\t\t\t\t//overwirte\n\t\t\t\techo '<br>'. strlen($finalmatch) . ' chars extracted using REGEX';\n\t\t\t\t$res ['cont'] = $finalmatch;\n\t\t\t\t$res ['matched_content'] = $finalmatch;\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\techo '<br>Nothing extracted using REGEX using summary instead..';\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// redirect_url tag finding\n\t\t$redirect = '';\n\t\t$redirect = curl_getinfo($this->ch, CURLINFO_EFFECTIVE_URL);\n\t\t \n\t\tif(trim($redirect) != ''){\n\t\t\t$res ['redirect_url'] = $redirect;\n\t\t}\n\n\t\t// Stripping content using id or class from $res[cont]\n\t\tif(in_array('OPT_STRIP_CSS', $camp_opt)){\n\t\t\t\t\n\t\t\t echo '<br>Stripping content using:- ';\n\t\t\t\t\n\t\t\t$cg_selector = $camp_general['cg_custom_strip_selector'];\n\t\t\t$cg_selecotr_data = $camp_general['cg_feed_custom_strip_id'];\n\t\t\t$cg_selecotr_data = array_filter($cg_selecotr_data);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// Load dom\n\t\t\t$final_doc = new DOMDocument();\n\t\t\t\n\t\t\t//getting encoding \n\t\t\t\n\t\t\tpreg_match_all('{charset=[\"|\\']([^\"]+?)[\"|\\']}', $original_cont,$encMatches);\n\t\t\t$possibleCharSet = $encMatches[1];\n\t\t\t\n\t\t \n\t\t\t\n\t\t\t$possibleCharSet = isset($possibleCharSet[0]) ? $possibleCharSet[0] : '';\n\t\t\t\n\t\t\tif(trim($possibleCharSet) == '') $possibleCharSet = 'UTF-8';\n\t\t\t\n\t\t\t$charSetMeta = '<meta http-equiv=\"content-type\" content=\"text/html; charset=' . $possibleCharSet . '\"/>';\n\t\t\t\n\t\t\t$full_html = '<head>'.$charSetMeta.'</head><body>'. $res['cont'] . '</body>' ;\n\t\t\t$html_to_count = $full_html;\n\t\t\t\n\t\t\t@$final_doc->loadHTML( $full_html );\n\t\t\t\n\t\t\t$selector = new DOMXPath($final_doc);\n\t\t\t\n\t\t\t\n\t\t\t$i=0;\n\t\t\t$inner = false;\n\t\t\tforeach ( $cg_selecotr_data as $cg_selector_data_single ){\n\t\t\t\t\n\t\t\t\techo '<br> - ' . $cg_selector[$i]. ' = \"'.$cg_selector_data_single.'\" ';\n\t\t\t\t\n\t\t\t\tif(trim($cg_selector_data_single) != '' ){\n\t\t\t\t\t\n\t\t\t\t\tif($cg_selector[$i] == 'class'){\n\t\t\t\t\t\t$query_final = '//*[contains(attribute::class, \"' . trim($cg_selector_data_single) . '\")]';\n\t\t\t\t\t}elseif( $cg_selector[$i] == 'id'){\n\t\t\t\t\t\t$query_final = \"//*[@id='\" . trim($cg_selector_data_single) .\"']\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$countBefore = $this->chars_count( $html_to_count );\n\t\t\t\t\t\n\t\t\t\t\tforeach($selector->query($query_final) as $e ) {\n\t\t\t\t\t\t$e->parentNode->removeChild($e);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t$html_to_count = $final_doc->saveHTML($final_doc->documentElement);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$countAfter = $this->chars_count($res['cont']);\n\t\t\t\t\t\n\t\t\t\t\techo '<-- '. ( $countBefore - $countAfter ) . ' chars removed';\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$contentAfterReplacement = $final_doc->saveHTML($final_doc->documentElement);\n\t\t\t$contentAfterReplacement = str_replace( array('<html>' , '</html>' , '<body>' , '</body>' , $charSetMeta ) , '' , $contentAfterReplacement );\n\t\t\t$contentAfterReplacement = preg_replace('{<head>.*?</head>}','' , $contentAfterReplacement );\n\t\t\t\n\t\t\t$res['cont'] = trim( $contentAfterReplacement );\n\t\t\t\t \n\t\t\t\t//overwirte\n\t\t\t\t$res ['matched_content'] = $res ['cont'];\n \n\n\t\t\t \n\t\t\t\t\n\t\t}\n\n\t\t// Stripping content using REGEX\n\t\tif(in_array('OPT_STRIP_R', $camp_opt)){\n\t\t\t$current_content =$res ['matched_content'] ;\n\t\t\t$current_title=$res['title'];\n\t\t\t$cg_post_strip = html_entity_decode($camp_general['cg_post_strip']);\n\t\t\t\t\n\t\t\t$cg_post_strip=explode(\"\\n\", $cg_post_strip);\n\t\t\t$cg_post_strip=array_filter($cg_post_strip);\n\t\t\t\t\n\t\t\tforeach($cg_post_strip as $strip_pattern){\n\t\t\t\tif(trim($strip_pattern) != ''){\n\n\t\t\t\t\t//$strip_pattern ='<img[^>]+\\\\>';\n\n\t\t\t\t\t echo '<br>Stripping using REGEX:'.htmlentities($strip_pattern);\n\t\t\t\t\t\n\t\t\t\t\t $countBefore = $this->chars_count( $current_content );\n\t\t\t\t\t \n\t\t\t\t\t $current_content= preg_replace('{'.trim($strip_pattern).'}is', '', $current_content);\n\t\t\t\t\t\n\t\t\t\t\t $countAfter = $this->chars_count($current_content);\n\t\t\t\t\t \n\t\t\t\t\t echo ' <-- '. ( $countBefore - $countAfter ) . ' chars removed'; \n\t\t\t\t\t \n\t\t\t\t\t$current_title= preg_replace('{'.trim($strip_pattern).'}is', '', $current_title);\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t\t \n\t\t\tif(trim($current_content) !=''){\n\t\t\t\t$res ['matched_content'] =$current_content ;\n\t\t\t\t$res ['cont'] =$current_content ;\n\t\t\t}\n\t\t\t\t\n\t\t\tif(trim($current_title) !=''){\n\t\t\t\t$res ['matched_title'] =$current_title ;\n\t\t\t\t$res ['original_title'] =$current_title ;\n\t\t\t\t$res ['title'] =$current_title ;\n\n\t\t\t}\n\t\t\t\t\n\t\t}// end regex replace\n\t\t\n\t\t// strip tags\n\t\tif(in_array('OPT_STRIP_T', $camp_opt)){\n\t\t\t\n\t\t\t echo '<br>Stripping html tags...';\n\t\t\t\n\t\t\t$cg_allowed_tags = trim($camp_general['cg_allowed_tags']);\n\t\t\t\n\t\t\tif(! stristr($cg_allowed_tags, '<script')){\n\t\t\t\t$res ['matched_content'] = preg_replace( '{<script.*?script>}s', '', $res ['matched_content'] );\n\t\t\t\t$res ['cont'] = preg_replace( '{<script.*?script>}s', '', $res ['cont'] );\n\t\t\t\t\n\t\t\t\t$res ['matched_content'] = preg_replace( '{<noscript.*?noscript>}s', '', $res ['matched_content'] );\n\t\t\t\t$res ['cont'] = preg_replace( '{<noscript.*?noscript>}s', '', $res ['cont'] );\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$res ['matched_content'] = strip_tags(\t$res ['matched_content'] , $cg_allowed_tags) ;\n\t\t\t$res ['cont'] =strip_tags($res ['cont'] , $cg_allowed_tags) ;\n\t\t}\n\t\t\n\t\t// validate content size\n\t\t\n\t\t//MUST CONTENT\n\t\tif(in_array('OPT_MUST_CONTENT', $camp_opt)){\n\t\t\n\t\t\tif(trim($res['cont']) == ''){\n\t\t\t\t echo '<--No content excluding';\n\t\t\t\t$this->link_execlude( $camp->camp_id, $original_url );\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t//limit content\n\t\tif(in_array('OPT_MIN_LENGTH', $camp_opt)){\n\t\t\n\t\t\t$contentTextual = strip_tags($res['cont']);\n\t\t\t$contentTextual = str_replace(' ', '', $contentTextual);\n\t\t\t\n\t\t\tif(function_exists('mb_strlen'))\n\t\t\t{\n\t\t\t\t$contentLength = mb_strlen($contentTextual);\n\t\t\t}else{\n\t\t\t\t$contentLength = strlen($contentTextual);\n\t\t\t}\n\t\t\t\n\t\t\tunset($contentTextual);\n\t\t\n\t\t\t echo '<br>Content length:'.$contentLength;\n\t\t\n\t\t\tif( $contentLength < $camp_general['cg_min_length'] ){\n\t\t\t\t echo '<--Shorter than the minimum... Excluding';\n\t\t\t\t$this->link_execlude( $camp->camp_id, $original_url );\n\t\t\t\tcontinue;\n\t\t\n\t\t\t}\n\t\t\n\t\t}\n \n\t\t// Entity decode \n\t\tif(in_array('OPT_FEED_ENTITIES', $camp_opt)){\n\t\t\t echo '<br>Decoding html entities';\n\t\t\t\t\n\t\t\t//php 5.3 and lower convert &nbsp; to invalid charchters that broke everything\n\t\t\t\t\n\t\t\t$res ['original_title'] = str_replace('&nbsp;', ' ', $res ['original_title']);\n\t\t\t$res ['matched_content'] = str_replace('&nbsp;', ' ', $res ['matched_content']);\n\t\t\t\t\n\t\t\t$res ['original_title'] = html_entity_decode($res ['original_title'] , ENT_QUOTES | ENT_HTML401);\n\t\t\t$res ['title'] = html_entity_decode($res ['title'] , ENT_QUOTES | ENT_HTML401) ;\n\t\t\t\t\n\t\t\t\t\n\t\t\t$res ['matched_content'] = html_entity_decode($res ['matched_content'],ENT_QUOTES | ENT_HTML401 );\n\t\t\t$res ['cont'] = $res ['matched_content'];\n\t\t\n\t\t}// end entity decode\n\t\t\n\t\t\n\t\t// Clean googleads and <script tag\n\t\t$res['cont'] = preg_replace('{<ins.*?ins>}s', '', $res['cont']);\n\t\t$res['cont'] = preg_replace('{<ins.*?>}s', '', $res['cont']);\n\t\t\n\t\tif(! in_array('OPT_FEED_SCRIPT', $camp_opt))\n\t\t$res['cont'] = preg_replace('{<script.*?script>}s', '', $res['cont']);\n\t\t\n\t\t$res['cont'] = preg_replace('{\\(adsbygoogle.*?\\);}s', '', $res['cont']);\n\t\t$res ['matched_content'] = $res['cont'];\n \n\t\t// meta tags\n\t\tif(in_array('OPT_ORIGINAL_META', $camp_opt)){\n\t\t\t\n\t\t \t\n\t\t\t//extract all metas \n\t\t\tpreg_match_all('{<meta.*?>}s', $original_cont,$metaMatches);\n\t\t\t\n\t\t\t$allMeta = $metaMatches[0];\n\t\t\t\n\t\t\tforeach ($allMeta as $singleMeta){\n\t\t\t\t\n\t\t\t\tif(stristr($singleMeta, 'keywords')){\n\t\t\t\t\t\n\t\t\t\t\tif(preg_match('{name[\\s]?=[\\s]?[\"\\']keywords[\"\\']}', $singleMeta) ){\n\t\t\t\t\t\t\n\t\t\t\t\t\tpreg_match_all('{content[\\s]?=[\\s]?[\\'\"](.*?)[\\'\"]}s', $singleMeta,$realTagsMatches);\n\t\t\t\t\t\t$realTagsMatches = $realTagsMatches[1];\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(trim($realTagsMatches[0]) != ''){\n\t\t\t\t\t\t \n\t\t\t\t\t\t\techo '<br>Meta tags:'.$realTagsMatches[0];\n\t\t\t\t\t\t\t$res['tags'] = $realTagsMatches[0];\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t\n\t\n\t\t\t// Extract cats from original source\n\t\t\tif(in_array('OPT_ORIGINAL_CATS', $camp_opt) && trim($camp_general['cg_feed_custom_id_cat']) != ''){\n\t\t\t\t\n\t\t\t\techo '<br>Extracting original post categories ';\n\t\t\t\t\n\t\t\t\t$cg_selector_cat=$camp_general['cg_custom_selector_cat'];\n\t\t\t\t$cg_selecotr_data_cat=$camp_general['cg_feed_custom_id_cat'];\n\t\t\t\t$inner = false;\n\t\t\t\t\n\t\t\t\techo ' for '.$cg_selector_cat . ' = '.$cg_selecotr_data_cat;\n\t\t\t\t\n\t\t \n\t\t\t\t//dom class\n\t\t\t\tif(! isset($wpAutomaticDom)){\n\t\t\t\t\trequire_once 'inc/class.dom.php';\n\t\t\t\t\t$wpAutomaticDom = new wpAutomaticDom($original_cont);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(1){\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$extract='';\n\t\t\t\t\t\n\t\t\t\t\tif ($cg_selector_cat == 'class') {\n\t\t\t\t\t\t$extract = $wpAutomaticDom->getContentByClass ( $cg_selecotr_data_cat, $inner );\n\t\t\t\t\t} elseif ($cg_selector_cat == 'id') {\n\t\t\t\t\t\t$extract = $wpAutomaticDom->getContentByID ( $cg_selecotr_data_cat, $inner );\n\t\t\t\t\t} elseif ($cg_selector_cat == 'xpath') {\n\t\t\t\t\t\t$extract = $wpAutomaticDom->getContentByXPath ( stripslashes ( $cg_selecotr_data_cat ), $inner );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(is_array($extract)){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(in_array('OPT_SELECTOR_SINGLE_CAT', $camp_opt)){\n\t\t\t\t\t\t\t$extract = $extract[0];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$extract = implode(' ' , $extract);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(trim($extract) == ''){\n\t\t\t\t\t\techo '<br>Nothing found to extract for this category rule';\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo '<br>Cat Rule extracted ' . strlen($extract) .' charchters ';\n\t\t\t\t\t\t\n \n\t\t\t\t\t\tif(stristr($extract, '<a')){\n\t\t\t\t\t\t\tpreg_match_all('{<a .*?>(.*?)</a}su', $extract,$cats_matches);\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t$cats_founds = $cats_matches[1];\n\t\t\t\t\t\t\t$cat_founds = array_map('strip_tags', $cats_founds);\n\t\t\t\t\t\t\t$cats_str = implode(',', $cat_founds);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo ' found cats:'.$cats_str;\n\t\t\t\t\t\t\t$res['cats'] =$cats_str;\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\t\n\t\t\t}\n\t\t\t\n\t\t \n\t\t// Extract tags from original source\n\t\tif(in_array('OPT_ORIGINAL_TAGS', $camp_opt) && trim($camp_general['cg_feed_custom_id_tag']) != ''){\n\t\t\t\t\n\t\t\t echo '<br>Extracting original post tags ';\n\t\t\t\t\n\t\t\t$cg_selector_tag=$camp_general['cg_custom_selector_tag'];\n\t\t\t$cg_selecotr_data_tag=$camp_general['cg_feed_custom_id_tag'];\n\t\t\t$inner = false;\n\t\t\t \n\n\t\t\techo ' for '.$cg_selector_tag . ' = '.$cg_selecotr_data_tag;\n\n\t\t\t//dom class\n\t\t\tif(! isset($wpAutomaticDom)){\n\t\t\t\trequire_once 'inc/class.dom.php';\n\t\t\t\t$wpAutomaticDom = new wpAutomaticDom($original_cont);\n\t\t\t}\n\t\t\t\n\t\t\t \n\t\t\tif(1){\n\t\t\t\t\t\n\t\t\t \n\t\t\t\t$extract='';\n\t\t\t\t\t\n\t\t\t\tif ($cg_selector_tag == 'class') {\n\t\t\t\t\t$extract = $wpAutomaticDom->getContentByClass ( $cg_selecotr_data_tag, $inner );\n\t\t\t\t} elseif ($cg_selector_tag == 'id') {\n\t\t\t\t\t$extract = $wpAutomaticDom->getContentByID ( $cg_selecotr_data_tag, $inner );\n\t\t\t\t} elseif ($cg_selector_tag == 'xpath') {\n\t\t\t\t\t$extract = $wpAutomaticDom->getContentByXPath ( stripslashes ( $cg_selecotr_data_tag ), $inner );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(is_array($extract)){\n\t\t\t\t\t\n\t\t\t\t\tif(in_array('OPT_SELECTOR_SINGLE_TAG', $camp_opt)){\n\t\t\t\t\t\t$extract = $extract[0];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$extract = implode(' ' , $extract);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t \t\n\t\t\t\tif(trim($extract) == ''){\n\t\t\t\t\t echo '<br>Nothing found to extract for this tag rule';\n\t\t\t\t}else{\n\t\t\t\t\t echo '<br>Tag Rule extracted ' . strlen($extract) .' charchters ';\n\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\tif(stristr($extract, '<a')){\n\t\t\t\t\t\tpreg_match_all('{<a .*?>(.*?)</a}su', $extract,$tags_matches);\n \n\t\t\t\t\t\t$tags_founds = $tags_matches[1];\n\t\t\t\t\t\t$tags_founds = array_map('strip_tags', $tags_founds); \n\t\t\t\t\t\t \n\t\t\t\t\t\t$tags_str = implode(',', $tags_founds);\n\n\t\t\t\t\t\t echo ' Found tags:'.$tags_str;\n\t\t\t\t\t\t $res['tags'] =$tags_str;\n\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t \n\t\t\t\t\n\t\t}elseif(in_array('OPT_ORIGINAL_TAGS', $camp_opt)){\n\t\t\t\n\t\t\t echo '<br>You must add a valid ID/Class to Extract tags, No tags will get extracted.';\n\t\t\t\n\t\t}//extract tags\n\n\t\t//extract author from original source\n\t\tif(in_array('OPT_ORIGINAL_AUTHOR', $camp_opt) && trim( $camp_general['cg_feed_custom_id_author'] ) != '' ){\n\n\t\t\t echo '<br>Extracting original post author ';\n\n\t\t\t$cg_selector_author=$camp_general['cg_custom_selector_author'];\n\t\t\t$cg_selecotr_data_author=$camp_general['cg_feed_custom_id_author'];\n\t\t\t$inner = false;\n\n\t\t\t echo ' for '.$cg_selector_author . ' = '.$cg_selecotr_data_author;\n \n\t\t\t\t \n\t\t\t //dom class\n\t\t\t if(! isset($wpAutomaticDom)){\n\t\t\t \trequire_once 'inc/class.dom.php';\n\t\t\t \t$wpAutomaticDom = new wpAutomaticDom($original_cont);\n\t\t\t }\n\t\t\t \n\t\t\t\n\t\t\t\n\t\t\tif(1){\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t$extract='';\n\t\t\t\t\n\t\t\t\tif ($cg_selector_author == 'class') {\n\t\t\t\t\t$extract = $wpAutomaticDom->getContentByClass ( $cg_selecotr_data_author, $inner );\n\t\t\t\t} elseif ($cg_selector_author == 'id') {\n\t\t\t\t\t$extract = $wpAutomaticDom->getContentByID ( $cg_selecotr_data_author, $inner );\n\t\t\t\t} elseif ($cg_selector_author == 'xpath') {\n\t\t\t\t\t$extract = $wpAutomaticDom->getContentByXPath ( stripslashes ( $cg_selecotr_data_author ), $inner );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(is_array($extract)){\n\t\t\t\t\t\n\t\t\t\t\tif(in_array('OPT_SELECTOR_SINGLE_AUTHOR', $camp_opt)){\n\t\t\t\t\t\t$extract = $extract[0];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$extract = implode(' ' , $extract);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Validate returned author\n\t\t\t\tif(trim($extract) == ''){\n\t\t\t\t\t echo '<br>Nothing found to extract for this author rule';\n\t\t\t\t}else{\n\t\t\t\t\t echo '<br>author Rule extracted ' . strlen($extract) .' charchters ';\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\tif(stristr($extract, '<a')){\n\t\t\t\t\t\tpreg_match_all('{<a .*?>(.*?)</a}su', $extract,$author_matches);\n\n\t\t\t\t\t\t$author_founds = $author_matches[1];\n\t\t\t\t\t\t$author_str = strip_tags($author_founds[0]);\n\n\t\t\t\t\t\t echo ' Found author:'.$author_str;\n\t\t\t\t\t\t$res['author'] =$author_str;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t \n\t\t\t}\n\n\n\t\t}elseif(in_array('OPT_ORIGINAL_AUTHOR', $camp_opt)){\n\t\t\t\n\t\t\tif( trim($res['author']) == '' ){\n\t\t\t\n\t\t\t\t echo '<br>You must add a valid ID/Class to Extract Author, No Author will get extracted.';\n\t\t\t}\n\t\t\t\n\t\t}//extract author\n\n\n\t\tif(! in_array('OPT_ENCLUSURE', $camp_opt)){\n\t\t\tif( isset($media_image_url) && ! stristr($res['cont'], '<img') ){\n\t\t\t\t echo '<br>enclosure image:'.$media_image_url;\n\t\t\t\t$res['cont'] = '<img src=\"'.$media_image_url.'\" /><br>' . $res['cont'];\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t// Part to custom field OPT_FEED_PTF\n\t\t\n\t\t// Extracted custom fields ini\n\t\t$customFieldsArr = array();\n\t\t$ruleFields = array(); //fields names\n\t\t\n\t\tIf( in_array('OPT_FEED_PTF', $camp_opt) ){\n\t\t\t\n\t\t\techo '<br>Specific Part to custom field extraction';\n\t\t\t\n\t\t\t// Load rules\n\t\t\t$cg_part_to_field = trim( html_entity_decode( $camp_general['cg_part_to_field'] ) );\n\t\t\t$cg_part_to_field_parts = explode(\"\\n\", $cg_part_to_field);\n\t\t\t\n\t\t\t// Process rules\n\t\t\tforeach ( $cg_part_to_field_parts as $cg_part_to_field_part ){\n\t\t\t\t echo '<br>Rule:'.htmlentities($cg_part_to_field_part);\n\t\t\t\t\n\t\t\t\t// Validate format | \n\t\t\t\tif( ! stristr($cg_part_to_field_part, '|')){\n\t\t\t\t\t echo '<- Wrong format...';\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Parse rule\n\t\t\t\t$rule_parts = explode('|', $cg_part_to_field_part);\n\t\t\t\t\n\t\t\t\t$rule_method = trim( $rule_parts[0] );\n\t\t\t\t$rule_value = trim( $rule_parts[1] );\n\t\t\t\t$rule_field = trim( $rule_parts[2] );\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$rule_single = 0;\n\t\t\t\t@$rule_single = $rule_parts[3];\n\t\t\t\t\n\t\t\t\t// Validate rule\n\t\t\t\tif(trim($rule_method) == '' || trim($rule_value) == '' || trim($rule_field) == ''){\n\t\t\t\t\t echo '<- Wrong format...';\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$ruleFields[] = $rule_field;\n\t\t\t\t\n\t\t\t\t// Validate rule method: class,id,regex,xpath\n\t\t\t\tif( $rule_method != 'id' && $rule_method != 'class' && $rule_method != 'regex' && $rule_method != 'xpath' ){\n\t\t\t\t\t echo '<- Wrong Method:'.$rule_method;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t \n\t\t\t\t\n\t\t\t \n\t\t\t\t \n\t\t\t\t// id,class,xPath\n\t\t\t\tif( $rule_method == 'id' || $rule_method == 'class' || $rule_method == 'xpath' ){\n\t\t\t\t\t\n\t\t\t\t\t// Dom object\n\t\t\t\t\t$doc = new DOMDocument;\n\t\t\t\t\t\n\t\t\t\t\t// Load Dom\n\t\t\t\t\t@$doc->loadHTML($original_cont);\n\t\t\t\t\t\n\t\t\t\t\t// xPath object\n\t\t\t\t\t$xpath = new DOMXPath($doc);\n\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t// xPath query\n\t\t\t\t\tif($rule_method != 'xpath'){\n\t\t\t\t\t\t$xpathMatches = $xpath->query(\"//*[@\".$rule_method.\"='\".$rule_value.\"']\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$xpathMatches = $xpath->query(\"$rule_value\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t// Single item ? \n\t\t\t\t\tif($rule_single){\n\t\t\t\t\t\t$xpathMatches = array($xpathMatches->item(0));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Rule result ini\n\t\t\t\t\t$rule_result = '';\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\tforeach ($xpathMatches as $xpathMatch){\n\t\t\t\t\t\n\t\t\t\t\t\tif($rule_field == 'tags' || $rule_field == 'categories' ){\n\t\t\t\t\t\t\t$rule_result.= ',' . $xpathMatch->nodeValue;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$rule_result.= $xpathMatch->nodeValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t// Store field to be added\n\t\t\t\t\tif(trim($rule_result) != ''){\n\t\t\t\t\t\t echo ' <--'.$this->chars_count($rule_result). ' chars extracted';\n\t\t\t\t\t\t\n\t\t\t\t\t\t if( $rule_field == 'categories' ){\n\t\t\t\t\t\t \t$res['cats'] = $rule_result;\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t$customFieldsArr[] = array( $rule_field , $rule_result );\n\t\t\t\t\t\t }\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo '<-- nothing found';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t// Regex extract\n\t\t\t\t\t$matchregex = array();\n\t\t\t\t\t$finalmatch = '';\n\t\t\t\t\t\n\t\t\t\t\t// Match\n\t\t\t\t\tpreg_match_all('{'.trim($rule_value).'}is', $original_cont,$matchregex);\n\t\t\t\t\t\n\t\t\t\t\t$matchregex_vals = $matchregex[1];\n\t\t\t\t\t\n\t\t\t\t\tif(isset($matchregex[2])) $matchregex_vals = array_merge($matchregex_vals , $matchregex[2] );\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t//single match\n\t\t\t\t\tif($rule_single && count($matchregex_vals) > 1){\n\t\t\t\t\t\t$matchregex_vals = array($matchregex_vals[0]);\n\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t// Read matches\n\t\t\t\t\t\tforeach($matchregex_vals as $newmatch){\n\t\t\t\t\t\n\t\t\t\t\t\t\tif(trim($newmatch) !=''){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(trim($finalmatch) ==''){\n\t\t\t\t\t\t\t\t\t$finalmatch.=''.$newmatch;\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif($rule_field == 'tags' || $rule_field == 'categories' ){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t$finalmatch.= ',' . $newmatch;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t$finalmatch.=$newmatch;\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\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t// Store field to be added\n\t\t\t\t\tif(trim($finalmatch) != ''){\n\t\t\t\t\t\t\n\t\t\t\t\t\t echo ' <--'.$this->chars_count($finalmatch). ' chars extracted';\n\t\t\t\t\t \t\n\t\t\t\t\t\t \n\t\t\t\t\t\t if( $rule_field == 'categories' ){\n\t\t\t\t\t\t \t$res['cats'] = $finalmatch;\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t \t$customFieldsArr[] = array( $rule_field , $finalmatch );\n\t\t\t\t\t\t }\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t \t\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo '<-- Nothing found';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t \n\t\t\t}//foreach rule\n\t\t\t\n\t\t\t\n\t\t}//if part to field enabled\n\t\t \n\t\t$res['custom_fields'] = $customFieldsArr;\n\t\t\n\t\tforeach( $ruleFields as $field_name ){\n\t\t\t\n\t\t\t$field_value = ''; //ini\n\t\t\t\t\t\n\t\t\tforeach($customFieldsArr as $fieldsArray){\n\t\t\t\t\n\t\t\t\tif($fieldsArray[0] == $field_name ){\n\t\t\t\t\t$field_value = $fieldsArray[1] ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$res[$field_name] = $field_value;\n\t\t\t\n\t\t}\n\t\t \n\t \n\t\t\n\t\t//og:image check\n\n\t\t//$url=\"kenh14.vn/kham-pha/5-hoi-chung-benh-ky-quac-nghe-thoi-cung-toat-mo-hoi-hot-20151219200950753.chn\";\n\t\n\t\t$currentOgImage = '' ; // for og:image found check \n\t\t\n\t\tif( in_array('OPT_FEEDS_OG_IMG', $camp_opt)){\n \n\t\t\t\t\n\t\t\t//getting the og:image\n\t\t\t//let's find og:image\n\n\t\t\t// if no http\n\t\t\t$original_cont = str_replace('content=\"//', 'content=\"http://', $original_cont );\n\n\t\t\techo '<br>Extracting og:image :';\n\t\t\t\t\n\t\t\t//let's find og:image may be the content we got has no image\n\t\t\tpreg_match('{<meta[^<]*?property=[\"|\\']og:image[\"|\\'][^<]*?>}s', $original_cont,$plain_og_matches);\n\t\t\t\n\t\t\tif( isset($plain_og_matches[0]) && stristr($plain_og_matches[0], 'og:image')){\n\t\t\t\tpreg_match('{content=[\"|\\'](.*?)[\"|\\']}s', $plain_og_matches[0],$matches);\n\t\t\t\t$og_img = $matches[1];\n\t\t\t\t\n\t\t\t\tif(trim($og_img) !=''){\n\n\t\t\t\t\t$og_img_short = preg_replace('{http://.*?/}', '', $og_img);\n\t\t\t\t\techo $og_img_short ;\n\t\t\t\t\tif(trim($og_img_short) == ''){\n\t\t\t\t\t\t$og_img_short = $og_img;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// get og_title\n\t\t\t\t\tpreg_match_all('/<img .*>/', $original_cont,$all_images);\n\t\t\t\t\t\n\t\t\t\t\t$all_images = $all_images[0];\n\t\t\t\t\t$foundAlt = '';//ini\n\t\t\t\t\tforeach ($all_images as $single_image) {\n\t\t\t\t\t\tif(stristr( $single_image , $og_img_short)){\n\t\t\t\t\t\t\t//extract alt text\n\t\t\t\t\t\t\tpreg_match('/alt=[\"|\\'](.*?)[\"|\\']/', $single_image,$alt_matches) ;\n\t\t\t\t\t\t\t$foundAlt = (isset($alt_matches[1])) ? $alt_matches[1] : '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t$res ['og_img']=$og_img ;\n\t\t\t\t\t$res['og_alt'] = $foundAlt;\n\t\t\t\t\t$currentOgImage = $og_img;\n\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\n\t\t//fix FB embeds\n\t\tif(stristr($res['cont'], 'fb-post') && ! stristr($res['cont'], 'connect.facebook') ){\n\t\t\techo '<br>Possible Facebook embeds found adding embed scripts';\n\t\t\t$res['cont'].= '<div id=\"fb-root\"></div>\n<script async defer src=\"https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2\"></script>';\n\t\t}\n\t\t\n\t\t//fix twitter embeds\n\t\tif(stristr($res['cont'], 'twitter.com') && ! stristr($res['cont'], 'platform.twitter') ){\n\t\t\techo '<br>Possible tweets found without twitter JS. adding JS';\n\t\t\t$res['cont'].= '<script async src=\"https://platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>';\n\t\t}\n\t\t\n\t\t//fix instagram.com embeds\n\t\tif(stristr($res['cont'], 'instagram.com') && ! stristr($res['cont'], 'platform.instagram') ){\n\t\t\techo '<br>Possible Instagram embeds found without JS. adding JS';\n\t\t\t$res['cont'].= '<script async defer src=\"https://platform.instagram.com/en_US/embeds.js\"></script>';\n\t\t}\n\t\t\n\t\t//fix youtube no height embeds\n\t\tif(stristr($res['cont'], 'youtube.com/embed')){\n\t\t\t\n\t\t\tpreg_match_all('{<iframe[^>]*?youtube.com/embed/(.*?)\".*?>(?:</iframe>)?}',$res['cont'],$yt_matches);\n\t\t\t\n\t\t \n\t\t\t$yt_matches_full = $yt_matches[0];\n\t\t\t$yt_matches_ids = $yt_matches[1];\n\t\t\t\n\t\t\t\n\t\t\tif(count($yt_matches_full) > 0 ){\n\t\t\t\t\n\t\t\t\t$i = 0;\n\t\t\t\tforeach ($yt_matches_full as $embed){\n\t\t\t\t\t\n\t\t\t\t\techo '<br>Youtube video embed format changed to WordPress for video :'. $yt_matches_ids[$i] ;\n\t\t\t\t\t\n\t\t\t\t\t$res['cont'] = str_replace($embed , '[embed]https://www.youtube.com/watch?v=' . $yt_matches_ids[$i] . '[/embed]' , $res['cont'] ) ;\n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t \n\t\t}\n\t\t\t\n\t\t//check if image or not\n\t\tif( in_array ( 'OPT_MUST_IMAGE', $camp_opt ) && ! stristr($res['cont'], '<img') && trim($currentOgImage) == '' ) {\n\t\t\t\n\t\t\t echo '<br>Post contains no images skipping it ...';\n\t\t\t\n\t\t\t// Excluding it \n\t\t\t$this->link_execlude($camp->camp_id, $original_url);\n\n\t\t}else{\n\t\t\t \n\t\t\t\n\t\t\t\n\t\t\t \n\t\t\t\n\t\t\t//og image fix\n\t\t\tif( isset( $res ['og_img'] ) && trim($res ['og_img']) !=''){\n\t\t\t\t\n\t\t\t\t//make sure it has the domain\n\t\t\t\tif(! stristr($og_img, 'http:')){\n\t\t\t\t\tif(stristr($og_img, '//')){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$og_img = 'http:'. $og_img;\n\t\t\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t\n\t\t\t\t\t\t//no domain at all\n\t\t\t\t\t\t$og_img = '/'.$og_img;\n\t\t\t\t\t\t$og_img = str_replace('//', '/', $og_img);\n\t\t\t\t\t\t$og_img = 'http://'.$host.$og_img;\n\t\t\t\t\t\t$res ['og_img']=$og_img ;\n\t\t\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t \n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//og title or custom title extraction method\n\t\t\tif( in_array('OPT_FEED_OG_TTL', $camp_opt) || ( isset($camp_general['cg_ml_ttl_method']) && trim($camp_general['cg_ml_ttl_method']) != 'auto' ) ){\n\t\t\t\t\n\t\t\t\t \n\t\t\t\tif( in_array('OPT_FEED_OG_TTL', $camp_opt) ){\n\t\t\t\t\t// let's find og:image may be the content we got has no image\n\t\t\t\t\tpreg_match('{<meta[^<]*?property=[\"|\\']og:title[\"|\\'][^<]*?>}s', $original_cont,$plain_og_matches);\n\t\t\t\t\t\n\t\t \n\t\t\t\t\t\n\t\t\t\t\tif(@stristr($plain_og_matches[0], 'og:title')){\n\t\t\t\t\t\tpreg_match('{content[\\s]*=[\\s]*\"(.*?)\"}s', $plain_og_matches[0],$matches);\n\t\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\t$og_ttl = $matches[1];\n\t\t\t\t\t\n\t\t\t\t\t\techo '<br>og:title:'. html_entity_decode( htmlspecialchars_decode($og_ttl));\n\t\t\t\t\t\t \n\t\t\t\t\t\tif(trim($og_ttl) !=''){\n\t\t\t\t\t\t\t$og_ttl = htmlspecialchars_decode($og_ttl,ENT_QUOTES);\n\t\t\t\t\t\t\t$res ['title'] = html_entity_decode( $og_ttl) ;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}// If og:title\n\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t// custom extraction method\n\t\t\t\t\t$cg_ml_ttl_method = $camp_general['cg_ml_ttl_method'];\n\t\t\t\t\t\n\t\t\t\t\trequire_once 'inc/class.dom.php';\n\t\t\t\t\t$wpAutomaticDom = new wpAutomaticDom($original_cont);\n\t\t\t\t\t\n\t\t\t\t\t$finalContent = '';\n\t\t\t\t\t\n\t\t\t\t\tif ($cg_ml_ttl_method == 'visual') {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cg_ml_visual = $camp_general ['cg_ml_visual'];\n\t\t\t\t\t\t$path = isset ( $cg_ml_visual [0] ) ? $cg_ml_visual [0] : '';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (trim ( $path ) == '') {\n\t\t\t\t\t\t\techo '<br>No path found for pagination, please set the extraction rule for pagination if you want to make use of pagination.';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tforeach ( $cg_ml_visual as $xpath ) {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\techo '<br>Getting link for XPath:' . $path;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$finalContent = $wpAutomaticDom->getContentByXPath ( $xpath, false );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (is_array ( $finalContent ))\n\t\t\t\t\t\t\t\t\t$finalContent = implode ( '', $finalContent );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\techo '<-- ' . strlen ( $finalContent ) . ' chars';\n\t\t\t\t\t\t\t} catch ( Exception $e ) {\n\t\t\t\t\t\t\t\techo '<br>Error:' . $e->getMessage ();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ($cg_ml_ttl_method == 'css') {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cg_ml_css_type = $camp_general ['cg_ml_css_type'];\n\t\t\t\t\t\t$cg_ml_css = $camp_general ['cg_ml_css'];\n\t\t\t\t\t\t$cg_ml_css_wrap = $camp_general ['cg_ml_css_wrap'];\n\t\t\t\t\t\t$cg_ml_css_size = $camp_general ['cg_ml_css_size'];\n\t\t\t\t\t\t$finalContent = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\tforeach ( $cg_ml_css_type as $singleType ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($cg_ml_css_wrap [$i] == 'inner') {\n\t\t\t\t\t\t\t\t$inner = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$inner = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<br>Extracting content by ' . $cg_ml_css_type [$i] . ' : ' . $cg_ml_css [$i];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($cg_ml_css_type [$i] == 'class') {\n\t\t\t\t\t\t\t\t$content = $wpAutomaticDom->getContentByClass ( $cg_ml_css [$i], $inner );\n\t\t\t\t\t\t\t} elseif ($cg_ml_css_type [$i] == 'id') {\n\t\t\t\t\t\t\t\t$content = $wpAutomaticDom->getContentByID ( $cg_ml_css [$i], $inner );\n\t\t\t\t\t\t\t} elseif ($cg_ml_css_type [$i] == 'xpath') {\n\t\t\t\t\t\t\t\t$content = $wpAutomaticDom->getContentByXPath ( stripslashes ( $cg_ml_css [$i] ), $inner );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (is_array ( $content )) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ($cg_ml_css_size [$i] == 'single') {\n\t\t\t\t\t\t\t\t\t$content = $content [0];\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$content = implode ( \"\\n\", $content );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$finalContent .= $content . \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<-- ' . strlen ( $content ) . ' chars';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$i ++;\n\t\t\t\t\t\t} // foreach rule\n\t\t\t\t\t} elseif ($cg_ml_ttl_method == 'regex') {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cg_ml_regex = $camp_general ['cg_ml_regex'];\n\t\t\t\t\t\t$finalContent = '';\n\t\t\t\t\t\t$i = 0;\n\t\t\t\t\t\tforeach ( $cg_ml_regex as $cg_ml_regex_s ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<br>Extracting content by REGEX : ' . htmlentities ( stripslashes ( $cg_ml_regex_s ) );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$content = $wpAutomaticDom->getContentByRegex ( stripslashes ( $cg_ml_regex_s ) );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$content = implode ( $content );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo '<-- ' . strlen ( $content ) . ' chars';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (trim ( $content ) != '') {\n\t\t\t\t\t\t\t\t$finalContent .= $content . \"\\n\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$i ++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$possibleTitle = '';\n\t\t\t\tif(trim($finalContent) != ''){\n\t\t\t\t\t$possibleTitle = strip_tags($finalContent);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(trim($possibleTitle) != ''){\n\t\t\t\t\t$res ['original_title'] = html_entity_decode( $possibleTitle , ENT_QUOTES | ENT_HTML401);\n\t\t\t\t\t$res ['title'] = html_entity_decode($possibleTitle , ENT_QUOTES | ENT_HTML401) ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t \n\t\t\t}\n\t\t\t \n\t\t\treturn $res;\n\t\t}\n\n\t}else{\n\n\t\t//duplicated link\n\t\t echo ' <-- duplicate in post <a href=\"'. admin_url('post.php?post='.$this->duplicate_id.'&action=edit') .'\">#'.$this->duplicate_id.'</a>';\n\n\t}\n\tendforeach\n\t;\n\n\t echo '<br>End of feed items reached.';\n\t\n\t if(isset($camp->camp_sub_type) && $camp->camp_sub_type == 'Multi'){\n\t \t\n\t \tdelete_post_meta ( $camp->camp_id, 'wp_automatic_cache' );\n\t \t\n\t }else{\n\t \t\n\t \t// Set isItemsEndReached flag to yes\n\t \tupdate_post_meta($camp->camp_id,$feedMd5.'_isItemsEndReached' , 'yes' );\n\t }\n\t \n\t \n\t \n\t \n}", "function post_comments_feed_link($link_text = '', $post_id = '', $feed = '')\n {\n }", "function feed_links($args = array())\n {\n }", "function rss_feed_links() {\n\tadd_theme_support( 'automatic-feed-links' );\n}", "function broadcast_feed_links()\n{\n\tif ( get_option( 'permalink_structure' ) ) {\n\t\techo '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"' . get_bloginfo( 'name' ) . ' &raquo; ' . __( 'Feed', 'rabe' ) . '\" href=\"' . site_url( '/feed/' ) .'\" />';\n\t\techo '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"' . get_bloginfo( 'name' ) . ' &raquo; ' . get_broadcast_name() . ' ' . __( 'Broadcast Feed', 'rabe' ) . '\" href=\"' . site_url( '/broadcast/' . get_broadcast_slug() ) . '/feed/\" />';\n\t} else {\n\t\techo '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"' . get_bloginfo( 'name' ) . ' &raquo; ' . __( 'Feed', 'rabe' ) . '\" href=\"' . site_url( '/index.php?&feed=rss2' ) .'\" />';\n\t\techo '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"' . get_bloginfo( 'name' ) . ' &raquo; ' . get_broadcast_name() . ' ' . __( 'Broadcast Feed', 'rabe' ) . '\" href=\"' . site_url( '/index.php?broadcast=' . get_broadcast_slug() ) . '&feed=rss2\" />';\n\t}\n}", "public function getFeedLink();", "function auto_discovery_link_tags()\n{\n $html = '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"'. __('Omeka RSS Feed') . '\" href=\"'. html_escape(items_output_url('rss2')) .'\" />';\n $html .= '<link rel=\"alternate\" type=\"application/atom+xml\" title=\"'. __('Omeka Atom Feed') .'\" href=\"'. html_escape(items_output_url('atom')) .'\" />';\n return $html;\n}", "function permalink_single_rss($deprecated = '')\n {\n }", "function get_search_feed_link($search_query = '', $feed = '')\n {\n }", "function addFeedData($feedID,$url,$status=true,$update=0);", "function salmon_get_feed_link() {\n return \"<link rel='salmon' href='\".salmon_generate_api_url().\"'/>\";\n}", "function get_tag_feed_link($tag, $feed = '')\n {\n }", "function addLink(& $story, & $pageElement) {\t\t\n\t\t$storyElement =& $this->_document->createElement('link');\n\t\t$pageElement->appendChild($storyElement);\n\t\t\n\t\t$this->addCommonProporties($story, $storyElement);\n\t\t\n \t\t// description\n\t\t$shorttext =& $this->_document->createElement('description');\n\t\t$storyElement->appendChild($shorttext);\n\t\t$shorttext->appendChild($this->_document->createTextNode(htmlspecialchars($story->getField('shorttext'))));\n \t\t\n \t\t// file\n\t\t$longertext =& $this->_document->createElement('url');\n\t\t$storyElement->appendChild($longertext);\n\t\t$longertext->appendChild($this->_document->createTextNode(htmlspecialchars($story->getField(\"url\"))));\n\t\t\n\t\t$this->addStoryProporties($story, $storyElement);\n\t}", "function CreateSiteLinksFeed(FeedService $feedService) {\n // Create attributes.\n $textAttribute = new FeedAttribute();\n $textAttribute->type = 'STRING';\n $textAttribute->name = 'Link Text';\n $urlAttribute = new FeedAttribute();\n $urlAttribute->type = 'URL';\n $urlAttribute->name = 'Link URL';\n\n // Create the feed.\n $sitelinksFeed = new Feed();\n $sitelinksFeed->name = 'Feed For Site Links';\n $sitelinksFeed->attributes = array($textAttribute, $urlAttribute);\n $sitelinksFeed->origin = 'USER';\n\n // Create operation.\n $operation = new FeedOperation();\n $operation->operator = 'ADD';\n $operation->operand = $sitelinksFeed;\n\n $operations = array($operation);\n\n // Add the feed.\n $result = $feedService->mutate($operations);\n\n $savedFeed = $result->value[0];\n $savedAttributes = $savedFeed->attributes;\n\n return array(\n 'feedId' => $savedFeed->id,\n 'textAttributeId' => $savedAttributes[0]->id,\n 'urlAttributeId' => $savedAttributes[1]->id,\n );\n}", "function get_author_feed_link($author_id, $feed = '')\n {\n }", "public function add_new_feed(){\n\t\tadd_feed( 'wptticsfeeds', array( $this, 'generate_feed' ) );\n\t}", "function adjacent_post_link($format, $link, $in_same_term = \\false, $excluded_terms = '', $previous = \\true, $taxonomy = 'category')\n {\n }", "function comments_rss_link($link_text = 'Comments RSS')\n {\n }", "function df_store_url_link($s = null) {return df_store_url($s, S::URL_TYPE_LINK);}", "function get_adjacent_post_link($format, $link, $in_same_term = \\false, $excluded_terms = '', $previous = \\true, $taxonomy = 'category')\n {\n }", "public function link();", "function do_feed_rdf()\n {\n }", "function get_post_type_archive_feed_link($post_type, $feed = '')\n {\n }", "public function AddFeedAtom($atomLink = '') {\r\n\tif (empty($atomLink)) {\r\n\t if ($this->FeedTitle->offsetExists('link')) {\r\n\t\t$this->FeedAtom->offsetSet('href', $this->FeedTitle->offsetGet('link'));\r\n\t\treturn TRUE;\r\n\t }\r\n\t return FALSE;\r\n\t}\r\n\t$this->FeedAtom->offsetSet('href', $atomLink);\r\n\treturn TRUE;\r\n }", "function _post_format_link($link, $term, $taxonomy)\n {\n }", "function string_rss_links( $p_string ) \r\n{\r\n\t// rss can not start with &nbsp; which spaces will be replaced into by string_display().\r\n\t$t_string = trim( $p_string );\r\n\r\n\t// same steps as string_display_links() without the preservation of spaces since &nbsp; is undefined in XML.\r\n\t$t_string = string_strip_hrefs( $t_string );\r\n\t$t_string = string_html_specialchars( $t_string );\r\n\t$t_string = string_restore_valid_html_tags( $t_string );\r\n\t$t_string = string_nl2br( $t_string );\r\n\t$t_string = string_insert_hrefs( $t_string );\r\n\t$t_string = string_process_bug_link( $t_string, /* anchor */ true, /* detailInfo */ false, /* fqdn */ true );\r\n\t$t_string = string_process_bugnote_link( $t_string, /* anchor */ true, /* detailInfo */ false, /* fqdn */ true );\r\n\t$t_string = string_process_cvs_link( $t_string );\r\n\t# another escaping to escape the special characters created by the generated links\r\n\t$t_string = string_html_specialchars( $t_string );\r\n\r\n\treturn $t_string;\r\n}", "public function addTweetEntityLinks($tweet) {\n // actual tweet as a string\n $tweetText = $tweet[\"text\"];\n\n // create an array to hold urls\n $tweetEntites = array();\n\n // add each url to the array\n foreach( $tweet[\"entities\"][\"urls\"] as $url ) {\n $tweetEntites[] = array (\n 'type' => 'url',\n 'curText' => $url[\"url\"],\n 'newText' => \"<a href='\" .\n $url['expanded_url'] .\n \"'>\" .\n $url[\"display_url\"] .\n \"</a>\"\n );\n }\n\n // add each user mention to the array\n foreach ( $tweet[\"entities\"][\"user_mentions\"] as $mention ) {\n $string = $mention[\"screen_name\"];\n $tweetEntites[] = array (\n 'type' => 'mention',\n 'curText' => $string,\n 'newText' => \"<a href='http://twitter.com/\" .\n $mention[\"screen_name\"] .\n \"' target='_blank'>\" .\n $string .\n \"</a>\"\n );\n }\n\n // add each hashtag to the array\n foreach ( $tweet[\"entities\"][\"hashtags\"] as $tag ) {\n $string = $tag[\"text\"];\n $tweetEntites[] = array (\n 'type' => 'hashtag',\n 'curText' => $string,\n 'newText' => \"<a href='http://twitter.com/search?q=%23\" .\n $tag['text'] .\n \"&src=hash' target='_blank'>\" .\n $string . \"</a>\"\n );\n }\n\n // replace the old text with the new text for each entity\n foreach ( $tweetEntites as $entity ) {\n $tweetText = str_replace( $entity['curText'], $entity['newText'], $tweetText );\n $tweetText = preg_replace('/[^(\\x20-\\x7F\\p{Sc})]/u', '', $tweetText);\n }\n\n return $tweetText;\n\n }", "function updateDocmanLink($sessionKey, $group_id, $item_id, $title, $description, $status, $obsolescence_date, $content, $permissions, $metadata, $owner, $create_date, $update_date) {\n if ($content !== null) $extraParams['item']['link_url'] = $content;\n return _updateDocmanDocument($sessionKey, $group_id, $item_id, $title, $description, $status, $obsolescence_date, PLUGIN_DOCMAN_ITEM_TYPE_LINK, $permissions, $metadata, $owner, $create_date, $update_date, $extraParams); \n}", "abstract public function addEntry($long_url, $short_uri = null);", "function get_term_feed_link($term, $taxonomy = '', $feed = '')\n {\n }", "function avia_link_content_filter($current_post)\n\t{\n\t\t$link \t\t= \"\";\n\t\t$newlink = false;\n\t\t$pattern1 \t= '$^\\b(https?|ftp|file)://[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|]$i';\n\t\t$pattern2 \t= \"!^\\<a.+?<\\/a>!\";\n\t\t$pattern3 \t= \"!\\<a.+?<\\/a>!\";\n\n\t\t//if the url is at the begnning of the content extract it\n\t\tpreg_match($pattern1, $current_post['content'] , $link);\n\t\tif(!empty($link[0]))\n\t\t{\n\t\t\t$link = $link[0];\n\t\t\t$markup = avia_markup_helper(array('context' => 'entry_title','echo'=>false));\n\t\t\t$current_post['title'] = \"<a href='$link' rel='bookmark' title='\".__('Link to:','avia_framework').\" \".the_title_attribute('echo=0').\"' $markup>\".get_the_title().\"</a>\";\n\t\t\t$current_post['content'] = preg_replace(\"!\".str_replace(\"?\", \"\\?\", $link).\"!\", \"\", $current_post['content'], 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpreg_match($pattern2, $current_post['content'] , $link);\n\t\t\tif(!empty($link[0]))\n\t\t\t{\n\t\t\t\t$link = $link[0];\n\t\t\t\t$current_post['title'] = $link;\n\t\t\t\t$current_post['content'] = preg_replace(\"!\".str_replace(\"?\", \"\\?\", $link).\"!\", \"\", $current_post['content'], 1);\n\t\t\t\t\n\t\t\t\t$newlink = get_url_in_content( $link );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpreg_match($pattern3, $current_post['content'] , $link);\n\t\t\t\tif(!empty($link[0]))\n\t\t\t\t{\n\t\t\t\t\t$current_post['title'] = $link[0];\n\t\t\t\t\t\n\t\t\t\t\t$newlink = get_url_in_content( $link[0] );\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($link)\n\t\t{\n\t\t\tif(is_array($link)) $link = $link[0];\n\t\t\tif($newlink) $link = $newlink;\n\t\t\t\n\t\t\t$heading = is_singular() ? \"h1\" : \"h2\";\n\n\t\t\t//$current_post['title'] = \"<{$heading} class='post-title entry-title \". avia_offset_class('meta', false). \"'>\".$current_post['title'].\"</{$heading}>\";\n\t\t\t$current_post['title'] = \"<{$heading} class='post-title entry-title' \".avia_markup_helper(array('context' => 'entry_title','echo'=>false)).\">\".$current_post['title'].\"</{$heading}>\";\n\t\t\t\n\t\t\t//needs to be set for masonry\n\t\t\t$current_post['url'] = $link;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$current_post = avia_default_title_filter($current_post);\n\t\t}\n\n\t\treturn $current_post;\n\t}", "function add_feed($feedname, $callback)\n {\n }", "public function addLink(string $name, array $attributes);", "function link_to_items_rss($text = null, $params = array())\n{\n if (!$text) {\n $text = __('RSS');\n }\n return '<a href=\"' . html_escape(items_output_url('rss2', $params)) . '\" class=\"rss\">' . $text . '</a>';\n}", "function add_feed_sid($binfo) {\r\n\t\r\n\t$owa = owa_getInstance();\r\n\t\r\n\t$test = strpos($binfo, \"feed=\");\r\n\t\r\n\tif ($test == true):\r\n\t\t$newbinfo = $owa->add_feed_tracking($binfo);\r\n\t\r\n\telse: \r\n\t\t\r\n\t\t$newbinfo = $binfo;\r\n\t\t\r\n\tendif;\r\n\t\r\n\treturn $newbinfo;\r\n\r\n}", "public function getLinkFun() {}", "function the_permalink_rss()\n {\n }", "function get_edit_bookmark_link($link = 0)\n {\n }", "function _links_add_base($m)\n {\n }", "function hook_culturefeed_social_activity_link_alter(array &$build, $activity_type, CultuurNet\\Search\\ActivityStatsExtendedEntity $extended_entity) {\n}", "function addCategoryLink($object) {\n /* you can itentify the article with $object->reference->ShopId */ \n $object->Item->ShopId = 'yourReturnedLinkIdOnMarketplace_'.rand(1000, 9999); \n}", "function bookmark_tools_forward_old_link($hook, $type, $return, $params) {\n \n $result = $return;\n $parts = $return['segments'];\n \n switch ($parts[0]) {\n case 'list':\n default:\n $owner = get_entity($parts[1]);\n if (!$owner) {\n return $result; // 404\n }\n $url = elgg_get_site_url() . 'bookmarks/owner/' . $owner->username;\n if (elgg_instanceof($owner, 'group', '', 'ElggGroup')) {\n $url = elgg_get_site_url() . 'bookmarks/group/' . $owner->guid . '/all';\n }\n \n forward($url);\n return FALSE;\n break;\n }\n }", "function edit_bookmark_link($link = '', $before = '', $after = '', $bookmark = \\null)\n {\n }", "function the_content_rss($more_link_text = '(more...)', $stripteaser = 0, $more_file = '', $cut = 0, $encode_html = 0)\n {\n }", "public function addLink($link, $updated_at)\n {\n $link_object = new CustomObject;\n $link_object->link = $link;\n $link_object->updated_at = $updated_at;\n\n $this->links[] = $link_object;\n }", "function adjacent_posts_rel_link_wp_head()\n {\n }", "function AddLink($long_url)\n\t{\n\t\t$data['redirect_link'] = $long_url;\n\t\t$this->db->insert('links', $data);\t\t\n\t\treturn dechex(mysql_insert_id());\n\t}", "function next_post_link($format = '%link &raquo;', $link = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }", "function newsstats_feed_links( $post ) {\n\n $links = array();\n $post_id = $post->ID;\n $url = newsstats_get_rss_url( $post_id ); // RSS file\n\n $xml = ( $url ) ? newsstats_get_xml( $url ) : false;\n $links = ( $xml ) ? newsstats_get_xml_links( $xml ) : false;\n\n if ( ! $links ) { // Try parsing with string-between function.\n $links = newsstats_parse_xml_items( $url );\n }\n\n return $links;\n}", "function sc_featured_link( $attr, $content='' ) {\n\treturn '<div class=\"featured-link\">' . do_shortcode( $content ) . '</div>'; // use divs to work around WP autoformatting\n}", "function get_link($bookmark_id, $output = \\OBJECT, $filter = 'raw')\n {\n }", "function smarty_function_mtlink($args, &$ctx) {\n // status: incomplete\n // parameters: template, entry_id\n static $_template_links = array();\n $curr_blog = $ctx->stash('blog');\n if (isset($args['template'])) {\n if (!empty($args['blog_id']))\n $blog = $ctx->mt->db()->fetch_blog($args['blog_id']);\n else\n $blog = $ctx->stash('blog');\n\n $name = $args['template'];\n $cache_key = $blog->id . ';' . $name;\n if (isset($_template_links[$cache_key])) {\n $link = $_template_links[$cache_key];\n } else {\n $tmpl = $ctx->mt->db()->load_index_template($ctx, $name, $blog->id);\n $site_url = $blog->site_url();\n if (!preg_match('!/$!', $site_url)) $site_url .= '/';\n $link = $site_url . $tmpl->template_outfile;\n $_template_links[$cache_key] = $link;\n }\n if (!$args['with_index']) {\n $link = _strip_index($link, $curr_blog);\n }\n return $link;\n } elseif (isset($args['entry_id'])) {\n $arg = array('entry_id' => $args['entry_id']);\n list($entry) = $ctx->mt->db()->fetch_entries($arg);\n $ctx->localize(array('entry'));\n $ctx->stash('entry', $entry);\n $link = $ctx->tag('EntryPermalink',$args);\n $ctx->restore(array('entry'));\n if ($args['with_index'] && preg_match('/\\/(#.*)$/', $link)) {\n $index = $ctx->mt->config('IndexBasename');\n $ext = $curr_blog->blog_file_extension;\n if ($ext) $ext = '.' . $ext; \n $index .= $ext;\n $link = preg_replace('/\\/(#.*)?$/', \"/$index\\$1\", $link);\n }\n return $link;\n }\n return '';\n}", "public static function pushFeed2($text, $bean, $link_type=false, $link_url=false)\n {\n self::pushFeed(\n $text,\n $bean->module_dir,\n $bean->id,\n $bean->assigned_user_id,\n $link_type,\n $link_url\n );\n }", "function redirectToSource($linkid) {\r\n\tglobal $wpdb;\r\n\t$wpdb->update(WP_BARDB_LINKS,array('link_behavior'=>1),array('id'=>$linkid),array('%d'),array('%d'));\r\n}", "private function convertLinks(){\n\t\tif(!isset($this->course['course_links']))\n\t\t\treturn;\n\t\t\n\t\t//Create folder in tmp for links\n mkdir('./tmp/links');\n\t\t$sectionCounter = 0;\n\n\t\t//Add section to manifest\n\t\tHelper::addIMSSection($this->manifest, $this->currentSectionCounter, $this->identifierCounter, 'Links');\n\n $section = $this->manifest->organizations->organization->item->item[$this->currentSectionCounter];\n \n\t\t//First add all general links\n\t\t\n\t\tforeach($this->course['course_links'] as $link_url)\n\t\t{\n\t\t\tif(intval($link_url['category'])==0)\n\t\t\t{\n\t\t\t\t//Create the xml\n\t\t\t\tHelper::createLinkXML($link_url);\t\t\t\t\n\t\n\t\t\t\t//Edit the manifest\n\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'link', $link_url, 0);\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tforeach($this->course['course_link_categories'] as $cat)\n\t\t{\n\t\t\t//Add the label to the manifest\n\t\t\tHelper::addIMSLabel($section, $sectionCounter, $this->identifierCounter, $cat['name'], 0);\n\n\t\t\t//Add links below the label\n\t\t\tforeach($this->course['course_links'] as $link_url)\n\t\t\t{\n\t\t\t\tif(intval($link_url['category'])==$cat['id'])\n\t\t\t\t{\n\t\t\t\t\t//Create the xml\n\t Helper::createLinkXML($link_url); \n\t\t\t\t\t\n \t\t//Edit the manifest\n\t\t\t\t\tHelper::addIMSItem($section, $this->manifest, $sectionCounter, $this->identifierCounter, $this->resourceCounter, 'link', $link_url, 1);\n \t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Proceed to next section\n\t\t$this->currentSectionCounter++;\n\t\t\t\n\t\t\n\t}", "private function yoast_news() {\n\t\t$extra_links = '<li class=\"facebook\"><a href=\"https://www.facebook.com/yoast\">' . __( 'Like Yoast on Facebook', 'helpscout-docs-api' ) . '</a></li>';\n\t\t$extra_links .= '<li class=\"twitter\"><a href=\"https://twitter.com/yoast\">' . __( 'Follow Yoast on Twitter', 'helpscout-docs-api' ) . '</a></li>';\n\t\t$extra_links .= '<li class=\"email\"><a href=\"https://yoast.com/newsletter/\">' . __( 'Subscribe by email', 'helpscout-docs-api' ) . '</a></li>';\n\n\t\t$this->rss_news( 'https://yoast.com/feed/', __( 'Latest news from Yoast', 'helpscout-docs-api' ), $extra_links );\n\t}", "function wlwmanifest_link()\n {\n }", "function _ti_amg_fw_topics_do_drush_fix_urls($nid, &$context) {\n $node = node_load($nid);\n\n if (!empty($node->field_left_nav_links[LANGUAGE_NONE])) {\n foreach ($node->field_left_nav_links[LANGUAGE_NONE] as $delta => $link) {\n if (substr($link['url'], -1) == '/' && substr_count($link['url'], 'http://www.foodandwine.com')) {\n $node->field_left_nav_links[LANGUAGE_NONE][$delta]['url'] = substr($link['url'], 0, -1);\n\n $context['results'][$nid] = TRUE;\n }\n }\n }\n\n // Save it\n if ($context['results'][$nid]) {\n node_save($node);\n $context['message'] = t('Fixed links on page %title.',\n array('%title' => $node->title)\n );\n\n // Get it published\n if (function_exists('state_flow_load_state_machine')) {\n $state_flow = state_flow_load_state_machine($node);\n $state_flow->fire_event('publish', 1);\n }\n }\n else {\n $context['message'] = t('Links on page @title were already OK.',\n array('@title' => $node->title)\n );\n }\n}", "function addLink($link){\r\n if(!$this->isURLExistingInLinkArry($link->getURL())){\r\n $this->crawlPage($link);\r\n }\r\n \r\n }", "function get_category_feed_link($cat, $feed = '')\n {\n }", "public function setLink($link);", "function wac_create_link($string) {\n\t$url = '@(http)?(s)?(://)?(([a-zA-Z])([-\\w]+\\.)+([^\\s\\.]+[^\\s]*)+[^,.\\s])@';\n\treturn preg_replace($url, 'http$2://$4', $string);\n}", "function do_feed_rss()\n {\n }", "function tfnm_parse_link( $text, $url ){\n $start = strpos( $text, 'href=\"\"' );\n return substr_replace( $text, 'href=\"' . esc_url( $url ) . '\"', $start, strlen('href=\"\"') );\n}", "function addPageRSS(& $link, & $parentElement) {\n\t\t$linkElement =& $this->_document->createElement('pageRSS');\n\t\t$parentElement->appendChild($linkElement);\n\t\t\n\t\t$this->addCommonProporties($link, $linkElement);\n\t\t\n\t\t// url\n\t\t$url =& $this->_document->createElement('url');\n\t\t$linkElement->appendChild($url);\n\t\t$url->appendChild($this->_document->createTextNode(htmlspecialchars($link->getField('url'))));\n\t\t\n\t\t$url->setAttribute('maxItems', $link->getField(\"archiveby\"));\n\t\t\n\t\tif ($link->getField('location') == 'right')\n\t\t\t$linkElement->setAttribute('location', 'right');\n\t\telse\n\t\t\t$linkElement->setAttribute('location', 'left');\n\t}", "public function getRssLinkRel()\n {\n global $module;\n \n $rssVersion2 = $this->getRssUri('2.0');\n return '<link rel=\"alternate\" type=\"application/rss+xml\" '\n . 'title=\"RSS 2.0\" href=\"' . $rssVersion2 . '\" />' . \"\\n\";\n }", "public function add_links($links)\n {\n }", "function owa_post_link($link) {\r\n\r\n\t$owa = owa_getInstance();\r\n\r\n\treturn $owa->add_link_tracking($link);\r\n\t\t\r\n}", "function linkify_tweet($tweet) {\n\n //Convert urls to <a> links\n $tweet = preg_replace(\"/([\\w]+\\:\\/\\/[\\w-?&;#~=\\.\\/\\@]+[\\w\\/])/\", \"<a target=\\\"_blank\\\" href=\\\"$1\\\">$1</a>\", $tweet);\n\n //Convert hashtags to twitter searches in <a> links\n $tweet = preg_replace(\"/#([A-Za-z0-9\\/\\.]*)/\", \"<a target=\\\"_new\\\" href=\\\"http://twitter.com/search?q=$1\\\">#$1</a>\", $tweet);\n\n //Convert attags to twitter profiles in <a> links\n $tweet = preg_replace(\"/@([A-Za-z0-9\\/\\.]*)/\", \"<a href=\\\"http://www.twitter.com/$1\\\">@$1</a>\", $tweet);\n\n return $tweet;\n\n}", "public function addNewsfeed($url)\n {\n $this->rssFeed[] = $url;\n }", "function clean_feeds() {\r\n\t\t//var_dump($this->file);\r\n\t\tif(strpos($this->code, '<feed xmlns=\"http://www.w3.org/2005/Atom\"') === false && strpos($this->code, '<feed xmlns=\"https://www.w3.org/2005/Atom\"') === false) { // this is not a feed file\r\n\t\t\r\n\t\t} else {\r\n\t\t\tinclude_once('feed_generator' . DS . 'FeedWriter.php');\r\n\t\t\t//include('feed_generator' . DS . 'FeedWriter.php');\r\n\t\t\t$changed_feed_file = false;\r\n\t\t\t$TestFeed = new FeedWriter(ATOM);\r\n\t\t\t\r\n\t\t\t$feed_pos = strpos($this->code, '<feed');\r\n\t\t\t$first_entry_pos = strpos($this->code, '<entry');\r\n\t\t\t$header_code = substr($this->code, $feed_pos, $first_entry_pos - $feed_pos);\r\n\t\t\tpreg_match_all('/<id[^<>]*?>(.*?)<\\/id>/is', $header_code, $id_matches);\r\n\t\t\t//print('$id_matches: ');var_dump($id_matches);exit(0);\r\n\t\t\tif(sizeof($id_matches[0]) === 1) {\r\n\t\t\t\t$current_id = $id_matches[1][0];\r\n\t\t\t} else {\r\n\t\t\t\tprint('Found other than one ID in Atom RSS header...');var_dump($header_code);exit(0);\r\n\t\t\t}\r\n\t\t\tpreg_match_all('/<link[^<>]*? href=\"([^\"]*?)\"[^<>]*?>(.*?)<\\/link>/is', $header_code, $link_matches);\r\n\t\t\tif(sizeof($id_matches[0]) === 1) {\r\n\t\t\t\t$current_link = $link_matches[1][0];\r\n\t\t\t} else { // we have to be a bit more clever\r\n\t\t\t\t$found_default_link = false;\r\n\t\t\t\tforeach($link_matches[0] as $index => $value) {\r\n\t\t\t\t\tif(strpos($link_matches[0][$index], 'rel=\"self\"') !== false) {\r\n\t\t\t\t\t\t$found_default_link = true;\r\n\t\t\t\t\t\t$current_link = $link_matches[1][$index];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif($found_default_link) {\r\n\t\t\t\t\tprint('Could not find default link for Atom RSS feed file...');var_dump($header_code);exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$generated_id = $TestFeed->uuid($current_link, 'urn:uuid:');\r\n\t\t\tif($generated_id !== $current_id) {\r\n\t\t\t\t$this->code = str_replace($current_id, $generated_id, $this->code);\r\n\t\t\t\t$this->logMsg('Feed file ID with link: ' . $current_link . ' was changed.');\r\n\t\t\t\t$changed_feed_file = true;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tpreg_match_all('/<entry(.*?)<\\/entry>/is', $this->code, $entry_matches);\r\n\t\t\t$counter = sizeof($entry_matches[0]) - 1;\r\n\t\t\twhile($counter > -1) {\r\n\t\t\t\t$entry_match = $initial_entry_match = $entry_matches[0][$counter];\r\n\t\t\t\tpreg_match_all('/<id[^<>]*?>(.*?)<\\/id>/is', $entry_match, $id_matches);\r\n\t\t\t\tif(sizeof($id_matches[0]) === 1) {\r\n\t\t\t\t\t$current_id = $id_matches[1][0];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprint('Found other than one ID in an Atom RSS entry...');var_dump($entry_match);exit(0);\r\n\t\t\t\t}\r\n\t\t\t\tpreg_match_all('/<link[^<>]*? href=\"([^\"]*?)\"[^<>]*?>(.*?)<\\/link>/is', $entry_match, $link_matches);\r\n\t\t\t\tif(sizeof($id_matches[0]) === 1) {\r\n\t\t\t\t\t$current_link = $link_matches[1][0];\r\n\t\t\t\t} else { // we have to be a bit more clever\r\n\t\t\t\t\t$found_default_link = false;\r\n\t\t\t\t\tforeach($link_matches[0] as $index => $value) {\r\n\t\t\t\t\t\tif(strpos($link_matches[0][$index], 'rel=\"self\"') !== false) {\r\n\t\t\t\t\t\t\t$found_default_link = true;\r\n\t\t\t\t\t\t\t$current_link = $link_matches[1][$index];\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\tif($found_default_link) {\r\n\t\t\t\t\t\tprint('Could not find default link for an Atom RSS entry...');var_dump($entry_match);exit(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$generated_id = $TestFeed->uuid($current_link, 'urn:uuid:');\r\n\t\t\t\tif($generated_id !== $current_id) {\r\n\t\t\t\t\t//var_dump($generated_id, $current_id);\r\n\t\t\t\t\t//print('current_id: ');var_dump($current_id);\r\n\t\t\t\t\t//print('generated_id: ');var_dump($generated_id);\r\n\t\t\t\t\t$entry_match = str_replace($current_id, $generated_id, $entry_match);\r\n\t\t\t\t\t$this->logMsg('ID on entry with link: ' . $current_link . ' was changed.');\r\n\t\t\t\t}/* else {\r\n\t\t\t\t\tprint('hi3740650056<br>');\r\n\t\t\t\t}*/\r\n\t\t\t\t//print('here37485969707<br>');\r\n\t\t\t\tif($entry_match != $initial_entry_match) {\r\n\t\t\t\t\t//print('here37485969708<br>');\r\n\t\t\t\t\t$this->code = str_replace($initial_entry_match, $entry_match, $this->code);\r\n\t\t\t\t\t$changed_feed_file = true;\r\n\t\t\t\t}\r\n\t\t\t\t$counter--;\r\n\t\t\t}\r\n\t\t\t//print('here37485969709<br>');\r\n\t\t\tif($changed_feed_file) {\r\n\t\t\t\t//print('here37485969710<br>');\r\n\t\t\t\t//var_dump(date(\"Y-m-d\"), time(\"Y-m-d\"));\r\n\t\t\t\t$this->code = preg_replace('/<feed([^<>]*?)>(.*?)<updated>([0-9]{4})\\-([0-9]{2})\\-([0-9]{2})([^<>]*?)<\\/updated>/is', '<feed$1>$2<updated>' . date(\"Y-m-d\") . '$6</updated>', $this->code);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function linkAdd() { return \"\"; }", "function make_link($string)\n {\n $string = ' ' . $string;\n $string = preg_replace_callback(\"#(^|[\\n ])([\\w]+?://.*?[^ \\\"\\n\\r\\t<]*)#is\", \"shorten_link\", $string);\n $string = preg_replace(\"#(^|[\\n ])((www|ftp)\\.[\\w\\-]+\\.[\\w\\-.\\~]+(?:/[^ \\\"\\t\\n\\r<]*)?)#is\", \"$1<a href=\\\"http://$2\\\">$2</a>\", $string);\n #$string = preg_replace(\"#(^|[\\n ])([a-z0-9&\\-_.]+?)@([\\w\\-]+\\.([\\w\\-\\.]+\\.)*[\\w]+)#i\", \"\\\\1<a href=\\\"mailto:\\\\2@\\\\3\\\">\\\\2@\\\\3</a>\", $string);\n $string = mb_substr($string, 1, mb_strlen($string, CHARSET), CHARSET);\n return $string;\n }", "function we_tag_linkToSEEM($attribs, $content){\n\tt_e('deprecated', __FUNCTION__);\n\treturn we_tag('linkToSeeMode', $attribs, $content);\n}", "public function feed(string $link)\n {\n $dom = new \\DOMDocument();\n $dom->load($link);\n\n $items = $dom->getElementsByTagName($this->template::$ITEM_TAG);\n\n foreach ($items as $item) {\n $sub_dom = new \\DOMDocument();\n $sub_dom->appendChild($sub_dom->importNode($item, true));\n\n array_push($this->items, array(\n 'link' => self::getElementContent($sub_dom, $this->template::$LINK_TAG),\n 'title' => self::getElementContent($sub_dom, $this->template::$TITLE_TAG),\n 'description' => self::getElementContent($sub_dom, $this->template::$DESCRIPTION_TAG),\n 'date' => self::getElementContent($sub_dom, $this->template::$DATE_TAG),\n 'language' => self::getElementContent($sub_dom, $this->template::$LANGUAGE_TAG),\n ));\n }\n }", "function add_links($string)\n{\n\t$string = preg_match(\"/((ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?)/\", \"<a href='\\\\0' target='_blank'>\\\\0</a>\", $string);\n\t\n\treturn $string;\n}", "function lean_links($links, $attributes = array('class' => 'links')) {\n \n // Link 'Add a comment' link to node page instead of comments reply page\n if($links['comment_add']['href']){\n $arr_linkparts = explode('/', $links['comment_add']['href']);\n $links['comment_add']['href'] = 'node/'.$arr_linkparts[2];\n }\n // Don't show 'reply' link for comments\n unset($links['comment_reply']);\n \n return theme_links($links, $attributes);\n}", "function get_next_post_link($format = '%link &raquo;', $link = '%title', $in_same_term = \\false, $excluded_terms = '', $taxonomy = 'category')\n {\n }", "function linktag($destination, $content, $class='', $style='', $id='', $extra='', $title_alt='')\n\t{\n\t\t$content = ($this->entitize_content) ? htmlentities('' . $content) : $content;\n\t\t$extra .= ' href=\"' . $destination . '\"';\n\t\t$extra .= ($title_alt == '' ? '' : ' alt=\"' . $title_alt . '\" title=\"' . $title_alt . '\"');\n\t\treturn $this->tag('a', $content, $class, $style, $id, $extra);\n\t}", "function news_link() {\n global $wp;\n $current_url = home_url(add_query_arg(array(),$wp->request));\n if (stripos($current_url, 'th') !== false) {\n $page = get_page_by_path('news-events-th');\n } else {\n $page = get_page_by_path('news-events');\n }\n the_permalink($page);\n}", "function get_search_comments_feed_link($search_query = '', $feed = '')\n {\n }", "function renderFilterCreationLink() {\n\t\t$content = tslib_CObj::getSubpart($this->fileContent, '###NEWFILTER_LINK###');\n\n\t\tif (!isset($this->conf['newfilter_link.']['form_url.']['parameter'])) {\n\t\t\t$this->conf['newfilter_link.']['form_url.']['parameter'] = $GLOBALS['TSFE']->id;\n\t\t}\n\t\t$this->conf['newfilter_link.']['form_url.']['returnLast'] = 'url';\n\t\t$content = tslib_cObj::substituteMarker($content, '###FORM_URL###', $this->cObj->typolink('', $this->conf['newfilter_link.']['form_url.']));\n\n\t\treturn $content;\n\t}", "function mgl_instagram_format_link($str)\n{\n // Remove http:// and https:// from url\n $str = preg_replace('#^https?://#', '', $str);\n return $str;\n}", "function get_shortcut_link()\n {\n }", "function tck_add_new_link( $return, $url, $keyword, $title ) {\n if ( $return['status'] == 'success' ) {\n $fkeyword = tck_get_keyword($keyword);\n $return['url']['keyword'] = $fkeyword;\n $return['shorturl'] = yourls_site_url(false) . '/' . $fkeyword;\n }\n \n return $return;\n }", "public function maybe_make_link($url)\n {\n }", "function wp_make_link_relative($link)\n {\n }", "function dvs_change_blog_links($post_link, $id=0){\n\n $post = get_post($id);\n\n if( is_object($post) && $post->post_type == 'post'){\n return home_url('/my-prefix/'. $post->post_name.'/');\n }\n\n return $post_link;\n}", "function register_block_core_social_link()\n {\n }" ]
[ "0.6778361", "0.67182124", "0.64651215", "0.6393721", "0.6378318", "0.6240546", "0.62273055", "0.6194639", "0.61402667", "0.61052424", "0.608226", "0.6079509", "0.59695506", "0.5967263", "0.59559053", "0.5943738", "0.594368", "0.5939042", "0.5911689", "0.5880697", "0.5873591", "0.5872323", "0.5845759", "0.58321214", "0.5812861", "0.5807981", "0.57733446", "0.5772014", "0.5758771", "0.5737862", "0.57131124", "0.57112586", "0.5692527", "0.5691609", "0.5678026", "0.5650811", "0.56468517", "0.56457436", "0.5645473", "0.5624887", "0.5623763", "0.5617567", "0.561401", "0.56111896", "0.55838865", "0.556874", "0.55619174", "0.5546709", "0.5540062", "0.5538199", "0.5533311", "0.5512578", "0.5493914", "0.54926497", "0.5489515", "0.5488591", "0.5480328", "0.54698867", "0.54630214", "0.54605126", "0.54569197", "0.5453955", "0.54380375", "0.54334307", "0.542808", "0.5424533", "0.5421247", "0.54201883", "0.5408187", "0.5406276", "0.54045033", "0.5402556", "0.5401603", "0.53925383", "0.53789395", "0.5371898", "0.536664", "0.5364854", "0.5357958", "0.5353922", "0.5349754", "0.5345886", "0.53456044", "0.53448784", "0.5344778", "0.5341617", "0.53402287", "0.5324243", "0.5317747", "0.53171647", "0.53136843", "0.53091216", "0.5296042", "0.5277775", "0.5277545", "0.52773786", "0.5263701", "0.52632725", "0.5262851", "0.52619743" ]
0.7680712
0
Run the database seeds.
public function run() { $data = [ ['short_title' => 'android','title'=>'安卓端'], ['short_title' => 'web','title'=>'web端'], ['short_title' => 'ios','title'=>'ios端'], ['short_title' => 'wx','title'=>'微信端'], ['short_title' => 'pc','title'=>'电脑端'], ]; Platform::insert($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }", "public function run()\n {\n \t$roles = DB::table('roles')->pluck('id');\n \t$sexes = DB::table('sexes')->pluck('id');\n \t$faker = \\Faker\\Factory::create();\n\n \tforeach (range(1,20) as $item) {\n \t\tDB::table('users')->insert([\n \t\t\t'role_id' => $faker->randomElement($roles),\n \t\t\t'sex_id' => $faker->randomElement($sexes),\n \t\t\t'name' => $faker->firstName . ' ' . $faker->lastName,\n \t\t\t'dob' => $faker->date,\n \t\t\t'bio' => $faker->text,\n \t\t\t'created_at' => now(),\n \t\t\t'updated_at' => now()\n \t\t]);\n \t} \n }" ]
[ "0.80130625", "0.79795986", "0.79764974", "0.79524934", "0.7950615", "0.79505694", "0.7944086", "0.7941758", "0.7938509", "0.79364634", "0.79335415", "0.7891555", "0.78802574", "0.78790486", "0.7878107", "0.7875447", "0.78703815", "0.7869534", "0.7851931", "0.7850407", "0.7840015", "0.78331256", "0.7826906", "0.78172284", "0.7807776", "0.78024083", "0.78023773", "0.7799859", "0.77994525", "0.77955437", "0.7790015", "0.77884936", "0.7786196", "0.77790534", "0.7776279", "0.7765613", "0.7761798", "0.7760838", "0.7760613", "0.7760611", "0.7759328", "0.7757682", "0.775591", "0.7752759", "0.774942", "0.7748997", "0.7745014", "0.7728245", "0.7727775", "0.77277344", "0.7716621", "0.77139914", "0.7713781", "0.77135956", "0.7713254", "0.7711222", "0.7710622", "0.7710614", "0.77104497", "0.77100515", "0.770471", "0.77039754", "0.7703702", "0.770327", "0.7702392", "0.7700962", "0.7700507", "0.7698413", "0.76974845", "0.7697178", "0.7696662", "0.76933604", "0.76916313", "0.76898587", "0.7689098", "0.76864886", "0.76862013", "0.76860833", "0.7685714", "0.7683389", "0.76831365", "0.7679125", "0.76774627", "0.767677", "0.7676274", "0.76719916", "0.76704824", "0.76679665", "0.7667335", "0.7667264", "0.76645994", "0.7662546", "0.76618296", "0.7660438", "0.76583356", "0.76564723", "0.76530147", "0.7651929", "0.7651548", "0.7651444", "0.76511025" ]
0.0
-1
Checking if user has submitted report
public function isReported($user,$component,$component_id) { if(!is_object($user)) return 0; $reports = $this->getQueryBuilder() ->where("r.user_reporting = :user") ->andWhere("r.component = :component") ->andWhere("r.componentId = :component_id") ->setParameter("user",$user->getId()) ->setParameter("component",$component) ->setParameter("component_id",$component_id) ->getQuery(); $rep = $reports->getResult(); if($rep) return 1; return 2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isReported()\n\t{\n\t\tif ($this->get('reports', -1) > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t// Reports hasn't been set\n\t\tif ($this->get('reports', -1) == -1)\n\t\t{\n\t\t\tif (is_file(Component::path('com_support') . DS . 'models' . DS . 'report.php'))\n\t\t\t{\n\t\t\t\tinclude_once Component::path('com_support') . DS . 'models' . DS . 'report.php';\n\n\t\t\t\t$val = \\Components\\Support\\Models\\Report::all()\n\t\t\t\t\t->whereEquals('referenceid', $this->get('id'))\n\t\t\t\t\t->whereEquals('category', 'pubreview')\n\t\t\t\t\t->total();\n\n\t\t\t\t$this->set('reports', $val);\n\n\t\t\t\tif ($this->get('reports') > 0)\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\treturn false;\n\t}", "function check_form_submitted()\n {\n $query = $this->recruitment_model->get_faculty_info($this->user_id);\n if($query->num_rows()==1)\n {\n if($query->row()->final_submission==1)\n {\n return 1;\n }\n else\n {\n return 0;\n }\n }\n return 0;\n }", "function isSubmittedBy();", "function can_view_report() {\n //make sure context libraries are loaded\n $this->require_dependencies();\n\n //make sure the current user can view reports in at least one course context\n $contexts = get_contexts_by_capability_for_user('cluster', $this->access_capability, $this->userid);\n return !$contexts->is_empty();\n }", "function can_do_add() {\n //try to obtain the report shortname directly from the url parameter\n //(applies only during the first step of the wizard interface)\n $report_shortname = $this->optional_param('report', '', PARAM_ALPHAEXT);\n\n //try to obtain the report shortname from the workflow information\n //(applies only after the first step of the wizard interface)\n if ($report_shortname == '' && isset($this->workflow)) {\n $data = $this->workflow->unserialize_data();\n if ($data !== NULL && isset($data['report'])) {\n $report_shortname = $data['report'];\n }\n }\n\n if ($report_shortname === '') {\n //report info not found, so disallow\n return false;\n }\n\n //check permissions via the report\n $report_instance = php_report::get_default_instance($report_shortname, NULL, php_report::EXECUTION_MODE_SCHEDULED);\n return $report_instance !== false;\n }", "public function isReport()\n {\n return $this->getName() === 'report';\n }", "function reportUser(){\n\t\t\t$this->load->model('User_model');\n\t\t\t$userID = $_POST[\"userID\"];\n\t\t\t$reason = $_POST[\"reason\"];\n\t\t\t\n\t\t\t$data = array('userID'=>$userID, 'reason'=>$reason);\n\t\t\t$query = $this->User_model->reportUserModel($data);\n\t\t\t\n\t\t\tif($query){\n\t\t\t\techo 'reported';\n\t\t\t}\t\t\t\n\t\t}", "function can_view_report() {\n\n //no default restrictions, implement restrictions in report instance class\n return true;\n }", "public function isSubmitted();", "function reportExistsForUser( $userid, $reporttype, $getline ) {\r\n\t\tif( $this->getReportNameForUser( $userid, $reporttype, $getline ) )\r\n\t\t\treturn true;\r\n\t\treturn false;\r\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 isReported()\n\t{\n\t\treturn ($this->get('state') == static::ANSWERS_STATE_REPORTED);\n\t}", "public function actionReportuser(){\n $type = htmlentities($_GET['type']);\n $page = preg_replace('/[^-a-zA-Z0-9_]/', '', $type);\n $id = (int) $_GET['id'];\n $reason = htmlentities($_GET['reason']);\n if($type == 'others' && $reason != ''){\n $type = $reason;\n }\n $report = new FlagReports;\n $report->reported_by = \\Yii::$app->user->getId();\n $report->user_id = $id;\n $report->report = $type;\n $report->datetimestamp = date('Y-m-d H:i:s', time());\n if($report->save()){\n echo \"true\";\n }else{\n echo \"false\";\n }\n }", "function checkPermissionReport() {\n\t\tif ($_SESSION['log_report']!=='1'){\n\t\t\theader('Location: start.php');\n\t\t\tdie();\n\t\t}\n\t}", "function incompleteSubmissionExists($monographId, $userId, $pressId) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT\tsubmission_progress\n\t\t\tFROM\tmonographs\n\t\t\tWHERE\tmonograph_id = ? AND\n\t\t\t\tuser_id = ? AND\n\t\t\t\tpress_id = ? AND\n\t\t\t\tdate_submitted IS NULL',\n\t\t\tarray($monographId, $userId, $pressId)\n\t\t);\n\t\t$returner = isset($result->fields[0]) ? $result->fields[0] : false;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}", "function isRead() {\n\t\t$submissionDao = Application::getSubmissionDAO();\n\t\t$userGroupDao = DAORegistry::getDAO('UserGroupDAO');\n\t\t$userStageAssignmentDao = DAORegistry::getDAO('UserStageAssignmentDAO');\n\t\t$viewsDao = DAORegistry::getDAO('ViewsDAO');\n\n\t\t$submission = $submissionDao->getById($this->getSubmissionId());\n\n\t\t// Get the user groups for this stage\n\t\t$userGroups = $userGroupDao->getUserGroupsByStage(\n\t\t\t$submission->getContextId(),\n\t\t\t$this->getStageId()\n\t\t);\n\t\twhile ($userGroup = $userGroups->next()) {\n\t\t\t$roleId = $userGroup->getRoleId();\n\t\t\tif ($roleId != ROLE_ID_MANAGER && $roleId != ROLE_ID_SUB_EDITOR) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Get the users assigned to this stage and user group\n\t\t\t$stageUsers = $userStageAssignmentDao->getUsersBySubmissionAndStageId(\n\t\t\t\t$this->getSubmissionId(),\n\t\t\t\t$this->getStageId(),\n\t\t\t\t$userGroup->getId()\n\t\t\t);\n\n\t\t\t// Check if any of these users have viewed it\n\t\t\twhile ($user = $stageUsers->next()) {\n\t\t\t\tif ($viewsDao->getLastViewDate(\n\t\t\t\t\tASSOC_TYPE_REVIEW_RESPONSE,\n\t\t\t\t\t$this->getId(),\n\t\t\t\t\t$user->getId()\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\n\t\treturn false;\n\t}", "public function isReported(User $user)\n {\n $userId = $user->getId();\n $redis = Yii::$app->redis;\n \n $key = 'postcomplains:'.$this->id;\n \n return($redis->sismember($key, $userId)); \n }", "public function has_submit() {\n\t\treturn false;\n\t}", "function isSubmitted()\r\n\t\t{\r\n\t\t\tif( isset($_POST[$this->form_id.'-issubmitted'] ) )\r\n\t\t\t\treturn TRUE;\r\n\t\t\telse\r\n\t\t\t\treturn FALSE;\r\n\r\n\t\t}", "public function report(User $user)\n {\n $userId = $user->getId();\n $redis = Yii::$app->redis;\n \n $key = 'postcomplains:'.$this->id;\n \n if($redis->sadd($key, $userId)){\n $this->updateCounters(['complaints'=>1]);\n return true;\n } \n return false;\n }", "public function has_user_fundraiser()\n {\n return ( ! empty( $this->get_user_fundraiser() ) );\n }", "function can_do_edit() {\n global $USER;\n\n if (has_capability('block/php_report:manageschedules', get_context_instance(CONTEXT_SYSTEM))) {\n //user can manage schedules globally, so allow access\n return true;\n }\n\n $report_shortname = '';\n\n //try to obtain the report shortname from the report schedule id\n //(applies only during first step of wizard interface)\n $id = $this->optional_param('id', 0, PARAM_INT);\n if ($id !== 0) {\n if ($record = get_record('php_report_schedule', 'id', $id)) {\n if ($record->userid != $USER->id) {\n //disallow access to another user's schedule\n return false;\n }\n $config = unserialize($record->config);\n if (isset($config['report'])) {\n $report_shortname = $config['report'];\n }\n } else {\n //wrong id, so disallow\n return false;\n }\n }\n\n //try to obtain the report shortname from the workflow information\n //(applies only after the first step of the wizard interface)\n if ($report_shortname == '' && isset($this->workflow)) {\n $data = $this->workflow->unserialize_data();\n if ($data !== NULL && isset($data['report'])) {\n $report_shortname = $data['report'];\n }\n }\n\n if ($report_shortname === '') {\n //report info not found, so disallow\n return false;\n }\n\n //check permissions via the report\n $report_instance = php_report::get_default_instance($report_shortname, NULL, php_report::EXECUTION_MODE_SCHEDULED);\n return $report_instance !== false;\n }", "public function isReported()\n\t{\n\t\tif ($this->get('state') == self::APP_STATE_FLAGGED)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private function isThereWorkToBeDone()\r\n {\r\n if($this->dbCon->count($this->dbTableName, [\"isDelivered\" => 0]) < 1)\r\n {\r\n generic::successEncDisplay(\"There is no email for posting\");\r\n\r\n // add the return to follow the PHP principles and manual, however, it will terminate from the above!\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "public function authorize()\n\t{\n\t\t$expenses = $this->input('expense_ids');\n\t\tif($expenses != null && count($expenses) > 0) {\n\t\t\t$reportId = Expense::find($expenses[0])->report_id;\n\t\t\t$report = ExpenseReport::find($reportId);\n\t\t\tif($report->status) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "function submissionsReport($args) {\r\n\t\timport ('classes.submission.sectionEditor.SubmissionsReportForm');\r\n\t\tparent::validate();\r\n\t\t$this->setupTemplate();\r\n\t\t$submissionsReportForm= new SubmissionsReportForm($args);\r\n\t\t$isSubmit = Request::getUserVar('generateSubmissionsReport') != null ? true : false;\r\n\t\r\n\t\tif ($isSubmit) {\r\n\t\t\t$submissionsReportForm->readInputData();\r\n\t\t\tif($submissionsReportForm->validate()){\r\n\t\t\t\t$this->generateSubmissionsReport($args);\r\n\t\t\t}else{\r\n\t\t\t\tif ($submissionsReportForm->isLocaleResubmit()) {\r\n\t\t\t\t\t$submissionsReportForm->readInputData();\r\n\t\t\t\t}\r\n\t\t\t\t$submissionsReportForm->display($args);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t$submissionsReportForm->display($args);\r\n\t\t}\r\n\t}", "public function isUsed()\n\t{\n\t\treturn $this->data && $this->data['forms_attempts'] > 0;\n\t}", "function cannedReports(){\n\t\t\n\tif(!empty($this->params['form']))\n\t\t{\n\t\t\tif($_POST['cannedReports']=='allData'){\n\t\t\t\t$this->redirect('alldatareport');\n\t\t\t\t//$this->set('surveyexports',$this->Surveyexport->find('all'));\n\t\t\t\t\n\t\t\t\t//echo \" running your fancy report\";\n\t\t\t}\n\t\t\tif($_POST['cannedReports']=='recordCount')\n\t\t\t{\n\t\t\t\t\t$this->redirect('countsreport'); // record count page\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//else\n\t\t\t //{\n\t\t\t\t//echo \" select a report to run!\";\n\t\t\t\t//echo \"<br/>what was passed \".$this->params['form'].\"</br>\";\n\t\t\t\t//echo\" <br/>post array \".$_POST['cannedReports'] ;\n\t\t\t\t//echo\"</br></br>\";\n\t\t\t\t\n\t\t\t//}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t\t\n\t}", "public function isReporter(UserInterface $user);", "private function allowed_to_view_matches(){\n if(!rcp_user_can_access($this->user_id, $this->security_form_id) || !rcp_user_can_access($this->user_id, $this->defendant_id)){\n $this->error_message = esc_html__('You do not have access to this report.', 'pprsus');\n return false;\n }\n //are the variables even set\n if($this->security_form_id == '' || $this->defendant_id == '' || $this->token == ''){\n $this->error_message = esc_html__('There was a problem retrieving the prison list. Please return to the dashboard and try again.', 'pprsus');\n return false;\n }\n\n //is this a security form post type\n if(get_post_type($this->security_form_id) != 'security'){\n $this->error_message = esc_html__('There was a problem retrieving the prison list. Please return to the dashboard and try again.', 'pprsus');\n return false;\n }\n\n //does the security form or defendant belong to the current user\n $security_form_author = get_post_field('post_author', $this->security_form_id);\n if($security_form_author != $this->user_id){\n $this->error_message = esc_html__('This security report belongs to another user.', 'pprsus');\n return false;\n }\n\n $defendant_author = get_post_field('post_author', $this->defendant_id);\n if($defendant_author != $this->user_id){\n $this->error_message = esc_html__('This defendant belongs to another user.', 'pprsus');\n return false;\n }\n\n //is the token valid\n $token_from_post = get_post_meta((int)$this->security_form_id, 'secret_token', true);\n if($token_from_post != $this->token){\n $this->error_message = esc_html__('There was a problem retrieving the prison list. Please return to the dashboard and try again.', 'pprsus');\n return false;\n }\n\n return true;\n }", "private function checkPrintCondition()\r\n {\r\n // is queryResult is empty this means it is a new claim\r\n if(empty($this->queryResult))\r\n {\r\n return \"checked\";\r\n }\r\n }", "function needReport() {\n\t $produceReport = false;\n\t foreach ($this->members as $member) {\n\t $array = $member->getBills();\n\t \n\t if ($array != null && sizeof($array) != 0) {\n\t $produceReport = true;\n\t break;\n\t }\n\t }\n\t return $produceReport;\n\t}", "public function userCanSubmit() {\n\t\tglobal $content_isAdmin;\n\t\tif (!is_object(icms::$user)) return false;\n\t\tif ($content_isAdmin) return true;\n\t\t$user_groups = icms::$user->getGroups();\n\t\t$module = icms::handler(\"icms_module\")->getByDirname(basename(dirname(dirname(__FILE__))), TRUE);\n\t\treturn count(array_intersect($module->config['poster_groups'], $user_groups)) > 0;\n\t}", "function HasSubmitted ($id) {\n if (@mysql_result(@mysql_query (\"SELECT `submission_id` AS `sub_id` FROM `hunt_submissions` WHERE `submission_person` = $id AND `submission_hunt` = \".$this->hunt_id.\" LIMIT 1\", $this->ka_db), 0, 'sub_id') != '') {\n return true;\n } else {\n return false;\n }\n }", "function report_availabilty($student_id)\n {\n global $CFG;\n\n $now=time();\n\n //if a maximum number of entries has been set lets see if the student has reached this number\n if (!empty($this->reportmaxentries)) {\n $studententries = $this->dbc->count_report_entries($this->report_id,$student_id);\n\n if ($studententries >= $this->reportmaxentries) {\n $extension = $this->extension_check('reportmaxentries');\n\n if (empty($extension) || $studententries >= $extension->value) {\n $temp = new stdClass();\n $temp->entries = $studententries;\n $temp->maxentries = (!empty($extension))? $extension->value : $this->reportmaxentries;\n return false;\n }\n }\n }\n\n //if this report has a lock date check if the date has passed\n if ($this->reporttype == ILP_RT_RECURRING_FINALDATE || $this->reporttype == ILP_RT_FINALDATE) {\n\n if ( $this->reportlockdate < $now ) {\n //find out if this student has been given a report extension\n $extension = $this->extension_check('reportlockdate');\n if (empty($extension) || $extension->value < $now) {\n $temp = new stdClass();\n $temp->expiredate = (!empty($extension))? date('d-m-Y',$extension->value) : date('d-m-Y',$this->reportlockdate);\n return false;\n }\n }\n }\n\n //if the report is a recurring report\n if ($this->reporttype == ILP_RT_RECURRING || $this->reporttype == ILP_RT_RECURRING_FINALDATE) {\n $recurringstart = 0;\n\n if ($this->recurstart == ILP_RECURRING_REPORTCREATION) {\n //rules started at report creation\n $recurringstart = $this->timecreated;\n } else if ($this->recurstart == ILP_RECURRING_SPECIFICDATE) {\n //rules started at specific date\n $recurringstart = $this->recurdate;\n } else {\n //rules started at first entry\n $studententries = $this->dbc->get_user_report_entries($this->id,$student_id);\n\n if (!empty($studententries)) {\n //get the creation time of the first user entry\n $recurringstart = reset($studententries);\n $recurringstart = $recurringstart->timecreated;\n }\n }\n\n if (!empty($recurringstart)) {\n $recurringperiod = $this->recurring_period($recurringstart,$this->recurfrequency);\n\n $entriescount = $this->dbc->count_report_entries($this->id,$student_id,$recurringperiod['start'],$recurringperiod['end']);\n\n if (!empty($entriescount) && $entriescount >= $this->recurmax) {\n $extension = $this->extension_check('recurmax');\n if (empty($extension) || $extension->value <= $entriescount) {\n $temp = new stdClass();\n $temp->entries = $entriescount;\n $temp->maxentries = (!empty($extension))? $extension->value : $this->recurmax;\n return false;\n }\n }\n }\n }\n return true;\n }", "public static function has_log_report() : bool {\n $loggerclass = self::get_logger_classname();\n\n return $loggerclass::has_log_report();\n }", "public function isSubmitted() {\n return $this->submitted;\n }", "public function reportAction()\n {\n /* Checking if user is signed in to be allowed to report answer */\n $this->requireSignin();\n\n /* Getting user's id */\n $user = Auth::getUser();\n \n /* Getting Answer by id */\n $this_answer = Answer::getById(intval($_POST['answer_id']));\n\n /* Checking if user is online and the answer is not already deleted */\n if ($user->id > 0 && $this_answer->active > 0) {\n\n /* Creating new Report's object */\n $report = new Report([\n 'from_user' => $user->id,\n 'answer_id' => $this_answer->id,\n 'message' => $_POST['report_message'],\n ]);\n\n /* Adding new report */\n if ($report->add()) {\n\n /* Show success message */\n Flash::addMessage(\"Done: Report sent!\", Flash::INFO);\n \n } else {\n \n /* Show error messages */\n Flash::addMessage(\"Error: \".implode(\", \", $report->errors), Flash::INFO);\n }\n\n } else {\n\n /* Show error messages */\n Flash::addMessage(\"Error: You can not report this answer.\", Flash::INFO);\n }\n\n /* Redirect to previous page */\n if (isset($_REQUEST[\"destination\"])) {\n\n header(\"Location: \".$_REQUEST['redirect_url']);\n\n } else if (isset($_SERVER[\"HTTP_REFERER\"])) {\n\n header(\"Location: \".$_SERVER[\"HTTP_REFERER\"]);\n \n } else {\n\n $this->redirect('/');\n }\n }", "function check_user_has_data_access($survey_id,$user_id)\n\t{\n\t\t$requests=$this->get_user_study_n_collection_requests($survey_id,$user_id);\n\t\t\t\n\t\t\tforeach($requests as $request)\n\t\t\t{\n\t\t\t\tif ($request['status']=='APPROVED')\n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\treturn FALSE;\n\t}", "function can_process()\n{\n global $controller, $Mode;\n if ( strlen( $_POST[ 'reported_by' ] ) > 0 )\n {\n return\n (!is_empty( $_POST[ 'gate_code' ], 'Superior Response' )) &&\n (!is_empty( $_POST[ 'superior_confirmed' ], 'Superior Confirmation' )) &&\n (!is_empty( $_POST[ 'superior_comments' ], 'Superior Comments' ))\n ;\n }\n else\n {\n return\n (!is_empty( $_POST[ 'gate_code' ], 'Employee Response' )) &&\n (!is_empty( $_POST[ 'employee_confirmed' ], 'Employee Confirmation' )) &&\n (!is_empty( $_POST[ 'employee_comments' ], 'Employee Comments' ))\n ;\n }\n}", "public function getHasSubmitted() {\n\t\t@$cookie = $_COOKIE['promotion_' . $this->getId()];\n\t\treturn (bool) $cookie;\n\t}", "public function formSubmitted() {\n return $_SERVER[\"REQUEST_METHOD\"] == 'POST';\n }", "function cannedReports(){\n\t\t\n\tif(!empty($this->params['form']))\n\t\t{\n\t\t\tif($_POST['cannedReports']=='allData'){\n\t\t\t\t$this->redirect('alldatareport');\n\t\t\t\t//$this->set('surveyexports',$this->Surveyexport->find('all'));\n\t\t\t\t\n\t\t\t\t//echo \" running your fancy report\";\n\t\t\t}\n\t\t\tif($_POST['cannedReports']=='recordCount')\n\t\t\t{\n\t\t\t\t\t$this->redirect('countsreport'); // record count page\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\tif($_POST['cannedReports']=='referralReport')\n\t\t\t{\n\t\t\t\t\t$this->redirect('referralreport'); // record count page\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//else\n\t\t\t //{\n\t\t\t\t//echo \" select a report to run!\";\n\t\t\t\t//echo \"<br/>what was passed \".$this->params['form'].\"</br>\";\n\t\t\t\t//echo\" <br/>post array \".$_POST['cannedReports'] ;\n\t\t\t\t//echo\"</br></br>\";\n\t\t\t\t\n\t\t\t//}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t\t\n\t}", "function is_available() {\n //by default, make the report available,\n //override in child class if necessary to restrict\n return true;\n }", "public function isSubmited(): bool\n {\n return (bool) $this->values();\n }", "public function reportStatus($id)\n {\n if (Auth::user() !== null) {\n $reported = false;\n $user = Auth::user();\n foreach ($user->postsReports as $value) {\n if ($value['pivot']['post_id'] == $id) {\n return $reported = true;\n }\n }\n return $reported;\n }\n }", "public function isExistingReview(): bool\n {\n $review = ShopFeedbackEntity::findOne([\n 'created_by' => (!isset(Yii::$app->request->post()['created_by']))\n ? Yii::$app->user->identity->getId() : Yii::$app->request->post()['created_by'],\n 'shop_id' => Yii::$app->request->post()['shop_id']]);\n if (!$review) {\n $this->addError('created_by',\n Yii::t('app', 'Отзыв не найден'));\n return false;\n } else {\n return true;\n }\n }", "function can_do_listinstancejobs() {\n if (has_capability('block/php_report:manageschedules', get_context_instance(CONTEXT_SYSTEM))) {\n //user can manage schedules globally, so allow access\n return true;\n }\n\n //obtain the report shortname and instance\n $report_shortname = $this->required_param('report', PARAM_ALPHAEXT);\n $report_instance = php_report::get_default_instance($report_shortname, NULL, php_report::EXECUTION_MODE_SCHEDULED);\n\n //false is returned in the case of permissions failure\n return $report_instance !== false;\n }", "public function can_do_list() {\n global $CFG, $USER;\n\n if (has_capability('block/php_report:manageschedules', get_context_instance(CONTEXT_SYSTEM))) {\n //user can manage schedules globally, so allow access\n return true;\n }\n\n //determine if the export action is available in the context of scheduling\n $export_available = false;\n\n //go through the directories\n if ($handle = opendir($CFG->dirroot . '/blocks/php_report/instances')) {\n\n while (false !== ($report_shortname = readdir($handle))) {\n //get the report instance (this inherently checks permissions and report availability)\n if($instance = php_report::get_default_instance($report_shortname, $USER->id, php_report::EXECUTION_MODE_SCHEDULED)) {\n\n //check permissions and make sure scheduling is not explicitly disallowed\n if (!$instance->can_view_report()) {\n continue;\n }\n\n //make sure there is at least one available export format\n $export_formats = $instance->get_export_formats();\n if (count($export_formats) == 0) {\n continue;\n }\n\n $export_available = true;\n break;\n }\n }\n }\n\n return $export_available;\n }", "function check_user_analytics_exist( $post ) {\n\n $form_id = get_post_meta( $post->ID, '_wpuf_form_id', true );\n $user_analytics_info = get_post_meta( $post->ID, 'user_analytics_info', true );\n\n if ( empty( $form_id ) && empty( $user_analytics_info ) ) {\n return false;\n }\n\n return true;\n }", "public function isSubmitted() {\n return $this->submitted;\n }", "public function hasRecordsToExport()\n\t{\n\t\t$record_collection = $this->getUnexportedRecords();\n\t\tif (count($record_collection)) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "function check_for_ownership($report_id)\n {\n $report_data = $this->Report_model->load_report_entries($report_id);\n //check if user is owner\n $this->is_owner($report_data['user_id']);\n return $report_data;\n \n }", "public function has() {\n\t\t$userid = $this->get();\n\t\treturn ! empty( $userid );\n\t}", "public function is_submit()\r\n {\r\n if( $this->taintedInputs->isAutogenerated()){\r\n return false;\r\n }\r\n else{\r\n return true;\r\n }\r\n }", "public function authorize()\n {\n\n return true;\n\n if ($this->route('self_report')) { // If ID we must be changing an existing record\n return Auth::user()->can('self_report update');\n } else { // If not we must be adding one\n return Auth::user()->can('self_report add');\n }\n\n }", "public function checkDataSubmission() {\n\t\t$this->main('', array());\n }", "function canTakeWrittenExam()\n {\n if(!$this->readingExamResult()->exists()){\n return FALSE;\n }\n\n // user already took the exam, determine if passed\n if(!$this->latestReadingExamResult()->didPassed()){\n return FALSE;\n }\n\n if(!$this->writtenExamResult()->exists()){\n return TRUE;\n }\n\n $exam = $this->latestWrittenExamResult();\n $now = Carbon::now();\n $examDate = Carbon::createFromFormat('Y-m-d H:i:s', $exam->datetime_started);\n\n $allowance = $examDate->copy()->addMinutes($exam->essay->limit);\n if(!$exam->datetime_ended && $allowance->gt($now)){\n return TRUE;\n }\n\n $cooldown = $examDate->copy()->addMonths(6);\n if($cooldown->lt($now)){\n return TRUE;\n } \n\n return FALSE;\n\n \n }", "public static function checkOwnerExisting()\n {\n global $mainframe;\n $db = JFactory::getDbo();\n $db->setQuery(\"Select count(id) from #__osrs_agents where agent_type <> '0' and published = '1'\");\n $count = $db->loadResult();\n if ($count > 0) {\n return true;\n } else {\n return false;\n }\n }", "public function mortality_reports_show()\n {\n if(Auth::user()->access != 1 )\n {\n abort(403);\n }\n }", "function formSubmitted()\n\t{\n\t\t// Do we have a form name? If so, if we have this form name, then this\n\t\t// particular form has been submitted.\n\t\tif ($this->formName) {\n\t\t\treturn (isset($_POST['update']) && $_POST['update'] == $this->formName);\t\n\t\t} \n\t\t// No form name, just detect our hidden field.\n\t\telse {\n\t\t\treturn (isset($_POST['update']));\n\t\t}\n\t}", "public function check()\n {\n $user = $this->user();\n return !empty($user);\n }", "public static function is_submitting(){\n\t\treturn (strcasecmp('POST', $_SERVER['REQUEST_METHOD'] ) == 0);\n\t}", "private function has_submission_field($user_id)\n {\n $this->db->where('umeta_key', 'submissions');\n $this->db->where('user_id', $user_id);\n\n $result = $this->db->get('user_meta');\n\n return ($result->num_rows() == 1) ? $result->row('umeta_value') : FALSE;\n }", "public function isSubmit() {\n return Tools::isSubmit($this->key());\n }", "public function exists()\r\n {\r\n global $g_comp_database_system;\r\n\r\n $l_sql = \"SELECT * FROM isys_report WHERE \" . \"(isys_report__title = '\" . $g_comp_database_system->escape_string($this->m_title) . \"');\";\r\n\r\n $l_resource = $g_comp_database_system->query($l_sql);\r\n if ($g_comp_database_system->num_rows($l_resource) > 0)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n } // if\r\n }", "public function report(User $user, GeneralAnswer $answer)\n {\n return ($user->id !== $answer->user_id\n && !GeneralAnswerReport::reported($user->id, $answer->id)->count());\n }", "function processReportForm($postArray){\n\t\tif(isset($postArray['user']) \n\t\t\t\t&& isset($postArray['category']) && isset($postArray['month'])) {\n \t\t\t$name = filter_var($postArray['user'],FILTER_SANITIZE_STRING);\n \t\t\t$category = filter_var($postArray['category'],FILTER_SANITIZE_STRING);\n \t\t\t$date = filter_var($postArray['month'],FILTER_SANITIZE_STRING);\n \t\t\t$postArray = array('name'=> $name,'category'=> $category,'date'=> $date);\n \t\t\t$connection = new Connection();\n \t\t\t$pdo = $connection->getConnection();\n \t\t\tunset($connection);\n \t\t\treturn $this->retrieveReportData($postArray,$pdo);\n \t\t} else {\n \t\t\theader('Locate: report.php');\n \t\t}\n\t}", "public function checkIfUserSubmittedProject($userId)\n {\n $query = 'SELECT EXISTS(SELECT * FROM submissions WHERE user_id = :user_id)';\n $statement = $this->db->prepare($query);\n $statement->bindValue('user_id', $userId, \\PDO::PARAM_INT);\n $statement->execute();\n $result = (bool) $statement->fetchColumn();\n\n return $result;\n }", "function reportExistsForSelf( $reporttype, $getline ) {\r\n\t\treturn $this->reportExistsForUser( $_SESSION['userid'], $reporttype, $getline );\r\n\t}", "function runReport (){\n\t\tif(!empty($this->params['form']))\n\t\t{\n\t\t\tif($this->params['form']=='allData'){\n\t\t\t\tindex();\n\t\t\t}else {\n\t\t\t\tindex();\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t}", "function runReport (){\n\t\tif(!empty($this->params['form']))\n\t\t{\n\t\t\tif($this->params['form']=='allData'){\n\t\t\t\tindex();\n\t\t\t}else {\n\t\t\t\tindex();\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t}", "public function hasVerifiedReport(): bool\n {\n return\n !RoadDamageReport::where('roaddamage_id', $this->id)\n ->where('verified', RoadDamageReport::FALSEPOSITIVE)->exists() &&\n RoadDamageReport::where('roaddamage_id', $this->id)\n ->where('verified', RoadDamageReport::VERIFIED)->exists();\n }", "function display_existing_report_info_user($login, $password, $report)\n{\n\n $conn = hsu_conn_sess($login, $password);\n\n $report_query = 'SELECT REPORT_ID, START_TIME, END_TIME, REPORT_DATE, BEACH_NAME, SURVEY_SUMMARY '.\n 'FROM REPORTS, BEACHES '.\n 'WHERE REPORTS.BEACH_ABBR = BEACHES.BEACH_ABBR '.\n 'AND REPORT_ID = :REPORT';\n\n $query_stmt = oci_parse($conn, $report_query);\n\n oci_bind_by_name($query_stmt, \":report\", $report);\n\n oci_execute($query_stmt, OCI_DEFAULT);\n oci_fetch($query_stmt);\n ?>\n\n <form class=\"form-inline\" action=\"<?= htmlentities($_SERVER['PHP_SELF'],ENT_QUOTES) ?>\" method=\"post\">\n <div class=\"form-group\">\n <fieldset>\n <legend> Report Details </legend>\n <p name=\"report_details\">\n Report ID : <?= oci_result($query_stmt, \"REPORT_ID\"); ?> <br>\n Beach : <?= oci_result($query_stmt, \"BEACH_NAME\"); ?> <br>\n Date : <?= oci_result($query_stmt, \"REPORT_DATE\"); ?> <br>\n Start Time: <?= oci_result($query_stmt, \"START_TIME\"); ?> <br>\n End Time: <?= oci_result($query_stmt, \"END_TIME\"); ?> <br>\n Survey Summary: <?= oci_result($query_stmt, \"SURVEY_SUMMARY\"); ?> <br>\n </p>\n\n <?php\n oci_free_statement($query_stmt);\n\n $entries_query = 'SELECT PRN, HSU_USERNAME, SPEC_NAME, POST_SURVEY_TAG, '.\n 'EXISTING_TAGS, PHOTOS, COMMENTS '.\n 'FROM REPORT_ENTRIES, SPECIES '.\n 'WHERE REPORT_ENTRIES.SPECIES_ABBR = SPECIES.SPEC_ABBR '.\n 'AND REPORT_ID = :REPORT';\n \n /* $entries_query = 'SELECT PRN, HSU_USERNAME, SPECIES_ABBR, COMMENTS '.\n 'FROM REPORT_ENTRIES '.\n 'WHERE REPORT_ID = :REPORT '; */\n\n $entries_stmt = oci_parse($conn, $entries_query);\n\n oci_bind_by_name($entries_stmt, \":report\", $report);\n\n oci_execute($entries_stmt, OCI_DEFAULT);\n ?>\n <fieldset>\n <legend> Entries </legend>\n <?php\n $entry_count = 0;\n while(oci_fetch($entries_stmt))\n {\n $entry_count = $entry_count + 1;\n\n $curr_prn = oci_result($entries_stmt, \"PRN\");\n $curr_user = oci_result($entries_stmt, \"HSU_USERNAME\");\n $curr_species = oci_result($entries_stmt, \"SPEC_NAME\");\n //$curr_species = oci_result($entries_stmt, \"SPEC_ABBR\");\n $curr_surv_tag = oci_result($entries_stmt, \"POST_SURVEY_TAG\");\n $curr_exist_tag = oci_result($entries_stmt, \"EXISTING_TAGS\");\n $curr_photos = oci_result($entries_stmt, \"PHOTOS\");\n $curr_comments = oci_result($entries_stmt, \"COMMENTS\");\n ?>\n <label for=\"entries\"> Entry #<?=$entry_count?> </label>\n <p name=\"entry_details\">\n PRN : <?= $curr_prn ?> <br>\n Surveyor : <?= $curr_user ?> <br>\n Species : <?= $curr_species ?> <br>\n Existing Tags? : <?= $curr_exist_tag ?> <br>\n Post Survey Tag? : <?= $curr_surv_tag ?> <br>\n Photos? : <?= $curr_photos ?> <br>\n Comments : <?= $curr_comments ?> <br>\n </p>\n <?php\n }\n\n oci_free_statement($entries_stmt);\n ?>\n </fieldset>\n <input type=\"submit\" name=\"report_view_by_user\" value=\"Go Back\" />\n <input type=\"submit\" name=\"main_menu\" value=\"Main Menu\" />\n </fieldset>\n </div>\n </form>\n <?php\n\n\n}", "public function create()\n\t{\n\t\tif(Request::ajax())\n\t\t{\n\t\t\treturn $this->_ajax_denied();\n\t\t}\n\t\tif(!Report::canCreate())\n\t\t{\n\t\t\treturn $this->_access_denied();\n\t\t}\n\t\treturn View::make('reports.create');\n\t}", "public function has_submitted($memberid) {\n return !empty($this->redscores[$memberid]);\n }", "public function isSubmitted()\n {\n return $this->isSubmitted;\n }", "public function isSubmitted()\n {\n return $this->isSubmitted;\n }", "function meetingAttendanceReport($args, &$request){\r\n\t\timport ('classes.meeting.form.MeetingAttendanceReportForm');\r\n\t\tparent::validate();\r\n\t\t$this->setupTemplate();\r\n\t\t$meetingAttendanceReportForm= new MeetingAttendanceReportForm($args, $request);\r\n\t\t$isSubmit = Request::getUserVar('generateMeetingAttendance') != null ? true : false;\r\n\t\t\r\n\t\tif ($isSubmit) {\r\n\t\t\t$meetingAttendanceReportForm->readInputData();\r\n\t\t\tif($meetingAttendanceReportForm->validate()){\t\r\n\t\t\t\t\t$this->generateMeetingAttendanceReport($args);\r\n\t\t\t}else{\r\n\t\t\t\tif ($meetingAttendanceReportForm->isLocaleResubmit()) {\r\n\t\t\t\t\t$meetingAttendanceReportForm->readInputData();\r\n\t\t\t\t}\r\n\t\t\t\t$meetingAttendanceReportForm->display($args);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\t$meetingAttendanceReportForm->display($args);\r\n\t\t}\r\n\t}", "public function isSubmitted()\n\t{\n\t\tif ($this->http_method == 'get') {\n\t\t\t// GET form is always submitted\n\t\t\treturn TRUE;\n\t\t} else if (isset($this->raw_input['__'])) {\n\t\t\t$__ = $this->raw_input['__'];\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t\tforeach ((array) $__ as $token => $x) {\n\t\t\t$t = static::validateFormToken($token, $this->id);\n\t\t\tif ($t !== FALSE) {\n\t\t\t\t// Submitted\n\t\t\t\tif ($this->form_ttl > 0 && time() - $t > $this->form_ttl) {\n\t\t\t\t\t$this->form_errors[self::E_FORM_EXPIRED] = array(\n\t\t\t\t\t\t'message' => _('The form has expired, please check entered data and submit it again.')\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "public function report() {\n $data = [];\n if ($this->input->post('submit')) {\n $report_data['from_date'] = $this->input->post('form_from_date');\n $report_data['to_date'] = $this->input->post('form_to_date');\n if ($this->input->post('form_summarized')) {\n $data['summarized_report'] = $this->account_model->getSummarizedReport($report_data);\n } else {\n $data['report'] = $this->account_model->getReport($report_data);\n }\n } else {\n if ($this->session->has_userdata('financialyear')) {\n $data['financialyear'] = $this->session->userdata('financialyear');\n }\n }\n $this->view('report', $data);\n }", "function full_report()\n {\n\n //check if person is authorised to view report\n //load view variables\n if (get_user_info_by_id($this->session->userdata('userid'), 'pde_id') == get_procurement_plan_entry_info(decryptValue($this->uri->segment(4)), 'pde_id')) {\n $data['page_title'] = get_procurement_plan_entry_info(decryptValue($this->uri->segment(4)), 'title');\n $data['current_menu'] = 'view_procurement_plans';\n $data['entry_id'] = decryptValue($this->uri->segment(4));\n $data['view_to_load'] = 'procurement/admin/entry_report_v';\n $data['view_data']['form_title'] = $data['page_title'];\n\n //echo get_procurement_plan_entry_info(decryptValue($this->uri->segment(5)), 'title');\n\n //load view\n $this->load->view('dashboard_v', $data);\n } else {\n //load view variables\n $data['page_title'] = \"Oops\";\n $data['current_menu'] = 'dashboard';\n $data['view_to_load'] = 'error_pages/500_v';\n $data['view_data']['form_title'] = $data['page_title'];\n $data['message'] = 'Only authorised PDU members can view this page';\n\n\n //load view\n $this->load->view('dashboard_v', $data);\n }\n\n\n }", "function UserIsClear()\n {\n StartSession();\n $isClear = isset($_SESSION[GetExamIdentifier()]);\n \n return $isClear;\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Amasty_Acart::acart_reports');\n }", "private function isBooked() {\n // count all bookings from program\n $statement = 'SELECT COUNT(*) FROM booking WHERE program_id = :program_id AND user_id = :user_id;';\n try {\n $statement = $this->db->prepare($statement);\n $statement->execute(array(\n 'user_id' => $this->getUser($this->data['cnp']),\n 'program_id' => $this->data['program']\n ));\n $result = $statement->fetchColumn();\n if ($result) {\n exit('You are already booked');\n }\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n }\n \n return FALSE;\n }", "function is_any_parcours_completed() {\n\t\n\t$id_user = get_current_user_id();\n\tglobal $wpdb;\n\t$results = $wpdb->get_results(\"SELECT * FROM parcours_user WHERE id_user = $id_user AND completed = 1\", ARRAY_A);\n\tif(!empty($results)) return true;\t\n\treturn false;\n}", "function is() {\n global $_SESSION;\n if (! empty($_SESSION['payback']['user'])) return true;\n else return false;\n }", "public function sendReportCheckin()\n { // $sended = $this->TBLTSendMail\n // ->exists([\n // 'Date' => date(\"Y-m-d\"),\n // 'Result' => 'success'\n // ]);\n\n // if($sended) { exit; }\n\n $alert = $this->TBLMItem->find()\n ->where([\n 'Code' => 'alert_time',\n 'Value IS NOT NULL'\n ])\n ->first();\n $mail1 = $this->TBLMItem->find()\n ->where([\n 'Code' => 'mail_receipt_1',\n 'Value IS NOT NULL'\n ])\n ->first();\n $mail2 = $this->TBLMItem->find()\n ->where([\n 'Code' => 'mail_receipt_2',\n 'Value IS NOT NULL'\n ])\n ->first();\n \n $allow = false;\n if (isset($alert['Value']) && (isset($mail1['Value']) || isset($mail2['Value']))) {\n if ($alert['Value'] == date(\"H:i\")) {\n $allow = true;\n } \n }\n\n // debug\n // $allow = true;\n\n if ($allow) {\n // set_time_limit(0);\n // ini_set(\"memory_limit\", \"-1\");\n // $builder = $this->viewBuilder();\n // // configure as needed\n // $builder->setLayout(false);\n // $builder->setTemplate('/Element/Pdf/ExportResultCheckin');\n // $builder->setHelpers(['Html']);\n // create a view instance\n\n\n $data[\"checked_in\"] = $this->TBLTTimeCard->find()\n ->contain(['TBLMStaff'])\n ->where([\n 'Date' => date(\"Y-m-d\"),\n // 'TimeIn <=' => $alert\n ])\n ->order(['TimeIn' => 'ASC'])\n ->toArray();\n\n $data[\"not_come\"] = $this->TBLMStaff->find()\n ->where([\n \"StaffID NOT IN (SELECT StaffID FROM tblTTimeCard WHERE Date ='\" . date(\"Y-m-d\") . \"')\",\n \"Position LIKE '%Leader%'\",\n \"FlagDelete = 0\"\n ])\n ->order(['StaffID' => 'ASC'])\n ->toArray();\n\n // echo '<pre>';\n // var_dump($data);\n // echo '</pre>';\n // exit;\n\n\n\n // $view = $builder->build(compact('data'));\n // $content = $view->render();\n\n // $dompdf = new Dompdf(array('enable_font_subsetting' => true));\n // $dompdf->loadHtml(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8'), \"UTF-8\");\n // $dompdf->set_option('defaultFont', 'Times-Roman');\n\n // // (Optional) Setup the paper size and orientation\n // $dompdf->setPaper('A4');\n\n // // Render the HTML as PDF\n // $dompdf->render();\n\n // /* save file */\n // $path = WWW_ROOT . \"files/PdfResultCheckin\";\n // if (!file_exists($path)) {\n // mkdir($path);\n // }\n\n // $fileNameExport = \"ASM SYSTEM \" . date(\"Ymd\") . \" (\" . date(\"D\") . \") \" . date(\"Hi\") . \".pdf\";\n // $output = $path . \"/\" . $fileNameExport;\n\n // $file = $dompdf->output();\n // file_put_contents($output, $file);\n\n // debug\n // exit;\n\n $result_sended = self::__sendFileToMail($data, $mail1['Value'], $mail2['Value']);\n // mails receipt\n $mails_receipt = \"\";\n if ($mail1['Value']) {\n $mails_receipt .= $mail1['Value'];\n }\n\n if ($mail2['Value']) {\n $mails_receipt .= \", \" . $mail2['Value'];\n }\n // result\n $result = \"\";\n if(isset($result_sended['success']) && $result_sended['success'] == 1){\n $result = \"success\";\n } else {\n $result = \"fail\";\n }\n\n // ==> SAVE RESULT TO DB\n $sended = TableRegistry::getTableLocator()->get('TBLTSendMail')->newEntity();\n $sended->Date = date(\"Y-m-d\");\n $sended->Time = date(\"H:i\");\n $sended->ToEmail = $mails_receipt;\n $sended->FileSend = '';\n $sended->Result = $result;\n TableRegistry::getTableLocator()->get('TBLTSendMail')->save($sended);\n\n // ==> WRITE LOG\n $content = \n \"Date: \".date(\"Y-m-d\") . \"\\n\" .\n \"Time: \".date(\"H:i\") . \"\\n\" . \n \"To emails: \" . $mails_receipt .\"\\n\".\n \"Filename attachment: \".'' . \"\\n\" .\n \"Result: \".$result . \"\\n \\n\";\n Log::info($content, ['scope' => ['SENDMAIL']]);\n }\n exit;\n }", "static function isTrackable()\n {\n if(!Auth::check())\n return true;\n $user = Auth::User();\n if(stristr($user->type, 'Employee') || stristr($user->type, 'Demo'))\n return false;\n return true;\n }", "public function has_results()\r\n {\r\n \t$tbl_stats = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_EXERCICES);\r\n\t\t$sql = 'SELECT count(exe_id) AS number FROM '.$tbl_stats\r\n\t\t\t\t.\" WHERE exe_cours_id = '\".$this->get_course_code().\"'\"\r\n\t\t\t\t.' AND exe_exo_id = '.$this->get_ref_id();\r\n \t$result = api_sql_query($sql, __FILE__, __LINE__);\r\n\t\t$number=mysql_fetch_row($result);\r\n\t\treturn ($number[0] != 0);\r\n }", "public static function checkRequest()\n {\n $conn = Db::getConnection();\n $statement = $conn->prepare(\"SELECT * from buddie_request WHERE receiver= '\" . $_SESSION['user_id'] . \"'\");\n $statement->execute();\n if ($statement->rowCount() > 0) {\n return true;\n } else {\n return false;\n }\n }", "private function userHasResources() {\n $utenti = new MUtenti;\n foreach ($utenti->find(array(), $utenti->getPosition()) as $itemUtenti) {\n if ($itemUtenti[$_POST['nomeRisorsaOfferta']] < $_POST['quantitaOfferta']) {\n return false;\n }\n }\n return true;\n }", "function shouldredirecttofilter() {\n if (!$this->has_filters()) {\n return false;\n }\n\n if ($data = data_submitted()) {\n //a forum submit action happened, so render the report\n return false;\n }\n\n if (!empty($_GET)) {\n //determine how many URL parameters were passed in\n $array_get = (array)$_GET;\n $num_elements = count($array_get);\n\n if (isset($array_get['report'])) {\n //don't count the report shortname\n $num_elements--;\n }\n\n if ($num_elements > 0) {\n //a non-innocuous URL parameter was passed in,\n //so render the report\n return false;\n }\n }\n\n return true;\n }", "public function isSubmitted()\n\t{\n\t\tif( $this->method == 'post' )\n\t\t{\n\t\t\treturn $this->request->getMethod() == 'post';\n\t\t}\n\n\t\t$arr = $this->request->getQueryString();\n\t\treturn ! empty( $arr );\n\t}", "function track_clicks_allowed_by_user(){\n if (!$this->get_config('track_visits_of_loggedin_users',true) && serendipity_userLoggedIn()){\n return false;\n }\n return true;\n }", "function is_current_parcours_completed($id_user , $id_episode , $id_parcours) {\n\n\t$completed = false;\n\n\tglobal $wpdb;\n\n\t$episodes = get_field('episodes' , $id_parcours); \n\t$episodes_number = count($episodes); \n\n\t$rowcount = $wpdb->get_var(\"SELECT COUNT(*) FROM tracking WHERE id_user = $id_user AND id_parcours = $id_parcours\");\n\n\tif($rowcount == $episodes_number) $completed = true;\n\n\treturn $completed;\n\n}", "function checkUser(){\n\t\t// Check for request forgeries\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\t\n\t\t$app \t = JFactory::getApplication();\n\t\t$db \t = JFactory::getDbo();\n\t\t$inputstr = $app->input->get('inputstr', '', 'string');\n\t\t$name \t = $app->input->get('name', '', 'string');\n\t\n\t\tif($name == 'username'){\n\t\t\t$query \t = \"SELECT COUNT(*) FROM #__users WHERE username=\".$db->quote($inputstr);\n\t\t\t$msg = 'COM_JBLANCE_USERNAME_EXISTS';\n\t\t}\n\t\telseif($name == 'email'){\n\t\t\t$query \t = \"SELECT COUNT(*) FROM #__users WHERE email=\".$db->quote($inputstr);\n\t\t\t$msg = 'COM_JBLANCE_EMAIL_EXISTS';\n\t\t}\n\t\n\t\t$db->setQuery($query);\n\t\tif($db->loadResult()){\n\t\t\techo JText::sprintf($msg, $inputstr);\n\t\t}\n\t\telse {\n\t\t\techo 'OK';\n\t\t}\n\t\texit;\n\t}", "function currentFormHasData() {\n global $double_data_entry, $user_rights, $quesion_by_section, $pageFields;\n\n $record = $_GET['id'];\n if ($double_data_entry && $user_rights['double_data'] != 0) {\n $record = $record . '--' . $user_rights['double_data'];\n }\n\n if (PAGE != 'DataEntry/index.php' && $question_by_section && Records::fieldsHaveData($record, $pageFields[$_GET['__page__']], $_GET['event_id'])) {\n // The survey has data.\n return true;\n }\n\n if (Records::formHasData($record, $_GET['page'], $_GET['event_id'], $_GET['instance'])) {\n // The data entry has data.\n return true;\n }\n\n return false;\n }", "public function check()\t{\n\t\treturn ! is_null($this->user());\n\t}", "public function reportForDuty()\n {\n //Do stuff ...\n }" ]
[ "0.7004151", "0.6772562", "0.67612225", "0.6617957", "0.6584873", "0.65281534", "0.6394429", "0.6389003", "0.63589954", "0.634948", "0.63420606", "0.63420606", "0.6301841", "0.6281017", "0.6269977", "0.62672937", "0.6250982", "0.6241081", "0.613254", "0.61283076", "0.60971415", "0.60771865", "0.60169", "0.6013187", "0.59778094", "0.59541345", "0.59450984", "0.59303874", "0.59196806", "0.59111613", "0.5910362", "0.59076774", "0.58997685", "0.5891947", "0.5888643", "0.58708584", "0.5865473", "0.58599764", "0.5857504", "0.58458275", "0.5814864", "0.5811672", "0.58102953", "0.5797437", "0.5796583", "0.57943153", "0.5780516", "0.5773364", "0.57631344", "0.57616377", "0.5754226", "0.57489675", "0.57453275", "0.5729095", "0.5727548", "0.5722473", "0.5721977", "0.57141936", "0.5713349", "0.56918055", "0.5686226", "0.56859094", "0.5684785", "0.5683849", "0.565886", "0.56501687", "0.5647023", "0.56457114", "0.5631578", "0.5629052", "0.56245136", "0.56236553", "0.56236553", "0.5619567", "0.56093645", "0.56052154", "0.5603966", "0.5588231", "0.5588231", "0.55820936", "0.55780286", "0.55735743", "0.55686927", "0.55631787", "0.5562893", "0.5557778", "0.5546637", "0.55378765", "0.55372417", "0.55356824", "0.55351406", "0.5526985", "0.5525007", "0.5523882", "0.549417", "0.5491085", "0.5487731", "0.54803944", "0.5477884", "0.5475431", "0.5457912" ]
0.0
-1
Use safeUp/safeDown to do migration with transaction
public function safeUp() { $this->createTable('site', array( 'client_id' => self::MYSQL_TYPE_UINT, 'domain' => 'string NOT NULL' )); $this->addForeignKey('site_client_id', 'site', 'client_id', 'client', 'id', 'CASCADE', 'RESTRICT'); $this->createTable('site_contract', array( 'site_id' => self::MYSQL_TYPE_UINT, 'contract_id' => self::MYSQL_TYPE_UINT, )); $this->addForeignKey('site_contract_site_id', 'site_contract', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT'); $this->addForeignKey('site_contract_contract_id', 'site_contract', 'contract_id', 'contract', 'id', 'CASCADE', 'RESTRICT'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\r\n {\r\n $this->up();\r\n }", "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "public function safeUp()\n {\n }", "public function safeUp()\n\t{\n\t $this->addColumn('Rent', 'is_deleted', 'TINYINT DEFAULT 0');\n\t $this->createIndex('is_deleted', 'Rent', 'is_deleted');\n\t}", "public function safeUp()\n\t{\n $sql = <<<SQL\n alter table r add R8 inte;\nSQL;\n\t\t//$this->execute($sql);\n $sql = <<<SQL\n ALTER TABLE r ADD constraint FK_r8_elgz1 FOREIGN KEY (r8) REFERENCES elgz (elgz1) ON DELETE SET DEFAULT ON UPDATE CASCADE;\nSQL;\n //$this->execute($sql);\n\t}", "public function safeUp()\n\t{\n $this->execute(\"\n /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n /*!40101 SET NAMES utf8mb4 */;\n /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n\n DROP TABLE IF EXISTS `Rating`;\n DROP TABLE IF EXISTS `RatingParams`;\n DROP TABLE IF EXISTS `RatingParamsValues`;\n\n /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;\n /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;\n /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n \");\n\t}", "public function safeUp()\n\t{\n $this->execute(\"\n -- Дамп структуры для таблица dev_dont_stop.Currencies\n CREATE TABLE IF NOT EXISTS `Currencies` (\n `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Currency ID',\n `name` varchar(50) NOT NULL DEFAULT '' COMMENT 'Currency name',\n `key` varchar(10) NOT NULL DEFAULT '' COMMENT 'Currency key',\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;\n\n -- Дамп данных таблицы dev_dont_stop.Currencies: ~3 rows (приблизительно)\n /*!40000 ALTER TABLE `Currencies` DISABLE KEYS */;\n INSERT INTO `Currencies` (`id`, `name`, `key`) VALUES\n (1, 'Российский рубль', 'RUR'),\n (2, 'Белорусский рубль', 'BYR'),\n (3, 'Доллар США', 'USD');\n /*!40000 ALTER TABLE `Currencies` ENABLE KEYS */;\n /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;\n /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;\n /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n \");\n\t}", "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'post_id' => $this->bigInteger()->notNull(),\n 'category_id' => $this->bigInteger()->notNull(),\n ]);\n\n $this->addForeignKey('post_category_post_id_fk', $this->tableName, 'post_id', '{{%post}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('post_category_category_id_fk', $this->tableName, 'category_id', '{{%category}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function safeUp() {\n $this->addColumn('tenant_setting', 'app_version', 'text');\n $this->update('tenant_setting', array('app_version' => '3.0'), null);\n }", "public function safeUp()\n\t{\n $this->execute(\"\n ALTER TABLE `Deals`\n ADD COLUMN `city_id` INT(11) UNSIGNED NULL DEFAULT NULL COMMENT 'City ID' AFTER `user_id`;\n ALTER TABLE `Deals`\n\t ADD CONSTRAINT `FK_Deals_Cities` FOREIGN KEY (`city_id`) REFERENCES `Cities` (`id`) ON UPDATE CASCADE ON DELETE SET NULL;\n \");\n\t}", "public function safeUp()\n {\n $this->addColumn('apartment', 'price', 'DECIMAL(20,2) DEFAULT 0');\n $this->addColumn('apartment', 'room_number', 'int UNSIGNED DEFAULT 0');\n $this->addColumn('apartment', 'square', 'int UNSIGNED DEFAULT 0');\n }", "public function safeUp()\n\t{\n\t\t$this->createTable( 'tbl_auth_item', array(\n\t\t \"name\" => \"varchar(64) not null\",\n\t\t \"type\" => \"integer not null\",\n\t\t \"description\" => \"text\",\n\t\t \"bizrule\" => \"text\",\n\t\t \"data\" => \"text\",\n\t\t \"primary key (name)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_item_child\", array(\n \t\t\"parent\" => \" varchar(64) not null\",\n\t\t\"child\" => \" varchar(64) not null\",\n \t\t\"primary key (parent,child)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_assignment\",array(\n \t\t\"itemname\" => \"varchar(64) not null\",\n \t\t\"userid\" => \"varchar(64) not null\",\n \t\t\"bizrule\" => \"text\",\n \t\t\"data\"\t => \"text\",\n \t\t\"primary key (itemname,userid)\",\n\t\t));\n\n\t\t$this->addForeignKey('fk_auth_item_child_parent','tbl_auth_item_child','parent','tbl_auth_item','name','CASCADE','CASCADE');\n\t\t$this->addForeignKey('fk_auth_assignment_itemname','tbl_auth_assignment','itemname','tbl_auth_item','name');\n\t\t$this->addForeignKey('fk_auth_assignment_userid','tbl_auth_assignment','userid','tbl_user','id');\n\t}", "public function safeUp()\n\t{\n\n\t\t$sql=\"ALTER TABLE `article` DROP INDEX `hid`;ALTER TABLE `article` DROP INDEX `IDX_CID_SHOW_TIME`;ALTER TABLE `article` DROP INDEX `IDX_SHOW_TIME`;ALTER TABLE `article` ADD INDEX `IND_SHOWTIME_STATUS_CID` (`show_time`,`status`,`cid`);\";\n\t\t$this->execute($sql);\n\t\t$this->refreshTableSchema('article');\n\t}", "public function safeUp()\n {\n $this->dropForeignKey('fk_barang_diskon_barang', 'barang_diskon');\n $this->alterColumn('barang_diskon', 'barang_id', 'INT(10) UNSIGNED NULL');\n $this->addColumn('barang_diskon', 'semua_barang', \"TINYINT NOT NULL DEFAULT 0 COMMENT 'perbarang = 0; semua = 1' AFTER `id`\");\n\n $this->addForeignKey('fk_barang_diskon_barang', 'barang_diskon', 'barang_id', 'barang', 'id', 'NO ACTION', 'NO ACTION');\n }", "public function safeUp()\n\t{\n\t\t$this->createTable('pesquisa', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t));\n\t}", "public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }", "public function safeUp()\n {\n $this->addColumn('compare_estimated_price_table','house_views_comp',\"tinyint(1) NOT NULL DEFAULT '0'\");\n }", "public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }", "public function safeUp()\n\t{\n\t\t\n\t\t$this->dropColumn('seguimiento_itil', 'per_sm');\n\t\t$this->dropColumn('seguimiento_itil', 'per_client');\n\n\t\t$this->createTable('seguimiento_percepcion_general', array(\n\t\t\t\t'id'=>'pk',\n\t\t\t\t'cliente_id' => 'int NOT NULL',\n\t\t\t\t'per_cliente' => 'int NOT NULL DEFAULT 0',\n\t\t\t\t'per_sm' => 'int NOT NULL DEFAULT 0',\n\t\t\t\t'fecha' => 'int NOT NULL DEFAULT 0')\n\t\t);\n\t\t$this->addForeignKey('FK01_seguimiento_percepcion_general_cliente', 'seguimiento_percepcion_general', 'cliente_id', 'cliente', 'id', 'RESTRICT');\n\t\t\n\t}", "public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }", "public function safeUp()\n {\n $this->execute(\"\n create table region(\n code_reg integer primary key,\n name_reg text\n );\n \");\n $this->execute(\"\n create table school(\n id integer primary key,\n name text,\n boss text,\n code_reg integer,\n phone text\n );\n \");\n $this->createIndex('school_fk_reg', 'school', 'code_reg');\n }", "public function safeUp()\n {\n $tables = Yii::$app->db->schema->getTableNames();\n $dbType = $this->db->driverName;\n $tableOptions_mysql = \"CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB\";\n\n /* MYSQL */\n if (!in_array('question_tag', $tables)) {\n if ($dbType == \"mysql\") {\n $this->createTable('{{%question_tag}}', [\n 'question_id' => 'INT(11) NOT NULL',\n 'tag_id' => 'INT(11) NOT NULL',\n ], $tableOptions_mysql);\n }\n }\n }", "public function safeUp()\n {\n $this->createIndex(\n 'idx-tag-tag_category_id',\n 'tag',\n 'tag_category_id'\n );\n\n // add foreign key for table `category`\n $this->addForeignKey(\n 'fk-tag-tag_category_id',\n 'tag',\n 'tag_category_id',\n 'tag_category',\n 'id',\n 'CASCADE'\n );\n }", "public function safeUp()\n {\n $this->insert('category',['name'=>'Uncategorized', 'slug'=>'uncategorized', 'description'=>'Default Category', 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()')]);\n $this->insert('user',['username'=>'Administrator', 'password_hash'=>'$2y$13$6yoLjvVORp/7EO1u8phYTuWYzhMSM4LVVsebZgcqEKj/EQLvo5nJK',\n 'email'=>'[email protected]',\n 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()'),\n 'status'=>1\n ]\n );\n }", "public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }", "public function safeUp()\n {\n $this->dropForeignKey('option_link_option_fk', '{{%user_option_link}}');\n $this->dropForeignKey('option_category_fk', '{{%option}}');\n $this->dropForeignKey(\"question_option_fk\", \"{{%question}}\");\n\n $this->dropTable('{{%option}}');\n $this->dropTable('{{%category}}');\n }", "public function safeUp()\n {\n $this->alterColumn('item_keuangan', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('item_keuangan', 'status', \"TINYINT(1) NOT NULL DEFAULT '1' COMMENT '0=tidak aktif; 1=aktif;' AFTER `jenis`\");\n }", "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL' ,\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey('fk_social_auth_user_id_to_user_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function safeUp()\n {\n $this->addColumn($this->table_name, 'fk_category', $this->integer()->notNull()->after('id'));\n\n // creates index for column `fk_category`\n $this->createIndex(\n \"{{%idx-{$this->table_name}-fk_category}}\",\n \"{{%{$this->table_name}}}\",\n 'fk_category'\n );\n\n // add foreign key for table `{{%category}}`\n $this->addForeignKey(\n \"{{%fk-{$this->table_name}-fk_category}}\",\n \"{{%{$this->table_name}}}\",\n 'fk_category',\n \"{{%forum_category}}\",\n 'id',\n 'CASCADE'\n );\n }", "public function safeUp()\n {\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable('{{%category_posts}}', [\n 'post_id' => Schema::TYPE_INTEGER,\n 'category_id' => Schema::TYPE_INTEGER,\n ], $tableOptions);\n\n $this->createIndex('FK_category', '{{%category_posts}}', 'category_id');\n $this->addForeignKey(\n 'FK_category_post', '{{%category_posts}}', 'category_id', '{{%category}}', 'id', 'SET NULL', 'CASCADE'\n );\n\n $this->createIndex('FK_post', '{{%category_posts}}', 'post_id');\n $this->addForeignKey(\n 'FK_post_category', '{{%category_posts}}', 'post_id', '{{%post}}', 'id', 'SET NULL', 'CASCADE'\n );\n\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t'like',\n\t\t\tarray(\n\t\t\t\t'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t\t'user_id' => 'int(11) UNSIGNED NOT NULL',\n\t\t\t\t'post_id' => 'int (11) NOT NULL',\n\t\t\t\t'status' => 'TINYINT(1)',\n\t\t\t\t'created_at' => 'int(11)',\n\t\t\t\t'updated_at' => 'int(11)',\n\t\t\t\t'PRIMARY KEY (id)',\n\t\t\t\t),\n\t\t\t'ENGINE=InnoDB'\n\n\t\t\t);\n\t}", "public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }", "public function safeUp()\n\t{\n\t\t$this->createTable('ejecutivos', array(\n\t\t\t\t'id' => 'pk',\n\t\t\t\t'cliente_id' => 'INT NOT NULL',\n\t\t\t\t'cargo' => 'VARCHAR(45) DEFAULT NULL',\n\t\t\t\t'nombre' => 'VARCHAR(45) DEFAULT NULL',\n\t\t\t\t'apellido' => 'VARCHAR(45) DEFAULT NULL',\n\t\t\t\t'email' => 'VARCHAR(255) DEFAULT NULL',\n\t\t\t\t'telefono' => 'VARCHAR(45) DEFAULT NULL',\n\t\t\t\t'celular' => 'VARCHAR(45) DEFAULT NULL',\n\t\t));\n\t\t$this->addForeignKey('FK01_ejecutivos_cliente', 'ejecutivos', 'cliente_id', 'cliente', 'id', 'RESTRICT');\n\t\n\t}", "public function safeUp()\n {\n $this -> alterColumn('diving_log', 'weight', $this->smallInteger()->notNull()->defaultValue(0)->comment('配重'));\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'application_id' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Ид приложения\"',\n\n\t\t\t\t'message' => 'TEXT NOT NULL DEFAULT \"\" COMMENT \"Оригинал\"',\n\t\t\t\t'category' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Категория\"',\n\t\t\t\t'language' => 'VARCHAR(5) NOT NULL DEFAULT \"\" COMMENT \"Язык\"',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function safeUp()\n {\n $this->createTable('site_phrase', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'phrase' => 'string NOT NULL',\n 'hash' => 'varchar(32)',\n 'price' => 'decimal(10,2) NOT NULL',\n 'active' => self::MYSQL_TYPE_BOOLEAN,\n ));\n\n $this->addForeignKey('site_phrase_site_id', 'site_phrase', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t// examples:\n\t\t\t\t'l_label' => 'VARCHAR(200) NULL DEFAULT NULL',\n\t\t\t\t'l_announce' => 'TEXT NULL DEFAULT NULL',\n\t\t\t\t//'l_content' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_principles_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_principles_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function safeUp()\n\t{\n $this->dropForeignKey('client', Yii::app()->getModule('user')->tableUsersClients);\n $this->addForeignKey('client', Yii::app()->getModule('user')->tableUsersClients, 'clients_id', Yii::app()->getModule('user')->tableClients, 'id', 'SET NULL', 'SET NULL');\n\t}", "public function safeUp() {\n\t$this->createTable('post', array(\n 'id' =>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'created_on' =>\"int(11) NOT NULL\",\n 'title' =>\"varchar(255) NOT NULL\",\n 'context' =>\"text NOT NULL\",\n \"PRIMARY KEY (`id`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "public function safeUp() {\n\n $this->createTable('user', [\n 'user_id' => Schema::TYPE_PK,\n 'user_first_name' => $this->string(100) . ' NOT NULL',\n 'user_last_name' => $this->string(100) . ' NOT NULL',\n 'user_email' => $this->string(100) . ' NOT NULL',\n 'user_password' => $this->string(500) . ' NOT NULL',\n 'user_access_token' => $this->string(500),\n 'user_auth_token' => $this->string(500),\n 'user_created_at' => $this->integer() . ' NOT NULL',\n 'user_modified_at' => $this->integer() . ' NOT NULL',\n ]);\n\n // Create index of foreign key\n $this->createIndex('user_email_idx', 'user', 'user_email');\n\n // Create index of foreign key\n $this->createIndex('user_password_idx', 'user', 'user_password');\n }", "public function safeUp()\n {\n $this->addColumn($this->tableName, 'page_hash', $this->string(32));\n\n $this->createIndex('posts_rating_page_hash_idx', $this->tableName, 'page_hash');\n }", "public function safeUp()\n {\n $this->addColumn('{{%organization}}', 'legal_entity', $this->string()->null());\n $this->addColumn('{{%organization}}', 'contact_name', $this->string()->null());\n $this->addColumn('{{%organization}}', 'about', $this->text()->null());\n $this->addColumn('{{%organization}}', 'picture', $this->string()->null());\n }", "public function safeUp()\r\n {\r\n $tableOptions = null;\r\n if ($this->db->driverName === 'mysql') {\r\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';\r\n }\r\n\r\n $this->createTable('{{%contact_msg}}', [\r\n 'id' => Schema::TYPE_PK,\r\n 'from_email' => Schema::TYPE_STRING . \"(320) NOT NULL\",\r\n 'to_email' => Schema::TYPE_STRING . \"(320) NULL\",\r\n 'subject' => Schema::TYPE_STRING . \"(300) NOT NULL\",\r\n 'text' => Schema::TYPE_TEXT,\r\n 'viewed' => Schema::TYPE_BOOLEAN . \"(1) NOT NULL DEFAULT '0'\",\r\n 'created_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n 'updated_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n ], $tableOptions);\r\n }", "public function safeUp()\n\t{\n\t $json = '{\"settings\":{\"dependencies\":[],\"elements\":{\"fields\":[{\"group\":\"About Page\",\"name\":\"CV\",\"handle\":\"cv\",\"instructions\":\"This is the cv and shadow cv that can be downloaded.\",\"translatable\":\"0\",\"required\":false,\"type\":\"Assets\",\"typesettings\":{\"useSingleFolder\":\"\",\"sources\":[\"resources\"],\"defaultUploadLocationSource\":\"timelinePhotos\",\"defaultUploadLocationSubpath\":\"\",\"singleUploadLocationSource\":\"timelinePhotos\",\"singleUploadLocationSubpath\":\"\",\"restrictFiles\":\"\",\"limit\":\"1\",\"viewMode\":\"list\",\"selectionLabel\":\"Upload CV\"}},{\"group\":\"About Page\",\"name\":\"Speaker Packet\",\"handle\":\"speakerPacket\",\"instructions\":\"This is the professional bio and speaker\\u0027s packet that can be downloaded.\",\"translatable\":\"0\",\"required\":false,\"type\":\"Assets\",\"typesettings\":{\"useSingleFolder\":\"\",\"sources\":[\"resources\"],\"defaultUploadLocationSource\":\"resources\",\"defaultUploadLocationSubpath\":\"\",\"singleUploadLocationSource\":\"timelinePhotos\",\"singleUploadLocationSubpath\":\"\",\"restrictFiles\":\"\",\"limit\":\"1\",\"viewMode\":\"list\",\"selectionLabel\":\"Upload speaker packet\"}}]}}}';\n return craft()->migrationManager_migrations->import($json);\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'label' => 'VARCHAR(20) NULL DEFAULT NULL COMMENT \"language label\"',\n\t\t\t\t'code' => 'VARCHAR(5) NOT NULL COMMENT \"language code\"',\n\t\t\t\t'locale' => 'VARCHAR (5) NULL DEFAULT NULL',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not visible; 1 - visible\"',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not published; 1 - published\"',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0 COMMENT \"order by position DESC\"',\n\t\t\t\t'created' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - creation time\"',\n\t\t\t\t'modified' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - last entity modified time\"',\n\n\t\t\t\t'UNIQUE key_unique_code (code)',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\n\t\t$this->insert('{{language}}', array(\n\t\t\t'label' => 'рус',\n\t\t\t'code' => 'ru',\n\t\t\t'locale' => 'ru',\n\t\t));\n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable('quiz_sections', array(\n 'section_id' => 'pk',\n 'title' => 'string NOT NULL',\n ));\n\t}", "public function safeUp()\n\t{\n\t\t$this->dropForeignKey('fk_issue_project','tbl_issue');\n\t\t$this->dropForeignKey('fk_issue_owner','tbl_issue');\n\t\t$this->dropForeignKey('fk_issue_requester','tbl_issue');\n\t\t$this->dropForeignKey('fk_user_project','tbl_project_user_assignment');\n\t\t$this->dropForeignKey('fk_project_user','tbl_project_user_assignment');\n\n\t\t$this->alterColumn('tbl_user','id','varchar(64)');\n\t\t$this->alterColumn('tbl_user','create_user_id','varchar(64)');\n\t\t$this->alterColumn('tbl_user','update_user_id','varchar(64)');\n\t\t$this->alterColumn('tbl_issue','id','varchar(64)');\n\t\t$this->alterColumn('tbl_issue','create_user_id','varchar(64)');\n\t\t$this->alterColumn('tbl_issue','update_user_id','varchar(64)');\n\t\t$this->alterColumn('tbl_issue','project_id','varchar(64)');\n\t\t$this->alterColumn('tbl_issue','status_id','varchar(64)');\n\t\t$this->alterColumn('tbl_issue','owner_id','varchar(64)');\n\t\t$this->alterColumn('tbl_issue','requester_id','varchar(64)');\n\t\t$this->alterColumn('tbl_project','id','varchar(64)');\n\t\t$this->alterColumn('tbl_project','create_user_id','varchar(64)');\n\t\t$this->alterColumn('tbl_project','update_user_id','varchar(64)');\n\t\t$this->alterColumn('tbl_project_user_assignment','project_id','varchar(64)');\n\t\t$this->alterColumn('tbl_project_user_assignment','user_id','varchar(64)');\n\n\n\n\t $this->addForeignkey('fk_issue_project','tbl_issue','project_id','tbl_project','id','CASCADE','RESTRICT');\n\t $this->addForeignkey('fk_issue_owner','tbl_issue','owner_id','tbl_user','id','CASCADE','RESTRICT');\n\t $this->addForeignkey('fk_issue_requester','tbl_issue','requester_id','tbl_user','id','CASCADE','RESTRICT');\n\t $this->addForeignkey('fk_project_user','tbl_project_user_assignment','project_id','tbl_project','id','CASCADE','RESTRICT');\n\t $this->addForeignkey('fk_user_project','tbl_project_user_assignment','user_id','tbl_user','id','CASCADE','RESTRICT');\n\t}", "protected abstract function do_up();", "protected function rollBackTransaction()\n {\n $this->container->make('db')->rollBack();\n }", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function migrate() {}", "public function migrate()\n {\n $fileSystem = new Filesystem();\n\n $fileSystem->copy(\n __DIR__.'/../database/migrations/2018_06_29_032244_create_laravel_follow_tables.php',\n __DIR__.'/database/migrations/create_laravel_follow_tables.php'\n );\n\n foreach ($fileSystem->files(__DIR__.'/database/migrations') as $file) {\n $fileSystem->requireOnce($file);\n }\n\n (new \\CreateLaravelFollowTables())->up();\n (new \\CreateUsersTable())->up();\n (new \\CreateOthersTable())->up();\n }", "abstract protected function up();", "public function safeDown()\n {\n $this->dropTable($this->tableName);\n }", "public function preUp()\n {\n }", "public function migrate()\n {\n $fileSystem = new Filesystem();\n $classFinder = new ClassFinder();\n\n foreach ($fileSystem->files(__DIR__.'/../../../../tests/NilPortugues/App/Migrations') as $file) {\n $fileSystem->requireOnce($file);\n $migrationClass = $classFinder->findClass($file);\n (new $migrationClass())->down();\n (new $migrationClass())->up();\n }\n }", "public function migrate()\n\t{ \n\t\t(new MigratorInterface)->migrate();\n\t}", "public function isMigratingUp();", "public function safeUp()\n\t{\n\t $json = '{\"settings\":{\"dependencies\":{\"sections\":[{\"name\":\"Resources\",\"handle\":\"resources\",\"type\":\"channel\",\"enableVersioning\":\"1\",\"hasUrls\":\"1\",\"template\":\"resources/_entry\",\"maxLevels\":null,\"locales\":{\"en_us\":{\"locale\":\"en_us\",\"urlFormat\":\"resources/{slug}\",\"nestedUrlFormat\":null,\"enabledByDefault\":\"1\"}},\"entrytypes\":[{\"sectionHandle\":\"resources\",\"hasTitleField\":\"1\",\"titleLabel\":\"Title\",\"name\":\"Resources\",\"handle\":\"resources\",\"fieldLayout\":{\"Content\":[\"description\"]},\"requiredFields\":[]}]}]},\"elements\":{\"sections\":[{\"name\":\"Resources\",\"handle\":\"resources\",\"type\":\"channel\",\"enableVersioning\":\"1\",\"hasUrls\":\"1\",\"template\":\"resources/_entry\",\"maxLevels\":null,\"locales\":{\"en_us\":{\"locale\":\"en_us\",\"urlFormat\":\"resources/{slug}\",\"nestedUrlFormat\":null,\"enabledByDefault\":\"1\"}},\"entrytypes\":[{\"sectionHandle\":\"resources\",\"hasTitleField\":\"1\",\"titleLabel\":\"Title\",\"name\":\"Resources\",\"handle\":\"resources\",\"fieldLayout\":{\"Content\":[\"description\"]},\"requiredFields\":[]}]}]}}}';\n return craft()->migrationManager_migrations->import($json);\n }", "public function migrate()\n {\n $this->syncRepository();\n $this->copyVariables();\n $this->copyDeployKeys();\n $this->reEnableBuilds();\n }", "public function safeUp()\n {\n $fields = (new Query())\n ->select(['*'])\n ->from([Table::FIELDS])\n ->where(['like', 'context', 'superTableBlockType:'])\n ->andWhere(['type' => MissingField::class])\n ->all();\n\n foreach ($fields as $field) {\n $settings = Json::decode($field['settings']);\n\n if (is_array($settings) && array_key_exists('expectedType', $settings)) {\n $expectedType = $settings['expectedType'];\n $newSettings = $settings['settings'] ?? [];\n\n $this->update(Table::FIELDS, [\n 'type' => $expectedType,\n 'settings' => $newSettings,\n ], [\n 'id' => $field['id']\n ]);\n }\n }\n }", "public function up() { return $this->run('up'); }", "public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }", "public function safeUp()\n {\n $this->createTable('user', array(\n 'id' => $this->primaryKey(),\n 'user_name' => $this->string(50)->notNull(),\n 'last_name' => $this->string(50)->notNull(),\n 'first_name' => $this->string(50)->notNull(),\n 'email' => $this->string(255)->notNull(),\n 'password' => $this->string(255)->notNull(),\n 'birthday' => $this->date(),\n 'zipcode' => $this->integer(5)->notNull(),\n 'city' => $this->string(50)->notNull(),\n 'country' => $this->string(50)->notNull(),\n 'street' => $this->string(50)->notNull(),\n 'update_time' => $this->dateTime(),\n 'create_time' => $this->dateTime(),\n ) // make für data form wir konnen später tauschen\n , 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB');\n\n\n\n }", "public function migrate()\n\t{\n\t}", "public function safeUp()\n\t{\n\t\t$chargesTable = $this->dbConnection->schema->getTable('{{charges}}');\n\n\t\tif ($chargesTable->getColumn('planCoupon') === null)\n\t\t{\n\t\t\t// Add the 'hash' column to the charges table\n\t\t\t$this->addColumnAfter('charges', 'planCoupon', array('column' => ColumnType::Varchar), 'planAmount');\n\t\t\t$this->addColumnAfter('charges', 'planDiscount', array('column' => ColumnType::Int), 'planAmount');\n\t\t\t$this->addColumnAfter('charges', 'planFullAmount', array('column' => ColumnType::Int), 'planAmount');\n\t\t\t$this->addColumnAfter('charges', 'planCouponStripeId', array('column' => ColumnType::Varchar), 'planCoupon');\n\t\t}\n\n\t\treturn true;\n\t}", "public function safeUp()\n {\n $this->addColumn('contract', 'type_of_payment', 'VARCHAR(255)');\n }", "function migrate(){\n\n create_table();\n save_migration_tables();\n\n}", "abstract public function up(ExceptionalMysqli &$mysqli);", "public function safeDown()\n {\n $this->down();\n }", "public function safeDown()\n {\n $this->down();\n }", "private function rollBack()\n\t{\n\t\tif (self::TRANSACTION) {\n\t\t\t$this->database->rollBack();\n\t\t}\n\t}", "public function preUp(MigrationManager $manager)\n {\n }", "public function preUp(MigrationManager $manager)\n {\n }", "public function preUp(MigrationManager $manager)\n {\n }", "public function up()\n {\n $oldStores = $this->getOldStores(); // update to newest data_version\n $newStores = $this->getNewStores(); // run all upgrade files\n if (!count($oldStores) && !count($newStores)) {\n return;\n }\n\n foreach ($this->getDepends() as $moduleCode) {\n if (0 !== strpos($moduleCode, 'TM_')) {\n continue;\n }\n $this->_getModuleObject($moduleCode)->up();\n }\n $saved = false;\n\n // upgrade currently installed version to the latest data_version\n if (count($oldStores)) {\n foreach ($this->getUpgradesToRun() as $version) {\n // customer able to skip upgrading data of installed modules\n if (!$this->getSkipUpgrade()) {\n $this->getUpgradeObject($version)\n ->setStoreIds($oldStores)\n ->upgrade();\n }\n $this->setDataVersion($version)->save();\n $saved = true;\n }\n }\n\n // install module to the new stores\n if (count($newStores)) {\n foreach ($this->getUpgradesToRun(0) as $version) {\n $this->getUpgradeObject($version)\n ->setStoreIds($newStores)\n ->upgrade();\n $this->setDataVersion($version)->save();\n $saved = true;\n }\n }\n\n if (!$saved) {\n $this->save(); // identity key could be updated without running the upgrades\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 safeDown()\n {\n //return false;\n $this->dropTable($this->tablePost);\n $this->dropTable($this->tableUser);\n }", "public function safeUp() {\n\n $user_id = 2;\n\n $this->insert('{{%category}}', [\n 'title' => 'Games',\n 'description' => 'Contains all games related categoried',\n 'show_in_menu' => TRUE,\n 'created_at' => 1493585108,\n 'updated_at' => 1493585108,\n ]);\n\n $category_id = $this->db->getLastInsertID();\n\n $this->insert('{{%application}}', [\n 'package_id' => 'testingapplicasdfasfasdationasdfasdjflasjdfasdjfl',\n 'title' => 'Sub way surfers',\n 'short_description' => 'This is short description',\n 'description' => 'This is very good game',\n 'playstore_url' => 'http://play.google.com',\n 'user_id' => $user_id,\n 'created_at' => 1493585108,\n 'updated_at' => 1493585108,\n ]);\n\n $app_id = $this->db->getLastInsertID();\n\n $this->insert('{{%application_category}}', [\n 'application_id' => $app_id,\n 'category_id' => $category_id,\n ]);\n\n $this->insert('{{%application}}', [\n 'package_id' => 'testingapplicationasdfasdjflsdfasdfasjdfasdjfl',\n 'title' => 'Candy Crush',\n 'short_description' => 'This is short description',\n 'description' => 'Here you crush candies',\n 'playstore_url' => 'http://play.google.com',\n 'user_id' => $user_id,\n 'created_at' => 1493585108,\n 'updated_at' => 1493585108,\n ]);\n\n $app_id = $this->db->getLastInsertID();\n\n $this->insert('{{%application_category}}', [\n 'application_id' => $app_id,\n 'category_id' => $category_id,\n ]);\n\n //new category\n $this->insert('{{%category}}', [\n 'title' => 'Sports',\n 'description' => 'Contains all sports apps that provide you sports info.',\n 'show_in_menu' => TRUE,\n 'created_at' => 1493585108,\n 'updated_at' => 1493585108,\n ]);\n\n $category_id = $this->db->getLastInsertID();\n\n $this->insert('{{%application}}', [\n 'package_id' => 'testingapplicationasdfasdjflasjdfasdjfasdfasdfl',\n 'title' => 'Ten Sports',\n 'short_description' => 'This is short description',\n 'description' => ' Here you watch ten sports live.',\n 'playstore_url' => 'http://play.google.com',\n 'user_id' => $user_id,\n 'created_at' => 1493585108,\n 'updated_at' => 1493585108,\n ]);\n\n $app_id = $this->db->getLastInsertID();\n\n $this->insert('{{%application_category}}', [\n 'application_id' => $app_id,\n 'category_id' => $category_id,\n ]);\n\n\n\n $this->insert('{{%application}}', [\n 'package_id' => 'testingapplicationasdfasdjflasjdfasdjfl',\n 'title' => 'Espncricinfo',\n 'short_description' => 'This is short description',\n 'description' => ' Here you can check all live cricket matches around the globe.',\n 'playstore_url' => 'http://play.google.com',\n 'user_id' => $user_id,\n 'created_at' => 1493585108,\n 'updated_at' => 1493585108,\n ]);\n\n $app_id = $this->db->getLastInsertID();\n\n $this->insert('{{%application_category}}', [\n 'application_id' => $app_id,\n 'category_id' => $category_id,\n ]);\n\n\n //new category\n $this->insert('{{%category}}', [\n 'title' => 'Health',\n 'description' => 'Contains all health related apps.',\n 'show_in_menu' => TRUE,\n 'created_at' => 1493585108,\n 'updated_at' => 1493585108,\n ]);\n\n\n $this->insert('{{%application}}', [\n 'package_id' => 'testingapplicationasdfas343djflasjdfasdjfl',\n 'title' => 'Doctors online',\n 'short_description' => 'This is short description',\n 'description' => ' Many doctors available to discuss you problems here.',\n 'playstore_url' => 'http://play.google.com',\n 'user_id' => $user_id,\n 'created_at' => 1493585108,\n 'updated_at' => 1493585108,\n ]);\n\n $app_id = $this->db->getLastInsertID();\n\n $this->insert('{{%application_category}}', [\n 'application_id' => $app_id,\n 'category_id' => $category_id,\n ]);\n\n\n $this->insert('{{%application}}', [\n 'package_id' => 'testingapplicationasdfasdjflaasdfas222sjdfasdjfl',\n 'title' => 'Fitnuss club ',\n 'short_description' => 'This is short description',\n 'description' => ' See each and everything related to fitness.',\n 'playstore_url' => 'http://play.google.com',\n 'user_id' => $user_id,\n 'created_at' => 1493585108,\n 'updated_at' => 1493585108,\n ]);\n\n $app_id = $this->db->getLastInsertID();\n\n $this->insert('{{%application_category}}', [\n 'application_id' => $app_id,\n 'category_id' => $category_id,\n ]);\n }", "public function safeUp() {\n $this->addColumn('istat_nazioni','data_soppressione', $this->date()->comment('Data soppressione o variazione'));\n $this->addColumn('istat_nazioni','soppressa', $this->boolean()->notNull()->defaultValue(0)->comment('Nazione soppressa o variata'));\n\n /**\n * Adding a new continent for ISTAT 'codici catastali dipendenze'\n */\n $this->insert('istat_continenti', [\n 'id' => 7,\n 'nome' => 'Dipendenze',\n ]);\n\n /**\n * Data manually extracted from data-sources/amministrazionicomunali_net-ESTERI.xls file\n * Source: https://www.amministrazionicomunali.net/docs/file/ESTERI.XLS (2018-08-18 10:10AM)\n */\n $this->batchInsert(\n \"istat_nazioni\",\n [ 'id', 'nome', 'nome_inglese', 'codice_catastale', 'istat_continenti_id', 'data_soppressione', 'soppressa'],\n [\n [ '2000000', 'Cecoslovacchia', 'Czechoslovakia', 'Z105', 1, '1993-01-01', 1],\n [ '2000001', 'Germania Repubblica Democratica', 'German Democratic Republic', 'Z111', 1, '1990-10-03', 1],\n [ '2000002', 'Germania Repubblica Federale', 'Federal Republic of Germany', 'Z112', 1, '1990-10-03', 1],\n [ '2000003', 'Iugoslavia', 'Yugoslavia', 'Z118', 1, '2003-01-04', 1],\n [ '2000004', 'U.R.S.S. - Unione Repubbliche Socialiste Sovietiche', 'U.S.S.R. - Union of Soviet Socialist Republics', 'Z135', 1, '1992-03-31', 1],\n [ '2000005', 'Georgia', 'Georgia', 'Z135', 3, '1994-01-01', 1],\n [ '2000006', 'Azerbaigian', 'Azerbaijan', 'Z141', 3, '1994-01-01', 1],\n [ '2000007', 'Kirghizistan', 'Kyrgyzstan', 'Z142', 3, '1994-01-01', 1],\n [ '2000008', 'Tagikistan', 'Tajikistan', 'Z147', 3, '1994-01-01', 1],\n [ '2000009', 'Turkmenistan', 'Turkmenistan', 'Z151', 3, '1994-01-01', 1],\n [ '2000010', 'Serbia e Montenegro', 'Serbia and Montenegro', 'Z157', 3, '2006-06-02', 1],\n [ '2000011', 'Arabia Meridionale, Federazione', 'South Arabia, Federation of', 'Z201', 3, '1975-12-31', 1],\n [ '2000012', 'Arabia Meridionale, Protettorato', 'South Arabia, Protectorate of', 'Z202', 3, '1975-12-31', 1],\n [ '2000013', 'Malaysia', 'Malaysia', 'Z230', 3, '1965-08-09', 1],\n [ '2000014', 'Ryukyu (Isole)', 'Ryukyu (Islands)', 'Z238', 3, '1972-05-22', 1],\n [ '2000015', 'Sikkim', 'Sikkim', 'Z239', 3, '1974-06-28', 1],\n [ '2000016', 'Timor (Isola)', 'Timor (Island)', 'Z242', 3, '1976-06-01', 1],\n [ '2000017', 'Vietnam del Sud', 'South Vietnam', 'Z244', 3, '1976-04-25', 1],\n [ '2000040', 'Vietnam del Nord', 'North Vietnam', 'Z245', 3, '1976-04-25', 1],\n [ '2000018', 'Yemen, Repubblica Democratica Popolare', 'People\\'s Democratic Republic of Yemen', 'Z250', 3, '1990-05-22', 1],\n [ '2000019', 'Africa del Sud-Ovest', 'South West Africa', 'Z300', 2, '1990-03-21', 1],\n [ '2000020', 'Basutoland', 'Basutoland', 'Z303', 2, '1966-10-04', 1],\n [ '2000021', 'Beciuania (Botswana)', 'Botswana', 'Z304', 2, '1966-09-30', 1],\n [ '2000022', 'IFNI', 'IFNI', 'Z323', 2, '1984-12-31', 1],\n [ '2000023', 'Sahara Spagnolo', 'Spanish Sahara', 'Z339', 2, '1976-01-01', 1],\n [ '2000024', 'Territorio francese degli Afar e degli Issa', 'French Territory of the Afars and the Issas', 'Z346', 2, '1977-06-27', 1],\n [ '2000025', 'Somalia Francese', 'French Somaliland', 'Z346', 2, '1975-12-31', 1],\n [ '2000026', 'Tanganica', 'Tanganyika', 'Z350', 2, '1964-04-25', 1],\n [ '2000027', 'Zanzibar', 'Zanzibar', 'Z356', 2, '1964-04-25', 1],\n [ '2000028', 'Sahara Meridionale', 'South Sahara', 'Z362', 2, '1976-01-01', 1],\n [ '2000029', 'Sahara Settentrionale', 'North Sahara', 'Z363', 2, '1976-01-01', 1],\n [ '2000030', 'Bophuthatswana', 'Bophuthatswana', 'Z364', 2, '1994-01-01', 1],\n [ '2000031', 'Transkei', 'Transkei', 'Z365', 2, '1994-01-01', 1],\n [ '2000032', 'Venda', 'Venda', 'Z366', 2, '1994-01-01', 1],\n [ '2000033', 'Ciskei', 'Ciskei', 'Z367', 2, '1994-01-01', 1],\n [ '2000034', 'Nyasaland', 'Nyasaland', 'Z369', 2, '1964-07-05', 1],\n [ '2000035', 'Congo Belga', 'Belgian Congo', 'Z370', 2, '1960-01-01', 1],\n [ '2000036', 'Antille Britanniche (Prima del 30-11-1966)', 'British Antilles (Before 1966-11-30)', 'Z500', 4, '1975-12-31', 1],\n [ '2000037', 'Antille Olandesi', 'Dutch Antilles', 'Z501', 4, '1973-07-10', 1],\n [ '2000038', 'Panama Zona Del Canale', 'Panama Canal Zone', 'Z517', 4, '1977-09-07', 1],\n [ '2000039', 'Antille Britanniche (Tra 30-11-1966 e 07-02-1974)', 'British Antilles (Between 30-11-1966 and 07-02-1974)', 'Z521', 4, '1974-02-07', 1],\n [ '2000041', 'Antille Britanniche', 'British Antilles', 'Z523', 4, '1983-09-19', 1],\n [ '2000042', 'Guyana Olandese', 'Dutch Guyana', 'Z608', 4, '1975-12-31', 1],\n [ '2000043', 'Guyana Britannica', 'British Guyana', 'Z606', 4, '1975-12-31', 1],\n [ '2000044', 'Caroline (Isole)', 'Caroline (Islands)', 'Z701', 4, '1984-12-31', 1],\n [ '2000045', 'Gilbert e Ellice (Isole)', 'Gilbert and Ellice Islands', 'Z705', 5, '1980-12-31', 1],\n [ '2000046', 'Marcus (Isole)', 'Marcus (Islands)', 'Z705', 5, '1975-12-31', 1],\n [ '2000047', 'Nuove Ebridi (Isole Condominio Franco-Inglese)', 'New Hebrides', 'Z717', 5, '1980-12-31', 1],\n [ '2000048', 'Nuova Guinea (Prima del 31-12-1975)', 'New Guinea (Before 1975-12-31)', 'Z718', 5, '1975-12-31', 1],\n [ '2000049', 'Papuasia', 'Papuasia', 'Z720', 5, '1975-12-31', 1],\n [ '2000050', 'Dipendenze Canadesi', 'Canada Dependent', 'Z800', 7, null, 0],\n [ '2000051', 'Dipendenze Norvegesi Artiche', 'Norwegian Artic Dependent', 'Z801', 7, null, 0],\n [ '2000052', 'Dipendenze Sovietiche', 'Soviet Union Dependent', 'Z802', 7, '1992-03-31', 1],\n [ '2000053', 'Dipendenze Russe', 'Russia Dependent', 'Z802', 7, null, 0],\n [ '2000054', 'Dipendenze Australiane', 'Australia Dependent', 'Z900', 7, null, 0],\n [ '2000055', 'Dipendenze Britanniche', 'Britain Dependent', 'Z901', 7, null, 0],\n [ '2000056', 'Dipendenze Francesi', 'France Dependent', 'Z902', 7, null, 0],\n [ '2000057', 'Dipendenze Neozelandesi', 'New Zealand Dependent', 'Z903', 7, null, 0],\n [ '2000058', 'Dipendenze Norvegesi Antartiche', 'Norwegian Antartica Dependent', 'Z904', 7, null, 0],\n [ '2000059', 'Dipendenze Statunitensi', 'US Dependent', 'Z905', 7, null, 0],\n [ '2000060', 'Dipendenze Sudafricane', 'South Africa Dependent', 'Z906', 7, null, 0],\n ]\n );\n\n return true;\n\n }", "public function safeDown()\r\n {\r\n $this->down();\r\n }", "public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}", "function runUp()\n{\n $files = scandir(LIB_ROOT . '/migrations');\n\n $db_migration_version = get_current_migration_version();\n\n $migrations = array();\n\n foreach($files as $file)\n {\n if(preg_match('/migration_([1-9][0-9]*)\\.php/i', $file, $matches))\n {\n $migration_version = $matches[1];\n\n // we only care about this migration if it has not been performed yet\n if($migration_version > $db_migration_version)\n {\n require_once LIB_ROOT . '/migrations/' . $matches[0];\n\n $migrations[$migration_version] = 'Migration_' . $migration_version;\n }\n }\n }\n\n if(count($migrations) == 0)\n echo 'There are no migrations to run; DB is already up to date (at version ' . $db_migration_version . ').' . \"\\n\\n\";\n else\n {\n // sort migrations, so that we execute them in ascending order\n ksort($migrations);\n\n $count = 0;\n\n foreach ($migrations as $id => $class_name)\n {\n $migrationClass = new $class_name();\n\n $count++;\n\n echo 'Running migration ' . $id . ' (' . $count . ' of ' . count($migrations) . ')...' . \"\\n\";\n\n try\n {\n $migrationClass->Up();\n fetch_none('UPDATE migration_version SET version=' . quote_smart($id));\n echo ' done!' . \"\\n\";\n }\n catch(Exception $e)\n {\n echo ' Encountered an exception during migration:' . \"\\n\";\n echo ' ' . $e->getMessage() . \"\\n\";\n echo ' Migration was not completed; the database may be left in a weird state.' . \"\\n\";\n if($count < count($migrations))\n {\n $remaining = (count($migrations) - $count);\n echo $remaining . ' remaining migration' . ($remaining == 1 ? '' : 's') . ' will not be run.' . \"\\n\";\n }\n echo \"\\n\";\n die();\n }\n }\n\n echo 'All done!' . \"\\n\\n\";\n }\n}", "public function safeUp()\n\t{\n $this->insert('options', array('name'=>'user_activity_period','value'=>30));\t \n\t}", "public function up(PhoreDba $db)\n {\n }", "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'id' => $this->bigPrimaryKey(),\n 'name' => $this->string()->notNull(),\n 'alt_name' => $this->string()->notNull(),\n 'unit' => $this->string()->notNull(),\n 'value' => $this->double()->notNull(),\n 'sex' => $this->string()->notNull(),\n ]);\n\n $this->createIndex('norms_vit_min_alt_name_idx', $this->tableName, 'alt_name');\n $this->createIndex('norms_vit_min_unit_idx', $this->tableName, 'unit');\n $this->createIndex('norms_vit_min_sex_idx', $this->tableName, 'sex');\n\n $norms = [\n ['id' => 1, 'name' => 'Калий', 'alt_name' => 'macro_k',\t'unit' => 'мг', 'value' => 2500, 'sex' => 'a'],\n ['id' => 2, 'name' => 'Кальций', 'alt_name' => 'macro_ca', 'unit' => 'мг', 'value' => 1000, 'sex' => 'a'],\n ['id' => 3, 'name' => 'Магний', 'alt_name' => 'macro_mg', 'unit' => 'мг', 'value' => 400, 'sex' => 'a'],\n ['id' => 4, 'name' => 'Натрий', 'alt_name' => 'macro_na', 'unit' => 'мг', 'value' => 1300, 'sex' => 'a'],\n ['id' => 5, 'name' => 'Сера', 'alt_name' => 'macro_s', 'unit' => 'мг', 'value' => 1000, 'sex' => 'a'],\n ['id' => 6, 'name' => 'Фосфор', 'alt_name' => 'macro_p', 'unit' => 'мг', 'value' => 800, 'sex' => 'a'],\n ['id' => 7, 'name' => 'Хлор', 'alt_name' => 'macro_cl', 'unit' => 'мг', 'value' => 2300, 'sex' => 'a'],\n ['id' => 8, 'name' => 'Железо', 'alt_name' => 'micro_fe', 'unit' => 'мг', 'value' => 10, 'sex' => 'm'],\n ['id' => 9, 'name' => 'Железо', 'alt_name' => 'micro_fe', 'unit' => 'мг', 'value' => 18, 'sex' => 'w'],\n ['id' => 10, 'name' => 'Цинк', 'alt_name' => 'micro_zn', 'unit' => 'мг', 'value' => 12, 'sex' => 'a'],\n ['id' => 11, 'name' => 'Йод', 'alt_name' => 'micro_j', 'unit' => 'мкг', 'value' => 150, 'sex' => 'a'],\n ['id' => 12, 'name' => 'Медь', 'alt_name' => 'micro_cu', 'unit' => 'мг', 'value' => 1, 'sex' => 'a'],\n ['id' => 13, 'name' => 'Марганец', 'alt_name' => 'micro_mn', 'unit' => 'мг', 'value' => 2, 'sex' => 'a'],\n ['id' => 14, 'name' => 'Селен', 'alt_name' => 'micro_se', 'unit' => 'мкг', 'value' => 55, 'sex' => 'w'],\n ['id' => 15, 'name' => 'Селен', 'alt_name' => 'micro_se', 'unit' => 'мкг', 'value' => 70, 'sex' => 'm'],\n ['id' => 16, 'name' => 'Хром', 'alt_name' => 'micro_cr', 'unit' => 'мкг', 'value' => 50, 'sex' => 'a'],\n ['id' => 17, 'name' => 'Молибден', 'alt_name' => 'micro_mo', 'unit' => 'мкг', 'value' => 70, 'sex' => 'a'],\n ['id' => 18, 'name' => 'Фтор', 'alt_name' => 'micro_f', 'unit' => 'мкг', 'value' => 4000, 'sex' => 'a'],\n ['id' => 19, 'name' => 'Кобальт', 'alt_name' => 'micro_co', 'unit' => 'мкг', 'value' => 10, 'sex' => 'a'],\n ['id' => 20, 'name' => 'Кремний', 'alt_name' => 'micro_si', 'unit' => 'мг', 'value' => 30, 'sex' => 'a'],\n ['id' => 21, 'name' => 'Бор', 'alt_name' => 'micro_b', 'unit' => 'мг', 'value' => 2, 'sex' => 'a'],\n ['id' => 22, 'name' => 'Ванадий', 'alt_name' => 'micro_v', 'unit' => 'мкг', 'value' => 40, 'sex' => 'a'],\n ['id' => 23, 'name' => 'Витамин C', 'alt_name' => 'vit_c', 'unit' => 'мг', 'value' => 90, 'sex' => 'a'],\n ['id' => 24, 'name' => 'Витамин B1 (тиамин)', 'alt_name' => 'vit_b1', 'unit' => 'мг', 'value' => 1.5, 'sex' => 'a'],\n ['id' => 25, 'name' => 'Витамин B2 (рибофлавин)', 'alt_name' => 'vit_b2', 'unit' => 'мг', 'value' => 1.8, 'sex' => 'a'],\n ['id' => 26, 'name' => 'Витамин B5 (пантотеновая кислота)', 'alt_name' => 'vit_b5',\t 'unit' => 'мг', 'value' => 5, 'sex' => 'a'],\n ['id' => 27, 'name' => 'Витамин B6 (пиридоксин)', 'alt_name' => 'vit_b6', 'unit' => 'мг', 'value' => 2, 'sex' => 'a'],\n ['id' => 28, 'name' => 'Витамин PP (ниацин)', 'alt_name' => 'vit_pp_niacin', 'unit' => 'мг', 'value' => 20, 'sex' => 'a'],\n ['id' => 29, 'name' => 'Витамин B12 (цианокобаламин)', 'alt_name' => 'vit_b12', 'unit' => 'мкг', 'value' => 3, 'sex' => 'a'],\n ['id' => 30, 'name' => 'Витамин B9 (фолиевая кислота)', 'alt_name' => 'vit_b9', 'unit' => 'мкг', 'value' => 400, 'sex' => 'a'],\n ['id' => 31, 'name' => 'Витамин H (биотин)', 'alt_name' => 'vit_h', 'unit' => 'мкг', 'value' => 50, 'sex' => 'a'],\n ['id' => 32, 'name' => 'Витамин A (РЭ)', 'alt_name' => 'vit_a_re', 'unit' => 'мкг',\t'value' => 900,\t'sex' => 'a'],\n ['id' => 33, 'name' => 'Бета-каротин', 'alt_name' => 'vit_beta_carotene', 'unit' => 'мг', 'value' => 5, 'sex' => 'a'],\n ['id' => 34, 'name' => 'Витамин E (ТЭ)', 'alt_name' => 'vit_e_te', 'unit' => 'мг', 'value' => 15, 'sex' => 'a'],\n ['id' => 35, 'name' => 'Витамин D', 'alt_name' => 'vit_d', 'unit' => 'мкг',\t'value' => 10, 'sex' => 'a'],\n ['id' => 36, 'name' => 'Витамин K (филлохинон)', 'alt_name' => 'vit_k', 'unit' => 'мкг', 'value' => 120, 'sex' => 'a'],\n ['id' => 37, 'name' => 'Холин', 'alt_name' => 'vit_choline',\t 'unit' => 'мг', 'value' => 500, 'sex' => 'a'],\n ];\n\n foreach ($norms as $norm){\n $fields = [];\n $values = [];\n foreach ($norm as $key => $value){\n $fields[] = $key;\n $values[] = ($key == 'id' || $key == 'value') ? $value : \"'$value'\";\n }\n $sql = 'INSERT INTO '.$this->tableName.' ('.implode(',', $fields).') VALUES('.implode(',', $values).')';\n Yii::$app->db->createCommand($sql)->execute();\n }\n }", "public function safeUp()\n {\n $this->createTable('items', [\n 'id' => $this->primaryKey(),\n 'topmenu_id' => $this->integer()->notNull(),//referense to table topmenu //tommenu.id\n 'items_id' => $this->integer()->notNull(),//referense to table_items this topmenu //tommenu.id\n 'name' => $this->string(50)->notNull()//equally table_items this topmenu namepropperty\n ]);\n $this->createIndex(\n 'idx-items_id_top_id',\n 'items',\n 'topmenu_id'//items.top_id\n );\n\n $this->addForeignKey(\n 'fk-items_id_top_id',\n 'items',//table items\n 'topmenu_id',//items.top_id\n 'topmenu',//table topmenu\n 'id',//topmenu.id\n 'CASCADE'\n );\n /**\n *\n */\n\n $this->createTable('properties',[\n 'id' => $this->primaryKey(),\n 'name' => $this->string(50)->notNull(),\n ]);\n /**\n *\n */\n\n $this->createTable('transport_prop',[\n 'id' => $this->primaryKey(),\n 'items_id' => $this->integer()->notNull(),\n 'prop_id' => $this->integer()->notNull(),\n 'value' => $this->string(50)->notNull(),\n ]);\n $this->createIndex(\n 'idx-items_id_transport_prop',\n 'transport_prop',\n 'items_id'//items.top_id\n );\n $this->createIndex(\n 'idx-prop_id_transport_prop',\n 'transport_prop',\n 'prop_id'//items.top_id\n );\n $this->addForeignKey(\n 'fk-prop_id_transport_prop',\n 'transport_prop',//table items\n 'prop_id',//items.top_id\n 'properties',//table topmenu\n 'id',//topmenu.id\n 'CASCADE'\n );\n /**\n *\n */\n\n $this->createTable('properties_group',[\n 'id' => $this->primaryKey(),\n 'groups' => $this->integer(),\n 'prop_id' => $this->integer()->notNull()\n ]);\n $this->createIndex(\n 'idx-items_id_properties_group',\n 'properties_group',\n 'prop_id'//items.top_id\n );\n $this->createIndex(\n 'idx-group_properties_group',\n 'properties_group',\n 'groups'//items.top_id\n );\n $this->addForeignKey(\n 'fk-items_id_properties_group',\n 'properties_group',//table items\n 'prop_id',//items.top_id\n 'properties',//table topmenu\n 'id',//topmenu.id\n 'CASCADE'\n );\n /**\n *\n */\n $this->createTable('items_transport', [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer()->notNull(),\n 'catalog_id' => $this->integer()->notNull(),\n 'topmenu_id' => $this->integer()->notNull(),\n 'prop_group' => $this->integer()->notNull(),\n 'created_at' => $this->dateTime()->notNull(),\n 'updated_at' => $this->dateTime()->notNull(),\n 'description' => $this->string()->notNull(),\n 'status' => $this->smallInteger()->defaultValue(0),\n ]);\n $this->createIndex(\n 'idx-user_id_items_transport',\n 'items_transport',\n 'user_id'\n );\n $this->addForeignKey(\n 'fk-user_id_items_transport',\n 'items_transport',//table items\n 'user_id',//items.top_id\n 'users',//table topmenu\n 'id',//topmenu.id\n 'CASCADE'\n );\n $this->createIndex(\n 'idx-catalog_id_items_transport',\n 'items_transport',\n 'catalog_id'\n );\n $this->addForeignKey(\n 'fk-catalog_id_items_transport',\n 'items_transport',//table items\n 'catalog_id',//items.top_id\n 'catalog',//table topmenu\n 'id',//topmenu.id\n 'CASCADE'\n );\n $this->createIndex(\n 'idx-topmenu_id_items_transport',\n 'items_transport',\n 'topmenu_id'\n );\n $this->addForeignKey(\n 'fk-topmenu_id_items_transport',\n 'items_transport',//table items\n 'topmenu_id',//items.top_id\n 'topmenu',//table topmenu\n 'id',//topmenu.id\n 'CASCADE'\n );\n $this->createIndex(\n 'idx-prop_group_items_transport',\n 'items_transport',\n 'prop_group'\n );\n $this->addForeignKey(\n 'fk-prop_group_items_transport',\n 'items_transport',//table items\n 'prop_group',//items.top_id\n 'properties_group',//table topmenu\n 'groups',//topmenu.id\n 'CASCADE'\n );\n\n\n $this->addForeignKey(\n 'fk-items_id_transport_prop',\n 'transport_prop',//table items\n 'items_id',//items.top_id\n 'items_transport',//table topmenu\n 'id',//topmenu.id\n 'CASCADE'\n );\n /**\n *\n */\n $this->createTable('level',[\n 'id' => $this->primaryKey(),\n 'value' => $this->string(50)\n ]);\n\n /***\n *\n */\n\n $this->createTable('profile',[\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(),\n 'tel_first' => $this->string(20)->notNull(),\n 'tel_sec' => $this->string(20)->defaultValue(''),\n 'tel_next' => $this->string(20)->defaultValue(''),\n 'name' => $this->string(50)->defaultValue('ded'),\n 'surname' => $this->string(50)->defaultValue('mozay'),\n 'patronymic' => $this->string(50)->defaultValue('klaus'),\n 'city' => $this->string(50)->defaultValue('Atlantida'),\n 'level' => $this->integer()->defaultValue(0)\n ]);\n\n $this->createIndex(\n 'idx-user_id_profile',\n 'profile',\n 'user_id'\n );\n $this->addForeignKey(\n 'fk-user_id_profile',\n 'profile',//table items\n 'user_id',//items.top_id\n 'users',//table topmenu\n 'id',//topmenu.id\n 'CASCADE'\n );\n $this->createIndex(\n 'idx-level_profile',\n 'profile',\n 'level'\n );\n $this->addForeignKey(\n 'fk-level_profile',\n 'profile',//table items\n 'level',//items.top_id\n 'level',//table topmenu\n 'id',//topmenu.id\n 'CASCADE'\n );\n }", "public function safeDown()\r\n\t{\r\n\t\t$this->down();\r\n\t}", "public function runDatabaseMigrations()\n {\n $this->parentRunDatabaseMigrations();\n\n $this->artisan('cms:migrate');\n\n $this->beforeApplicationDestroyed(function () {\n $this->artisan('cms:migrate:rollback');\n });\n }", "public function migrateDb();", "public function rollBack() {\r\n\r\n mysql_query(\"ROLLBACK\");\r\n mysql_query(\"SET AUTOCOMMIT=1\");\r\n\r\n }", "public function postUp(MigrationManager $manager)\n {\n }" ]
[ "0.7831747", "0.7831747", "0.77974", "0.77492934", "0.7730412", "0.76126146", "0.7103458", "0.7056744", "0.7019433", "0.686808", "0.68653876", "0.67907315", "0.67833483", "0.6779402", "0.677009", "0.6753907", "0.672025", "0.6714505", "0.66979295", "0.6674457", "0.66629297", "0.66621137", "0.6657518", "0.66517824", "0.663475", "0.6610122", "0.65827286", "0.65714085", "0.6565238", "0.6548997", "0.6543551", "0.65302837", "0.6513902", "0.6480387", "0.64771324", "0.6475393", "0.64662755", "0.64604926", "0.6457323", "0.64404863", "0.64300686", "0.64279217", "0.64076346", "0.63700867", "0.636352", "0.6352612", "0.62880504", "0.62846977", "0.62407064", "0.6235668", "0.61976725", "0.61942893", "0.6194176", "0.6194176", "0.6194176", "0.61640126", "0.61640126", "0.61640126", "0.61180234", "0.6111234", "0.61068803", "0.61006767", "0.60806996", "0.607439", "0.60594463", "0.6058456", "0.6036609", "0.6011074", "0.59930515", "0.5973502", "0.59710646", "0.59639454", "0.5963636", "0.5952997", "0.59319353", "0.592054", "0.5916394", "0.5893679", "0.5893679", "0.588015", "0.5879281", "0.5879281", "0.5879281", "0.5870311", "0.5842325", "0.58388215", "0.5836178", "0.5827478", "0.58156645", "0.579084", "0.57896876", "0.5789304", "0.57892954", "0.5763077", "0.5759341", "0.5749299", "0.5743735", "0.5729707", "0.57289255", "0.5725803" ]
0.6657859
22
add by minas 20140503
public function getFOrders() { // 花店管理员身份验证 if (session("admin_level") == 3){ $toFlower = M('weixin_order'); $data = $toFlower->where('type = 0')->select(); $this->assign('data',$data); } $toTrade = M('pub_trade_logs'); $con['uid'] = session('uid'); //$this->ajaxReturn(0 , $con['uid'] , 1); $TradeLogs = $toTrade->query("SELECT `xt_pub_trade_logs`.* ,`xt_pub`.`title` FROM `xt_pub_trade_logs` left join `xt_pub` on `xt_pub_trade_logs`.`pub_id` = `xt_pub`.`pub_id` WHERE 1"); // $this->ajaxReturn(0 , $TradeLogs , 1); $this->assign('tradelogs',$TradeLogs); $this->display(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function mass_add()\n {\n }", "public function plus();", "public function add();", "public function add();", "public function plus_abonados();", "function add() {\n }", "public function add()\n\t{\n\n\t}", "public function add()\n\t{\n\n\t}", "function add()\n\t{\n\t\t$a = 120;\n\t\t$b = 22;\n\t\t$c = $a + $b;\n\t\treturn $c;\n\n\t}", "protected function add() {\n\t}", "public function add()\n {\n }", "public function add()\n {\n }", "public function add()\n {\n }", "public function add($a,$b){\n return $a+$b;\n }", "public function add()\n {\n for ($i = 0 ; $i < func_num_args(); $i++) {\n $this->addSingle(func_get_arg($i));\n }\n }", "static function add_these($num1, $num2) {\n return $num1 + $num2 . \"<br>\";\n }", "function add($a, $b);", "function add()\n {\n return true;\n }", "function add( $a, $b ) {\r\n $ma = ($a >> 16) & 0xffff;\r\n $la = ($a) & 0xffff;\r\n $mb = ($b >> 16) & 0xffff;\r\n $lb = ($b) & 0xffff;\r\n\r\n $ls = $la + $lb;\r\n // Carry\r\n if ($ls > 0xffff) {\r\n $ma += 1;\r\n $ls &= 0xffff;\r\n }\r\n\r\n // MS add\r\n $ms = $ma + $mb;\r\n $ms &= 0xffff;\r\n\r\n // Works because the bitwise operators are 32 bit\r\n $result = ($ms << 16) | $ls;\r\n return $result;\r\n }", "function add(){\n \t $args = func_num_args();\n \t $sum = 0;\n \t $i = 0;\n\n \t for ($i; $i < $args; $i++) { \n \t \t is_int(func_get_arg($i)) ? $sum += func_get_arg($i) : die(\"only integers , por favor\");\n \t }\n \n return $sum;\n }", "static function addThese($num1, $num2) {\n\t\t\treturn ($num1 + $num2) . \"</br>\";\n\t}", "function add($x,$y)\n{\n\t$z=$x+$y;\n\treturn $z;\n}", "private function sellTrasactionAddsMoney(){\n\n }", "function add2($a, $b) {\n\t\t\t\treturn $a + $b;\n\t\t\t}", "static private function _add($value1, $value2){\n\t\treturn LocaleMath::add($value1, $value2);\n\t}", "public function engordar($quilos){\n $this->peso = $this->peso + $quilos;\n}", "function add($x, $y) {\n return $x + $y;\n }", "public function add() \n { // metodo add, complementar\n $str = \"insert into \".self::$tablename.\"(nitHotel, idCiudad, nomHotel, dirHotel, telHotel1, telHotel2, correoHotel, tipoHotel, Administrador, idRedes, aforo, tipoHabitaciones, status)\";\n $str.= \" values ('$this->nitHotel', $this->idCiudad, '$this->nomHotel', '$this->dirHotel', '$this->telHotel1', '$this->telHotel2', '$this->correoHotel', $this->tipoHotel, '$this->Administrador', $this->idRedes, $this->aforo, $this->tipoHabitaciones, $this->status);\";\n }", "function add($a = 0, $b = 0) {\n\tif(is_numeric($a) && is_numeric($b)) {\n\t\treturn $a + $b;\n\t} else {\n\t\treturn throwErrorMessage(\"add\");\n\t} \n}", "public function add($vector)\n {\n }", "function add()\n\t{\n\t\t$this->_updatedata();\n\t}", "public function add(){\n\n\t\t$db = new dbconnection();\n\t\t$conn = $db->startconnection();\t\n\n\t\t$query = $conn->prepare(\"INSERT INTO item(`item_code`,`item_category`,`item_subcategory`,`item_name`,`quantity`,`unit_price`) values (?,?,?,?,?,?)\");\n\n\t\t$query->bind_param(\"ssssss\",$this->itemcode,$this->category,$this->subcategory,$this->itemname,$this->quantity,$this->uprice);\n\t\t\t\n\t\t\tif($query->execute()){\n\n\t\t\treturn 1;\n\n\t\t}else{\n\n\t\t\treturn 0;\n\n\t\t}\n\n\n\t\t}", "function add($n1, $n2){\r\n\t\t\t\r\n\t\t\t$sum = $n1 + $n2; \r\n\t\t\treturn $sum;\r\n\t\t}", "function add($item);", "final public function addCanMakeATotal(): void\n {\n $this->assertEquals(2, add(1, 1));\n $this->assertEquals(0, add(1, -1));\n $this->assertEquals(-2, add(-1, -1));\n $this->assertEquals(3, add(1, 2));\n $this->assertEquals(-1, add(1, -2));\n $this->assertEquals(1234567940, add(50, 1234567890));\n // Test overflow\n $this->assertEquals(PHP_INT_MIN, add(1, PHP_INT_MAX));\n $this->assertEquals(PHP_INT_MAX, add(-1, PHP_INT_MIN));\n // This add function works on int not floats\n $this->assertEquals(2, add(1.1, 1.1));\n }", "function add() {\n\n\t\t// assign values from $_POST to class variables\n\t\t$this -> personal_id = $this -> input -> post('personal_id', TRUE);\n\n\t\t$this -> movable_number = $this -> input -> post('movable_number', TRUE);\n\n\t\t$this -> series_number = $this -> input -> post('series_number', TRUE);\n\n\t\t$this -> unit = $this -> input -> post('unit', TRUE);\n\n\t\t$this -> comment = $this -> input -> post('comment', TRUE);\n\t\t//tr_date_add\n\n\t\t$this -> give_date = tr_date_add($this -> input -> post('give_date', TRUE));\n\n\t\t$this -> take_date = tr_date_add($this -> input -> post('take_date', TRUE));\n\n\t\t$ok = $this -> db -> insert('movable', $this);\n\n\t\tif ($ok) {\n\n\t\t\t$this -> res = $this -> db -> insert_id();\n\t\t\t//$data['lastid'] = $this->db->insert_id() ;\n\n\t\t}\n\n\t\treturn $this -> res;\n\n\t}", "function add ($a, $b) {\n return $a + $b;\n}", "public function add($data)\n {\n }", "function add($num = \"\")\n{\n\t\n$internalnum = 10;\t\nreturn array($num,$internalnum );\t\n}", "public function add($value);", "public function add($value);", "function add_money($account,$total_money,$input_money){\n\t\t$total_money += $input_money;\n\t\tglobal $connection;\n\t\t$query_mn = mysqli_query($connection,\"UPDATE khachhang SET `money`=$total_money WHERE account='$account'\" );\n\t\treturn $total_money;\n\t}", "function add($x, $y){\n return $z = $x + $y;\n }", "function variant_add($left, $right) {}", "function add(Vector $add)\n\t\t{\n\t\t\t$res = new Vector(array('dest' => new Vertex(array(\n\t\t\t\t'x' => $this->_x + $add->getX(),\n\t\t\t\t'y' => $this->_y + $add->getY(),\n\t\t\t\t'z' => $this->_z + $add->getZ()\n\t\t\t))));\n\t\t\treturn ($res);\n\t\t}", "private function sellTrasactionPendingAddsMoney(){\n\n }", "function addNums() {\n $num1 = 3;\n $num2 = 4;\n\n return $num1 + $num2;\n }", "abstract public function add_item();", "function add(int $x, int $y): int {\n return $x + $y;\n }", "public function add($obj) {\n\t}", "public function add(){\r\n\t\t//$this->auth->set_access('add');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "function add_additional_field($details) {\r\n\t\t$sql = \"INSERT INTO sys_man_additional_fields (field_name, field_type, field_placement, group_id) VALUES (?, ?, ?, ?)\";\r\n\t\t$data=array(\"$details->field_name\", \"$details->field_type\", \"$details->field_placement\", \"$details->group_id\");\r\n\t\t$query = $this->db->query($sql, $data);\r\n\t\treturn;\r\n\t}", "public function add(){\n $outData['script']= CONTROLLER_NAME.\"/add\";\n $this->assign('output',$outData);\n $this->display();\n }", "public function testAddOperation()\n\t{\n\t\t$this->adder->setA(42);\n\t\t$this->adder->add();\n\t\t$this->assertEquals(42, $this->adder->getSum(), 'dont added correctly');\n\t}", "function addNumbers(float $a, float $b) : int /*fungsi dengan satu argumen (float$a, float$b) :int =Untuk menyatakan tipe untuk fungsi kembali, menambahkan usus ( :)*/{\n return (int)($a + $b);//statement immediately terminates the execution of a function when it is called from within that function.\n}", "public function testadd()\r\n {\r\n echo \"\\n---Dummy Test:Test Add---\\n\";\r\n $a=2;\r\n $b=2;\r\n $c=add($a, $b);\r\n $this->assertEquals(4,$c);\r\n }", "public function free_add()\n\t\t{\n\t\t\t// $data['master_libur'] = $this->general->getData($data);\n\t\t\t// echo $data->judul;\n\t\t\t$this->general->load('absent/free/add');\n\t\t}", "function addPOSEntry()\n{\n\n}", "public function AddTotalPoints($points){\r\n\t\t$this -> totalPoints += $points; \r\n\t }", "function add($num1, $num2) {\n\techo ($num1 + $num2) . PHP_EOL;\n}", "public function add() {\n $fields_definition = '';\n $fields_values = '';\n foreach ($this->fields as $name => $value) {\n $fields_definition .= '`' . $name . '`, ';\n $fields_values .= '\\''. $value . '\\', ';\n }\n\n $fields_definition = chop($fields_definition, ', ');\n $fields_values = chop($fields_values, ', ');\n\n $query = 'INSERT INTO `' . $this->table . '`'\n . ' (' . $fields_definition\n . ' ) VALUES ( ' . $fields_values . ' )';\n\n return $this->connection->query($query);\n }", "public function add() {\n $dataH['CustomerBankAccount'] = $_lib['sess']->get_companydef('BankAccount');\n $old_pattern = array(\"/[^0-9]/\");\n $new_pattern = array(\"\");\n $dataH['CustomerAccountPlanID'] = strtolower(preg_replace($old_pattern, $new_pattern , $_lib['sess']->get_companydef('OrgNumber')));\n }", "function add(Num &$n) { # :: (Num a) => (a, a) -> a\n $_ = $this->_return($n->value);\n return new $_($this->value + $n->value);\n }", "public function add(){\n if ($_POST) {\n if ($_POST[\"operation\"] == 'egreso'){\n $_POST[\"amount\"] = $_POST[\"amount\"]*(-1);\n }\n if ($this->transactions->save(\"transactions\", $_POST)) {\n $this->redirect(array(\"controller\"=>\"transactions\"));\n }else{\n $this->redirect(array(\"controller\"=>\"transactions\", \"method\"=>\"add\"));\n }\n }\n \n $this->set(\"accounts\", $this->transactions->find(\"accounts\"));\n $this->set(\"categories\", $this->transactions->find(\"categories\"));\n $this->_view->setView(\"add\");\n /* }else{\n $this->redirect(array(\"controller\"=>\"transactions\"));\n }*/\n }", "public function addField();", "public function add($leftOperand, $rightOperand);", "function add_unit_to_army($unit_id, $army_id)\n\t{\n\t\t$result = pg_prepare(\"point_query\", \"SELECT init_point_cost FROM warhammer.unit_list WHERE unit_id=$1\");\n\t\t$result = pg_execute(\"point_query\", array($unit_id));\n\t\t$result_a = pg_fetch_array($result,0,PGSQL_ASSOC);\n\t\t$points = $result_a[\"init_point_cost\"];\n\t\t$result = pg_prepare(\"add_query\", \"INSERT INTO warhammer.user_army VALUES (DEFAULT,$1,null,$2)\");\n\t\t$result = pg_execute(\"add_query\", array($unit_id,$points));\n\t\tpg_free_result($result);\n\t}", "public function sum();", "public function add(int $num)\n {\n $this->result += $num;\n }", "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }", "function _add($goods_id, $value, $score){\n\t\tglobal $bBlog;\n\t\treturn $bBlog->db->query(\"\n\t\t\tINSERT INTO `\".T_SEARCH.\"` ( `id` , `article_id` , `value` , `score` )\n\t\t\tVALUES (\n\t\t\t'0', '\".$goods_id.\"', '\".$value.\"', '\".$score.\"'\n\t\t\t);\");\n\t}", "function add($key, $pVal, $exp = 0) {\n\t\t\treturn $this->inst->add($key,$pVal,0,$exp);\n\t\t}", "public function add(...$args): self\n {\n $this->ensureCompatibleArgs($args);\n $realNum = $this->immute();\n static::runBcFunction($realNum, 'bcadd', $args);\n return $realNum;\n }", "function suma( $resultado, $valor) {\n\t$resultado += $valor;\n\treturn $resultado;\n}", "function AddNumbers(int $x, int $y){\n return $x + $y;\n }", "function add($name, $time);", "function action_add() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['add_id'];\n\t\t\t$table = $data['add_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\t$choosen[$table][$id] = $id;\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "public function add($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "function add_multi() {\n \t\t//-- step 1 pilih kode pelanggan\n \t\t$this->load->model('customer_model');\n\t\t$this->load->model('bank_accounts_model');\n \t\t$data['no_bukti']=$this->nomor_bukti();\n\t\t$data['date_paid']=date('Y-m-d');\n\t\t$data['how_paid']='Cash';\n\t\t$data['amount_paid']=0;\n\t\t$data['mode']='add';\n\t\t$data['customer_number']='';\n\t\t$data['how_paid_acct_id']='';\n\t\t$data['how_paid']='';\n\t\t$data['customer_list']=$this->customer_model->customer_list();\n\t\t$data['account_list']=$this->bank_accounts_model->account_number_list();\n\t\t$data['credit_card_number']='';\n\t\t$data['expiration_date']=date('Y-m-d');\n\t\t$data['from_bank']='';\n\t\t$this->template->display_form_input('sales/payment_multi',$data,'');\t\t\t\n\t\t\n }", "public function additionCastumer()\n {\n global $dbh;\n $sql = $dbh->prepare(\"INSERT INTO `castumer`(nameca ,namece ,phonec ,areac ,deletc)VALUES('$this->nameca', '$this->namece', '$this->phonec', '$this->areac', '$this->deletc')\");\n $result = $sql->execute();\n $id = $dbh->lastInsertId();\n\treturn array ($result,$id);\n }", "function add_kunjungan_pasien($no_rm){\n $kunjungan = $this->db->query(\"select kunjungan from pasien where no_rm = '\".$no_rm.\"' \")->row()->kunjungan;\n \n $data = array(\n 'kunjungan' => ($kunjungan + 1)\n );\n\n $this->db->where('no_rm', $no_rm);\n $this->db->update('pasien',$data);\n }", "public function add()\n {\n $calculator = new Calculator();\n $this->assertSame(4, $calculator->add(3, 1));\n }", "function CustomAdd(&$values, &$keys, &$error, $inline, &$pageObject)\n{\n\n\t\tcalendar_AddRecord($values);\n\nreturn false;\n;\t\t\n}", "public function testAddOperation1()\n\t{\n\t\t$this->adder->setA(4);\n\t\t$this->adder->setB(5);\n\t\t$this->adder->add();\n\t\t$this->assertEquals(9, $this->adder->getSum(), 'dont added correctly');\n\t}", "function add($meta = array(), $post_id = 0, $is_main = \\false)\n {\n }", "private static function add(float $a, float $b): float {\n return $a + $b;\n }", "function addRaw($sum, $as) {\n\t\t$this->fields[] = array($sum, $this->db->escape_string($as));\n\t\treturn $this;\n\t}", "function add($_data = null)\n\t{\n\t\tif (empty($_data['fields']) AND empty($_data['table'])){\n\t\t return FALSE;\n\t\t}\n\t\t\n\t\t$data = array();\n\t\tforeach($_data['fields'] as $k => $d)\n\t\t{\n\t\t\t$data[$k] = $d;\n\t\t}\n\t\t\n\t\t$ret =\t$this->db->insert($_data['table'], $data);\n\t\n\t\t\n\t\tlog_message('info','SQL Query: ' . $this->db->last_query());\n\t\n\t\t$this->__insert_id = $this->db->insert_id();\n\t\treturn $ret;\n\t}", "function add ($other, $another) {\n if ($this->isFraction($other)\n && ($this->isFraction($another) || is_int($another))) {\n if (is_int($another)) {\n $other->num += $another * $other->denom;\n } else {\n $lcd = $this->lcd ($other->denom, $another->denom);\n $other->num *= ($lcd / $other->denom);\n $other->denom *= ($lcd / $other->denom);\n $other->num += ($another->num * ($lcd / $another->denom));\n $other->reduce();\n }\n }\n return $other;\n }", "public function add_instr()\n {\n $this->instructions++; \n }", "function add($message) { return; }", "function addSql($sql) {\n $this->tCount++;\n $this->aSql[$this->tCount] = $sql;\n }", "public function add(){\n $this->edit();\n }", "public function add_data($data)\n {\n }", "public function testAddPoneyFromField($add, $result){\n $this->poneys->addPoneysFromField($add);\n $this->assertEquals($result, $this->poneys->getCount());\n }", "function add($object){if(is_array($this->arrayObj))\n \n {$tmp = count($this->arrayObj);$this->arrayObj[$tmp]=$object;\n\n }else{$this->arrayObj[0]=$object;}\n }", "function add($object){if(is_array($this->arrayObj))\n \n {$tmp = count($this->arrayObj);$this->arrayObj[$tmp]=$object;\n\n }else{$this->arrayObj[0]=$object;}\n }", "function add( $obj )\r\n\t{\r\n\t\tif ( $this->signUseID == true) {\r\n\t\t\t$pos = $obj->primary_key_value();\r\n\t\t\t$this->data[ $pos ] = $obj;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$this->data[] = $obj;\r\n\t\t}\r\n\t}", "function on_add_extra()\r\n\t{\r\n\t}", "public function add(...$items);", "function addSum($field, $name) {\n\t\t$name = \"`\".$this->db->escape_string($name).\"`\";\n\t\t$this->fields[] = array(\"SUM(\".$name.\")\", $this->db->escape_string($field));\n\t\treturn $this;\n\t}" ]
[ "0.7171696", "0.7106002", "0.7020637", "0.7020637", "0.70088506", "0.6989221", "0.6895944", "0.6895944", "0.6849266", "0.6759913", "0.66450715", "0.66450715", "0.66450715", "0.6584001", "0.6565468", "0.64222574", "0.64180136", "0.6411249", "0.6329956", "0.62820035", "0.6234273", "0.6208598", "0.6200407", "0.6194116", "0.6187861", "0.6181184", "0.6122212", "0.6079189", "0.6063116", "0.60626495", "0.60245013", "0.6001916", "0.6001508", "0.5994396", "0.59937894", "0.59717375", "0.59540397", "0.5938772", "0.5936778", "0.59227186", "0.59227186", "0.5909429", "0.59025365", "0.58762616", "0.58638906", "0.58417064", "0.58405364", "0.58366776", "0.5836218", "0.58319753", "0.5827214", "0.5815286", "0.58107686", "0.5794874", "0.57931465", "0.57907337", "0.57785445", "0.57721263", "0.5771731", "0.5770097", "0.57556504", "0.57511663", "0.5742202", "0.5738695", "0.5736857", "0.5735881", "0.5731452", "0.5726582", "0.57167685", "0.5709143", "0.5696588", "0.5694008", "0.56882226", "0.5687983", "0.5683625", "0.5673552", "0.5664988", "0.5647832", "0.5644594", "0.5643309", "0.56382054", "0.5636966", "0.56353855", "0.5631291", "0.5628493", "0.5625341", "0.56146", "0.5614536", "0.56084824", "0.56073385", "0.5597861", "0.5596857", "0.5592701", "0.55908406", "0.5590396", "0.55889136", "0.55889136", "0.5582926", "0.5579867", "0.55670106", "0.5564637" ]
0.0
-1
Get the tickets for the user.
public function tickets() { return $this->hasMany(Ticket::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_tickets ($user_id)\r\n\t{\r\n\t\t$db_manager = new database_manager ();\r\n\t\t$tickets \t= $db_manager -> select (\r\n\t\t\t'tickets',\r\n\t\t\tnull,\r\n\t\t\t\"user_id='$user_id'\"\r\n\t\t);\r\n\r\n\t\treturn ($tickets);\r\n\t}", "public function userTickets() {\r\n return $this->hasMany(\"Cochlea\\TicketSystem\\Models\\Ticket\", 'userId', $this->primaryKey);\r\n }", "function tickets ($user_id) {\n global $sql;\n return $sql->sql_select_array_query(\"SELECT * FROM `tickets` WHERE user_id = '{$user_id}' ORDER BY id DESC\");\n }", "function getTickets()\r\n\t{\r\n\t\t// get account tickets\r\n\t\treturn $this->call_API('getTickets');\r\n\t}", "public function getTickets()\n {\n return $this->tickets;\n }", "public function getMyTickets() /* /tickets/my-tickets */\n\t{\n\t\t$tickets = Auth::user()->tickets;\n\t\treturn Response::json([\n\t\t 'tickets' => $tickets->toArray()\n\t\t]);\n\t}", "public function forUser(User $user)\n\t{\n\t\treturn Ticket::where('assignee_id', $user->id)\n\t\t\t->orderBy('priority', 'asc')\n\t\t\t->get();\n\t}", "public function Tickets() {\n\t$filter = array(\"Status\"=>\"Open\");\n\treturn self::get_tickets($filter);\n\t\n \n \n \n \n\t}", "public function getTickets()\n {\n return $this->hasMany(Ticket::class, ['created_by' => 'id']);\n }", "public function byUser(User $user)\n {\n return Ticket::where('creator_id', $user->id)\n ->orderBy('created_at', 'asc')\n ->get();\n }", "public function getAllTickets()\n {\n\t\t$tickets = DB::table('tickets')->get();\n\n\t\treturn $tickets;\n }", "public function index()\n {\n $id = Auth::id();\n return new TicketCollection(Ticket::where('user_id', \"=\", $id)->get());\n }", "public function userOpenTickets()\n {\n return $this->hasMany('PanicHD\\PanicHD\\Models\\Ticket', 'user_id')->whereNull('completed_at');\n }", "public function index()\n {\n $tickets = Ticket::ownerOrAdmin( Auth::user() )->orderBy('created_at','ASC')->paginate(10);\n\n $tickets->each( function ($ticket) {\n $ticket->user;\n });\n return view('resources.comun.tickets.index')->with('tickets',$tickets);\n }", "public function geefTickets() {\n $klant_id = $_SESSION['gebruiker']->geefKlant_id();\n $sql = 'SELECT * FROM `tickets` WHERE `klant_id` = :klant_id';\n $stmnt = $this->db->prepare($sql);\n $stmnt->bindParam(':klant_id', $klant_id);\n $stmnt->execute();\n $tickets = $stmnt->fetchAll(\\PDO::FETCH_CLASS, __NAMESPACE__ . '\\Ticket');\n return $tickets;\n }", "public function getTickets(){\n $sql = \"SELECT idChap, chapter, titleChap, DATE_FORMAT(dateChap, 'Le %d-%m-%Y à %k:%i') AS dateChap, DATE_FORMAT(dateChapUpdate, 'Le %d-%m-%Y à %k:%i') AS dateChapUpdate, contentChap FROM chapitres ORDER BY chapter DESC\";\n $tickets = $this->executeRequest($sql);\n return $tickets;\n }", "static function listUserTickets( $users, $id, $courseid ) {\n global $CFG;\n\n // build html\n $table = new html_table();\n\n // table headings\n $table->head = array(\n get_string( 'username','block_otrs' ),\n get_string( 'email','block_otrs' ),\n '&nbsp;',\n );\n\n // iterate over users\n $count = 1;\n foreach ($users as $user) {\n\n // view ticket link\n $link = new moodle_url('/blocks/otrs/list_tickets.php', array('id'=>$id, 'user'=>$user->id, 'courseid'=>$courseid));\n\n $table->data[] = array(\n fullname( $user ),\n $user->email,\n \"<a class=\\\"btn btn-info\\\" href=\\\"$link\\\">\".get_string('view','block_otrs').\"</a>\",\n );\n $count++;\n }\n\n $html = html_writer::table($table);\n\n // check for nothing shown\n if ($count==1) {\n $html .= \"<center><p class=\\\"alert alert-danger\\\">\".get_string('nousers','block_otrs').\"</p></center>\";\n }\n\n $html .= '</div>';\n return $html;\n }", "public function getTicket()\n {\n //Query untuk mengambil data semua ticket\n return $this->db->get('ticket');\n }", "public function getTicket(Request $request, $id)\n {\n $tickets = DB::table('tickets')->where('id', $id)->get();\n\n return $tickets;\n }", "public function getAllTicketsAssigned(Request $request, $userId)\n {\n $tickets = DB::table('tickets')->where('assignedto', $userId)->get();\n\n return $tickets;\n }", "public function getTicketsWithUsername()\n\t{\n\t\t$this->createdBy_username = $this->input->post('createdBy_username');\n\t\t$query = $this->db->query(\"select * from Tickets where createdBy_username='\" . $this->createdBy_username . \"';\");\n\t\treturn $query->result_array();\n\t}", "public function tickets() {\n return $this->hasMany('Rockit\\Models\\Ticket')\n ->orderBy('amount', 'desc');\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $tickets = $em->getRepository('SupportBundle:Ticket')->findUserTicket($em->getRepository('MemberBundle:User')->find($this->getUser()->getId()));\n\n return $this->render('ticket/index.html.twig', array(\n 'tickets' => $tickets,\n ));\n }", "public function index() {\n return Ticket::all();\n }", "public function index()\n {\n if (in_array(Auth::user()->id, [1, 2])) {\n $tickets = Ticket::all();\n } else {\n $tickets = Ticket::where('user_id', Auth::user()->id)->get();\n }\n\n return view('tickets.index', compact('tickets'));\n }", "public function index()\n {\n return Ticket::all();\n }", "public function geefEscalatiesTickets() {\n $klant_id = $_SESSION['gebruiker']->geefKlant_id();\n $sql = 'SELECT * FROM `tickets` WHERE `escalatie` != \"\" AND `klant_id` = :klant_id';\n $stmnt = $this->db->prepare($sql);\n $stmnt->bindParam(':klant_id', $klant_id);\n $stmnt->execute();\n $tickets = $stmnt->fetchAll(\\PDO::FETCH_CLASS, __NAMESPACE__ . '\\Ticket');\n return $tickets;\n }", "public function ticket()\n {\n return $this->hasMany(Ticket::class);\n }", "public function list_ticket() {\n try {\n //construct the sql SELECT statement in this format\n $sql = \"SELECT * FROM \" . $this->tblTicket;\n\n //execute the query\n $query = $this->dbConnection->query($sql);\n\n // if the query failed, return false. \n //if (!$query)\n //return false;\n //if the query succeeded, but no ticket was found.\n if ($query && $query->num_rows > 0) {\n\n //handle the result\n //create an array to store all returned tickets\n $tickets = array();\n\n //loop through all rows in the returned recordsets\n while ($obj = $query->fetch_object()) {\n $ticket = new Ticket(stripslashes($obj->price), stripslashes($obj->gate), stripslashes($obj->seat), stripslashes($obj->class), stripslashes($obj->depart_time), stripslashes($obj->arrival_location), stripslashes($obj->arrival_time), stripslashes($obj->image));\n\n //set the id for the ticket\n $ticket->setId($obj->id);\n\n //add the ticket into the array\n $tickets[] = $ticket;\n }\n return $tickets;\n }if (!$query) {\n throw new DatabaseException(\"query failed to execute, cannot retrieve tickets\");\n }\n }\n //catch exception and display message\n catch (DatabaseException $e) {\n $message = $e->getMessage();\n //display error message in error view from views folder\n $view = new CityError();\n $view->display($message);\n exit();\n }\n //display message for any other error/exception\n catch (Exception $e) {\n $message = $e->getMessage();\n //display error message in error view from views folder\n $view = new CityError();\n $view->display($message);\n exit();\n }\n }", "public function view_ticket($id){\n\t\t$this->db->select(\"*, users.id AS 'userid', tickets.id as 'ticketid'\");\n\t\t$this->db->join('users', 'users.id = tickets.user_id');\n\t\t$query = $this->db->get_where('tickets', array('tickets.id' => $id));\n\n\t\t//is there are no found assigned users\n\t\tif ($query->num_rows()==0){\n\t\t\t//retrieve all users with the role admin and filter to the first entry\n\t\t\t$admin = $this->db->get_where('users', array('users.roles' => \"Admin\"));\n\t\t\t$row = $admin->row_array(0);\n\t\t\t$str= $this->db->last_query();\n\n\t\t\t//retrieve ticket and user information\n\t\t\t$this->db->select(\"*, users.id AS 'userid', tickets.id as 'ticketid'\");\n\t\t\t//If user isnt found, set to admin user from $admin query.\n\t\t\t$this->db->join('users', 'users.id =' . $row['id']);\n\t\t\t$query = $this->db->get_where('tickets', array('tickets.id' => $id));\n\t\t\treturn $query->result_array(0);\n\t\t}\n\t\telse{\n\t\treturn $query->result_array();\n\t\t}\n\t}", "public function userCompleteTickets()\n {\n return $this->hasMany('PanicHD\\PanicHD\\Models\\Ticket', 'user_id')->whereNotNull('completed_at');\n }", "public function index()\n\t{\n\t\t$data = $this->commons->getUser();\n\n\t\t/*Load Language File*/\n\t\trequire DIR_BUILDER.'language/'.$data['info']['language'].'/common.php';\n\t\t$data['lang']['common'] = $lang;\n\t\trequire DIR_BUILDER.'language/'.$data['info']['language'].'/tickets.php';\n\t\t$data['lang']['tickets'] = $tickets;\n\t\t\n\t\t$data['result'] = $this->ticketModel->getTickets($data['user']['email']);\n\n\t\t/* Set confirmation message if page submitted before */\n\t\tif (isset($this->session->data['message'])) {\n\t\t\t$data['message'] = $this->session->data['message'];\n\t\t\tunset($this->session->data['message']);\n\t\t}\n\t\t$data['page_title'] = $data['lang']['common']['text_tickets'];\n\t\t$data['token'] = hash('sha512', TOKEN . TOKEN_SALT);\n\t\t/*Set action method for form submit call*/\n\t\t$data['action'] = URL_CLIENTS.DIR_ROUTE.'ticket/action';\n\t\t/*Render Info view*/\n\t\t$this->view->render('ticket/ticket_list.tpl', $data);\n\t}", "private function getTicketListForAjax()\n { \n $settings = Utils::getPersonalizedSettings($this->db);\n // Utils::dumpvar($settings);\n $page = isset($this->param[2]) ? $this->param[2] : 0;\n\n $page_size = $settings->show_issues_per_page ? \n $settings->show_issues_per_page : \n SQL_PAGE_SIZE;\n\n /*$user_id = $settings->enable_issues_created_by_me ? \n $settings->enable_issues_created_by_me :\n null;*/\n\n $param = array(\n 'user_id' => null,\n 'source_id' => null,\n 'start' => $page,\n 'size' => $page_size\n );\n//print_r( $this->template);\n $TicketListRenderer = new TicketListRenderer($this->db, $this->template);\n $sql = $this->getTicketListSQL($param);\n \n $list = $TicketListRenderer->getTicketList($sql);\n//utils::dumpvar($list);\n if($list)\n {\n echo implode(\"\", $list);\n }\n else\n {\n echo \"No results found.\";\n }\n\n exit; \n }", "private function showTicketList()\n {\n $settings = Utils::getPersonalizedSettings($this->db);\n\n /*$user_id = $settings->enable_issues_created_by_me ? \n $settings->enable_issues_created_by_me :\n null;*/\n\n $param = array(\n 'user_id' => null,\n 'source_id' => null,\n 'start' => 0,\n 'size' => 1\n );\n\n $TicketListRenderer = new TicketListRenderer($this->db, $this->template);\n $sql = $this->getTicketListSQL($param);\n//echo $sql;\n $total_ticket = $TicketListRenderer->countTicketList($sql);\n\n $data = array();\n $data['pagger_action_url'] = 'Ticket/ajax_list';\n $data['total_ticket'] = $total_ticket;\n \n $html = $TicketListRenderer->getTicketListView($data);\n \n return $html;\n }", "public function tickets($complete = false)\n {\n return $this->hasMany('PanicHD\\PanicHD\\Models\\Ticket', 'user_id');\n }", "public function index()\n {\n $tickets = Ticket::latest()->with('user')->get();\n // $id = $user->id;\n // $user = User::where('id', $id)->first();\n return view('tickets.index', compact('tickets'));\n }", "public function pendingTickets()\n {\n $user = Auth::user();\n $all_members = User::where('role', 2)->where('agency_id', $user->agency_id)->lists('id');\n $all_members[count($all_members)] = $user->id;\n\n if($user->role > 3)\n return redirect('/');\n else if($user->role==1){\n $pending_tickets = Ticket::where('status', 3)->orWhere('status', 7)->whereIn('assignee', $all_members)->orderBy('created_at', 'DESC')->paginate(20);\n }\n else if($user->role==2){\n $pending_tickets = Ticket::where('status', 3)->orWhere('status', 7)->where('assignee', $user->id)->orderBy('created_at', 'DESC')->paginate(20);\n }\n else{\n $pending_tickets = Ticket::where('status', 3)->orWhere('status', 7)->orderBy('created_at', 'DESC')->paginate(20);\n }\n\n return view('tickets.pending')->with('user', $user)->with('pending_tickets', $pending_tickets);\n }", "public function tickets(Ticket $ticket)\n {\n $range = explode('-', $this->request->range);\n $start_date = date('Y-m-d', strtotime($range[0]));\n $end_date = date('Y-m-d', strtotime($range[1]));\n $this->request->request->add(['date_range' => [$start_date, $end_date]]);\n $tickets = $ticket->apply($this->request->except(['range']))->with(['user:id,username,name', 'dept', 'AsStatus'])->get();\n $html = view('analytics::_ajax._tickets', compact('tickets'))->render();\n\n return response()->json(['status' => 'success', 'html' => $html, 'message' => 'Processed successfully'], 200);\n }", "public function show(Tickets $tickets)\n {\n \n }", "public function index()\n {\n\n $id = Auth::user()->id;\n $user = User::find($id);\n\n //loads tickets for user \n $tickets = $user->tickets()->get();\n \n return view('home', ['tickets' => $tickets]);\n var_dump($name);\n \n }", "public function index()\n {\n $tickets = $this->loggedin()->tickets;\n return view('pages.users.tickets.index', compact('tickets'));\n }", "public function index(Request $request)\n {\n $customers = DB::table('users')->where('type','=','customer')->get();\n $agents = DB::table('users')->where('type','=','agent')->get();\n $user = Auth::user();\n\n $tickets = new ticket;\n\n if(!empty($request->title)){\n $tickets = $tickets->where('title','like','%'.$request->title.'%');\n }\n if(!empty($request->report_by)){\n $tickets = $tickets->Where(function($query) use ($request){\n foreach (explode(\",\", $request->report_by) as $key => $value) {\n $query = $query->orWhere('report_by','like',$value);\n }\n });\n }\n if(!empty($request->assign_to)){\n $tickets = $tickets->Where(function($query) use ($request){\n foreach (explode(\",\", $request->assign_to) as $key => $value) {\n $query = $query->orWhere('assign_to','like',$value);\n }\n });\n }\n if(!empty($request->created_by)){\n $tickets = $tickets->where('created_by','like','%'.$request->created_by.'%');\n }\n if(!empty($request->status)){\n $tickets = $tickets->Where(function($query) use ($request){\n foreach (explode(\",\", $request->status) as $key => $value) {\n $query = $query->orWhere('status','like',$value);\n }\n });\n }\n if(!empty($request->priority)){\n $tickets = $tickets->Where(function($query) use ($request){\n foreach (explode(\",\", $request->priority) as $key => $value) {\n $query = $query->orWhere('priority','like',$value);\n }\n });\n }\n if(!empty($request->category)){\n $tickets = $tickets->Where(function($query) use ($request){\n foreach (explode(\",\", $request->category) as $key => $value) {\n $query = $query->orWhere('category','like',$value);\n }\n });\n }\n if(!empty($request->date_from) && !empty($request->date_to)){\n $tickets = $tickets->whereBetween('created_at', [$request->date_from, $request->date_to]);\n }\n\n if($user->type=='customer'){\n $tickets = $tickets->where('report_by','=',$user->id);\n }\n\n $tickets = $tickets->orderBy('id', 'desc');\n\n if(!empty($request->paginate)){\n $paginate = $request->paginate;\n }else{\n $paginate = 20;\n }\n\n $tickets = $tickets->paginate($paginate);\n\n $tickets->appends(Input::except('page'))->links();\n\n // dd($tickets);\n\n return view('ticket',compact('tickets','customers','agents'));\n }", "public function getTicket()\n {\n return $this->ticket;\n }", "public function getTicket()\n {\n return $this->ticket;\n }", "public function list()\n {\n $users = glpi_users::all();\n\n $timesMonths = glpi_tickets::getTimeMonth();\n\n return view('users')\n ->with('users',$users)\n ->with('timesMonths', $timesMonths);\n }", "public function userTickets($complete = false)\n {\n if ($complete) {\n return $this->hasMany('PanicHD\\PanicHD\\Models\\Ticket', 'user_id')->whereNotNull('completed_at');\n } else {\n return $this->hasMany('PanicHD\\PanicHD\\Models\\Ticket', 'user_id')->whereNull('completed_at');\n }\n }", "public function index()\n {\n $user = Auth::user();\n\n if($user->role > 3)\n return redirect('/');\n else if($user->agency_id==0){\n $unassigned_tickets = Ticket::where('assignee', NULL)->where('status', 1)->orderBy('created_at', 'DESC')->paginate(20);\n \n if($user->role == 0){\n $inprocess_tickets = Ticket::where('status', 2)->paginate(10);\n $pending_tickets = Ticket::where('status', 3)->orWhere('status', 7)->paginate(10); \n $closed_tickets = Ticket::where('status', 5)->paginate(10);\n }\n else if($user->role == 1){\n $subs = User::where('role', 2)->where('agency_id', $user->agency_id)->lists('id');\n $inprocess_tickets = Ticket::where('status', 2)->whereIn('assignee', $subs)->paginate(10);\n $pending_tickets = Ticket::where('status', 3)->orWhere('status', 7)->whereIn('assignee', $subs)->paginate(10);\n $closed_tickets = Ticket::where('status', 5)->whereIn('assignee', $subs)->paginate(10);\n }\n else if($user->role == 2){\n $inprocess_tickets = Ticket::where('status', 2)->where('assignee', $user->id)->paginate(10);\n $pending_tickets = Ticket::where('status', 3)->orWhere('status', 7)->where('assignee', $user->id)->paginate(10);\n $closed_tickets = Ticket::where('status', 5)->where('assignee', $user->id)->paginate(10);\n }\n\n foreach ($unassigned_tickets as $key => $uticket) {\n $deptname = Department::find($uticket->dept_id)->pluck('dept_name');\n $uticket->dept_name = $deptname;\n }\n\n foreach ($inprocess_tickets as $key => $iticket) {\n $deptname = Department::find($iticket->dept_id)->pluck('dept_name');\n $iticket->dept_name = $deptname;\n }\n\n foreach ($pending_tickets as $key => $pticket) {\n $deptname = Department::find($pticket->dept_id)->pluck('dept_name');\n $pticket->dept_name = $deptname;\n }\n\n return view('tickets.all-tickets')->with('unassigned_tickets', $unassigned_tickets)\n ->with('inprocess_tickets', $inprocess_tickets)\n ->with('pending_tickets', $pending_tickets)\n ->with('closed_tickets', $closed_tickets)\n ->with('user', $user);\n }\n }", "public function getUserTicket($userId, $statusCode = 200){\n try {\n return $this->db->query('SELECT `tickets` FROM `ticket` WHERE `id`=? LIMIT 1', array($userId))->fetchArray();\n } catch (Exception $e) {\n // throw new Exception($e->errorMessage());\n return $e;\n }\n }", "public function getIdUserTicket()\n {\n return $this->idUserTicket;\n }", "public function index()\n {\n $auth = Auth::id();\n $user = User::find($auth);\n if($user->id_tipouser == 1){\n $tickets = Ticket::all();\n }else{\n $tickets = Ticket::where('id_user', $user->id)->get();\n }\n return view('home.index', compact('user','tickets'));\n\n }", "public function index()\n {\n $users = ticketUser::all();\n return view('ticketUser.index')->with('users',$users);\n }", "public function index()\n {\n $this->ticket = $this->ticket->where('user_id', Auth::user()->id)->get();\n return view('panel.ticket.index')\n ->with('ticket', $this->ticket);\n }", "public static function getTicketOwner($user_id)\n {\n return static::where('id', $user_id)->firstOrFail();\n }", "public function actionTicket()\n {\n $model = new MonitoringVoucherForm();\n\n $rawdata = array();\n $option = array();\n $option[] = array('VoucherID' => 1, 'VoucherName' => 'Ticket');\n //Provide list data\n $vouchers = CHtml::listData($option, 'VoucherID', 'VoucherName');\n if (isset($_POST['MonitoringVoucherForm']))\n {\n $rawdata = $this->monitorVouchers($_POST['MonitoringVoucherForm']);\n Yii::app()->session['rawData'] = $rawdata;\n }\n if (count($rawdata) > 0)\n {\n $this->hasResult = true;\n }\n else\n {\n $this->hasResult = false;\n }\n $headertitle = \"Monitoring of Tickets\";\n $this->render('index', array('model' => $model, 'vouchers' => $vouchers, 'rawdata' => $rawdata, 'title' => $headertitle));\n }", "private function getAllUser($ticketId = null)\n {\n $resolver = $this->getResolver($ticketId);\n $sourceUser = $this->getAuthorisedSource($ticketId);\n \n $allUsers = array_merge($resolver, $sourceUser);\n \n return $allUsers;\n }", "public function GetTickets($date, $eventId){\n\t\t$sql = \"SELECT *\n\t\t\t\t\t\tFROM ticket\n\t\t\t\t\t\tJOIN venue ON venue.venue=ticket.venue\n\t\t\t\t\t\tJOIN artist ON artist.name=ticket.artist\n\t\t\t\t\t\tWHERE DATE(end)='$date' AND \tevent_id = $eventId\";\n\n\t\tglobal $conn;\n\t\t$results = $conn->query($sql);\n\t\t$numRows = $results->num_rows;\n\t\tif($numRows > 0){\n\t\t\twhile($row = $results->fetch_assoc()){\n\t\t\t$data[] = $row;\n\t\t\t}\n\t\t\treturn $data;\n\t\t}\n\t}", "private function showTicketDetails()\n {\n $data = array();\n\n $ticket_id = $this->param[2];\n\n $data['ticket_status_type'] = Utils::arrayAlterKeyValue(\n $GLOBALS['TICKET_STATUS_TYPE']\n );\n \n $my_sources = array();\n foreach($_SESSION['LOGIN_USER']['sources'] as $index => $source)\n {\n $my_sources[$source->source_id] = $source->name;\n }\n $data['source_list'] = $my_sources;\n \n $sql = \"SELECT t.*, ts.source_id \n FROM \" . TICKETS_TBL . \" as t, \" . TICKET_SOURCES_TBL . \" as ts \n WHERE t.ticket_id = ts.ticket_id AND t.ticket_id = $ticket_id\";\n try\n {\n $ticket = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n \n $ticket = isset($ticket[0]) ? $ticket[0] : new stdClass();\n $ticket->status_text = $GLOBALS['TICKET_STATUS_TYPE'][$ticket->status];\n $ticket->create_date = date('l jS F Y @ h:i A (T)', \n strtotime($ticket->create_date));\n \n $priorityColorSettings = Utils::getPriorityColorSettings($this->db,$_SESSION['LOGIN_USER']['userId']); \n \n $ticket->color = $priorityColorSettings[$ticket->priority];\n $data['ticket'] = $ticket; \n\n $sql = \"SELECT d.*, u.first_name, u.last_name \n FROM \" . TICKETS_DETAILS_TBL . \" as d, \" . USERS_TBL . \" as u \n WHERE d.user_id = u.user_id \n AND d.ticket_id = $ticket_id \n ORDER BY d.create_date desc\";\n try\n {\n $list = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n\n // if($list)\n // {\n // foreach($list as $index => $row)\n // {\n // $list[$index]->create_date = date('l jS F Y @ h:i A (T)', \n // strtotime($row->create_date));\n // }\n // }\n // \n // $first_detail_pos = count($list)-1;\n // $first_detail = $list[$first_detail_pos];\n // unset($list[$first_detail_pos]);\n // \n // $data['first_detail'] = $first_detail;\n // $data['detail_list'] = $list;\n \n if($list)\n {\n foreach($list as $index => $row)\n {\n $row->create_date = date('l jS F Y @ h:i A (T)', \n strtotime($row->create_date));\n if($row->type == 1)\n {\n $description = $row;\n }\n else\n {\n $res[] = $row;\n }\n }\n }\n $data['first_detail'] = $description;\n $data['detail_list'] = $res;\n\n $list = array();\n $sql = \"SELECT * \n FROM \" . TICKET_ATTACHMENTS_TBL . \" \n WHERE deleted = 0 AND ticket_id = $ticket_id\";\n try\n {\n $rows = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n \n if($rows)\n {\n foreach($rows as $index => $row)\n {\n $extArray = split(\"[.]\",$row->original_filename);\n $row->extension = strtolower($extArray[count($extArray)-1]);\n \n $list[$row->details_id][] = $row;\n }\n }\n $data['attachments_by_details_id'] = $list; \n \n $sql = \"SELECT * \n FROM \" . TICKET_RATING_SUMMARY_TBL . \" \n WHERE ticket_id = $ticket_id\";\n try\n {\n $rows = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n \n if(count($rows) > 0)\n {\n $data['ticket_rating_submissions'] = $rows[0]->rating_submissions;\n if($rows[0]->rating_sum > 0)\n {\n $data['ticket_average_rating'] = number_format((float)$rows[0]->rating_sum / (float)$data['ticket_rating_submissions'], 2, '.', '');\n }\n else\n {\n $data['ticket_average_rating'] = 0;\n }\n }\n else\n {\n $data['ticket_rating_submissions'] = 0;\n $data['ticket_average_rating'] = 0;\n }\n\n $data['ticket_status_list'] = $GLOBALS['TICKET_STATUS_TYPE'];\n $data['login_user_id'] = $_SESSION['LOGIN_USER']['userId'];\n $data['is_resolver'] = Utils::isResolverUser($ticket->source_id); \n \n $data['add_detail_dialog'] = $this->template\n ->parseTemplate(TICKET_DETAIL_DIALOG_TEMPLATE, $data);\n\n $data['add_tag_dialog'] = $this->template\n ->parseTemplate(TICKET_TAG_DIALOG_TEMPLATE, $data);\n \n $data['add_merge_dialog'] = $this->template\n ->parseTemplate(TICKET_MERGE_DIALOG_TEMPLATE, $data); \n\n $data['is_source'] = count($_SESSION['LOGIN_USER']['authorized_sources']);\n $data['is_executive'] = Utils::isExecutive($ticket->source_id);\n // Utils::dumpvar($data);\n return $this->template->parseTemplate(TICKET_DETAIL_TEMPLATE, $data);\n }", "public function getAuthenticatedEmotes($user) { \r\n return $this->makeRequest('get', \"/users/{$user}/emotes\");\r\n }", "private function ticketsAction()\n {\n if (isset($_POST['zoek']) && !empty($_POST['zoek']))\n {\n $tickets = $this->model->zoekTickets();\n if ($tickets === \"ticketBestaatNiet\")\n {\n $this->model->foutGoedMelding('danger', 'Ticket bestaat niet!');\n }\n }\n if (!isset($tickets) && empty($tickets) || $tickets === \"ticketBestaatNiet\")\n {\n $tickets = $this->model->geefTickets();\n }\n $this->view->set('tickets', $tickets);\n\n $klanten = $this->model->geefKlanten();\n $this->view->set('klanten', $klanten);\n\n $gebruikers = $this->model->geefGebruikers();\n $this->view->set('gebruikers', $gebruikers);\n }", "public function open_tickets()\n {\n return $this->hasMany('App\\Models\\Tickets', 'mailbox_id', 'id')->where('status', 'open');\n }", "public function inProcessTickets()\n {\n $user = Auth::user();\n $all_members = User::where('role', 2)->where('agency_id', $user->agency_id)->lists('id');\n $all_members[count($all_members)] = $user->id;\n\n if($user->role > 3)\n return redirect('/');\n else if($user->role==1){\n $in_process_tickets = Ticket::where('status', 2)->whereIn('assignee', $all_members)->orderBy('created_at', 'DESC')->paginate(20);\n }\n else if($user->role==2){\n $in_process_tickets = Ticket::where('status', 2)->where('assignee', $user->id)->orderBy('created_at', 'DESC')->paginate(20);\n }\n else{\n $in_process_tickets = Ticket::where('status', 2)->orderBy('created_at', 'DESC')->paginate(20);\n }\n\n return view('tickets.in-process')->with('user', $user)->with('in_process_tickets', $in_process_tickets);\n }", "public function index()\n {\n return TicketResource::collection(Ticket::paginate(10));\n }", "public function index()\n {\n $endorsed = EndorsedTicket::all();\n foreach ($endorsed as $e) {\n $e->user = $e->user;\n unset($e->user->email);\n unset($e->user->password);\n unset($e->user->privilege);\n unset($e->user->worker_sid);\n unset($e->user->contact_no);\n }\n return $endorsed;\n }", "function dialogue_get_user_entries($dialogue, $user) {\n global $DB, $CFG;\n $sqlparams = array('dialogueid' => $dialogue->id, 'userid' => $user->id);\n return $DB->get_records_select('dialogue_entries', \"dialogueid = :dialogueid AND userid = :userid\",\n 'timecreated DESC', $sqlparams);\n}", "public function geefGeslotenTickets() {\n $klant_id = $_SESSION['gebruiker']->geefKlant_id();\n $sql = 'SELECT * FROM `tickets` WHERE `status` = \"gesloten\" AND `klant_id` = :klant_id';\n $stmnt = $this->db->prepare($sql);\n $stmnt->bindParam(':klant_id', $klant_id);\n $stmnt->execute();\n $tickets = $stmnt->fetchAll(\\PDO::FETCH_CLASS, __NAMESPACE__ . '\\Ticket');\n return $tickets;\n }", "function get_available_tickets( $include_member_tickets = false ){\n\t\t$tickets = array();\n\t\tforeach ($this->get_tickets() as $EM_Ticket){\n\t\t\t/* @var $EM_Ticket EM_Ticket */\n\t\t\tif( $EM_Ticket->is_available($include_member_tickets) ){\n\t\t\t\t//within time range\n\t\t\t\tif( $EM_Ticket->get_available_spaces() > 0 ){\n\t\t\t\t\t$tickets[] = $EM_Ticket;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$EM_Tickets = new EM_Tickets($tickets);\n\t\treturn apply_filters('em_bookings_get_available_tickets', $EM_Tickets, $this);\n\t}", "public function closedTickets()\n {\n $user = Auth::user();\n $all_members = User::where('role', 2)->where('agency_id', $user->agency_id)->lists('id');\n $all_members[count($all_members)] = $user->id;\n\n if($user->role > 3)\n return redirect('/');\n else if($user->role==1){\n $closed_tickets = Ticket::where('status', 5)->whereIn('assignee', $all_members)->orderBy('created_at', 'DESC')->paginate(20);\n }\n else if($user->role==2){\n $closed_tickets = Ticket::where('status', 5)->where('assignee', $user->id)->orderBy('created_at', 'DESC')->paginate(20);\n }\n else{\n $closed_tickets = Ticket::where('status', 5)->orderBy('created_at', 'DESC')->paginate(20);\n }\n\n return view('tickets.closed')->with('user', $user)->with('closed_tickets', $closed_tickets);\n }", "public function getTicketToDispatch(Request $request)\n {\n\n $userID = Auth::id(); \n $nberRows = 10;\n //retrieve all of the query string values as an associative array\n $query= $request -> query();\n // Store in session Via a request instance...\n $request->session()->put($query);\n \n if($request->session()->has('status')) {\n \n $status = $request->session()->pull('status');\n //$nberRows = $request->session()->get('nberRow'); \n //Get Ticket with status sended by query\n $tickets = $this->ticketRepository->getTicketByStatus($status,$nberRows); \n }\n if($request->session()->has('category')) {\n \n $category = $request->session()->pull('category');\n // $nberRows = $request->session()->get('nberRow'); \n //Get Ticket with status sended by query\n $tickets = $this->ticketRepository->getTicketByCategory($category,$nberRows); \n }\n\n if ($request->has('nberRows')) {\n \n $query = $request->session()->get('category','status');\n if($query =='status'){\n //Get Ticket with status sended by query\n $tickets = $this->ticketRepository->getTicketByStatus($status,$nberRows);\n }\n if($query == 'category' ){\n //Get Ticket with status sended by query\n $tickets = $this->ticketRepository->getTicketByCategory($category,$nberRows);\n }\n\n }\n \n //Get All User who have role Agent\n $agents = $this->roleRepository->getUserByRole('Agent');\n \n //Get value of status column from Ticket table\n $statusColumnValues = $this->ticketRepository->getAllValueOfStatusColumn();\n\n //Get all value of category column from Ticket table\n $categoryColumnValues = $this->ticketRepository->getAllValueOfCategoryColumn();\n // \n return view('tickets.ticket_update_agent',['tickets'=>$tickets,\n 'agents'=>$agents,\n 'categoryColumnValues'=> $categoryColumnValues,\n 'statusColumnValues'=> $statusColumnValues \n ]);\n\n }", "public function getassignedtickets($id){\n\t\t$this->db->order_by(\"created_at\", \"DESC\");\n\t\t$this->db->select('*');\n\t\t$this->db->join('tickets', 'tickets.id = ticketsassigned.ticketid ');\n\t\t$this->db->where('tickets.status !=', 'Closed');\n $query = $this->db->get_where('ticketsassigned', array('userid' => $id));\n return $query->result_array(); \t\t\t\n\t}", "public function showTickets()\n {\n $user = Auth::user();\n\n return view('pages.user.404')->withUser($user);\n }", "function index() {\n $this->tickets();\n }", "public function getYourTickets($mailboxId)\n\t{\n\t\treturn $this->send($this->getHttp()->get($this->url.'mailbox/'.$mailboxId.'/yours'));\n\t}", "public function index()\n {\n // return dd($tickets_count);\n $ticketsUser = Ticket::UserAction()->get();\n $ticketsPending = Ticket::UserPending()->get();\n $tickets = Ticket::UserAll()->get();\n\n return view('dashboard', compact('ticketsUser', 'ticketsPending', 'tickets'));\n }", "function get_usersrecords() {\n\t\t$this->db->select('ut.users_id, ut.message, u.users_fname, u.users_lname,u.users_email_id');\n\t\t$this->db->from('user_tickets ut');\n\t\t$this->db->join('users u', 'u.users_id = ut.users_id');\n\t\t$query = $this->db->get();\n\n\t\t$collection = $query->result();\n\t\treturn $collection;\n\t}", "private function getEditableTickets()\n {\n $tickets = ArrayList::create();\n foreach ($this->getTickets() as $ticket) {\n /** @var Ticket $ticket */\n $fieldName = $this->name . \"[{$ticket->ID}][Amount]\";\n $range = range($ticket->OrderMin, $ticket->OrderMax);\n\n $ticket->AmountField = DropdownField::create($fieldName, 'Amount', array_combine($range, $range))\n ->setHasEmptyDefault(true)\n ->setEmptyString(_t('TicketsField.EMPTY', 'Tickets'));\n\n // Set the first to hold the minimum\n if ($this->getTickets()->count() === 1) {\n $ticket->AmountField->setValue($ticket->OrderMin);\n }\n\n // $availability = $ticket->TicketPage()->getAvailability();\n $availability = $ticket->getAvailability();\n if ($availability < $ticket->OrderMax) {\n $disabled = range($availability + 1, $ticket->OrderMax);\n $ticket->AmountField->setDisabledItems(array_combine($disabled, $disabled));\n }\n\n if (!$ticket->getAvailable()) {\n $ticket->AmountField->setDisabled(true);\n }\n\n $this->extend('updateTicket', $ticket);\n $tickets->push($ticket);\n }\n return $tickets;\n }", "public function bringUserPurchases($user){\n try\n {\n $query=\"SELECT * \n FROM \".$this->tableName.\" \n WHERE idUser= :idUser\";\n\n $parameters[\"idUser\"]=$user->getIdUser();\n\n $this->connection = Connection::GetInstance();\n\n $resultSet=$this->connection->Execute($query, $parameters);\n\n $purchaseList=array();\n\n foreach ($resultSet as $row ) {\n $purchase=new Purchase($row[\"purchaseDate\"], $row[\"total\"], $row[\"discount\"],$this->helper->helpUserById($row[\"idUser\"]));\n $purchase->setIdPurchase($row[\"idPurchase\"]);\n\n $query2=\"SELECT * \n FROM \".$this->ticketTable.\" T \n JOIN \".$this->tableName.\" P \n ON T.idPurchase=P.idPurchase \n WHERE T.idPurchase= :idPurchase;\";\n\n $parameters2[\"idPurchase\"]=$purchase->getIdPurchase();\n\n $this->connection = Connection::GetInstance();\n \n $resultSet2=$this->connection->Execute($query2, $parameters2);\n\n $tickets=array();\n\n foreach($resultSet2 as $row2){\n $ticket=new Ticket();\n $ticket->setTicketNumber($row2[\"idTicket\"]);\n $ticket->setQR($row2[\"QR\"]);\n $ticket->setMovieFunction($this->helper->helpFunctionById($row2[\"idMovieFunction\"]));\n array_push($tickets,$ticket);\n }\n\n $purchase->setTickets($tickets);\n\n array_push($purchaseList,$purchase);\n }\n\n return $purchaseList;\n }\n catch(Exception $ex)\n {\n throw $ex;\n }\n }", "public function getTicketModel()\n {\n return $this->getController()->getServiceLocator()->get('User\\Model\\Ticket');\n }", "public function get_tickets($archived = false){\n\t\t//if not looked for archived, retrieve all open tickets\n\t\tif ($archived == FALSE){\n\t\t\t$this->db->order_by(\"created_at\", \"DESC\");\n $query = $this->db->get_where('tickets', array('status' => 'Open'));\n return $query->result_array(); \n\t\t\t}\n\t\t\t//retrieve all closed tickets\n\t\t\telse {\n\t\t\t$this->db->order_by(\"created_at\", \"DESC\");\n\t\t\t$query = $this->db->get_where('tickets', array('status' => 'Closed'));\n\t\t\treturn $query->result_array();\n\t\t\t}\n\t}", "public function getValidTickets() {\n\n try {\n $select = $this->select()\n ->from(array('t' => 'ticket_system'), array('t.ticket_id', 't.code', 't.bonus_amt', 't.valid_from', 't.valid_upto', 't.limitation', 't.status'))\n ->setIntegrityCheck(false)\n ->joinLeft(array('con' => 'contests'), 't.ticket_id = con.ticket_id', array(\"con.con_status\"))\n ->where('con.con_status = ?', '0')\n ->order('t.ticket_id DESC');\n\n\n $result = $this->getAdapter()->fetchAll($select);\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n }\n if ($result) :\n return $result;\n endif;\n\n\n\n // echo \"<pre>\"; print_r($result); echo \"</pre>\"; die;\n }", "public function getActiveTickets() {\n try {\n $select = $this->select()\n ->from($this);\n// ->where('status =?',1);\n $result = $this->getAdapter()->fetchAll($select);\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n }\n if ($result) :\n return $result;\n endif;\n }", "private function printTicketDetails()\n {\n $data = array();\n\n $ticket_id = $this->param[2];\n\n $data['ticket_status_type'] = Utils::arrayAlterKeyValue(\n $GLOBALS['TICKET_STATUS_TYPE']\n );\n \n $my_sources = array();\n foreach($_SESSION['LOGIN_USER']['sources'] as $index => $source)\n {\n $my_sources[$source->source_id] = $source->name;\n }\n $data['source_list'] = $my_sources;\n \n $sql = \"SELECT t.*, ts.source_id \n FROM \" . TICKETS_TBL . \" as t, \" . TICKET_SOURCES_TBL . \" as ts \n WHERE t.ticket_id = ts.ticket_id AND t.ticket_id = $ticket_id\";\n try\n {\n $ticket = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n\n $ticket = isset($ticket[0]) ? $ticket[0] : new stdClass();\n $ticket->status_text = $GLOBALS['TICKET_STATUS_TYPE'][$ticket->status];\n $ticket->create_date = date('l jS F Y @ h:i A (T)', \n strtotime($ticket->create_date));\n $data['ticket'] = $ticket;\n\n $sql = \"SELECT d.*, u.first_name, u.last_name \n FROM \" . TICKETS_DETAILS_TBL . \" as d, \" . USERS_TBL . \" as u \n WHERE d.user_id = u.user_id \n AND d.ticket_id = $ticket_id \n ORDER BY d.create_date desc\";\n try\n {\n $list = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n\n // if($list)\n // {\n // foreach($list as $index => $row)\n // {\n // $list[$index]->create_date = date('l jS F Y @ h:i A (T)', \n // strtotime($row->create_date));\n // }\n // }\n // \n // $first_detail_pos = count($list)-1;\n // $first_detail = $list[$first_detail_pos];\n // unset($list[$first_detail_pos]);\n // \n // $data['first_detail'] = $first_detail;\n // $data['detail_list'] = $list;\n \n if($list)\n {\n foreach($list as $index => $row)\n {\n $row->create_date = date('l jS F Y @ h:i A (T)', \n strtotime($row->create_date));\n if($row->type == 1)\n {\n $description = $row;\n }\n else\n {\n $res[] = $row;\n }\n }\n }\n $data['first_detail'] = $description;\n $data['detail_list'] = $res;\n \n $list = array();\n $sql = \"SELECT * \n FROM \" . TICKET_ATTACHMENTS_TBL . \" \n WHERE deleted = 0 AND ticket_id = $ticket_id\";\n try\n {\n $rows = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n \n if($rows)\n {\n foreach($rows as $index => $row)\n {\n $list[$row->details_id][] = $row;\n }\n }\n $data['attachments_by_details_id'] = $list;\n\n $data['ticket_status_list'] = $GLOBALS['TICKET_STATUS_TYPE'];\n $data['login_user_id'] = $_SESSION['LOGIN_USER']['userId'];\n \n $data['add_detail_dialog'] = $this->template\n ->parseTemplate(TICKET_DETAIL_DIALOG_TEMPLATE, $data);\n\n $data['add_tag_dialog'] = $this->template\n ->parseTemplate(TICKET_TAG_DIALOG_TEMPLATE, $data);\n\n $data['is_source'] = count($_SESSION['LOGIN_USER']['authorized_sources']);\n $data['is_executive'] = Utils::isExecutive($ticket->source_id);\n \n //return $this->template->parseTemplate(TICKET_DETAIL_TEMPLATE, $data);\n echo $this->template->parseTemplate(PRINT_TICKET_DETAIL_TEMPLATE, $data);\n exit;\n }", "public function allAssignedTo() {\n return $this->hasMany(TicketAssignedUser::class, 'ticket_id');\n }", "public function index()\n {\n if(auth()->user()->isTechnical())\n {\n $tickets = Ticket::where(\"technical_id\",\"=\",auth()->user()->id)->paginate(9);\n }\n else if(auth()->user()->isCLient())\n {\n $tickets = Ticket::where(\"client_id\",\"=\",auth()->user()->id)->paginate(9);\n }\n else\n {\n $tickets = Ticket::paginate(9);\n }\n\n return view($this->pathViews.\"index\",compact('tickets'));\n }", "private function getTicketAuthKeys($userId, $ticketId)\n {\n $params = array();\n $params['db_link'] = $this->db;\n\n try\n {\n $ticketAuthObj = new TicketAuth($params);\n\n $authKeys = $ticketAuthObj->create($userId, $ticketId);\n }\n catch(Exception $e)\n {\n echo $e->getMessage();\n }\n\n return $authKeys;\n }", "public function index()\n {\n $tickets = '';\n $status = 'add';\n $role = Auth::user()->role;\n if ($role == 'add') {\n $tickets = Ticket::select('value as ticketAtAdd', 'id')->where('status', 'add')->get();\n } elseif ($role == 'sub') {\n\n $tickets = DB::table('tickets')\n ->select(DB::raw(\"value+addition as ticketAtSub ,id\"))\n ->where('status', '=', 'sub')\n ->get();\n $status = 'sub';\n\n } elseif ($role == 'mul') {\n $tickets = DB::table('tickets')\n ->select((\"((value+addition )-subtraction as ticketAtMul ,id\"))\n ->where('status', '=', 'mul')\n ->get();;\n $status = 'mul';\n\n\n } elseif ($role == 'div') {\n $tickets = DB::table('tickets')\n ->select((\"(((value+addition )-subtraction)*multiplication as ticketAtDiv ,id\"))\n ->where('status', '=', 'div')\n ->get();\n $status = 'div';\n\n\n } elseif ($role == 'supervisor') {\n $tickets = Ticket::where('status', '=', 'pending')->get();\n }\n $data = [\n 'status' => $status,\n 'tickets' => $tickets,\n ];\n return Response::json($data);\n }", "public function getEntries($user) {\n\t\t$db = $this->db;\n\t\t$user = $db->quote($user);\n\t\t$query = \"SELECT value FROM entries WHERE user=$user\";\n\t\t$result = $db->query($query);\n\t\treturn $result->fetchAll(PDO::FETCH_ASSOC);\n\t}", "public function index()\n {\n //all tickets for the admin\n $ticketsall = Ticket::latest()->paginate(5);\n //ticket for only project members \n // $tickets=Ticket::latest()->paginate(5);\n $users=auth()->user();\n $tickets=DB::table('tickets')->join('members','members.projectid','=','tickets.projectid')->where('members.modelid', '=', $users->id)->latest()->paginate(5);\n return view('tickets.index',compact('ticketsall','tickets'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "public function tickets(){\n return $this->hasMany('App\\Tickets','servicio_id');\n }", "function get_tickets( $force_reload = false ){\n\t\tif( !is_object($this->tickets) || $force_reload ){\n\t\t\t$this->tickets = new EM_Tickets($this->event_id);\n\t\t\tif( get_option('dbem_bookings_tickets_single') && count($this->tickets->tickets) == 1 ){\n\t\t\t\t//if in single ticket mode, then the event booking cut-off is the ticket end date\n\t\t \t$EM_Ticket = $this->tickets->get_first();\n\t\t \t$EM_Event = $this->get_event();\n\t\t \t//if ticket has cut-off date, that should take precedence as we save the ticket cut-off date/time to the event in single ticket mode\n\t\t \tif( !empty($EM_Ticket->ticket_end) ){\n\t\t \t\t//if ticket end dates are set, move to event\n\t\t \t\t$EM_Event->event_rsvp_date = $EM_Ticket->end()->format('Y-m-d');\n\t\t \t\t$EM_Event->event_rsvp_time = $EM_Ticket->end()->format('H:i:00');\n\t\t \t\tif( $EM_Event->is_recurring() && !empty($EM_Ticket->ticket_meta['recurrences']) ){\n\t\t \t\t\t$EM_Event->recurrence_rsvp_days = $EM_Ticket->ticket_meta['recurrences']['end_days'];\t\t \t\t\t\n\t\t \t\t}\n\t\t \t}else{\n\t\t \t\t//if no end date is set, use event end date (which will have defaulted to the event start date\n\t\t \t\tif( !$EM_Event->is_recurring() ){\n\t\t \t\t\t//save if we have a valid rsvp end date\n\t\t \t\t\tif( $EM_Event->rsvp_end()->valid ){\n\t\t\t\t\t\t $EM_Ticket->ticket_end = $EM_Event->rsvp_end()->getDateTime();\n\t\t\t\t\t }\n\t\t \t\t}else{\n\t\t\t \t\tif( !isset($EM_Ticket->ticket_meta['recurrences']['end_days']) ){\n\t\t\t \t\t\t//for recurrences, we take the recurrence_rsvp_days and feed it into the ticket meta that'll handle recurrences\n\t\t\t \t\t\t$EM_Ticket->ticket_meta['recurrences']['end_days'] = !empty($EM_Event->recurrence_rsvp_days) ? $EM_Event->recurrence_rsvp_days : 0;\n\t\t\t \t\t\tif( !isset($EM_Ticket->ticket_meta['recurrences']['end_time']) ){\n\t\t\t \t\t\t\tiF( empty($EM_Event->event_rsvp_time) ){\n\t\t\t\t\t\t\t\t $EM_Ticket->ticket_meta['recurrences']['end_time'] = $EM_Event->start()->getTime();\n\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t $EM_Ticket->ticket_meta['recurrences']['end_time'] = $EM_Event->event_rsvp_time;\n\t\t\t\t\t\t\t }\n\t\t\t \t\t\t}\n\t\t\t\t\t\t $EM_Ticket->ticket_end = $EM_Event->start()->format('Y-m-d') . $EM_Ticket->ticket_meta['recurrences']['end_time'];\n\t\t\t \t\t}\n\t\t \t\t}\n\t\t \t}\n\t\t\t}\n\t\t}else{\n\t\t\t$this->tickets->event_id = $this->event_id;\n\t\t}\n\t\treturn apply_filters('em_bookings_get_tickets', $this->tickets, $this);\n\t}", "private function _getTicketsReferentSales()\n {\n $this->loadModel('Users');\n $users = $this->Users->find('all')->toArray();\n $data = [];\n\n foreach ($users as $user) {\n $count = $this->Tickets->find('all')->where(['paid' => 1, 'user_code' => $user->code])->count();\n\n if($count > 0) {\n $data[] = [\n 'label' => $user->firstname . ' ' . $user->lastname,\n 'value' => $this->Tickets->find('all')->where(['paid' => 1, 'user_code' => $user->code])->count()\n ];\n }\n }\n\n return $data;\n }", "function get( $id ) {\n\t\ttry {\n\t\t\t$response = $this->api( 'ticket.get', [ $id ] );\n\t\t} catch( \\Exception $e ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn [\n\t\t\t'id' => $response[0],\n\t\t] + (array) $response[3];\n\t}", "function getRequestedTeamTeaches() {\n global $CFG;\n\n $sql = \"SELECT * FROM\n {$CFG->prefix}block_courseprefs_teamteach\n WHERE usersid = {$this->id}\n AND status != 'undo'\";\n\n $results = get_records_sql($sql);\n $teamteaches = array();\n\n // Return an empty array if there are no records to process\n if (!$results) {\n return $teamteaches;\n }\n\n foreach ($results as $result) {\n $teamteaches[$result->id] = new CoursePrefsTeamTeach($result->usersid, \n $result->sectionsid, $result->tt_sectionsid, $result->status,\n $result->approval_flag, $result->id);\n }\n return $teamteaches;\n }", "public function index()\n {\n return User::withTrashed()->get();\n }", "public function actionIndex()\n {\n $searchModel = new TicketsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getTicketById($id)\n { \n $conn = $this->connect();\n $stmt = $conn->prepare(\"SELECT * FROM tickets WHERE ticket_id = ? ;\");\n $stmt->bind_param('s', $id);\n\n $stmt->execute();\n\n $resultTicket = $stmt->get_result();\n\n\n\n return $resultTicket;\n }", "public function tickets(): MorphMany\n {\n return $this->morphMany(static::getTicketModel(), 'ticketable', 'ticketable_type', 'ticketable_id');\n }", "public function getTicketPrinted()\n {\n return $this->join('customers','sales.customer_id','=','customers.id')\n ->select('sales.*','customers.name as customer')\n ->where('status','=', 3)\n // ->orderBy('updated_at','desc')\n ->get();\n }", "function listTicket() {\n\t\t$query = \"SELECT t.t_id, t.name, t.price, t.quantity_available \n\t\tFROM yam14.F_ticket t, yam14.F_event e\n\t\tWHERE e.e_id = t.e_id\n\t\tAND t.e_id = \" . $this->eid . \";\";\n\t\t\n\t\t$result = mysql_query($query);\n\t\tif (!$result) {\n\t\t\t$message='Invalid Query' .mysql_errno().\" \\n\";\n\t\t $message .= 'Whole Query' . $query;\n\t\t die($message);\n\t\t}//end if\n\t\t\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t$this->ticketid = $row['t_id'];\n\t\t\t$this->ticketname = $row['name'];\n\t\t\t$this->ticketprice = $row['price'];\n\t\t\t$this->ticketavailable = $row['quantity_available'];\n\t\t\t\n\t\t\techo \"<table class=\\\"table\\\">\";\n\t\t\techo \t\"<form method=\\\"post\\\" action=\\\"event.php?eid=$this->eid\\\">\";\n\t\t\techo \t\"<tr><th colspan=\\\"4\\\">Ticket Information</th></tr>\";\n\t\t\techo \t\"<tr><td>TYPE</td><td>REMAINING</td><td>PRICE</td><td>QUANTITY</td></tr>\";\n\t\t\techo \t\"<tr>\";\n\t\t\techo \"<td>$this->ticketname</td>\";\n\t\t\techo \"<td>\";\n\t\t\tif ($this->ticketavailable==0) {\n\t\t\t\techo \"<p class='error'>Sold Out</p>\";\n\t\t\t}else {\n\t\t\t\techo $this->ticketavailable;\n\t\t\t}\n\t\t\techo \t\"</td>\";\n\t\t\techo \t\"<td>\";\n\t\t\tif ($this->ticketprice==0) {\n\t\t\t\techo \"FREE\";\n\t\t\t}else {\n\t\t\t\techo \"$\" . $this->ticketprice;\n\t\t\t}\n\t\t\techo \"</td>\";\n\t\t\techo \t\"<td><input type=\\\"number\\\" name=\\\"quantity\\\" value=\\\"\\\" step='1' placeholder=\\\"1\\\" min=\\\"1\\\" max=\\\"$this->ticketavailable\\\" \";\n\t\t\tif ($this->ticketavailable==0) {\n\t\t\t\techo \"disabled\";\n\t\t\t}\n\t\t\techo \"/></td>\";\n\t\t\techo \t\"</tr>\";\n\t\t\techo \t\"<tr><td>\";\n\t\t\techo \t\"</td><td></td><td></td><td><input type=\\\"submit\\\" name=\\\"register\\\" value=\\\"Register\\\" class=\\\"btn btn-lg btn-success\\\" \";\n\t\t\tif ($this->ticketavailable==0) {\n\t\t\t\techo \"disabled\";\n\t\t\t}\n\t\t\techo \" /></td></tr>\";\n\t\t\techo \t\"</form>\";\n\t\t\techo \t\"</table>\";\n\t\t}\t\n\t\t\n\t\tmysql_free_result($result);\n\t\t\n\t\t\t\n\t\t\t\n\t}", "public function getThreads()\n {\n $user = request()->user();\n\n $messages = $user->threadsWithMessagesWithUsers($user->id)->get();\n\n /**\n * Returns unread messages given the userId.\n */\n //$messages = Message::unreadForUser($user->id)->get();\n\n return ThreadsResource::collection($messages);\n //return response()->json($messages);\n }" ]
[ "0.7822738", "0.75688815", "0.7543042", "0.74866563", "0.7249491", "0.7233538", "0.70889676", "0.70712817", "0.7044554", "0.7016593", "0.6866737", "0.67694527", "0.66842353", "0.6614182", "0.65816617", "0.65543854", "0.650449", "0.6467773", "0.6370188", "0.635437", "0.63448", "0.62879235", "0.6259401", "0.624735", "0.6209286", "0.6178902", "0.6167065", "0.61625695", "0.6139572", "0.61223376", "0.6120036", "0.6108319", "0.61075765", "0.6099937", "0.6078284", "0.6073078", "0.6073061", "0.6041098", "0.6011325", "0.59633505", "0.59282035", "0.59026295", "0.5877328", "0.5877328", "0.5876275", "0.5875597", "0.58272463", "0.5800498", "0.5797446", "0.57931584", "0.5787959", "0.5787106", "0.5782478", "0.57713234", "0.57658565", "0.5760211", "0.57540697", "0.57406414", "0.57151055", "0.5707497", "0.56842434", "0.5671643", "0.56516564", "0.5632579", "0.5632196", "0.56284577", "0.56220806", "0.56111443", "0.5604157", "0.55897415", "0.55895096", "0.55828613", "0.5553194", "0.5550978", "0.55176866", "0.55072784", "0.55049664", "0.55042225", "0.54949784", "0.548998", "0.54875326", "0.5469452", "0.54538906", "0.5448395", "0.5443559", "0.5437187", "0.54368377", "0.5435971", "0.54311836", "0.54187983", "0.5410885", "0.5408875", "0.54063815", "0.5392827", "0.53918684", "0.53867406", "0.53828377", "0.538167", "0.53720397" ]
0.6587757
15
Show dashboard of customer
public function editInvoice($order_id) { $submitted = Request::get('submitted'); if ($submitted) { } else { $order = Invoice::where('id', '=', $order_id)->get(); $order_details =[]; return view('common.edit_invoice') ->with('order', $order[0]) ->with('order_details', $order_details); // return view('common.edit_invoice')->with('order', $order)->with('order_details', $order_details)->with('before_image',$before_image); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function customer() {\n $this->access_lib->_is(\"adm,mgr\");\n\n $data['header'] = $this->header;\n\n $this->load->view('report_customer_v', $data);\n }", "public function listCustomers()\n {\n return $this->view( 'pages.dashboard.customers' );\n }", "public function index()\n {\n $customer = Customer::all();\n return view('dashboard.customer.index', ['customer' => $customer]);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n // Check for admin user\n $user = auth()->user()->id;\n\n // if admin render admin dashboard view, otherwise render customer form\n // Could refactor this to create additional admins or other specifications \n if($user === 1){\n\n $allCompanies = Company::with('customers')->get()->toArray(); \n\n // Helper code snippet to visualize data\n\n // echo \"<pre>\";\n // print_r($allCompanies);\n // exit; \n\n return view('pages.dashboard')->with('companies', $allCompanies);\n }\n else {\n return view('forms.customer');\n }\n\n \n }", "public function show()\n {\n\t $customer = Customer::find(Auth::user()->id);\n\n\t return view('age-layouts.' . Session::get('ageGroup') . '.dashboard-user', ['customer' => $customer]);\n }", "public function customers()\n {\n if ($_SESSION['role'] == 1)\n { \n //get customers info from the database\n $Customer = $this->model('Customer');\n $this->customers = $Customer->adminGetCustomers(); \n $this->view('AdminDashboard/customers', ['viewName' => 'Dashboard - Customers']);\n }\n else\n {\n header('location: '.URL.'Login');\n }\n\n }", "public function dashboard() {\n\t\tif( Session::get(\"logged_in_as\") !== \"customer\" ) {\n\t\t\treturn Router::redirect(\"login\");\n\t\t}\n\t\t$order_model = new OrdersModel($this->db);\n\t\t$username = Session::get(\"logged_in_username\");\n\t\tif( @$_POST ) {\n\t\t\t$order_id = (int) $_POST[\"order_id\"];\n\t\t\t$order_model->delete($order_id);\n\t\t}\n\t\t// $orders = $order_model->get_order_by(\"user\", $username);\n\t\t$orders = $order_model->get(\"booked_by\", $username);\n\t\t$res = [];\n\t\t$vehicle_model = new VehicleModel($this->db);\n\t\tforeach( $orders as $order) {\n\t\t\t$res[$order[\"id\"]] = $order;\n\t\t\t$res[$order[\"id\"]][\"vehicle\"] = $vehicle_model->get_vehicle_by(\"id\", $order[\"vehicle_id\"]);\n\t\t\t$res[$order[\"id\"]][\"vehicle\"][\"meta\"] = $vehicle_model->get_vehicle_meta($order[\"vehicle_id\"]);\n\t\t}\n\t\t$props = [\"orders\" => $res];\n\t\treturn $this->render(\"customer/dashboard.twig\", $props);\n\t}", "public function index()\n {\n $customer=$this->customint->index();\n return view('admin.pages.customer.index',compact('customer'));\n }", "public function index()\n {\n // Show the page\n return view('admin.customer.index');\n }", "public function index()\n {\n if(Input::get('customer') !== null){\n return $this->show(Input::get('customer'));\n }\n return view('customer.index')->with('customers',Customer::all());\n }", "public function index()\n {\n $customers = Customer::all();\n return view('admin.customer.customer',compact('customers'));\n }", "public function index()\n {\n $customers = Customer::where('type',Customer::CUSTOMER)->paginate(5);\n return view('admin.customers.customers',compact('customers'));\n }", "public function actionCustomer()\n {\n $tab = Yii::$app->request->get('tab') ? Yii::$app->request->get('tab') : '1';\n $title = '多客服管理';\n $keywords = 'wechat customer service 微信 客服';\n $description = '多客服管理';\n \n switch ($tab) \n {\n case 1:\n $page = 'customer';\n break;\n case 2:\n $page = 'customer1';\n break;\n case 3:\n $page = 'customer2';\n break;\n }\n return $this -> render($page,[\n 'tab' => $tab,\n 'title' => $title,\n 'keywords' => $keywords,\n 'description' => $description\n ]);\n }", "public function index()\n\t{\t$customers = Customer::all();\n\t\treturn view('admin.customer.customers',['customers' => $customers]);\n\t}", "public function index()\n {\n \n $user = User::role(0)->get();\n \n\n return view('admin.customer.index', compact('user'));\n }", "public function index()\n {\n $customers = User::with(['balance', 'userData'])->orderByDesc('updated_at')->get();\n $personal_code = Setting::where('slug', 'personal_code')->first()->value_lt;\n\n return view('admin.customers', compact('customers', 'personal_code'));\n }", "public function index()\n {\n return view('admin.customer.index' , [\n 'customerinfo_all' => Customerinfo::all(),\n 'total_customerinfo' => Customerinfo::count(),\n ]);\n }", "public function customer(){\n\n $data['title'] = 'Customers';\n return view('admin.customer_list')->with($data);\n }", "public function index()\n {\n return view('admin.customer',['customers' => User::all()]);\n\n }", "public function show(Customer $customer)\n {\n //\n }", "public function show(Customer $customer)\n {\n //\n }", "public function show(Customer $customer)\n {\n //\n }", "public function show(Customer $customer)\n {\n //\n }", "public function show(Customer $customer)\n {\n //\n }", "public function show(Customer $customer)\n {\n //\n }", "public function show(Customer $customer)\n {\n //\n }", "public function show(Customer $customer)\n {\n //\n }", "public function index()\n {\n $customer = Customer::orderBy('id', 'desc')->get();\n return view('admin.customer.index', ['customer' => $customer]);\n }", "public function clients_show()\n {\n if(Auth::user()->access != 1 )\n {\n abort(403);\n }\n return view('hact.reports.client');\n }", "public function show(Customer $customer)\n {\n //\n }", "public function show(Custo $custo)\n {\n //\n }", "public function index()\n\t{\n\t\t$data = Customer::customer()->get();\n\n return view('customer.index', compact('data'));\n\t}", "function customer(){\n $data['customer'] = $this->m_rental->get_data('customer')->result();\n $this->load->view('header');\n $this->load->view('admin/customer',$data);\n $this->load->view('footer');\n }", "public function dashboard() {\n return view('fronts.shop_owner.shop_owner_dashboard');\n }", "public function index(){\n\t\treturn view('user.customers');\n\t}", "public function index()\n {\n return view('Admin.add_customer');\n }", "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 index()\n {\n $customers = Customer::get();\n return view('customer.show' , ['customers' => $customers]);\n\n }", "public function index()\n {\n $customer_data=CustomerModel::all();\n return view('Admin.Customer.customer',['customer_data'=>$customer_data]);\n }", "public function index()\n {\n $name = Request()->input(\"customer_name\");\n $customer = $this->search_customers($name)->paginate(15);\n return view('pages.management.customer', ['customer' => $customer, 'customer_name' => $name]);\n }", "public function index()\n {\n $data = array(\n 'page_title' => 'Kunder',\n 'customers' => Customer::all()\n );\n\n return view('admin.customers.index')->with($data);\n }", "public function index()\n {\n $data = Customer::orderBy('company_name', 'asc')->paginate(12);\n return view('admin.customers.index', compact('data'));\n }", "public function index()\n {\n //\n return view('customer.index')->with('customer', Customer::all());\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function index()\n {\n $users = User::orderBy('id', 'desc')->paginate(30);\n return view('admin.customers.all_customer', ['customers' => $users]);\n }", "public function index()\n {\n $customers = DB::select('select * from customers'); \n \n return view('customermanager')->with('customers',$customers);\n }", "public function show()\n {\n $data = Customer::where('userID', '=', Auth::user()->id)->first();\n return view('customer.show', compact('data'));\n }", "public function show(Customers $customers)\n {\n //\n }", "public function customerPage() {\n $user = Auth::user();\n\n return view('books.customer_requests', compact('user'));\n }", "public function index()\n {\n $customer = customer::orderby('id', 'desc')->get();\n return View('customer.index',['customer'=>$customer]);\n }", "public function getUserDashboard() {\n $products = ProductModel::getProduct();\n $categoryAndSubcategory = CategoryModel::getCategory();\n\n $cartProducts = Cart::getContent();\n\n return view('user.pages.dashboard')\n ->with('categoryAndSubcategory', $categoryAndSubcategory)\n ->with('products', $products)\n ->with('cartProducts', $cartProducts);\n }", "public function dashboard()\n\t{\n\t\t$bought = ProductUser::with();\n\n\t\treturn View::make('admin.dashboard.dashboard', compact('bought'));\n\n\t}", "public function index()\n {\n //\n return view('pages.customer.index-customer');\n }", "public function index()\n {\n $this->permission->check_label('add_customer')->create()->redirect();\n\n $content = $this->lcustomer->customer_add_form();\n $this->template_lib->full_admin_html_view($content);\n }", "public function index()\n {\n return view('backend.customers.index');\n }", "public function index()\n {\n $data['customers'] = Customer::where('customer_type',2)->get();\n return view('backend.customers.view',$data);\n }", "public function index()\n {\n $customers = Customer::orderBy('created_at', 'desc')->paginate(10);\n if (Auth::guest()) {\n //is a guest so redirect\n return redirect('/');\n }\n return view('customer.customer')->with('customers', $customers);\n }", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function index()\n {\n // \n\n // return view('abcc.customers.index', compact(''));\n }", "public function index()\n {\n $results = User::getQueriedResult();\n\n return view('admin.customers.list',compact('results'));\n }", "public function index()\n {\n $user = Auth::user();\n $customers = $user->customers()->orderBy('id', 'DESC')->get();\n\n // $cust = Customer::find(519)->addresses;\n // dd($cust);\n return view('customers.index', [\n 'title'=>'Clients', \n 'btntitle'=>'Ajouter un client', \n 'ctrllink'=> 'customers', \n 'actionlink'=> 'create',\n 'customers'=>$customers\n ]);\n }", "public function get_customers () {\n \t$customers = $this->service->get_customers();\n \treturn view('admin.customers', ['customers' => $customers]);\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function index()\n {\n if (!Auth::user()->can('admin-customers-list')) {\n app()->abort(403);\n }\n\n $page_title = trans(\"timetracker::customers/admin_lang.title\");\n\n return view('timetracker::customers.admin_index', compact('page_title'))\n ->with('page_title_icon', $this->page_title_icon);\n }", "public function list()\n {\n $customer_result = User::select('id', 'first_name', 'last_name', 'email', 'contact_no', 'status')\n ->orderBy(\"created_at\", \"ASC\")\n ->paginate(5);\n \n return view('admin.customer_list', ['customers' => $customer_result]);\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 $customer = Customer::with(\"identification_type\")->get();\n return view(\"admin.customer.list\",compact(\"customer\"));\n }", "public function index()\n {\n $user= User::count();\n $staff=Staff::count();\n $customer=CustomerBooking::where('status','1')\n ->count();\n return view('admin.admin-content.dashboard',['user'=>$user,'staff'=>$staff,'customer'=>$customer]);\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 $judul = \"Customer List\";\n return view('customerlist.customerlist',compact('judul'));\n }", "public function index()\n {\n //get all users for admin\n //get related customer to the employee\n\n\n if (\\Auth::user()->role->role === 'admin') {\n $customers = Customer::with('employee')->get();\n } elseif (\\Auth::user()->role->role === 'employee') {\n $customers = \\Auth::user()->customers()->with('employee')->get();\n } else \\Redirect::route('home');\n\n\n return view('customers.index', compact('customers'));\n }", "public function index()\n {\n return view('pages.customers.index');\n }", "public function Dashboard(){\n\t\tif($this->IsLoggedIn('super_admin')){\n\t\t\t$data = $this->GetDataForSuperAdmin(\"Dashboard\");\n\t\t\t$data['sidebar_collapsed'] = \"true\";\n\t\t\t$data['admin_list']=$this->SuperAdminModel->FullTable('mss_business_admin');\n\t\t\t$data['admin_list']=$data['admin_list']['res_arr'];\n\t\t\t$data['active_admin']=$this->SuperAdminModel->ActiveAdminDetails();\n\t\t\t$data['active_admin']=$data['active_admin']['res_arr'];\n\t\t\t$data['master_admin']=$this->SuperAdminModel->FullTable('mss_master_admin');\n\t\t\t$data['master_admin']=$data['master_admin']['res_arr'];\n\t\t\t/*$this->PrettyPrintArray($data);\n\t\t\tdie;*/\n\t\t\t$this->load->view('superAdmin/sa_dashboard_view',$data);\n\t\t}\n\t\telse{\n\t\t\t$this->LogoutUrl(base_url().\"SuperAdmin/Login\");\n\t\t}\n\t}", "public function get_view(){\n\t\tif (Auth::check()){\n\t\t\t$customer_id = Auth::user()->customer_id;\n\n\t\t\t$customer_countryId = Customer::find($customer_id)->customer_countryId;\n\t\t\t$customer_countryName = Country::find($customer_countryId)->country_name;\n\n\t\t\t$customer_addressLine2 = Customer::find($customer_id)->customer_addressLine2;\n\t\t\t\n\t\t\tif($customer_addressLine2==\"\")\n\t\t\t\t$customer_addressLine2 = 'N/A';\n\n\t\t\t$customer_phoneNumber = Customer::find($customer_id)->customer_phoneNumber;\n\n\t\t\tif($customer_phoneNumber==\"\")\n\t\t\t\t$customer_phoneNumber = 'N/A';\n\n\t\t\t$this->layout->content = View::make('frontend.customers.view')\n\t\t\t\t->with('title', 'Customer View Page')\n\t\t\t\t->with('customer', Customer::find($customer_id))\n\t\t\t\t->with('customer_country', $customer_countryName)\n\t\t\t\t->with('customer_addressLine2', $customer_addressLine2)\n\t\t\t\t->with('customer_phoneNumber', $customer_phoneNumber);\n\t\t}\n\t}", "public function dashboard()\n {\n //$products = Product::with('category', 'subcategory')->get();\n return Inertia::render('Dashboard');\n }", "public function render()\n {\n return view('adminhub::livewire.pages.customers.show')\n ->layout('adminhub::layouts.app', [\n 'title' => $this->customer->fullName,\n ]);\n }", "public function index()\n {\n $data['front_scripts'] = array();\n $users = User::with('role', 'profile')->paginate(5);\n $data['users'] = $users;\n return View::make('backend_pages.customers.index',$data);\n }", "public function index()\n {\n $car = new Cars;\n $customer = new Customers;\n $customers = $customer::all();\n $cars = $car::all();\n // $car_customers = Cars::customers;\n \n return view('cars.dashboard', compact('cars','customers'));\n }", "public function index()\n {\n $customers = Customer::all();\n\n return view('transaction.customer.index', compact('customers'));\n }", "public function dashboardPartner()\n {\n // navbar large\n $pageConfigs = ['navbarLarge' => false];\n\n return view('admin.dashboard-partner-overview', ['pageConfigs' => $pageConfigs]);\n }", "public function show(Custompost $custompost)\n {\n //\n $customposts = Custompost::all();\n return view('dashboard.admin2', compact('customposts'));\n }", "public function admin()\n {\n if ($this->loggedIn()) {\n $data['flights'] = $this->modalPage->getFlights();\n $data['name'] = $_SESSION['user_name'];\n $data['title'] = 'dashboard ' . $_SESSION['user_name'];\n $this->view(\"dashboard/\" . $_SESSION['user_role'], $data);\n\n } else {\n redirect('users/login');\n }\n\n }", "public function index()\n {\n $customers = Customer::all();\n return view('customer.index', compact('customers'));\n }", "public function index()\n {\n $customers=Customer::paginate(15);\n\n return view(\"customer.index\",compact(\"customers\"));\n }", "public function c_index()\n {\n\t\t$this->layout= 'c_default';\n\t\t$this->getC();\n\t\t$admin=$this->request->session()->read('type')==\"admin\";\n\t\tif(($admin)){ \n\t\t\t$this->set('customers', $this->paginate($this->Customers));\n\t\t\t$this->set('_serialize', ['customers']);\n\t\t}else{\n\t\t\t$customer = $this->Customers->get(1);\n\t\t\t$this->set('customers', $customer);\n\t\t}\n\t\t\n }", "public function index()\n {\n //\n $customers = tbl_customer::all();\n return view('customers.index',compact('customers'));\n }", "public function index()\n {\n $customer = Customer::paginate(15);\n return view('customer.index', compact('customer'));\n }", "public function index()\n {\n \t$customer = Customer::all();\n \t// return data ke view\n \treturn view('customer/index', ['customer' => $customer]);\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 $customer=customers::all();\n\n return view('customer/new_customer',compact('customer'));\n }", "public function index()\n {\n $customers = DB::select('SELECT cust.*, bran.name\n FROM customers AS cust\n LEFT JOIN branches AS bran\n ON cust.branch_id = bran.id');\n return view('customers.index')->with(['customers'=>$customers]);\n }", "public function index()\n {\n if (TypeUser::find(\\Auth::user()->type_user_id)->TypeName != \"Reception\" and TypeUser::find(\\Auth::user()->type_user_id)->TypeName != \"Administator\") {\n return redirect('main');\n }\n $customers = Customer::all();\n return view('main.customer.index',compact('customers'));\n\n\n }", "public function customers(){\r\n if(isset($_SESSION['admindata'])){\r\n $this->load->view('layout/header', $nav['navdisable'] = \"none\");\r\n $this->load->view('admin/customer');\r\n $this->load->view('layout/footer');\r\n } else {\r\n $this->load->view('layout/header');\r\n $this->load->view('admin/login');\r\n $this->load->view('layout/footer'); \r\n }\r\n }", "public function index()\n {\n $customers = Customers::sortable()->paginate(5);\n return view('backend.customers.customertable',['customers'=>$customers]);\n }", "public function index()\n {\n $customers = Customer::orderBy('created_at', 'desc')->get();\n\n return view('customer.index', compact('customers'));\n }", "public function index()\n {\n $customers = Customer::all();\n\n return view('customer.index', compact('customers'));\n }", "public function index()\n {\n $orders = Auth::user()->orders;\n\n return view('customer.dashboard.order.index', compact('orders'));\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function myCustomers(){\n $obj = new Customer(); \n \n dashboard_add_plugin_js(array('bootbox/bootbox.min.js', 'bootstrap-fileinput/bootstrap-fileinput.js', 'data-tables/jquery.dataTables.js', 'data-tables/DT_bootstrap.js', 'uniform/jquery.uniform.min.js'));\n \n dashboard_add_footer_js(array('custom/common_js/table-ajax.js', 'custom/common_js/datatable.js', 'custom/common_js/app.js'));\n dashboard_add_plugin_css(array('bootstrap-fileinput/bootstrap-fileinput.css', 'data-tables/DT_bootstrap.css', 'bootstrap/css/bootstrap.min.css'));\n dashboard_add_css(array('common/common.css', 'plugins.css', 'style-metronic.css'));\n\n $data['title'] = lang(\"account_menu_my_customers\");\n $data['tag'] = lang(\"account_menu_my_customers\");\n $data['module'] = \"customers\";\n $data['breadcrumb'] = array('Home' => 'coach/dashboard', $data['tag'] => '');\n $data['view_file'] = \"coach/my_customers\";\n $this->tamplate->coach_template($data);\n\n }" ]
[ "0.7743648", "0.77122045", "0.7582847", "0.75818187", "0.74903864", "0.74875647", "0.7450015", "0.74047416", "0.7397758", "0.7369586", "0.73574007", "0.7297543", "0.72182643", "0.7218159", "0.72107905", "0.71872187", "0.71839637", "0.7179397", "0.7170521", "0.7157259", "0.7152546", "0.7152546", "0.7152546", "0.7152546", "0.7152546", "0.7152546", "0.7152546", "0.7152546", "0.7120321", "0.7089654", "0.70887685", "0.7084078", "0.7076455", "0.7073982", "0.7059913", "0.7022435", "0.70139986", "0.7006708", "0.70018166", "0.69985944", "0.69925296", "0.6984138", "0.6982784", "0.6974282", "0.69714576", "0.6968823", "0.6968343", "0.69543016", "0.69529426", "0.6945725", "0.6935927", "0.6930775", "0.69250077", "0.6905348", "0.690318", "0.68906945", "0.6886014", "0.6880927", "0.6877452", "0.68739194", "0.6856495", "0.6853905", "0.68524235", "0.6849894", "0.684407", "0.6839966", "0.6831847", "0.6820489", "0.67818093", "0.67704165", "0.6766622", "0.67610013", "0.675077", "0.67494357", "0.6748979", "0.674703", "0.6744296", "0.67375386", "0.6724897", "0.6722619", "0.6721776", "0.6721239", "0.6718106", "0.67177767", "0.6706505", "0.6700364", "0.6700364", "0.6689754", "0.66896653", "0.6688632", "0.6675604", "0.66744983", "0.6673623", "0.6671598", "0.66708004", "0.66696", "0.66595906", "0.66513044", "0.66505075", "0.6648483", "0.664567" ]
0.0
-1
/ 1. Strip unnecessary characters 2. Remove backslashes (\) 3. ensure security by preventing user malicious code entry
function test_input($data) { $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data); return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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}", "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 ATsanitize($input)\n{\n $user_input = trim($input);\n \n if (get_magic_quotesgpc())\n {\n $input = stripslashes($input);\n }\n}", "function scrubInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $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 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 sanitise_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function clean_input($str)\n\t{\n\t\t$str = strip_tags($str);\n\t\t$str = (get_magic_quotes_gpc()) ? stripslashes($str) : $str;\n\t\t$str = trim($str);\n\t\t$str = preg_replace('/[\\\\\"\\'[{;&}|<>\\/]/i', '', $str);\n\t\treturn $str;\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 filterinput($variable)\n{\n // this will add a slash in front of every occurnece of ' in the string \n $variable = str_replace(\"'\", \"\\'\", $variable);\n // this will attempt to add a slash in front og every \" in the string\n // this will not run there is a syntax error the first parmeter need to add a \\ in the middle \n // it would be a better practice to just re-write the arameters as ('\"', '\\\"', $variable)\n $variable = str_replace(\"\"\", \"\\\"\", $variable);\n return $variable;\n}", "function cleanText($str) {\r\n $str = @trim($str);\r\n if (get_magic_quotes_gpc()) {\r\n $str = stripslashes($str);\r\n }\r\n return $str;\r\n}", "function cleanInput($data)\n{\n    $data = trim($data);\n\n // gunakan stripslashes untuk elakkan  double escape if magic_quotes_gpc is enabledif(get_magic_quotes_gpc()){\n $data = stripslashes($data);}", "function bwm_clean($s) {\r\n if (get_magic_quotes_gpc())\r\n return trim(stripslashes($s));\r\n return trim($s);\r\n}", "function clean_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "public static function removeMagicQuotes() {\r\n if (get_magic_quotes_gpc() ) {\r\n \tif(isset($_GET)){\r\n \t\t$_GET = self::stripSlashesDeep($_GET);\r\n \t}\r\n \r\n\t\t\tif(isset($_POST)){\r\n \t\t$_POST = self::stripSlashesDeep($_POST);\r\n \t}\r\n \r\n\t\t\tif(isset($_COOKIE)){\r\n \t\t$_COOKIE = self::stripSlashesDeep($_COOKIE);\r\n \t}\r\n \r\n }\r\n }", "function clean_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}", "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 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 function removeMagicQuotes() {\n if ( get_magic_quotes_gpc() ) {\n $_GET = $this->stripSlashesDeep($_GET);\n $_POST = $this->stripSlashesDeep($_POST);\n $_COOKIE = $this->stripSlashesDeep($_COOKIE);\n }\n }", "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 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 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 smartstripslashes($str) {\n\t\tif ( get_magic_quotes_gpc() == true ) {\n\t\t\t$str = stripslashes($str);\n\t\t}\n\t\treturn $str;\n\t}", "private function _sanitize($path) {\n\t\t$path = str_replace('\\\\', '/', $path);\n\t\twhile (strpos($path, '//')) {\n\t\t\t$path = str_replace('//', '/', $path);\n\t\t}\n\t\t\n\t\treturn ($path);\n\t}", "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}", "static function stripMagic() {\n\t\t@set_magic_quotes_runtime(0);\n\t\t// if magic_quotes_gpc strip slashes from GET POST COOKIE\n\t\tif (get_magic_quotes_gpc()){\n\t\tfunction stripslashes_array($array) {\n\t\t return is_array($array) ? array_map('stripslashes_array',$array) : stripslashes($array);\n\t\t}\n\t\t$_GET= stripslashes_array($_GET);\n\t\t$_POST= stripslashes_array($_POST);\n\t\t$_REQUEST= stripslashes_array($_REQUEST);\n\t\t$_COOKIE= stripslashes_array($_COOKIE);\n\t\t}\n\t}", "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 mf_sanitize($input){\n\t\tif(get_magic_quotes_gpc() && !empty($input)){\n\t\t\t $input = is_array($input) ?\n\t array_map('mf_stripslashes_deep', $input) :\n\t stripslashes(trim($input));\n\t\t}\n\t\t\n\t\treturn $input;\n\t}", "function cleanInput($data) { \n return htmlspecialchars(stripslashes(trim($data)));\n}", "function cleanseTheData($data) \n\t\t{\n \t\t\t$data = trim($data);\n\t\t\t$data = stripslashes($data);\n\t\t\t$data = htmlspecialchars($data);\n\t\t\treturn $data;\n\t\t}", "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(\"&amp;\", \" \", $line);\n $line = str_replace(\"&copy;\", \" \", $line);\n $line = str_replace(\"&nbsp;\", \" \", $line);\n $line = str_replace(\"&quot;\", \" \", $line);\n $line = str_replace(\"&\", \" \", $line);\n $line = str_replace(\";\", \" \", $line);\n $line = str_replace(\"\\n\", \" \", $line);\n return $line;\n}", "function cleanInput($data) { \n return htmlspecialchars(stripslashes(trim($data)));\n}", "function makeSafe($path) \n {\n $ds = (DS == '\\\\') ? '\\\\' . DS : DS;\n $regex = array('#[^A-Za-z0-9:\\_\\-' . $ds . ' ]#');\n return preg_replace($regex, '', $path);\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 clean($str) {\r\n\t\t$str = @trim($str);\r\n\t\tif(get_magic_quotes_gpc()) {\r\n\t\t\t$str = stripslashes($str);\r\n\t\t}\r\n\t\treturn $str;\r\n\t}", "function test_input($data) {\n $data = trim($data); // strip whitespace from beginning and end\n $data = stripslashes($data); // unquotes a quoted string\n $data = htmlspecialchars($data); // converts special characters to HTML entities, thereby breaking their purpose if used maliciously\n return $data;\n}", "function sanitize_input($str) {\n\treturn preg_replace(\"/[?'&<>\\\"]/\", \"\", $str);\n}", "function safe_slash_html_input($text) {\r\n if (get_magic_quotes_gpc()==0) \r\n {\t\t\r\n $text = addslashes(htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false));\r\n } else \r\n {\t\t\r\n\t $text = htmlentities($text, ENT_QUOTES, 'UTF-8', false);\t\r\n }\r\n return $text;\r\n}", "function santitise_input($data) {\n $data = trim($data);\n //Removing backslashes.\n $data = stripslashes($data);\n //Removing HTML special/control characters.\n $data = htmlspecialchars($data);\n return $data; \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 }", "function sanitize($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}", "function filter_mydata($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function stripslashes_from_strings_only($value)\n {\n }", "function filter($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function cleanData($data) {\n $data = stripslashes($data);\n $data = trim($data);\n return $data;\n}", "function sec($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function sanitize($str) {\n return addslashes($str);\n}", "function fix_input_quotes() {\n if(get_magic_quotes_gpc()) {\n array_stripslashes($_GET);\n array_stripslashes($_POST);\n array_stripslashes($_COOKIE);\n } // if\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 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 _put_safe_slashes ($text = \"\") {\n\t\t$text = str_replace(\"'\", \"&#039;\", trim($text));\n\t\t$text = str_replace(\"\\\\&#039;\", \"\\\\'\", $text);\n\t\t$text = str_replace(\"&#039;\", \"\\\\'\", $text);\n\t\tif (substr($text, -1) == \"\\\\\" && substr($text, -2, 1) != \"\\\\\") {\n\t\t\t$text .= \"\\\\\";\n\t\t}\n\t\treturn $text;\n\t}", "function path_clean($path){\n $path = trim($path);\n $path = str_replace(\"/\",\"\\\\\",$path); // this kills me\n while (strstr($path,\"\\\\\\\\\")) $path = str_replace(\"\\\\\\\\\",\"\\\\\",$path);\n return $path;\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 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 test_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n //$data = htmlspecialchars($data);\n return $data;\n}", "function clean($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}", "private function _remove_magic_quotes()\n {\n if(get_magic_quotes_gpc()) {\n $_GET = $this->_strip_slashes_deep($_GET);\n $_POST = $this->_strip_slashes_deep($_POST);\n $_COOKIE = $this->_strip_slashes_deep($_COOKIE);\n }\n }", "function cleanData($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 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 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 cleanInput($data){ //sanitize data \n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function sanitize_path($path) {\n\treturn rtrim(ltrim(stripslashes($path), '/'), '/');\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 sanitizeInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n $data = strip_tags($data);\n return $data;\n}", "function txt_safeslashes($t=\"\")\n\t{\n\t\treturn str_replace( '\\\\', \"\\\\\\\\\", $this->txt_stripslashes($t));\n\t}", "public static function clean_input($input)\n {\n $input = trim(stripslashes($input));\n\n # strip the slashes if magic quotes is on\n if(get_magic_quotes_gpc()) {\n $input = trim(stripslashes($input));\n }\n else {\n $input = trim($input);\n }\n\treturn ($input);\n\n }", "private static function clean_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "function cleanString($str){\n return str_replace(\"\\\\'\", \"'\", str_replace(\"\\\\\\\\\", \"\\\\\", str_replace(\"\\\\\\\"\", \"\\\"\", $str)));\n}", "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function applescript_safe($string) {\n\t$string=str_replace(\"\\\\\", \"\\\\\\\\\", $string);\n\t$string=str_replace(\"\\\"\", \"\\\\\\\"\", $string);\n\treturn $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\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{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{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 RemoveMagicQuotesGPC()\n\t{\n\t\t// Check magic quotes state for GPC\n\t\tif (get_magic_quotes_gpc())\n\t\t{\n\t\t\t// Remove magic quotes in GET\n\t\t\t$_GET = RemoveSlashes($_GET);\n\t\t\t// Remove magic quotes in POST\n\t\t\t$_POST = RemoveSlashes($_POST);\n\t\t\t// Remove magic quotes in COOKIE\n\t\t\t$_COOKIE = RemoveSlashes($_COOKIE);\n\t\t}\n\t}", "function cleanInput($data) { \r\n return htmlspecialchars(stripslashes(trim($data)));\r\n }", "protected function sanitize($input){ \n\t\tif ( get_magic_quotes_gpc() )\n\t\t{\n\t\t\t$input = stripslashes($input);\n\t\t}\n\n\t $search = array(\n\t\t '@<script[^>]*?>.*?</script>@si', // Strip out javascript\n\t\t '@<[\\/\\!]*?[^<>]*?>@si', // Strip out HTML tags\n\t\t '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly\n\t\t '@<![\\s\\S]*?--[ \\t\\n\\r]*>@' // Strip multi-line comments\n\t \t);\n\n\t\t$output = preg_replace($search, '', $input);\n\t\treturn $output;\n }", "function phpTrafficA_cleanTextBasic($text) {\n$text = str_replace(\"\\'\", \"&#39;\", $text);\n$text = str_replace(\"'\", \"&#39;\", $text);\n$text = str_replace(\"\\\"\", \"&#34;\", $text);\n$text = str_replace(\"\\\\\\\"\", \"&#34;\", $text);\n$text = str_replace(\"\\\\\", \"&#92;\", $text);\n$text = str_replace(\"\\\\\\\\\", \"&#92;\", $text);\n$text = str_replace(\"\\n\", \"\", $text);\n$text = str_replace(\"\\r\", \"\", $text);\n$text = str_replace(\"<\", \"&#060;\", $text);\n$text = str_replace(\">\", \"&#062;\", $text);\nreturn $text;\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 secure_input($data) {\n $data = trim($data);\n // remove backslashes (\\)\n $data = stripslashes($data);\n // save as HTML escaped code --> any scripts in input data will not run\n $data = htmlspecialchars($data);\n return $data;\n }", "function validate_input(string $data) :string\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\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 test_Providerinput($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function remove_wp_magic_quotes() {\r\n\t\t$_GET = stripslashes_deep($_GET);\r\n\t\t$_POST = stripslashes_deep($_POST);\r\n\t\t$_COOKIE = stripslashes_deep($_COOKIE);\r\n\t\t$_REQUEST = stripslashes_deep($_REQUEST);\r\n\t}", "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 sanitize($data) {\n $data = htmlentities(get_magic_quotes_gpc() ? stripslashes($data) : $data, ENT_QUOTES, 'UTF-8');\n return $data;\n }", "function sanitize_pathname(string $pathName, string $charToReplaceWhiteSpace): string\n{\n return sanitize_filename($pathName, true, $charToReplaceWhiteSpace);\n}", "function cleanInput($data) {\n\t\n\treturn htmlspecialchars(stripslashes(trim($data)));\n}", "function strClean($strCadena){\n $string = trim($strCadena);\n $string = stripslashes($string);\n $string = str_ireplace(\"<script>\",\"\",$string);\n $string = str_ireplace(\"</script>\",\"\",$string);\n $string = str_ireplace(\"SELECT * FROM\",\"\",$string);\n $string = str_ireplace(\"DELETE FROM\",\"\",$string);\n $string = str_ireplace(\"DROP TABLE\",\"\",$string);\n $string = str_ireplace(\"==\",\"\",$string);\n $string = str_ireplace(\"LIKE\",\"\",$string);\n return $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{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{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 test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data); // remember this \r\n $data = htmlspecialchars($data); //remember to ckeck this \r\n return $data;\r\n}", "function filter( $str ){\r\n\t\treturn addslashes( $str );\r\n\t}", "function stripString($string) {\r\n return stripslashes($string);\r\n}", "function test_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "function test_input($data)\r\n{\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\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 test_input($data) {\n $data= trim($data);\n $data= stripslashes($data);\n $data= htmlspecialchars($data);\n return $data;\n}", "function Strip($value)\n{\n\t$value = StripGPC($value);\n\t$value = str_replace(\"\\\"\",\"'\",$value);\n\t$value = preg_replace('/[[:cntrl:][:space:]]+/',\" \",$value);\t// zap all control chars and multiple blanks\n\treturn ($value);\n}", "function test_input($data) {\n\t $data = trim($data);\n\t $data = stripslashes($data);\n\t $data = htmlspecialchars($data);\n\t return $data;\n\t}", "function inputRefine($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}" ]
[ "0.74068093", "0.73126304", "0.72646415", "0.72569776", "0.72124624", "0.72124624", "0.7207709", "0.71911836", "0.7154672", "0.7154672", "0.7114482", "0.71103495", "0.7102492", "0.70576155", "0.70553267", "0.7030534", "0.70291024", "0.6989625", "0.69856757", "0.6981518", "0.69730985", "0.6970143", "0.6959848", "0.69520456", "0.6951752", "0.69406265", "0.6926703", "0.69220734", "0.69215953", "0.6900838", "0.6890219", "0.6887393", "0.6882131", "0.68757087", "0.68726087", "0.68621653", "0.68613696", "0.68587035", "0.6855768", "0.6853614", "0.68518335", "0.68506557", "0.6848386", "0.68238527", "0.6823258", "0.6821036", "0.68186855", "0.68170494", "0.68147147", "0.6809844", "0.68069893", "0.6805388", "0.68043023", "0.6795121", "0.67925864", "0.67822915", "0.6780244", "0.6779798", "0.67780596", "0.67759407", "0.67755926", "0.6773016", "0.6771097", "0.6765522", "0.6757006", "0.6755449", "0.67537993", "0.6752725", "0.6748034", "0.6746871", "0.6744459", "0.6744459", "0.6744459", "0.6742329", "0.67405665", "0.67404443", "0.6738663", "0.67375416", "0.67369926", "0.67360675", "0.67274934", "0.6727212", "0.6725581", "0.67215574", "0.67187077", "0.67179793", "0.67168903", "0.6714604", "0.6711749", "0.67112434", "0.67100704", "0.6709639", "0.6707153", "0.6706174", "0.67023396", "0.66945887", "0.66918457", "0.668852", "0.66809696", "0.66756666", "0.6675657" ]
0.0
-1
Display a listing of the resource.
public function index() { $siswa = Siswa::all(); return response()->json($siswa); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}" ]
[ "0.7594622", "0.7594622", "0.7588457", "0.7580005", "0.75723624", "0.7499764", "0.7436887", "0.74322647", "0.7387517", "0.735172", "0.73381543", "0.73117113", "0.72958225", "0.7280436", "0.7273787", "0.72433424", "0.7230227", "0.7225085", "0.71851814", "0.71781176", "0.7174025", "0.7149406", "0.71431303", "0.7142905", "0.7136737", "0.712733", "0.7122102", "0.71148264", "0.71148264", "0.71148264", "0.7111841", "0.7092733", "0.70843536", "0.70822084", "0.7079442", "0.70571405", "0.70571405", "0.7055195", "0.70391846", "0.7039114", "0.7035626", "0.7033991", "0.70300245", "0.7026507", "0.7026417", "0.7019451", "0.7017105", "0.7004775", "0.70031846", "0.6999904", "0.6995238", "0.6994825", "0.699354", "0.6988824", "0.6986871", "0.6965804", "0.6965542", "0.69560695", "0.69515944", "0.6950682", "0.6947703", "0.69433117", "0.6941539", "0.6939613", "0.69377476", "0.69377476", "0.693678", "0.69344354", "0.69314486", "0.6927608", "0.69264024", "0.6922966", "0.69181216", "0.69150716", "0.6911192", "0.69095594", "0.69092506", "0.6907887", "0.69018227", "0.69008595", "0.69006085", "0.6900209", "0.68949944", "0.6892768", "0.6891944", "0.6891552", "0.6891552", "0.6891443", "0.68886423", "0.6888326", "0.68856037", "0.68835604", "0.68813664", "0.6878345", "0.6876079", "0.6873206", "0.6873183", "0.687048", "0.687014", "0.686966", "0.68695843" ]
0.0
-1
Store a newly created resource in storage.
public function store(SiswaRequest $request) { $data = new Siswa; $data->name = $request->name; $data->department = $request->department; $data->age = $request->age; $data->bio = $request->bio; $data->isdone = 0; $data->save(); return response()->json('Successfully added'); }
{ "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) { $siswa = Siswa::find($id); return response()->json($siswa); }
{ "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()\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(SiswaRequest $request, $id) { $data = Siswa::find($id); $data->name = $request->name; $data->department = $request->department; $data->age = $request->age; $data->save(); return response()->json('Successfully Update'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "public function update($request, $id);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "abstract public function put($data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public abstract function update($object);", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update($id, $input);", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function put($path, $data = null);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7424578", "0.7062392", "0.7056844", "0.6897447", "0.65815884", "0.6451359", "0.634689", "0.62107086", "0.6145251", "0.6121901", "0.6115076", "0.61009926", "0.60885817", "0.6053816", "0.6018965", "0.6007763", "0.5973282", "0.59455335", "0.593951", "0.59388787", "0.5892445", "0.58630455", "0.58540666", "0.58540666", "0.5851948", "0.5816257", "0.58070177", "0.5752376", "0.5752376", "0.57359827", "0.5723941", "0.57152426", "0.56958807", "0.5691061", "0.56881654", "0.5669518", "0.5655434", "0.5651897", "0.56480426", "0.5636727", "0.56354004", "0.5633156", "0.5632135", "0.5629063", "0.5621358", "0.56089175", "0.5602031", "0.55927175", "0.5582773", "0.558176", "0.5581365", "0.5575607", "0.5571989", "0.55672973", "0.5562929", "0.55623275", "0.55602384", "0.55602384", "0.55602384", "0.55602384", "0.55602384", "0.55598706", "0.55560726", "0.55558753", "0.5554241", "0.55534166", "0.5552986", "0.55440396", "0.55438566", "0.5540619", "0.55394524", "0.5536144", "0.5535339", "0.5534803", "0.5524157", "0.55188423", "0.55163455", "0.55135876", "0.5509835", "0.5507501", "0.55068344", "0.55034274", "0.5501476", "0.55010915", "0.5499286", "0.5497852", "0.54958415", "0.54958415", "0.5494513", "0.5494261", "0.54935366", "0.54931587", "0.54917634", "0.54836094", "0.5479455", "0.5478885", "0.5478268", "0.54654354", "0.54645413", "0.5461025", "0.54568535" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $data = Siswa::find($id); $data->delete(); return response()->json('Successfully 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
get array image size
public function get_thumbnail_size_array( $size ) { global $_wp_additional_image_sizes; $size_array = array(); if( array_key_exists ( $size, $_wp_additional_image_sizes ) ){ $size_array = $_wp_additional_image_sizes[ $size ]; }else { $size_array = $_wp_additional_image_sizes[ 'post-thumbnail' ]; } return $size_array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getImageSize() \n { \n return array($this->_width,$this->_height); \n }", "public function getArraySampleSize(): UnsignedInteger;", "function getimagesize($filename){\n\t\t$arr = @getimagesize($filename);\n\n\t\tif(isset($arr) && is_array($arr) && (count($arr) >= 4) && $arr[0] && $arr[1]){\n\t\t\treturn $arr;\n\t\t} else {\n\t\t\tif(we_base_imageEdit::gd_version()){\n\t\t\t\treturn we_base_imageEdit::getimagesize($filename);\n\t\t\t}\n\t\t\treturn $arr;\n\t\t}\n\t}", "public function getSize() {\n return array(\"x\" => imagesx($this->current), \"y\" => imagesy($this->current));\n }", "protected function _getWidthArray() {}", "public function getDimensions() {\n\t\treturn array('width' => $this->getImageWidth(),'height' =>$this->getImageHeight());\t\n\t}", "function elk_getimagesize($file, $error = 'array')\n{\n\t$sizes = @getimagesize($file);\n\n\t// Can't get it, what shall we return\n\tif (empty($sizes))\n\t{\n\t\t$sizes = $error === 'array' ? array(-1, -1, -1) : false;\n\t}\n\n\treturn $sizes;\n}", "public function getImageSize()\n\t{\n\t\tlist($width, $height) = getimagesize($this->getFullpath());\n\n\t\treturn compact('width', 'height');\n\t}", "public function dimensions() {\n\t\treturn $this->_cache(__FUNCTION__, function($file) {\n\t\t\t$dims = null;\n\n\t\t\tif (!$file->isImage()) {\n\t\t\t\treturn $dims;\n\t\t\t}\n\n\t\t\t$data = @getimagesize($file->path());\n\n\t\t\tif ($data && is_array($data)) {\n\t\t\t\t$dims = array(\n\t\t\t\t\t'width' => $data[0],\n\t\t\t\t\t'height' => $data[1]\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (!$data) {\n\t\t\t\t$image = @imagecreatefromstring(file_get_contents($file->path()));\n\t\t\t\t$dims = array(\n\t\t\t\t\t'width' => @imagesx($image),\n\t\t\t\t\t'height' => @imagesy($image)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn $dims;\n\t\t});\n\t}", "public function getImgSize() {\n\t\t$this->imgSize = getimagesize($this->imgUri);\n\t}", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getSize();", "public function getImageSizesNames(): array\n {\n return get_intermediate_image_sizes();\n }", "public function size()\n { \n $props = $this->uri->ruri_to_assoc();\n\n if (!isset($props['o'])) exit(0);\n $w = -1;\n $h = -1;\n $m = 0;\n if (isset($props['w'])) $w = $props['w'];\n if (isset($props['h'])) $h = $props['h'];\n if (isset($props['m'])) $m = $props['m'];\n\n $this->img->set_img($props['o']);\n $this->img->set_size($w, $h, $m);\n $this->img->set_square($m);\n $this->img->get_img();\n }", "public function getSizes(): array\n {\n }", "public function get_image_sizes() {\n\t\tif ( ! is_array( $this->image_sizes ) || empty( $this->image_sizes ) ) {\n\t\t\treturn array();\n\t\t}\n\n\t\treturn $this->image_sizes;\n\t}", "function acf_get_image_sizes()\n{\n}", "function get_intermediate_image_sizes()\n {\n }", "function image_dimensions ( $image_path ) {\r\n\t\t$image = image_read($image_path,false);\r\n\t\tif ( !$image ) return $image;\r\n\t\t$width = imagesx($image);\r\n\t\t$height = imagesy($image);\r\n\t\t$dimensions = compact('width','height');\r\n\t\treturn $dimensions;\r\n\t}", "public function getImageSize()\n {\n return (($this->isWrapped() || $this->isTemp()) ?\n getimagesizefromstring($this->getRaw())\n : getimagesize($this->getPathname())\n );\n }", "function getSize() ;", "public function length() {\n\t\treturn sizeof( $this->array );\n\t}", "public static function size($inputImg)\n\t{\n\t\tif (is_string($inputImg))\n\t\t\t$img = self::imgCreate($inputImg);\n\t\telse\n\t\t\t$img = $inputImg;\n\n\t\t$imgW = imagesx($img);\n\t\t$imgH = imagesy($img);\n\n\t\tif (is_string($inputImg))\n\t\t\timagedestroy($img);\n\n\t\treturn array($imgW, $imgH);\n\t}", "public function get_size_image($img){\n if ($this->get_path_pic($img)){\n return filesize($this->get_path_pic($img)); \n }else{\n return false;\n }\n \n }", "public function get_image_width()\n {\n }", "public function getTotalSize();", "function getSize() {\n\t\treturn $this->data_array['filesize'];\n\t}", "public function getArrayLength()\n {\n return $this->array_length;\n }", "public function getSize() {}", "public function getSize() {}", "public function getSize() {}", "public function getSize() {}", "public function getSize() {}", "public function getSize() {}", "public function imageSize($image)\n\t{\n\t\tif (is_file($image))\n\t\t{\n\t\t\t$image = getimagesize($image);\n\n\t\t\treturn [\n\t\t\t\t'w' => $image[0],\n\t\t\t\t'h' => $image[1],\n\t\t\t];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn [\n\t\t\t\t'w' => 0,\n\t\t\t\t'h' => 0,\n\t\t\t];\n\t\t}\n\t}", "public function getDimensions()\n {\n $imageDimension = getimagesize($this->image);\n\n $width = $imageDimension[0];\n $height = $imageDimension[1];\n\n foreach($this->effect as $effect)\n {\n if($effect instanceof PictureEffect)\n {\n $modified = $effect->getNewDimensions($width, $height);\n\n $width = $modified['w'];\n $height = $modified['h'];\n }\n }\n\n return array(\n 'w' => $width,\n 'h' => $height,\n );\n }", "public function getImageSize()\n {\n return $this->ImageSize;\n }", "public function get_image_height()\n {\n }", "public function getDimensions(){\n\t\treturn array('width' => $this->_width, 'height' => $this->_height);\n\t}", "public function getImageDimensions()\n {\n $dimension = $this->_getSetting('dimension');\n if ($this->getRow()->use_crop) {\n $parentDimension = $this->_getImageEnlargeComponent()->getImageDimensions();\n $dimension['crop'] = $parentDimension['crop'];\n }\n $data = $this->getImageData();\n return Kwf_Media_Image::calculateScaleDimensions($data['file'], $dimension);\n }", "function getimagesize($filename){\n\t\treturn ($this->isSvg() ? $this->getSvgSize($filename) : we_thumbnail::getimagesize($filename));\n\t}", "function getimagesize($filename){\n\t\treturn we_thumbnail::getimagesize($filename);\n\t}", "public function getSizes(){\n return (array) $this->getAttr('size');\n }", "public function getImageSizes(): array\n {\n /** @var BackendUser $user */\n $user = $this->tokenStorage->getToken()->getUser();\n\n return $this->imageSizes->getOptionsForUser($user);\n }", "public function getImageHeight(): int\n {\n return $this->imageHeight;\n }", "public function getTotalSize(): int;", "function wp_getimagesize($filename, array &$image_info = \\null)\n {\n }", "function size( $axis = NULL )\n\t{\n\t\tif( !strcasecmp( $axis, 'W' ) )\n\t\t\treturn imageSX( $this->im );\n\t\telseif( !strcasecmp( $axis, 'H' ) )\n\t\t\treturn imageSY( $this->im );\n\t\telse\n\t\t\treturn (object)array( 'w' => imageSX( $this->im ), 'h' => imageSY( $this->im ) );\n\t}", "public function getSize() {\n return 8 * (strlen(Util::base64url_decode($this->data['n'])) - 1);\n }", "public function getWidth()\n {\n return imagesx($this->image);\n }", "public function getImageSizes(): array\n {\n $additionalSizes = wp_get_additional_image_sizes();\n $names = $this->getImageSizesNames();\n\n return array_map(function (string $name) use ($additionalSizes) {\n if (isset($additionalSizes[$name])) {\n return [\n \"name\" => $name,\n \"width\" => $additionalSizes[$name][\"width\"],\n \"height\" => $additionalSizes[$name][\"height\"],\n \"crop\" => $additionalSizes[$name][\"crop\"],\n ];\n }\n \n return [\n \"name\" => $name,\n \"width\" => get_option(\"{$name}_size_w\"),\n \"height\" => get_option(\"{$name}_size_h\"),\n \"crop\" => !!get_option(\"{$name}_crop\"),\n ];\n }, $names);\n }", "public function getWidth() {\n return imagesx($this->image);\n }", "public function getDimensions() {}", "public function image_size()\n\t{\n if (!$this->local_file) {\n $this->get_local_file();\n }\n $image_size = getimagesize($this->local_file);\n $this->mime = $image_size['mime'];\n return $image_size;\n\t}", "public function size() {\n return count($this->_values) * 32;\n }", "public function getSize()\n\t{\n\t\treturn $this->size;\n\t}", "private function get_image_sizes() {\n\n\t\treturn array(\n\t\t\t'square_medium' => array( 200, 200 ),\n\t\t\t'full' => array( 1200, 1200 ),\n\t\t);\n\n\t}", "public function getSize(): int;", "public function getSize(): int;", "public function getSize(): int;", "public function getSize(): int;", "function getWidth() {\r\n\t\treturn imagesx($this->image);\r\n\t}", "public function getHeight() {\n return Image::make($this->file)->height();\n }", "function getSize()\r\n\t{\r\n\t\treturn $this->size;\r\n\t}", "public static function get_sizes()\n {\n }", "function getWidth() \n {\n return imagesx($this->image);\n }", "public function getSize() {\r\n return $this->iSize;\r\n }", "public function getImageHeight()\n {\n return $this->imageHeight;\n }", "public function getSize() {\n return (int) $this->_count;\n }", "function rest_get_avatar_sizes()\n {\n }", "public function size() : int\n {\n return $this->m * $this->n;\n }", "public function getImageHeight()\n\t{\n\t\treturn $this->imageHeight;\n\t}", "public function getWidth() {\n return Image::make($this->file)->width();\n }", "public function getSize() {\n\t \t return $this->size;\n\t }", "public function GetImageSize() {\n\n return $this->IsValid()\n ? @getimagesize($this->TmpName) // @ - prevent warning on reading non-images\n : false;\n }", "function guy_imagedims($src) {\n\tif (substr($src,0,1)=='/') $src = \nsubstr_replace($src,$_SERVER['DOCUMENT_ROOT'].'/',0,1);\n\tif (is_file($src)) {\n\t\t$wh = @GetImageSize($src);\n\t\treturn $wh[3];\n\t}\n\treturn '';\n}", "public function getHeight()\n {\n return imagesy($this->image);\n }", "public function getSizes()\n {\n return $this->sizes;\n }", "public function getDimensions();", "public function getDimensions();", "public function getSize()\n {\n return $this->item['size'];\n }", "function size()\n {\n return $this->p_size;\n }", "public function getSize() {\n\n return $this->size;\n\t}", "function getWidth($image) {\r\n\t\t\t$size = getimagesize($image);\r\n\t\t\t$width = $size[0];\r\n\t\t\treturn $width;\r\n\t\t}", "protected function sizeAsset(AssetRepresentation $asset): array\n {\n // The storage adapter should be checked for external storage.\n $storagePath = $this->getStoragePath('asset', $asset->filename());\n $filepath = $this->basePath . DIRECTORY_SEPARATOR . $storagePath;\n return file_exists($filepath)\n ? $this->getWidthAndHeightLocal($filepath)\n : $this->getWidthAndHeightUrl($asset->assetUrl());\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getSize()\n {\n return $this->size;\n }", "public function getHeight() {\n return imagesy($this->image);\n }" ]
[ "0.74550134", "0.7333092", "0.7119386", "0.7076211", "0.706649", "0.6996733", "0.69935316", "0.69560367", "0.69290364", "0.6836457", "0.68109304", "0.68109304", "0.68109304", "0.68109304", "0.68109304", "0.68109304", "0.68109304", "0.68109304", "0.68109304", "0.67841214", "0.67837757", "0.6764561", "0.6764223", "0.67561007", "0.6722295", "0.67036444", "0.66562194", "0.6635829", "0.66210735", "0.66119194", "0.6589336", "0.6561093", "0.6550659", "0.6548896", "0.64896226", "0.6483598", "0.64828795", "0.6482267", "0.6482267", "0.6482267", "0.6482267", "0.648068", "0.6467829", "0.64559335", "0.6455086", "0.6453814", "0.6445409", "0.6435626", "0.6431177", "0.6421891", "0.64002365", "0.63938457", "0.63895005", "0.638419", "0.63748664", "0.6365025", "0.63606375", "0.6359928", "0.6357206", "0.63566655", "0.63548875", "0.6354288", "0.63497555", "0.6344767", "0.6341301", "0.6341301", "0.6341301", "0.6341301", "0.633737", "0.63320506", "0.630887", "0.63064235", "0.62970656", "0.6281687", "0.6266995", "0.62667763", "0.6265334", "0.6263152", "0.6258675", "0.6251519", "0.62508684", "0.6246569", "0.62419355", "0.623186", "0.6230391", "0.6224903", "0.6224903", "0.6211274", "0.62061954", "0.6204342", "0.62012875", "0.6196661", "0.619396", "0.619396", "0.619396", "0.619396", "0.619396", "0.619396", "0.619396", "0.619396", "0.6193379" ]
0.0
-1
A Dusk test example.
public function a_user_looking_for_data_refund() { /** * first todo * todo auth|login|middleware * alternative use ->loginAs(Model::find(id)) */ $this->user_login(); $this->browse(function (Browser $browser) { $assertSee = 'Data Refund Modal'; $tanggal = '2019-05-31'; $uraian = 'Salah Top Up Saldo'; // value='keterangan' $jumlah = '8400000'; $jumlahSee = 'Rp. 8.400.000,00,-'; $browser /** * #path_url-02 cabang_path() * don't forget to put path link after execute link/move/change address.url * in this case we have move from user_login */ ->assertPathIs($this->cabang_path()) /** * ?clickLink('param') * the function for this * <a href='x'> param </a> */ ->clickLink('Data Permodalan') ->clickLink('List Data Refund Saldo') // measure against , the bot seen a page , // for capture laters -> finalize js loading screen ->assertSee($assertSee) // capture the task ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](1)') /** * select('name', 'value-option') * looking for view */ ->select('perpage', '10') ->press('Oke') ->assertSee($assertSee) ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](2)') ->select('perpage', '25') ->press('Oke') ->assertSee($assertSee) ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](3)') ->select('perpage', '50') ->press('Oke') ->assertSee($assertSee) ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](4)') ->select('perpage', '100') ->press('Oke') ->assertSee($assertSee) ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](5)') // end of select /** * searching */ // [tanggal] ->select('by', 'tanggal') // some case value more prefered use ID not CLASS , sometime make anError ->value('#q', $tanggal) //search ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](6)') // press ('value-of-button') ->press('Oke') ->assertSee($tanggal) //text from data by search ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](6.1)') // [uraian|keterangan] ->select('by', 'uraian') // some case value more prefered use ID not CLASS , sometime make anError ->value('#q', $uraian) //search ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](7.1)') // press ('value-of-button') ->press('Oke') ->assertSee($uraian) //text from data by search ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](7.2)') // [jumlah] ->select('by', 'jumlah') // some case value more prefered use ID not CLASS , sometime make anError ->value('#q', $jumlah) //search ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](8.1)') // press ('value-of-button') ->press('Oke') ->assertSee($jumlahSee) //text from data by search ->screenshot('UserViewDataPermodalan[LIST-REFUND-SALDO](8.2)') // end ; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testExample()\n {\n //this test is empty as we have not yet decided if we want to use dusk\n\n // $this->get('/')\n // ->click('About')\n // ->seePageIs('/about');\n }", "public function testExample()\n {\n $this->browse(function ($browser , $second) {\n $browser->visit('/')\n //->assertVueContains('name','sina','@editor');\n ->assertVue('name','sina','@editor');\n // ->pause(3000)\n // ->click('.test');\n // ->assertSee('Register')\n // ->value('#name' , 'sina')\n // ->value('#email' , Str::random(10).'@gmail.com')\n // ->value('#password' , '123456789')\n // ->value('#password-confirm' , '123456789')\n // ->click('button[type=\"submit\"]')\n // ->assertPathIs('/home')\n // ->refresh()\n // ->script('alert(\"ok\")');\n });\n }", "public function testExample()\n {\n $this->visit('/')\n ->type('[email protected]', 'email')\n ->type('7encoeaz', 'password')\n ->press('submit')\n ->see('You\\'ve logged into your online dashboard');\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->assertSee('SIGN IN')\n ->type('email', '[email protected]')\n ->type('password', '123456')\n ->press('LOGIN')\n ->assertPathIs('/home')\n ->visit('/addProduct')\n ->type('nama_product', 'air jordan')\n ->type('harga_product', '100000')\n ->type('stock_product', '100000')\n ->type('deskripsi', 'haip bis parah ngga sih')\n ->select('kategori_product', 'Lainnya')\n ->select('nama_marketplace', 'Shopee')\n ->attach('img_path', __DIR__.'\\test.jpg')\n ->press('Submit');\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/project_bookstore/client')\n ->click('nav > div > div.collapse.navbar-collapse.navbar-ex1-collapse > ul > li:nth-child(5) > a')\n ->type('username', 'client4')\n ->type('password', 123456)\n ->click('a#btn-login')\n ->waitForText('client4')\n ->assertSee('client4')\n ->assertPathIs('/project_bookstore/client');\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/giris-yap')\n ->type('input[name=\"email\"]','[email protected]')\n ->type('input[name=\"pass\"]','123')\n ->check('input[name=\"rememberme\"]')\n ->click('button[name=\"login\"]')\n ->waitForLocation('/')\n ->click('a[href=\"yeni-is-ekle\"]')\n ->pause(1000)\n ->select('select[name=\"project\"]')\n ->type('input[name=\"title\"]','İş Adı')\n ->type('input[name=\"desc\"]','İş Açıklama')\n ->click('button[name=\"create\"]')\n ->waitForDialog()\n ->assertDialogOpened('İş oluşturma işlemi başarı ile tamamlandı.');\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(\"[email protected]\")\n ->visit(\"/home\");\n });\n }", "public function testExample()\n {\n $this->visit('/admin/login')\n ->type('admin1', 'txtUsername')\n ->type(12345, 'txtPassword')\n ->press('Login')\n ->seePageIs('admin/cate/list');\n }", "public function testBasicExample()\n {\n $this->browse(function ( Browser $browser) {\n $browser->visit('/')\n ->press('demo')\n ->press('form')\n ->assertTitle('FORM')\n ->type('email', '[email protected]')\n ->type('pwd', '1')\n ->press('submit')\n ->assertPathIs('/')\n ->assertSee('1')\n ->clickLink('Page 1')\n ->assertSee('About')\n ->clickLink('About')\n ->assertTitle('127.0.0.1:8000/about')\n ->resize(1100, 2400)->driver->takeScreenshot();\n\n\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/dashboard/projects/')\n ->assertSee('Laravel');\n });\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Login to Airtel Sales Force System');\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visitRoute('subscription', ['id' => '1'])\n ->radio('gender', 'L')\n ->type('fullName', 'GHF')\n ->type('birthdate', '04/24/1999')\n ->type('phone', '088177552')\n ->type('address', 'Bandung')\n ->press('Submit');\n });\n }", "public function testExample()\n {\n $this->visit('ticket')\n ->see('Listado de Tickets')\n ->seeLink('Ver Ticket') \n ->visit('ticket/1')\n ->see('Quod et autem sed')\n ->seeLink('Ver todos los tickets')\n ->click('Ver todos los tickets')\n ->see('Listado de Tickets')\n ->seeLink('Agregar un ticket', 'ticket/crear');\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/giris-yap')\n ->type('input[name=\"email\"]','[email protected]')\n ->type('input[name=\"pass\"]','123')\n ->check('input[name=\"rememberme\"]')\n ->click('button[name=\"login\"]')\n ->waitForLocation('/')\n ->click('a[href=\"yeni-proje-ekle\"]')\n ->type('input[name=\"date\"]','15.01.2021')\n ->type('input[name=\"name\"]','Proje Adı')\n ->type('input[name=\"technician\"]','Teknik Uzman')\n ->type('input[name=\"actualtime\"]','100')\n ->type('textarea[name=\"desc\"]','Açıklama')\n ->type('textarea[name=\"notes\"]','Notlar')\n ->click('button[name=\"create\"]')\n ->waitForDialog()\n ->assertDialogOpened('Proje oluşturma işlemi başarı ile tamamlandı.');\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n\n\n $browser->visit(new RegisterTaskPage)\n ->type('email', '[email protected]')\n ->type('password', 'secret')\n ->type('password_confirmation', 'secret')\n ->Click('@element')\n ->pause(5000)\n ->assertPathIs('/home');\n\n });\n }", "public function testExample()\n {\n $this->visit(\"http://localhost/laravel/cdp/public/project/1/visitor\");\n $this->seePageIs('http://localhost/laravel/cdp/public/project/1/visitor');\n }", "public function testExample()\n {\n $this->browse(function ($browser) {\n $browser->clickLink('Homes');\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/user/profile')\n ->assertSee('Profile');\n \n });\n }", "public function testExample()\n {\n $this->browse(function ($browser) {\n $browser->on(new LoginPage)\n ->loginUser()\n ->visit('/talk/talk')\n ->waitFor('.is-login')\n ->assertSee('TALKに話題を投稿しましょう!');\n });\n }", "public function testExample()\n {\n $this->browse(function ($browser) {\n $exampleTest = new ExampleTest();\n $exampleTest->testBasicLogin();\n\n $browser->visit(new Pages\\ProfilePage())\n ->assertSeeIn('section.content-header', 'My profile');\n });\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('TROLOLOLO');\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/news/create')\n ->type('title', '123')\n ->type('text', 'test123')\n ->press('Добавить новость')\n\n ->assertSee('Мало букв в поле Заголовок');\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->assertSee('Авторизация');\n });\n\n $user = User::factory()->create([\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n ]);\n\n $this->browse(function ($browser) {\n $browser->visit('/login')\n ->type('email', '[email protected]')\n ->type('password', 'password')\n ->press('Авторизоваться')\n ->assertPathIs('/dashboard')\n ->assertSee('Главная');\n });\n\n }", "public function testExample()\n {\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->type('surname', 'Surname')\n ->type('name', 'Name')\n ->type('login', '')\n ->type('phone_number' . '89999999999')\n ->type('email', '[email protected]')\n ->type('password', 'user_test')\n ->type('password_confirmation', 'user_test')\n ->press('Enter')\n ->assertPathIs('/');\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('React JS examples');\n });\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Laravel');\n });\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel')\n ->see('Login')\n ->see('Register');\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/register')\n ->type('name', 'TestBot1')\n ->type('email', '[email protected]')\n ->type('password', '123')\n ->type('password_confirmation', '123')\n ->press('Register')\n ->assertPathIs('/computers');\n });\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->with('.special-text', function ($text) {\n $text->assertSee('title1');\n });\n\n // 確認商品數量\n $browser->click('.check_product')\n ->waitForDialog(5)\n ->assertDialogOpened('商品數量充足')\n ->acceptDialog();\n\n // 設定中斷點\n eval(\\Psy\\sh());\n });\n }", "public function testExample()\n {\n $this->visit('/')\n ->see('WELCOME');\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('API tester');\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('URL Notes');\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('html');\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $a = [\n 'last_name' => 'Catacutan',\n 'first_name' => 'Romeo',\n 'middle_name' => 'Dimaandal',\n 'sex' => 'M',\n 'mobile' => '9876543210',\n 'email' => '[email protected]',\n 'qualification_id' => Qualification::first()->qualification_id\n ];\n $browser->visit(route('applications.create'))\n ->type('last_name', $a['last_name'])\n ->assertSee('Laravel');\n });\n }", "public function testExample()\n {\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n \n $browser->visit('/')\n ->pause(2000)\n ->assertSee('后台登录');\n \n\n // 页面 url, 是否有All按钮, select 选择框\n // 模板 [\"url\" => \"\", \"select\" => [\"name\" => \"\", \"value\" => \"\"]]\n /*\n $pages = [\n [\"url\" => \"/user_manage/all_users\", \"all\" => true, \"select\" => [\"name\" => \"id_grade\", \"value\" => 102], \"click\" => \".td-info\"],\n [\"url\" => \"human_resource/index_new\", \"select\" => [\"name\" => \"id_teacher_money_type\", \"value\" => 0], \"click\" => \".opt-freeze-list\"],\n [\"url\" => \"/authority/manager_list\", \"select\" =>[\"name\" => \"id_call_phone_type\", \"value\" => \"2\"]]\n ];\n \n foreach($pages as $item) {\n $browser->visit($item[\"url\"])->pause(5000);\n if (isset($item[\"all\"]))\n $browser->press(\"ALL\");\n //$browser->select($item[\"select\"]['name'], $item[\"select\"][\"value\"]);\n if (isset($item[\"click\"]) && $item[\"click\"])\n $browser->click($item[\"click\"]);\n //$browser->pause(5000);\n }*/\n\n /* $browser->visit(\"/user_manage/all_users\")\n ->press(\"ALL\")\n ->select(\"id_grade\", 101)\n ->select(\"id_grade\", 102)\n ->click(\".td-info\")\n ->pause(500);\n /*\n\n //$browser->click(\".bootstrap-dialog-body .opt-user\");\n\n $browser->click(\".bootstrap-dialog-header .close\"); // 关闭模态框\n\n $browser->visit(\"/tea_manage/lesson_list\")\n ->press(\"ALL\")\n ->pause(2000);\n */\n\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $user = \\App\\User::find(1);\n\n $browser->logInAs($user)\n ->visit('/home')\n ->assertSee('Received')\n ->assertSee('Given');\n });\n }", "public function testBasicExample()\n {\n // 1. Visit the home page\n // 2. Press the \"Register\" link\n // 3. See \"Register\"\n // 4. Fill in all fields\n // 5. Click \"Register\" Button\n // 6. Wait for \"Registration successful\" toast-message\n\n $this->browse(function (Browser $browser) {\n $browser->visit('/')->assertSee('Jeroens Weblog')\n ->pause(1000)\n ->clickLink('Register');\n \n $browser->pause(1000)\n ->type('first_name', 'Jaap')\n ->type('last_name', 'Hendriks')\n ->type('email', '[email protected]')\n ->type('password', 'jaaphendriks')\n ->type('password_confirmation', 'jaaphendriks')\n ->press('Register');\n\n // Wait a maximum of five seconds for the text...\n $browser->waitForText('Registration successful')\n ->pause(3000);\n });\n }", "public function testBasicTest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->visit('/login')\n ->assertSee('Login here')\n ->type('email', '[email protected]')\n ->type('password', 'secret')\n ->press('button')\n ->assertPathIs('/company');\n });\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n// $browser->visit('/login/twitter')\n// ->type('session[username_or_email]', 'MatchMtg')\n// ->type('session[password]', 'boc0805k')\n// ->click('#allow')\n// ->assertPathIs('/login/twitter/callback')\n// ->pause(5000)\n $browser->loginAs(User::find(1))\n ->visit('/home')\n ->press('募集してみる!')\n ->assertSee('新規募集ページ');\n\n });\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel');\n }", "public function test()\n {\n $data = [\n 'name' => 'Test user',\n 'email' => '[email protected]',\n 'password' => 'test123',\n ];\n\n\n $this->browse(function (Browser $browser) use ($data) {\n $browser->visit('/')\n ->assertSee('ZAREJESTRUJ SIĘ')\n ->clickLink('Zarejestruj się')\n ->screenshot('1.Register_form')\n ->type('name', $data['name'])\n ->type('email', $data['email'])\n ->type('password', $data['password'])\n ->type('password_confirmation', $data['password'])\n ->screenshot('2.Register_form_filled')\n ->press('Zarejestruj się')\n ->screenshot('3.Registred')\n ->assertSee('Witaj, Test user!')\n ->clickLink($data['name'])\n ->clickLink('Wyloguj')\n ->screenshot('4.Logout')\n ->clickLink('Logowanie')\n ->type('email', $data['email'])\n ->type('password', $data['password'])\n ->press('Logowanie')\n ->screenshot('5.Logged')\n ->assertSee('Witaj, Test user!')\n ;\n });\n }", "public function testExample()\n {\n /**\n * @group search\n */\n $this->browse(function (Browser $browser) {\n $browser->visit(route('admin.login'))\n ->type('username', 'admin1')\n ->type('password', '123456')\n ->press('login')\n ->assertPathIs('/admin/index');\n });\n\n /**\n * @group search\n */\n $this->browse(function (Browser $browser) {\n $browser->visit(route('admin.product.list'))\n ->type('search-product', 'abcd')\n ->press('submit-product-search')\n ->assertPathIs('/admin/product/search');\n });\n\n /**\n * @group search\n */\n $this->browse(function (Browser $browser) {\n $browser->visit(route('admin.product.list'))\n ->type('search-product', 'nhân dâu')\n ->press('submit-product-search')\n ->assertPathIs('/admin/product/search');\n });\n\n /**\n * @group search\n */\n $this->browse(function (Browser $browser) {\n $browser->visit(route('admin.product.list'))\n ->type('search-product', 'valentine')\n ->press('submit-product-search')\n ->assertPathIs('/admin/product/search');\n });\n }", "public function testExample()\n {\n // lets make it risky to destroy the green\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel 5');\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel 5');\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel 5');\n }", "public function testExample()\n {\n dump(\"testExample\");\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->actingAs( \\App\\User::first() )\n ->visit('/city')\n ->see('City List');\n }", "public function testExample()\n {\n $data = People::where('id', '=', 6)->get();\n foreach ($data as $peps => $pep) {\n if (!$pep->fb_completed || $pep->fb_completed == '') {\n $this->browse(function (Browser $browser) use ($pep) {\n $browser->visit('www.facebook.com/')\n ->pause(1500)\n ->clickLink('Create New Account')\n ->pause(3000)\n ->type('firstname', $pep->first_name)\n ->type('lastname', $pep->last_name)\n ->type('reg_passwd__', 'refrigerator')\n ->type('reg_email__', $pep->email . '@yandex.com')\n ->pause(120000)\n ->assertSee('Facebook');\n });\n $pep->fb_completed = 'true';\n }\n }\n }", "function test_sample() {\n\n\t\t$this->assertTrue( true );\n\n\t}", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/foo')\n ->click('@botao-modal')\n ->whenAvailable('.modal', function ($modal){\n $modal->assertSee('Modal')\n ->press('Fechar');\n });\n // ->waitForText('Modal')\n // ->assertSee('Meu modal');\n });\n }", "public function testBasicExample()\n {\n $user = User::first();\n $this->be($user);\n $this->visit('/')\n ->see('Welcome Back');\n\n }", "public function testExample()\n {\n $this->assertTrue(true);\n \n }", "public function testBasicTest()\n {\n\n }", "function test_sampleme() {\n\t\t// Replace this with some actual testing code.\n\t\t$this->assertTrue( true );\n\t}", "public function test()\n {\n $this->executeScenario();\n }", "public function testBasicTest()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n\n // Test that we see the titel on the page - run phpunit in terminal\n // $this->get('/')->assertSee('titeln på sidan');\n }", "public function testExample()\n {\n # 会员\n $oUser = \\App\\Models\\User::orderBy(\"id\", \"desc\")->first();\n\n # step 2. 会员登入\n $this->UserLogin($oUser->name, \"123qwe\"); \n\n\n # step 3. 遊戲列表\n $sUrl = \"/api/games\";\n $sMethod = \"GET\";\n\n # 傳送參數設定\n $this->aHeader[\"currency\"] = \"VND\";\n $aData = [];\n # 測試接口\n $response = $this->withHeaders($this->aHeader)->json($sMethod, $sUrl, $aData); \n \n\n $sUrl = \"/api/games/9/login\";\n $sMethod = \"POST\";\n\n # 傳送參數設定\n $this->aHeader[\"currency\"] = \"VND\";\n $this->aHeader[\"device\"] = \"1\";\n $aData = [];\n # 測試接口\n $response = $this->withHeaders($this->aHeader)->json($sMethod, $sUrl, $aData);\n\n $response->assertStatus(200);\n }", "function test_basic_example()\n {\n $user = factory(App\\Entities\\User::class)->create([\n 'name' => 'Valentin Plechuc',\n ]);\n\n $this->actingAs($user, 'api');\n\n $this->visit('/api/user')\n ->see('Valentin Plechuc');\n\n }", "public function testExample()\n {\n //make unauthorized user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->visit('/newcache')\n ->type('The best cache ever', 'name')\n ->type('94.234324234,-35.74352343', 'location')\n ->type('small', 'size')\n ->type('traditional', 'type')\n ->type('like fo reals this is short yo', 'short_description')\n ->type('like fo reals this is the longest description that could be possible yo. but I am a creative fellow \n and I need to express my art in the form of comments that is where I actually discuss the true meaning of \n life and that is death and sad because I am sad my gosh what has my life become I am the excessive of \n computer I am good my friend said so. ', 'long_description')\n ->press('Create')\n ->assertResponseStatus(403);\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit(Storage::get('url.txt'));\n // $browser->pause(5000);\n try{\n $browser->click('.close-layer');\n $browser->pause(5000);\n }\n catch(Exception $e){\n \n }\n \n try{\n $browser->click('#j-shipping-company');\n $browser->pause(5000);\n $elements = $browser->elements('#j-shipping-dialog');\n foreach ($elements as $element) {\n $data[] = $element->getAttribute('innerHTML');\n }\n Storage::put('data.txt',$data);\n \n }\n catch(Exception $e){\n //$this->data = $e;\n }\n });\n }", "public function testBasicExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n\t{\n\t\t$this->assertTrue(true);\n\t}", "public function testExample()\n {\n $this->get('/')->assertSee('Laravel');\n }", "function testSample() {\n\t\t$this->assertTrue( true );\n\t}", "public function testExample()\n {\n $this->seeInDatabase('geolite', [\n 'city_name' => 'Toledo'\n ]);\n $this->seeInDatabase('geolite', [\n 'country_name' => 'Cyprus'\n ]);\n\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function test1()\n {\n \t$this->visit('/')\n \t\t->type('management','name')\n \t\t ->press('submit')\n ->see('Search Results')\n ->see('Management');\n }", "public function testBasicTest()\n {\n dd('here');\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $response = $this->get('/api/test/');\n\n $response->assertStatus(200);\n }", "public function testBasicTest()\n {\n $user=factory(\\App\\User::class)->create([\n 'name'=>'Duilio Palacios',\n ]);\n\n $this->actingAs($user,'api')\n ->visit('api/user')\n ->see('Duilio Palacios');\n }", "public function testBasicTest()\n {\n// $response = $this->get('/');\n//\n// $response->assertStatus(200);\n $response = $this->get('/');\n\n $response->assertStatus(200);\n $response->assertSee('Laravel Homestead 2');\n\n }", "public function testBasicExample()\n\t{\n\t\t$crawler = $this->client->request('GET', '/');\n\n\t\t$this->assertTrue($this->client->getResponse()->isOk());\n\n $this->assertTrue(true);\n\n\t}", "public function test_example()\n {\n $response = $this->get('/api/menus');\n\n $response->assertStatus(200);\n }", "function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "public function testBasicExample()\n {\n $response = $this->json('POST', '/commander-login',\n [\n \"username\" => 'rs-system',\n \"version_url\" => 'https://einsatzv1.rucomm.com',\n \"password\" => \"#xCommandery\",\n \"imei\" => 'trainer',\n \"module-name\" => 'biometric_system',\n \"type\" => '3',\n \"version_uuid\" => \"123456\"\n ]);\n\n $response\n ->assertStatus(200)\n ->assertJson([])\n ->assertJsonFragment(['token'])\n ->assertJsonFragment(['status' => 1]);\n }", "public function testExample()\n {\n // $this->assertTrue(true);\n\n // $response = $this->call(\"GET\", \"/login\");\n $response = $this->get(\"/category\");\n\n\n // $response->assertAuthenticatedAs();\n // dd($response);\n\n // $response->assertStatus(200);\n\n $this->assertEquals(15, 15);\n\n }", "public function testBasicTest()\n {\n $response = $this->get('/dangthi');\n $response->assertStatus(200);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }", "public function testExample()\n {\n $this->assertTrue(true);\n }" ]
[ "0.8513539", "0.7812407", "0.7805981", "0.77781904", "0.76881546", "0.7686562", "0.7684846", "0.7639411", "0.7620482", "0.76054966", "0.7585921", "0.7527397", "0.7514917", "0.7506789", "0.7485635", "0.74846524", "0.745873", "0.74418616", "0.74364763", "0.74219656", "0.7409195", "0.74078715", "0.73342025", "0.729743", "0.7294968", "0.7294816", "0.7294652", "0.72816014", "0.7276479", "0.7275381", "0.72619563", "0.7245829", "0.72221696", "0.7165791", "0.71654814", "0.71583515", "0.7139132", "0.70580995", "0.7040363", "0.7026983", "0.69893765", "0.6975779", "0.69566864", "0.69044477", "0.69010997", "0.69010997", "0.69010997", "0.6842462", "0.6828972", "0.6801883", "0.6783844", "0.67523175", "0.67379606", "0.6719953", "0.67098725", "0.66799134", "0.66690373", "0.6657666", "0.665753", "0.6652571", "0.66453046", "0.66447264", "0.6639344", "0.6624861", "0.66175276", "0.6612294", "0.6599749", "0.65945697", "0.6581475", "0.65622973", "0.6530429", "0.6525595", "0.6523681", "0.6518543", "0.6513038", "0.6499836", "0.64972", "0.64956594", "0.6490449", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875", "0.64825875" ]
0.0
-1
$to is relative to the base location
public function copy($from, $to) { if(is_dir($from)) $this->recurse_copy($from, $this->base_location . "/" . $to); else copy($from, $this->base_location . "/" . $to); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTo();", "public function getTo();", "function getTo(){\n\t\t\treturn $this->to;\n\t\t}", "function redirect($to, $base=true){\n if($base==true){\n $to = getProp('base_url').$to;\n }\n header('location: '.$to);\n }", "protected function setTo() {}", "function redirect($to = '')\n{\n\t$link = config_item(\"base_url\");\n\tif (substr($to, -1, 1) == '/' || preg_match(\"/\\?/\", $to))\n\t\t$link .= $to;\n\telseif ($to != '')\n\t\t$link .= $to.\".php\";\n\theader(\"Location: $link\");\n}", "function url_for($to) {\n $args = func_get_args();\n\n # find params\n $params = array();\n if (is_array(end($args))) {\n $params = array_pop($args);\n }\n\n # urlencode all but the first argument\n $args = array_map('urlencode', $args);\n $args[0] = $to;\n\n return PluginEngine::getURL($this->dispatcher->plugin, $params, join('/', $args));\n }", "function url_for($to)\n {\n $args = func_get_args();\n\n # find params\n $params = array();\n if (is_array(end($args))) {\n $params = array_pop($args);\n }\n\n # urlencode all but the first argument\n $args = array_map('urlencode', $args);\n $args[0] = $to;\n\n return PluginEngine::getURL($this->dispatcher->plugin, $params, join('/', $args));\n }", "function url_for($to)\n {\n $args = func_get_args();\n\n // find params\n $params = array();\n if (is_array(end($args))) {\n $params = array_pop($args);\n }\n\n // urlencode all but the first argument\n $args = array_map('urlencode', $args);\n $args[0] = $to;\n\n return PluginEngine::getURL($this->dispatcher->plugin, $params, join('/', $args));\n }", "public function to(string $to);", "public function to($to) {\n if (is_string($to)) {\n $this->toValue = $to;\n }\n return $this->toValue;\n }", "public function to($to) {\n if (is_string($to)) {\n $this->toValue = $to;\n }\n return $this->toValue;\n }", "function redirect($to = '')\n {\n if ($to === '/' || $to == '') {\n $to = BASE_URL;\n }\n\n header(\"Location: \" . $to);\n die;\n }", "function url_for($to, $options = array()) {\n return $this->presenter()->url_for($to, $options);\n }", "protected function redirectTo()\n {\n\n return '/'; // return dynamicaly generated URL.\n }", "private function somebody_set_us_up_the_base()\n\t{\n\t\tdefine('BASE', SELF.'?S='.ee()->session->session_id().'&amp;D=cp'); // cp url\n\t}", "public function setTo($to) {\r\n\t\t$this->to = $to;\r\n\t}", "function setTo($to_set){\n\t\t\t$this->to=$to_set;\n\t\t}", "public function getTo() {\n return $this->to;\n }", "public function getTo()\n {\n return $this->_to;\n }", "public function getTo()\n {\n return $this->_to;\n }", "public function getTo() {\n\t\treturn $this->to;\n\t}", "public function getTo() {\n\t\treturn $this->to;\n\t}", "public function setTo($to) {\r\n $this->to = $to;\r\n }", "public function url_for($to)\n {\n $args = func_get_args();\n\n # find params\n $params = array();\n if (is_array(end($args))) {\n $params = array_pop($args);\n }\n\n # urlencode all but the first argument\n $args = array_map('urlencode', $args);\n $args[0] = $to;\n\n return PluginEngine::getURL($this->dispatcher->plugin, $params, join('/', $args));\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function to($value) {\n return $this->setProperty('to', $value);\n }", "function base_path()\n {\n $paths = getPaths();\n\n return $paths['base'];\n }", "public function to($to)\r\n {\r\n $this->to = $to;\r\n return $this;\r\n }", "static function base()\n {\n return trim(App::router()->getBase(), '/');\n }", "public function getToUrl()\n {\n\n return $this->toUrl;\n\n }", "protected function redirectTo(): string\n {\n return '/';\n }", "public function toRelativePath () {\n return new S (str_replace (DOCUMENT_ROOT, _NONE, $this->varContainer));\n }", "function base_path()\n {\n return dirname(__DIR__);\n }", "function getdirections_locations_user_path($fromuid, $touid) {\n if (module_exists('location') && is_numeric($fromuid) && is_numeric($touid)) {\n return \"getdirections/locations_user/$fromuid/$touid\";\n }\n}", "function getdirections_location_n2u_path($fromnid, $touid) {\n if (module_exists('location') && is_numeric($fromnid) && is_numeric($touid)) {\n return \"getdirections/location_u2n/$fromnid/$touid\";\n }\n}", "function base_url(){\n $url = BASE_URL;\n return $url;\n }", "private static function base_url($path=NULL)\n {\n\t\tglobal $url;\n $fullurl=$url.$path;\n return $fullurl;\n\t}", "public function GetAbsolute ();", "private static function base_relative($path = null)\n\t{\n\t\t$test\t= self::getProtocol().$_SERVER['HTTP_HOST'].\"/\".apps::getGlobal(\"router\")->getBasePath();\n\t\treturn concat_path($test,$path);\n\t}", "function Twiloop_url_base()\n{\n $url_base = '';\n $url_base = strrpos($_SERVER['PHP_SELF'], '/', -4)+1;\n $url_base = substr($_SERVER['PHP_SELF'], 0, $url_base);\n $url_base = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$url_base;\n return $url_base;\n}", "function qa_path_to_root()\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\tglobal $qa_root_url_relative;\n\treturn $qa_root_url_relative;\n}", "public function to($to)\n {\n $this->to = $to;\n return $this;\n }", "public function fullPath(){\n\t $this->path = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\treturn $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n }", "private function getRelativePath($from, $to)\n\t{\n\t\t\t$from = explode('/', $from);\n\t\t\t$to = explode('/', $to);\n\t\t\t$relPath = $to;\n\n\t\t\tforeach($from as $depth => $dir) {\n\t\t\t\t\t// find first non-matching dir\n\t\t\t\t\tif($dir === $to[$depth]) {\n\t\t\t\t\t\t\t// ignore this directory\n\t\t\t\t\t\t\tarray_shift($relPath);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// get number of remaining dirs to $from\n\t\t\t\t\t\t\t$remaining = count($from) - $depth;\n\t\t\t\t\t\t\tif($remaining > 1) {\n\t\t\t\t\t\t\t\t\t// add traversals up to first matching dir\n\t\t\t\t\t\t\t\t\t$padLength = (count($relPath) + $remaining - 1) * -1;\n\t\t\t\t\t\t\t\t\t$relPath = array_pad($relPath, $padLength, '..');\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$relPath[0] = './' . $relPath[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tunset($relPath[count($relPath)-1]);\n\t\t\treturn implode('/', $relPath);\n\t}", "public function to($url = '')\n\t{\n\t\treturn $this->url.'/'.$this->name.'/'.$url;\n\t}", "function internalRedirect($to){\n global $ID, $PAGE, $CURRENT, $Controller, $OLD;\n\n if(!is_object($to)) $to = $Controller->{(string)$to};\n\n if($PAGE)\n $OLD = $PAGE->ID;\n else $OLD = false;\n $PAGE = $CURRENT = $to;\n $_REQUEST['id'] = $to->ID;\n\n if(!@method_exists($CURRENT, 'run')) errorPage('Controller unknown');\n\n /**\n * Execute the requested object\n */\n $CURRENT->run();\n\n /**\n * Send output to browser\n */\n\n while (ob_get_level() > 0) {\n ob_end_flush();\n }\n\n exit;\n}", "function formatCurrentUrl() ;", "public function __construct($to) {\n $this->params['to'] = $to;\n }", "public function setTo($to)\n { \n $this->_param['to'] = Util::cleanNumber($to);\n return $this;\n }", "public function base_url()\n\t{\n\t\treturn URL::base();\n\t}", "function base_url(){\n return BASE_URL;\n }", "function cap_make_path_relative_to ($path, $base)\n{\n $base = rtrim ($base, '/') . '/';\n if (strncmp ($path, $base, strlen ($base)) == 0) {\n return substr ($path, strlen ($base));\n }\n return $path;\n}", "public function from($from);", "public function getTo() {\n return $this->user_to;\n }", "function get_base()\n\t{\n\t\t$site_url = get_site_option('siteurl');\n\t\t$base = trim(preg_replace('#https?://[^/]+#ui', '', $site_url), '/');\n\n\t\t// @since 1.3.0 - guess min dir to check for any dir that we have to\n\t\t// remove from the base\n\t\t$this->_guess_min_dir();\n\n\t\t$this->base = !empty($this->remove_from_base)\n\t\t\t? preg_replace('#^' . $this->remove_from_base . '/?#ui', '', $base, 1)\n\t\t\t: $base;\n\t}", "function base_path() {\n return (new Server)->get('DOCUMENT_ROOT');\n }", "protected static function generate_base_url()\n\t{\n\t\t$base_url = parent::generate_base_url();\n\t\treturn str_replace('htdocs/novius-os/', '', $base_url);\n\t}", "private static function get_relative_path($from, $to)\n {\n // some compatibility fixes for Windows paths\n $from = is_dir($from) ? rtrim($from, '\\/') . '/' : $from;\n $to = is_dir($to) ? rtrim($to, '\\/') . '/' : $to;\n $from = str_replace('\\\\', '/', $from);\n $to = str_replace('\\\\', '/', $to);\n\n $from = explode('/', $from);\n $to = explode('/', $to);\n $rel_path = $to;\n\n foreach ($from as $depth => $dir) {\n // find first non-matching dir\n if ($dir === $to[$depth]) {\n // ignore this directory\n array_shift($rel_path);\n } else {\n // get number of remaining dirs to $from\n $remaining = count($from) - $depth;\n if ($remaining > 1) {\n // add traversals up to first matching dir\n $pad_length = (count($rel_path) + $remaining - 1) * -1;\n $rel_path = array_pad($rel_path, $pad_length, '..');\n break;\n } else {\n $rel_path[0] = './' . $rel_path[0];\n }\n }\n }\n return implode('/', $rel_path);\n }", "protected function getCurrentAbsolutePath() {\n\t\treturn dirname(SS_ClassLoader::instance()->getManifest()->getItemPath(get_class($this)));\n\t}", "protected function getAbsoluteBasePath() {}", "function base_path($path)\n{\n return __DIR__.'/../'.$path;\n}", "function get_base_dir() {\n return $this->base_dir;\n }", "public function baseRelPath()\n {\n if($this instanceof Layout)\n {\n $class = Application::getApp();\n }\n else\n {\n $class = \\get_class($this);\n }\n $reflector = new \\ReflectionClass($class);\n $parts = \\explode('\\\\', $reflector->getName());\n $parts = \\array_chunk($parts, 3, false);\n return \\strtolower(\\implode('/', $parts[0])) . '/';\n }", "public function set_to( $to ) {\n $this->to = $to;\n return $this;\n }", "function base_path() {\n\treturn str_replace('index.php','',$_SERVER['SCRIPT_NAME']);\n}", "function get_base_url() {\n $fin_string = '';\n $parts = explode('/', $this->request_uri);\n if (count($parts) > 2) {\n $subparts = array_slice($parts, 2);\n foreach ($subparts as $p)\n $fin_string .= $p . '/';\n return substr($fin_string, 0, -1);\n }\n return $fin_string;\n }", "public function base_url(){\n return $this->plugin_url() . 'base/';\n }", "function cot_pfs_relpath($userid)\n{\n\tglobal $cfg;\n\n\tif ($cfg['pfs']['pfsuserfolder'])\n\t{\n\t\treturn($userid.'/');\n\t}\n\telse\n\t{\n\t\treturn('');\n\t}\n}", "function getRelativePath($from, $to)\r\n\t{\r\n\t\t// some compatibility fixes for Windows paths\r\n\t\t$from = is_dir($from) ? rtrim($from, '\\/') . '/' : $from;\r\n\t\t$to = is_dir($to) ? rtrim($to, '\\/') . '/' : $to;\r\n\t\t$from = str_replace('\\\\', '/', $from);\r\n\t\t$to = str_replace('\\\\', '/', $to);\r\n\r\n\t\t$from = explode('/', $from);\r\n\t\t$to = explode('/', $to);\r\n\t\t$relPath = $to;\r\n\r\n\t\tforeach($from as $depth => $dir) {\r\n\t\t\t// find first non-matching dir\r\n\t\t\tif($dir === $to[$depth]) {\r\n\t\t\t\t// ignore this directory\r\n\t\t\t\tarray_shift($relPath);\r\n\t\t\t} else {\r\n\t\t\t\t// get number of remaining dirs to $from\r\n\t\t\t\t$remaining = count($from) - $depth;\r\n\t\t\t\tif($remaining > 1) {\r\n\t\t\t\t\t// add traversals up to first matching dir\r\n\t\t\t\t\t$padLength = (count($relPath) + $remaining - 1) * -1;\r\n\t\t\t\t\t$relPath = array_pad($relPath, $padLength, '..');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$relPath[0] = './' . $relPath[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn implode('/', $relPath);\r\n\t}", "function base_path($uri = '', $protocol = NULL)\n\t{\n\t\treturn get_instance()->config->base_path($uri, $protocol);\n\t}", "function current_path()\n {\n\treturn str_replace(base_url(), '', current_url());\n }", "protected function route_base() {\n\t\treturn substr( strrchr( get_class( $this ), '\\\\' ), 1 );\n\t}", "private function getRelativePath($from, $to)\n {\n $from = is_dir($from) ? rtrim($from, '\\/') . '/' : $from;\n $to = is_dir($to) ? rtrim($to, '\\/') . '/' : $to;\n $from = str_replace('\\\\', '/', $from);\n $to = str_replace('\\\\', '/', $to);\n\n $from = explode('/', $from);\n $to = explode('/', $to);\n $relPath = $to;\n\n foreach ($from as $depth => $dir)\n {\n // find first non-matching dir\n if ($dir === $to[$depth])\n {\n // ignore this directory\n array_shift($relPath);\n }\n else\n {\n // get number of remaining dirs to $from\n $remaining = count($from) - $depth;\n if ($remaining > 1)\n {\n // add traversals up to first matching dir\n $padLength = (count($relPath) + $remaining - 1) * -1;\n $relPath = array_pad($relPath, $padLength, '..');\n break;\n }\n else\n {\n $relPath[0] = './' . $relPath[0];\n }\n }\n }\n return implode('/', $relPath);\n }", "protected function getBackUrl($from)\n {\n $boxes = explode('|', urldecode($from), 2);\n $parts = explode('-', array_shift($boxes), 2);\n if (count($parts) < 2) {\n return '/';\n }\n \n $params = count($boxes) ? array('f' => $boxes[0]) : array();\n switch ($parts[0]) {\n case 's':\n $params['q'] = $parts[1];\n return $this->router->buildRoute('search/', $params)->getUrl();\n case 'w':\n $params['c'] = $parts[1];\n return $this->router->buildRoute('search/wine', $params)->getUrl();\n case 'l':\n $params['id'] = $parts[1];\n return $this->router->buildRoute('lists/contents', $params)->getUrl();\n case 'm':\n $params['c'] = $parts[1];\n return $this->router->buildRoute('search/availability', $params)->getUrl();\n default:\n return '/';\n }\n }", "function getBaseURI(){\n\t\n\treturn \"http://\" . $_SERVER[ 'HTTP_HOST' ] . dirname( $_SERVER[ 'PHP_SELF' ] );\n}", "function lang_base_url()\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->lang_base_url;\n\t}", "function lang_base_url()\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->lang_base_url;\n\t}", "protected function setFrom() {}", "public function setTo($to)\n {\n $this->to = (string)$to;\n return $this;\n }", "public function to($to)\n {\n $this->to = $to;\n\n return $this;\n }", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function getAbsolutePath()\n {\n }", "public function baseUrl() : string\n {\n return $this->urlGenerator->to('mezzo/upload/');\n }", "public function destination() {\n return $this->destination;\n }", "function path($path='') {\n return $this->base_dir . $path;\n }", "public function getFrom();", "public function getFrom();", "function return_base_URL(){\n\t$current_url = \"http://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\n\t$current_url = explode('/', $current_url);\n\tunset($current_url[count($current_url) - 1]);\n\t$current_url = implode('/', $current_url);\n\n\treturn $current_url . '/';\n}", "function url_for($script_path) {\n //add the leading '/' if not present\n if ($script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n }", "function redirect(string $to)\n{\n URL::go($to);\n}" ]
[ "0.6383918", "0.5983753", "0.59542376", "0.59167176", "0.5847961", "0.5834583", "0.5779702", "0.5743164", "0.5729355", "0.56886727", "0.56617177", "0.56617177", "0.56594086", "0.56079924", "0.559791", "0.5593712", "0.5538026", "0.55208427", "0.54888356", "0.5480434", "0.5480434", "0.546346", "0.546346", "0.5457456", "0.5444593", "0.54272026", "0.54272026", "0.54272026", "0.54272026", "0.54272026", "0.54272026", "0.5414322", "0.538968", "0.53752846", "0.5359364", "0.5339631", "0.53264165", "0.5312982", "0.5311179", "0.52808243", "0.5262585", "0.5248074", "0.5240973", "0.52227926", "0.5219416", "0.52176845", "0.52146566", "0.5212863", "0.52047503", "0.5204477", "0.5195705", "0.5194077", "0.5190278", "0.5188544", "0.5186859", "0.51698816", "0.5163591", "0.515929", "0.51551193", "0.51502025", "0.51384634", "0.5134031", "0.5132018", "0.5129358", "0.5124443", "0.51195127", "0.5118671", "0.5097873", "0.50877744", "0.5086646", "0.5083494", "0.50807935", "0.5074054", "0.50722235", "0.5063696", "0.5062004", "0.5061668", "0.5050542", "0.5045249", "0.5043058", "0.5042087", "0.5036218", "0.5036218", "0.50346845", "0.5025271", "0.50218934", "0.50193155", "0.50193155", "0.50193155", "0.50193155", "0.50193155", "0.50193155", "0.5002957", "0.49980444", "0.49940214", "0.49939105", "0.49921027", "0.49921027", "0.4989833", "0.4986462", "0.49842733" ]
0.0
-1
$to is relative to the base location
public function move($from, $to) { rename($from, $this->base_location . "/" . $to); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTo();", "public function getTo();", "function getTo(){\n\t\t\treturn $this->to;\n\t\t}", "function redirect($to, $base=true){\n if($base==true){\n $to = getProp('base_url').$to;\n }\n header('location: '.$to);\n }", "protected function setTo() {}", "function redirect($to = '')\n{\n\t$link = config_item(\"base_url\");\n\tif (substr($to, -1, 1) == '/' || preg_match(\"/\\?/\", $to))\n\t\t$link .= $to;\n\telseif ($to != '')\n\t\t$link .= $to.\".php\";\n\theader(\"Location: $link\");\n}", "function url_for($to) {\n $args = func_get_args();\n\n # find params\n $params = array();\n if (is_array(end($args))) {\n $params = array_pop($args);\n }\n\n # urlencode all but the first argument\n $args = array_map('urlencode', $args);\n $args[0] = $to;\n\n return PluginEngine::getURL($this->dispatcher->plugin, $params, join('/', $args));\n }", "function url_for($to)\n {\n $args = func_get_args();\n\n # find params\n $params = array();\n if (is_array(end($args))) {\n $params = array_pop($args);\n }\n\n # urlencode all but the first argument\n $args = array_map('urlencode', $args);\n $args[0] = $to;\n\n return PluginEngine::getURL($this->dispatcher->plugin, $params, join('/', $args));\n }", "function url_for($to)\n {\n $args = func_get_args();\n\n // find params\n $params = array();\n if (is_array(end($args))) {\n $params = array_pop($args);\n }\n\n // urlencode all but the first argument\n $args = array_map('urlencode', $args);\n $args[0] = $to;\n\n return PluginEngine::getURL($this->dispatcher->plugin, $params, join('/', $args));\n }", "public function to(string $to);", "public function to($to) {\n if (is_string($to)) {\n $this->toValue = $to;\n }\n return $this->toValue;\n }", "public function to($to) {\n if (is_string($to)) {\n $this->toValue = $to;\n }\n return $this->toValue;\n }", "function redirect($to = '')\n {\n if ($to === '/' || $to == '') {\n $to = BASE_URL;\n }\n\n header(\"Location: \" . $to);\n die;\n }", "function url_for($to, $options = array()) {\n return $this->presenter()->url_for($to, $options);\n }", "protected function redirectTo()\n {\n\n return '/'; // return dynamicaly generated URL.\n }", "private function somebody_set_us_up_the_base()\n\t{\n\t\tdefine('BASE', SELF.'?S='.ee()->session->session_id().'&amp;D=cp'); // cp url\n\t}", "public function setTo($to) {\r\n\t\t$this->to = $to;\r\n\t}", "function setTo($to_set){\n\t\t\t$this->to=$to_set;\n\t\t}", "public function getTo() {\n return $this->to;\n }", "public function getTo()\n {\n return $this->_to;\n }", "public function getTo()\n {\n return $this->_to;\n }", "public function getTo() {\n\t\treturn $this->to;\n\t}", "public function getTo() {\n\t\treturn $this->to;\n\t}", "public function setTo($to) {\r\n $this->to = $to;\r\n }", "public function url_for($to)\n {\n $args = func_get_args();\n\n # find params\n $params = array();\n if (is_array(end($args))) {\n $params = array_pop($args);\n }\n\n # urlencode all but the first argument\n $args = array_map('urlencode', $args);\n $args[0] = $to;\n\n return PluginEngine::getURL($this->dispatcher->plugin, $params, join('/', $args));\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function getTo()\n {\n return $this->to;\n }", "public function to($value) {\n return $this->setProperty('to', $value);\n }", "function base_path()\n {\n $paths = getPaths();\n\n return $paths['base'];\n }", "public function to($to)\r\n {\r\n $this->to = $to;\r\n return $this;\r\n }", "static function base()\n {\n return trim(App::router()->getBase(), '/');\n }", "public function getToUrl()\n {\n\n return $this->toUrl;\n\n }", "protected function redirectTo(): string\n {\n return '/';\n }", "public function toRelativePath () {\n return new S (str_replace (DOCUMENT_ROOT, _NONE, $this->varContainer));\n }", "function base_path()\n {\n return dirname(__DIR__);\n }", "function getdirections_locations_user_path($fromuid, $touid) {\n if (module_exists('location') && is_numeric($fromuid) && is_numeric($touid)) {\n return \"getdirections/locations_user/$fromuid/$touid\";\n }\n}", "function getdirections_location_n2u_path($fromnid, $touid) {\n if (module_exists('location') && is_numeric($fromnid) && is_numeric($touid)) {\n return \"getdirections/location_u2n/$fromnid/$touid\";\n }\n}", "function base_url(){\n $url = BASE_URL;\n return $url;\n }", "private static function base_url($path=NULL)\n {\n\t\tglobal $url;\n $fullurl=$url.$path;\n return $fullurl;\n\t}", "public function GetAbsolute ();", "private static function base_relative($path = null)\n\t{\n\t\t$test\t= self::getProtocol().$_SERVER['HTTP_HOST'].\"/\".apps::getGlobal(\"router\")->getBasePath();\n\t\treturn concat_path($test,$path);\n\t}", "function Twiloop_url_base()\n{\n $url_base = '';\n $url_base = strrpos($_SERVER['PHP_SELF'], '/', -4)+1;\n $url_base = substr($_SERVER['PHP_SELF'], 0, $url_base);\n $url_base = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$url_base;\n return $url_base;\n}", "function qa_path_to_root()\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\tglobal $qa_root_url_relative;\n\treturn $qa_root_url_relative;\n}", "public function to($to)\n {\n $this->to = $to;\n return $this;\n }", "public function fullPath(){\n\t $this->path = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\treturn $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n }", "private function getRelativePath($from, $to)\n\t{\n\t\t\t$from = explode('/', $from);\n\t\t\t$to = explode('/', $to);\n\t\t\t$relPath = $to;\n\n\t\t\tforeach($from as $depth => $dir) {\n\t\t\t\t\t// find first non-matching dir\n\t\t\t\t\tif($dir === $to[$depth]) {\n\t\t\t\t\t\t\t// ignore this directory\n\t\t\t\t\t\t\tarray_shift($relPath);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// get number of remaining dirs to $from\n\t\t\t\t\t\t\t$remaining = count($from) - $depth;\n\t\t\t\t\t\t\tif($remaining > 1) {\n\t\t\t\t\t\t\t\t\t// add traversals up to first matching dir\n\t\t\t\t\t\t\t\t\t$padLength = (count($relPath) + $remaining - 1) * -1;\n\t\t\t\t\t\t\t\t\t$relPath = array_pad($relPath, $padLength, '..');\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$relPath[0] = './' . $relPath[0];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tunset($relPath[count($relPath)-1]);\n\t\t\treturn implode('/', $relPath);\n\t}", "public function to($url = '')\n\t{\n\t\treturn $this->url.'/'.$this->name.'/'.$url;\n\t}", "function internalRedirect($to){\n global $ID, $PAGE, $CURRENT, $Controller, $OLD;\n\n if(!is_object($to)) $to = $Controller->{(string)$to};\n\n if($PAGE)\n $OLD = $PAGE->ID;\n else $OLD = false;\n $PAGE = $CURRENT = $to;\n $_REQUEST['id'] = $to->ID;\n\n if(!@method_exists($CURRENT, 'run')) errorPage('Controller unknown');\n\n /**\n * Execute the requested object\n */\n $CURRENT->run();\n\n /**\n * Send output to browser\n */\n\n while (ob_get_level() > 0) {\n ob_end_flush();\n }\n\n exit;\n}", "function formatCurrentUrl() ;", "public function __construct($to) {\n $this->params['to'] = $to;\n }", "public function setTo($to)\n { \n $this->_param['to'] = Util::cleanNumber($to);\n return $this;\n }", "public function base_url()\n\t{\n\t\treturn URL::base();\n\t}", "function base_url(){\n return BASE_URL;\n }", "function cap_make_path_relative_to ($path, $base)\n{\n $base = rtrim ($base, '/') . '/';\n if (strncmp ($path, $base, strlen ($base)) == 0) {\n return substr ($path, strlen ($base));\n }\n return $path;\n}", "public function from($from);", "public function getTo() {\n return $this->user_to;\n }", "function get_base()\n\t{\n\t\t$site_url = get_site_option('siteurl');\n\t\t$base = trim(preg_replace('#https?://[^/]+#ui', '', $site_url), '/');\n\n\t\t// @since 1.3.0 - guess min dir to check for any dir that we have to\n\t\t// remove from the base\n\t\t$this->_guess_min_dir();\n\n\t\t$this->base = !empty($this->remove_from_base)\n\t\t\t? preg_replace('#^' . $this->remove_from_base . '/?#ui', '', $base, 1)\n\t\t\t: $base;\n\t}", "function base_path() {\n return (new Server)->get('DOCUMENT_ROOT');\n }", "protected static function generate_base_url()\n\t{\n\t\t$base_url = parent::generate_base_url();\n\t\treturn str_replace('htdocs/novius-os/', '', $base_url);\n\t}", "private static function get_relative_path($from, $to)\n {\n // some compatibility fixes for Windows paths\n $from = is_dir($from) ? rtrim($from, '\\/') . '/' : $from;\n $to = is_dir($to) ? rtrim($to, '\\/') . '/' : $to;\n $from = str_replace('\\\\', '/', $from);\n $to = str_replace('\\\\', '/', $to);\n\n $from = explode('/', $from);\n $to = explode('/', $to);\n $rel_path = $to;\n\n foreach ($from as $depth => $dir) {\n // find first non-matching dir\n if ($dir === $to[$depth]) {\n // ignore this directory\n array_shift($rel_path);\n } else {\n // get number of remaining dirs to $from\n $remaining = count($from) - $depth;\n if ($remaining > 1) {\n // add traversals up to first matching dir\n $pad_length = (count($rel_path) + $remaining - 1) * -1;\n $rel_path = array_pad($rel_path, $pad_length, '..');\n break;\n } else {\n $rel_path[0] = './' . $rel_path[0];\n }\n }\n }\n return implode('/', $rel_path);\n }", "protected function getCurrentAbsolutePath() {\n\t\treturn dirname(SS_ClassLoader::instance()->getManifest()->getItemPath(get_class($this)));\n\t}", "function base_path($path)\n{\n return __DIR__.'/../'.$path;\n}", "protected function getAbsoluteBasePath() {}", "function get_base_dir() {\n return $this->base_dir;\n }", "public function set_to( $to ) {\n $this->to = $to;\n return $this;\n }", "public function baseRelPath()\n {\n if($this instanceof Layout)\n {\n $class = Application::getApp();\n }\n else\n {\n $class = \\get_class($this);\n }\n $reflector = new \\ReflectionClass($class);\n $parts = \\explode('\\\\', $reflector->getName());\n $parts = \\array_chunk($parts, 3, false);\n return \\strtolower(\\implode('/', $parts[0])) . '/';\n }", "function base_path() {\n\treturn str_replace('index.php','',$_SERVER['SCRIPT_NAME']);\n}", "function get_base_url() {\n $fin_string = '';\n $parts = explode('/', $this->request_uri);\n if (count($parts) > 2) {\n $subparts = array_slice($parts, 2);\n foreach ($subparts as $p)\n $fin_string .= $p . '/';\n return substr($fin_string, 0, -1);\n }\n return $fin_string;\n }", "public function base_url(){\n return $this->plugin_url() . 'base/';\n }", "function cot_pfs_relpath($userid)\n{\n\tglobal $cfg;\n\n\tif ($cfg['pfs']['pfsuserfolder'])\n\t{\n\t\treturn($userid.'/');\n\t}\n\telse\n\t{\n\t\treturn('');\n\t}\n}", "function getRelativePath($from, $to)\r\n\t{\r\n\t\t// some compatibility fixes for Windows paths\r\n\t\t$from = is_dir($from) ? rtrim($from, '\\/') . '/' : $from;\r\n\t\t$to = is_dir($to) ? rtrim($to, '\\/') . '/' : $to;\r\n\t\t$from = str_replace('\\\\', '/', $from);\r\n\t\t$to = str_replace('\\\\', '/', $to);\r\n\r\n\t\t$from = explode('/', $from);\r\n\t\t$to = explode('/', $to);\r\n\t\t$relPath = $to;\r\n\r\n\t\tforeach($from as $depth => $dir) {\r\n\t\t\t// find first non-matching dir\r\n\t\t\tif($dir === $to[$depth]) {\r\n\t\t\t\t// ignore this directory\r\n\t\t\t\tarray_shift($relPath);\r\n\t\t\t} else {\r\n\t\t\t\t// get number of remaining dirs to $from\r\n\t\t\t\t$remaining = count($from) - $depth;\r\n\t\t\t\tif($remaining > 1) {\r\n\t\t\t\t\t// add traversals up to first matching dir\r\n\t\t\t\t\t$padLength = (count($relPath) + $remaining - 1) * -1;\r\n\t\t\t\t\t$relPath = array_pad($relPath, $padLength, '..');\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$relPath[0] = './' . $relPath[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn implode('/', $relPath);\r\n\t}", "function current_path()\n {\n\treturn str_replace(base_url(), '', current_url());\n }", "function base_path($uri = '', $protocol = NULL)\n\t{\n\t\treturn get_instance()->config->base_path($uri, $protocol);\n\t}", "protected function route_base() {\n\t\treturn substr( strrchr( get_class( $this ), '\\\\' ), 1 );\n\t}", "private function getRelativePath($from, $to)\n {\n $from = is_dir($from) ? rtrim($from, '\\/') . '/' : $from;\n $to = is_dir($to) ? rtrim($to, '\\/') . '/' : $to;\n $from = str_replace('\\\\', '/', $from);\n $to = str_replace('\\\\', '/', $to);\n\n $from = explode('/', $from);\n $to = explode('/', $to);\n $relPath = $to;\n\n foreach ($from as $depth => $dir)\n {\n // find first non-matching dir\n if ($dir === $to[$depth])\n {\n // ignore this directory\n array_shift($relPath);\n }\n else\n {\n // get number of remaining dirs to $from\n $remaining = count($from) - $depth;\n if ($remaining > 1)\n {\n // add traversals up to first matching dir\n $padLength = (count($relPath) + $remaining - 1) * -1;\n $relPath = array_pad($relPath, $padLength, '..');\n break;\n }\n else\n {\n $relPath[0] = './' . $relPath[0];\n }\n }\n }\n return implode('/', $relPath);\n }", "protected function getBackUrl($from)\n {\n $boxes = explode('|', urldecode($from), 2);\n $parts = explode('-', array_shift($boxes), 2);\n if (count($parts) < 2) {\n return '/';\n }\n \n $params = count($boxes) ? array('f' => $boxes[0]) : array();\n switch ($parts[0]) {\n case 's':\n $params['q'] = $parts[1];\n return $this->router->buildRoute('search/', $params)->getUrl();\n case 'w':\n $params['c'] = $parts[1];\n return $this->router->buildRoute('search/wine', $params)->getUrl();\n case 'l':\n $params['id'] = $parts[1];\n return $this->router->buildRoute('lists/contents', $params)->getUrl();\n case 'm':\n $params['c'] = $parts[1];\n return $this->router->buildRoute('search/availability', $params)->getUrl();\n default:\n return '/';\n }\n }", "function getBaseURI(){\n\t\n\treturn \"http://\" . $_SERVER[ 'HTTP_HOST' ] . dirname( $_SERVER[ 'PHP_SELF' ] );\n}", "function lang_base_url()\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->lang_base_url;\n\t}", "function lang_base_url()\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->lang_base_url;\n\t}", "protected function setFrom() {}", "public function setTo($to)\n {\n $this->to = (string)$to;\n return $this;\n }", "public function to($to)\n {\n $this->to = $to;\n\n return $this;\n }", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function formatCurrentUrl() {}", "public function getAbsolutePath()\n {\n }", "public function baseUrl() : string\n {\n return $this->urlGenerator->to('mezzo/upload/');\n }", "function path($path='') {\n return $this->base_dir . $path;\n }", "public function destination() {\n return $this->destination;\n }", "public function getFrom();", "public function getFrom();", "function return_base_URL(){\n\t$current_url = \"http://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\n\t$current_url = explode('/', $current_url);\n\tunset($current_url[count($current_url) - 1]);\n\t$current_url = implode('/', $current_url);\n\n\treturn $current_url . '/';\n}", "function url_for($script_path) {\n //add the leading '/' if not present\n if ($script_path[0] != '/') {\n $script_path = \"/\" . $script_path;\n }\n return WWW_ROOT . $script_path;\n }", "function redirect(string $to)\n{\n URL::go($to);\n}" ]
[ "0.63841194", "0.5983376", "0.59537977", "0.59162766", "0.58472085", "0.583404", "0.57795066", "0.5743012", "0.57292", "0.5688821", "0.5662056", "0.5662056", "0.5658825", "0.56070906", "0.5596752", "0.5592143", "0.5537419", "0.5520575", "0.5488127", "0.5479738", "0.5479738", "0.5462881", "0.5462881", "0.54567885", "0.544453", "0.542657", "0.542657", "0.542657", "0.542657", "0.542657", "0.542657", "0.54144025", "0.53868085", "0.5374324", "0.5356928", "0.53388625", "0.5325157", "0.53113645", "0.530907", "0.5280693", "0.52622664", "0.5245805", "0.52382433", "0.5220506", "0.521653", "0.5215514", "0.5212403", "0.5211942", "0.5203402", "0.5203259", "0.51964444", "0.5194844", "0.51897335", "0.51878566", "0.51861364", "0.5166768", "0.5161314", "0.51577204", "0.51532036", "0.5149904", "0.51361513", "0.5131685", "0.51297414", "0.51277155", "0.5122569", "0.5116621", "0.51163876", "0.50955003", "0.5085475", "0.5084844", "0.5081102", "0.50779206", "0.50713533", "0.50711334", "0.5062063", "0.50601083", "0.50595087", "0.50483143", "0.5043994", "0.50415784", "0.5039601", "0.50335526", "0.50335526", "0.50327635", "0.5024473", "0.50209427", "0.50183046", "0.50183046", "0.50183046", "0.50183046", "0.50183046", "0.50183046", "0.5000875", "0.49951178", "0.49927822", "0.49927458", "0.4990646", "0.4990646", "0.49873114", "0.49848038", "0.4984391" ]
0.0
-1
first check that $hook_suffix is appropriate for your admin page
function mw_enqueue_color_picker( $hook_suffix ) { wp_enqueue_style( 'wp-color-picker' ); wp_enqueue_script( 'my-script-handle', plugins_url('admin.js', __FILE__ ), array( 'wp-color-picker' ), false, true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleAdminScripts ( $hook_suffix )\n\t{\n\n\t\t$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '.dev' : '';\n\t\t$admin_pages = array ('post.php', 'page.php' );\n\t\tif ( in_array( $hook_suffix, $admin_pages ) ) {\n\t\t\twp_enqueue_script( 'avhamazonmetabox', $this->core->info['plugin_url'] . '/inc/js/metabox' . $suffix . '.js', array ('jquery' ), $this->core->version, true );\n\t\t}\n\t}", "function omega_admin_scripts( $hook_suffix ) {\r\n \r\n \r\n}", "function TS_VCSC_Extensions_Admin_Files($hook_suffix) {\r\n\t\t\tglobal $pagenow, $typenow;\r\n\t\t\tif (!function_exists('get_current_screen')) {\r\n\t\t\t\trequire_once(ABSPATH . '/wp-admin/includes/screen.php');\r\n\t\t\t}\r\n\t\t\t$screen \t\t\t\t\t\t= get_current_screen();\r\n\t\t\tif (empty($typenow) && !empty($_GET['post'])) {\r\n\t\t\t\t$post \t\t\t\t\t\t= get_post($_GET['post']);\r\n\t\t\t\t$typenow \t\t\t\t\t= $post->post_type;\r\n\t\t\t}\r\n\t\t\t$url\t\t\t\t\t\t\t= plugin_dir_url( __FILE__ );\r\n\t\t\t$TS_VCSC_IsEditPagePost \t\t= TS_VCSC_IsEditPagePost();\r\n // Check if Invalid WP Bakery PAGE Builder Editor\r\n if ($this->TS_VCSC_WebsiteBuilder_Instead == \"true\") {\r\n $TS_VCSC_IsEditPagePost = false;\r\n }\r\n // Check if Page/Post has been edited with Gutenberg\r\n if (($this->TS_VCSC_GutenbergExists == \"true\") && ((method_exists($screen, 'is_block_editor') && $screen->is_block_editor()) || ((function_exists('is_gutenberg_page') && is_gutenberg_page())))) {\r\n $TS_VCSC_IsGutenbergPost = \"true\";\r\n } else {\r\n $TS_VCSC_IsGutenbergPost = \"false\";\r\n }\r\n // Check for WP Bakery PAGE Builder Content\r\n if (($this->TS_VCSC_GutenbergExists == \"true\") && ($this->TS_VCSC_VCFrontEditMode == \"false\") && ($this->TS_VCSC_Gutenberg_Classic == \"false\") && ($TS_VCSC_IsGutenbergPost == \"false\")) {\r\n $TS_VCSC_IsWBPBContent = (TS_VCSC_CheckWBPageBuilderContent() == true ? \"true\" : \"false\");\r\n } else {\r\n $TS_VCSC_IsWBPBContent = \"true\";\r\n }\r\n // Check for Custom Post Type without VC\r\n\t\t\t$TS_VCSC_IsEditCustomPost \t\t= false;\t\t\t\r\n\t\t\tif ($screen != '' && $screen != \"false\" && $screen != false && ($screen->id == \"ts_timeline\" || $screen->id == \"ts_team\" || $screen->id == \"ts_testimonials\" || $screen->id == \"ts_skillsets\" || $screen->id == \"ts_logos\")) {\r\n\t\t\t\t$TS_VCSC_IsEditCustomPost \t= true;\r\n\t\t\t}\r\n\t\t\t// Files to be loaded on Widgets Page\r\n\t\t\tif ($pagenow == \"widgets.php\") {\r\n\t\t\t\tif ($this->TS_VCSC_CustomPostTypesWidgets == \"true\") {\r\n\t\t\t\t\twp_enqueue_style('ts-visual-composer-extend-widgets');\r\n\t\t\t\t\twp_enqueue_script('ts-visual-composer-extend-widgets');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Files to be loaded on WBP Settings Page\r\n\t\t\tif (($this->TS_VCSC_Extension_RoleManager == \"true\") || ($this->TS_VCSC_Extension_ElementsUser == \"true\")) {\r\n\t\t\t\twp_enqueue_style('ts-visual-composer-extend-composer');\r\n\t\t\t}\r\n\t\t\t// Files to be loaded with WP Bakery PAGE Builder Extensions Addon \r\n\t\t\tif ((($TS_VCSC_IsEditPagePost) && ($TS_VCSC_IsEditCustomPost == false) && ($this->TS_VCSC_WebsiteBuilder_Instead == \"false\") && (($this->TS_VCSC_GutenbergExists == \"false\") || ($this->TS_VCSC_Gutenberg_Classic == \"true\") || ($this->TS_VCSC_VCFrontEditMode == \"true\") || ($TS_VCSC_IsGutenbergPost = \"false\") || ($TS_VCSC_IsWBPBContent == \"true\"))) || ($this->TS_VCSC_Extension_ToolsetsUser == \"true\")) {\t\t\t\t\r\n if ($this->TS_VCSC_CustomPostTypesLoaded == \"true\") {\r\n\t\t\t\t\twp_enqueue_script('jquery-ui-sortable');\r\n\t\t\t\t}\r\n\t\t\t\tif (($this->TS_VCSC_EditorVisualSelector == \"true\") || ($this->TS_VCSC_IconicumActivated == \"true\") || ($this->TS_VCSC_GeneratorLoad == \"true\")) {\r\n\t\t\t\t\t$this->TS_VCSC_IconFontsEnqueue(false);\r\n\t\t\t\t}\r\n\t\t\t\twp_enqueue_style('ts-font-teammates');\r\n\t\t\t\tif ($this->TS_VCSC_EditorLivePreview == \"true\") {\r\n\t\t\t\t\twp_enqueue_style('ts-visual-composer-extend-preview');\r\n\t\t\t\t} else {\r\n\t\t\t\t\twp_enqueue_style('ts-visual-composer-extend-basic');\r\n\t\t\t\t}\r\n\t\t\t\tif ($this->TS_VCSC_LoadEditorNoUiSlider == \"true\") {\r\n\t\t\t\t\twp_enqueue_style('ts-extend-nouislider');\t\t\t\t\r\n\t\t\t\t\twp_enqueue_script('ts-extend-nouislider');\r\n\t\t\t\t}\r\n\t\t\t\twp_enqueue_style('ts-extend-multiselect');\r\n\t\t\t\twp_enqueue_script('ts-extend-multiselect');\r\n\t\t\t\twp_enqueue_script('ts-extend-picker');\t\t\r\n\t\t\t\twp_enqueue_script('ts-extend-iconpicker');\r\n\t\t\t\twp_enqueue_style('ts-extend-iconpicker');\r\n\t\t\t\twp_enqueue_style('ts-extend-colorpicker');\r\n\t\t\t\twp_enqueue_script('ts-extend-colorpicker');\t\r\n\t\t\t\twp_enqueue_script('ts-extend-classygradient');\r\n\t\t\t\twp_enqueue_style('ts-extend-animations');\r\n\t\t\t\twp_enqueue_style('ts-extend-preloaders');\r\n\t\t\t\twp_enqueue_style('ts-visual-composer-extend-admin');\t\t\t\t\r\n\t\t\t\twp_enqueue_script('ts-visual-composer-extend-admin');\r\n\t\t\t\tif (($this->TS_VCSC_WooCommerceActive == \"true\") || ($this->TS_VCSC_Visual_Composer_Elements['TS Rating Scales']['active'] == 'true')) {\r\n\t\t\t\t\twp_enqueue_style('ts-font-ecommerce');\r\n\t\t\t\t}\r\n\t\t\t\tif ($this->TS_VCSC_Visual_Composer_Elements['TS Google Maps PLUS']['active'] == 'true') {\r\n\t\t\t\t\twp_enqueue_style('ts-font-mapmarker');\r\n\t\t\t\t}\r\n\t\t\t\t// Load Custom Backbone View and Files for Rows\r\n\t\t\t\tif ($this->TS_VCSC_VCFrontEditMode == \"false\") {\r\n\t\t\t\t\tif ((($this->TS_VCSC_PluginExtended == \"true\") && (get_option('ts_vcsc_extend_settings_additions', 1) == 1)) || (($this->TS_VCSC_PluginExtended == \"false\"))) {\r\n\t\t\t\t\t\tif (get_option('ts_vcsc_extend_settings_additionsRows', 0) == 1) {\r\n\t\t\t\t\t\t\twp_enqueue_script('ts-vcsc-backend-rows');\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif ($this->TS_VCSC_VCFrontEditMode == \"false\") {\r\n\t\t\t\t\t// Load Custom Backbone View for Other Elements\r\n\t\t\t\t\tif ($this->TS_VCSC_EditorLivePreview == \"true\") {\r\n\t\t\t\t\t\twp_enqueue_script('ts-vcsc-backend-other');\r\n\t\t\t\t\t} else if (($this->TS_VCSC_Visual_Composer_Elements['TS Fancy Tabs (BETA)']['active'] == 'true') || ($this->TS_VCSC_Visual_Composer_Elements['TS Image Hotspot']['active'] == 'true')) {\r\n\t\t\t\t\t\twp_enqueue_script('ts-vcsc-backend-basic');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Load Custom Backbone for Shortcode Viewer\r\n\t\t\t\t\tif ($this->TS_VCSC_EditorShortcodesPopup == \"true\") {\r\n\t\t\t\t\t\twp_enqueue_script('ts-vcsc-backend-shortcode');\r\n\t\t\t\t\t\twp_enqueue_script('ts-extend-clipboard');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Load Custom Backbone for Container Toggle\r\n\t\t\t\t\tif ($this->TS_VCSC_EditorContainerToggle == \"true\") {\r\n\t\t\t\t\t\twp_enqueue_script('ts-vcsc-backend-collapse');\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Element Setting Panels\r\n\t\t\t\twp_enqueue_script('jquery-ui-autocomplete');\r\n\t\t\t\twp_enqueue_style('ts-visual-composer-extend-composer');\r\n\t\t\t\twp_enqueue_style('ts-visual-composer-extend-parameters');\r\n\t\t\t\twp_enqueue_script('ts-visual-composer-extend-parameters');\r\n\t\t\t\tif ($this->TS_VCSC_EditorElementFilter == \"true\") {\r\n\t\t\t\t\twp_enqueue_script('ts-visual-composer-extend-categories');\r\n\t\t\t\t}\r\n\t\t\t} else if (($TS_VCSC_IsEditPagePost) && ($TS_VCSC_IsEditCustomPost == true) && ($this->TS_VCSC_WebsiteBuilder_Instead == \"false\")) {\r\n if ($this->TS_VCSC_CustomPostTypesLoaded == \"true\") {\r\n\t\t\t\t\twp_enqueue_script('jquery-ui-sortable');\r\n\t\t\t\t}\r\n\t\t\t\twp_enqueue_style('ts-visual-composer-extend-admin');\r\n\t\t\t}\r\n\t\t\t// Files to be loaded for Plugin Settings Pages\r\n if (!is_null($hook_suffix)) {\r\n global $ts_vcsc_main_page;\r\n global $ts_vcsc_settings_page;\r\n global $ts_vcsc_upload_page;\r\n global $ts_vcsc_preview_page;\r\n global $ts_vcsc_generator_page;\r\n global $ts_vcsc_customCSS_page;\r\n global $ts_vcsc_customJS_page;\r\n global $ts_vcsc_transfer_page;\r\n global $ts_vcsc_system_page;\r\n global $ts_vcsc_license_page;\r\n global $ts_vcsc_about_page;\r\n global $ts_vcsc_google_fonts;\r\n global $ts_vcsc_custom_fonts;\r\n global $ts_vcsc_enlighterjs_page;\r\n global $ts_vcsc_downtime_page;\r\n global $ts_vcsc_sidebars_page;\r\n global $ts_vcsc_update_page;\r\n global $ts_vcsc_statistics_page;\r\n if (($ts_vcsc_main_page == $hook_suffix) || ($ts_vcsc_settings_page == $hook_suffix) || ($ts_vcsc_upload_page == $hook_suffix) || ($ts_vcsc_preview_page == $hook_suffix) || ($ts_vcsc_customCSS_page == $hook_suffix) || ($ts_vcsc_customJS_page == $hook_suffix) || ($ts_vcsc_system_page == $hook_suffix) || ($ts_vcsc_transfer_page == $hook_suffix) || ($ts_vcsc_license_page == $hook_suffix) || ($ts_vcsc_about_page == $hook_suffix) || ($ts_vcsc_google_fonts == $hook_suffix) || ($ts_vcsc_custom_fonts == $hook_suffix) || ($ts_vcsc_enlighterjs_page == $hook_suffix) || ($ts_vcsc_downtime_page == $hook_suffix) || ($ts_vcsc_sidebars_page == $hook_suffix) || ($ts_vcsc_statistics_page == $hook_suffix)) {\r\n if (!wp_script_is('jquery')) {\r\n wp_enqueue_script('jquery');\r\n }\r\n if (($ts_vcsc_main_page == $hook_suffix) || ($ts_vcsc_settings_page == $hook_suffix) || ($ts_vcsc_enlighterjs_page == $hook_suffix)) {\r\n wp_enqueue_style('wp-color-picker');\t\t\t\t\r\n wp_enqueue_script('ts-extend-colorpickeralpha');\t\t\t\t\t\r\n if ($ts_vcsc_enlighterjs_page != $hook_suffix) {\r\n wp_enqueue_script('ts-extend-dragsort');\r\n }\r\n wp_enqueue_style('ts-extend-nouislider');\r\n wp_enqueue_script('ts-extend-nouislider');\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n }\r\n if ($ts_vcsc_upload_page == $hook_suffix) {\r\n if (get_option('ts_vcsc_extend_settings_tinymceCustomPath', '') != '') {\r\n wp_enqueue_style('ts-font-customvcsc');\r\n }\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n wp_enqueue_script('ts-visual-composer-extend-admin');\r\n }\r\n if (($ts_vcsc_upload_page == $hook_suffix) || ($ts_vcsc_preview_page == $hook_suffix)) {\r\n wp_enqueue_style('ts-extend-dropdown');\r\n wp_enqueue_script('ts-extend-dropdown');\r\n wp_enqueue_script('ts-extend-freewall');\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n }\r\n if ($ts_vcsc_about_page == $hook_suffix) {\r\n wp_enqueue_script('ts-extend-slidesjs');\r\n }\r\n wp_enqueue_style('dashicons');\r\n wp_enqueue_style('ts-font-teammates');\r\n wp_enqueue_style('ts-extend-sweetalert');\r\n wp_enqueue_script('ts-extend-sweetalert');\r\n if ($ts_vcsc_enlighterjs_page != $hook_suffix) {\r\n wp_enqueue_style('ts-vcsc-extend');\r\n if ($ts_vcsc_downtime_page != $hook_suffix) {\r\n wp_enqueue_script('ts-vcsc-extend');\r\n }\r\n }\r\n wp_enqueue_script('validation-engine');\r\n wp_enqueue_style('validation-engine');\r\n wp_enqueue_script('validation-engine-en');\r\n wp_enqueue_style('ts-visual-composer-extend-buttons');\r\n }\r\n if (($ts_vcsc_generator_page == $hook_suffix) && ($this->TS_VCSC_IconicumStandard == \"false\")) {\r\n wp_enqueue_style('ts-vcsc-extend');\r\n wp_enqueue_script('ts-vcsc-extend');\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n wp_enqueue_script('ts-extend-clipboard');\r\n wp_enqueue_style('ts-visual-composer-extend-buttons');\r\n }\r\n if ($ts_vcsc_preview_page == $hook_suffix) {\r\n $this->TS_VCSC_IconFontsEnqueue(false);\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n wp_enqueue_script('ts-visual-composer-extend-admin');\r\n }\r\n if (($ts_vcsc_system_page == $hook_suffix) || ($ts_vcsc_transfer_page == $hook_suffix) || ($ts_vcsc_about_page == $hook_suffix)) {\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n wp_enqueue_script('ts-visual-composer-extend-admin');\t\t\t\t\r\n }\r\n if ($ts_vcsc_downtime_page == $hook_suffix) {\r\n wp_enqueue_style('ts-extend-preloaders');\r\n wp_enqueue_script('ts-extend-picker');\r\n wp_enqueue_style('ts-extend-nouislider');\r\n wp_enqueue_style('ts-extend-multiselect');\r\n wp_enqueue_script('ts-extend-nouislider');\r\n wp_enqueue_script('ts-extend-multiselect');\r\n wp_enqueue_script('ts-extend-sumo');\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n wp_enqueue_script('ts-visual-composer-extend-admin');\r\n wp_enqueue_style('ts-visual-composer-extend-downtime');\r\n wp_enqueue_script('ts-visual-composer-extend-downtime');\t\r\n }\r\n if ($ts_vcsc_sidebars_page == $hook_suffix) {\r\n wp_enqueue_style('ts-extend-preloaders');\r\n wp_enqueue_style('ts-extend-nouislider');\r\n wp_enqueue_script('ts-extend-nouislider');\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n wp_enqueue_script('ts-visual-composer-extend-admin');\r\n wp_enqueue_script('ts-visual-composer-extend-sidebars');\r\n }\r\n if ($ts_vcsc_google_fonts == $hook_suffix) {\r\n wp_enqueue_style('ts-extend-preloaders');\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n wp_enqueue_style('ts-visual-composer-extend-google');\r\n wp_enqueue_script('ts-visual-composer-extend-google');\r\n }\r\n if ($ts_vcsc_custom_fonts == $hook_suffix) {\r\n wp_enqueue_style('ts-extend-preloaders');\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n wp_enqueue_script('jquery-ui-sortable');\r\n wp_enqueue_script('ts-extend-repeatable');\r\n wp_enqueue_style('ts-visual-composer-extend-fonts');\r\n wp_enqueue_script('ts-visual-composer-extend-fonts');\r\n }\r\n if (($ts_vcsc_main_page == $hook_suffix) || ($ts_vcsc_settings_page == $hook_suffix)) {\r\n wp_enqueue_script('jquery-ui-sortable');\r\n wp_enqueue_style('ts-extend-preloaders');\r\n wp_enqueue_style('ts-extend-sumo');\r\n wp_enqueue_script('ts-extend-sumo');\r\n wp_enqueue_style('ts-extend-multiselect');\r\n wp_enqueue_script('ts-extend-multiselect');\r\n wp_enqueue_media();\r\n }\r\n if ($ts_vcsc_license_page == $hook_suffix) {\r\n wp_enqueue_style('ts-extend-preloaders');\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n }\r\n if ($ts_vcsc_statistics_page == $hook_suffix) {\r\n wp_enqueue_style('ts-font-tablefont');\r\n wp_enqueue_style('ts-extend-preloaders');\r\n wp_enqueue_style('ts-extend-datatables-full');\r\n wp_enqueue_style('ts-extend-datatables-custom');\r\n wp_enqueue_script('ts-extend-datatables-full');\r\n wp_enqueue_script('ts-extend-datatables-jszip');\r\n wp_enqueue_script('ts-extend-datatables-pdfmaker');\r\n wp_enqueue_script('ts-extend-datatables-pdffonts');\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n wp_enqueue_script('ts-visual-composer-extend-admin');\r\n wp_enqueue_style('ts-visual-composer-extend-statistics');\r\n wp_enqueue_script('ts-visual-composer-extend-statistics');\r\n }\r\n if (($ts_vcsc_customCSS_page == $hook_suffix) || ($ts_vcsc_customJS_page == $hook_suffix)) {\r\n wp_enqueue_script('ace_code_highlighter_js', \t $url.'assets/ACE/ace.js', '', false, true );\r\n }\r\n if ($ts_vcsc_customCSS_page == $hook_suffix) {\r\n wp_enqueue_script('ace_mode_css', $url.'assets/ACE/mode-css.js', array('ace_code_highlighter_js'), false, true );\r\n wp_enqueue_script('custom_css_js', \t\t \t\t$url.'assets/ACE/custom-css.js', array( 'jquery', 'ace_code_highlighter_js' ), false, true );\r\n wp_enqueue_style('ts-vcsc-extend');\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n }\r\n if ($ts_vcsc_customJS_page == $hook_suffix) {\r\n wp_enqueue_script('ace_mode_js', $url.'assets/ACE/mode-javascript.js', array('ace_code_highlighter_js'), false, true );\r\n wp_enqueue_script('custom_js_js', $url.'assets/ACE/custom-js.js', array( 'jquery', 'ace_code_highlighter_js' ), false, true );\r\n wp_enqueue_style('ts-vcsc-extend');\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n }\r\n if ($ts_vcsc_enlighterjs_page == $hook_suffix) {\r\n wp_enqueue_style('ts-extend-preloaders');\r\n wp_enqueue_script('ts-library-mootools');\r\n wp_enqueue_style('ts-extend-enlighterjs');\t\t\t\t\r\n wp_enqueue_script('ts-extend-enlighterjs');\t\t\t\t\r\n wp_enqueue_style('ts-extend-syntaxinit');\r\n wp_enqueue_script('ts-extend-syntaxinit');\r\n wp_enqueue_style('ts-extend-themebuilder');\t\r\n wp_enqueue_script('ts-extend-themebuilder');\r\n }\r\n // Files to be loaded for Update Notification\r\n if ($ts_vcsc_update_page == $hook_suffix) {\r\n wp_enqueue_style('dashicons');\r\n wp_enqueue_style('ts-visual-composer-extend-admin');\r\n wp_enqueue_script('ts-visual-composer-extend-admin');\r\n wp_enqueue_style('ts-vcsc-extend');\r\n wp_enqueue_script('ts-vcsc-extend');\r\n }\r\n }\r\n\t\t}", "protected function is_plugins_page( $hook_suffix ): bool {\n\t\treturn ( ! empty( $hook_suffix ) && 'plugins.php' === $hook_suffix );\n\t}", "function ajan_core_admin_hook() { \n\t$hook = ajan_core_do_network_admin() ? 'network_admin_menu' : 'admin_menu';\n\n\treturn apply_filters( 'ajan_core_admin_hook', $hook );\n}", "public function KemiSitemap_admin_styles($hook_suffix)\n {\n // jQuery confirm.\n // wp_enqueue_script('jQuery');\n if ($hook_suffix == 'settings_page_'.KEMISITEMAP_SLUG) {\n wp_enqueue_script('kemisitemap-scripts', KEMISITEMAP_PLUGIN_URL . 'dist/scripts.js', array('jquery'));\n\n wp_enqueue_style(\n 'admin_page',\n KEMISITEMAP_PLUGIN_URL . 'dist/app.css',\n array(),\n KEMISITEMAP_VERSION\n );\n\n wp_localize_script('kemisitemap-scripts', 'kemiSitemapLocalScript', array(\n 'ajax_url' => admin_url('admin-ajax.php')\n ));\n }\n }", "public static function load_admin_page_hook_slug($page, $hook = 'load-'){\r\n return $hook.'toplevel_page_'.$page;\r\n }", "private function _add_hooks () {\n\t\tif (!is_admin()) return false;\n\t\tif (defined('DOING_AJAX') && DOING_AJAX) return false;\n\n\t\tadd_action('admin_notices', array($this, 'dispatch_notices'));\n\t\tadd_action('upfront-admin-general_settings-versions', array($this, 'version_info'));\n\n\t\tadd_action('admin_menu', array($this, \"add_menu_item\"), 99);\n\n\t\tadd_filter('upfront-admin-admin_notices', array($this, 'process_core_notices'));\n\n\t\tadd_action('admin_init', array($this, 'initialize_dashboard'));\n\t}", "private function define_admin_hooks() {\n\n\t\t//$theme_admin = new Wpt_Custom_Theme_Admin( $this->get_theme_name(), $this->get_version() );\n\n\t\t//$this->loader->add_action( 'admin_enqueue_scripts', $theme_admin, 'enqueue_styles' );\n\n\t}", "private function define_admin_hooks()\n {\n $this->loader->add_action('init',$this,'load_options');\n $this->loader->add_action('plugins_loaded','WordPress_Reactro_Admin', 'load_framework');\n }", "private function define_admin_hooks() {\n\n $admin = new Online_Magazine_Manager_Admin( $this->version );\n\n $this->loader->add_action( 'admin_menu', $admin, 'register_admin_menu' );\n $this->loader->add_action( 'init', $admin, 'register_issue_post_type' );\n $this->loader->add_action( 'init', $admin, 'register_issue_article_post_type' );\n $this->loader->add_action( 'init', $admin, 'init_rewrite_rules' );\n $this->loader->add_action( 'parent_file', $admin, 'taxonomy_submenu_correction' );\n\n }", "private function checkHooks()\n {\n $this->registerHook('actionFrontControllerAfterInit');\n $this->registerHook('header');\n $this->registerHook('actionAdminControllerSetMedia');\n $this->registerHook('displayHome');\n $this->registerHook('displayLeftColumn');\n $this->registerHook('displayRightColumn');\n $this->registerHook('displayFooterProduct');\n $this->registerHook('displayFooter');\n $this->registerHook('displayCustomerAccount');\n $this->registerHook('moduleRoutes');\n $this->registerHook('displayBackOfficeHeader');\n $this->registerHook('actionObjectProductDeleteAfter');\n $this->registerHook('actionAdminMetaAfterWriteRobotsFile');\n $this->registerHook('displayAdminAfterHeader');\n $this->registerHook('actionAdminMetaAfterWriteRobotsFile');\n $this->registerHook('actionObjectProductDeleteAfter');\n $this->registerHook('actionObjectProductDeleteAfter');\n $this->registerHook('actionOutputHTMLBefore');\n return true;\n }", "private function admin_hooks() {\n\t\t\n\t\t// Actions\n\t\t// Load Nav injection\n\t\t$this->add_action ('admin_menu', $this->nav, 'plugin_menu' );\n\t\t\n\t\t// Load Dashboard widget\n\t\t$this->add_action ('wp_dashboard_setup', $this->admin, 'dashboard');\n\t\t\n\t\t// Load Edit Post additions\n\t\t// $this->add_action ('add_meta_boxes', $this->admin, 'post_edit' );\n\n\t\t// Load social toggles on submitbox, if the setting is available\n\t\t// if (get_option('smmp_view_submitbox'))\n\t\t//\t$this->add_action ('post_submitbox_misc_actions', $this->admin, 'admin_post_submitbox' );\n\t\t\n\t\t// On post update/save\n\t\t// $this->add_action ('save_post', $this->admin, 'admin_post_submitbox_submit');\n\t\t\n\t\t\n\t\t// Load Expired Account notice\n\t\t/*try {$this->admin->validate_accounts (); }\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$this->add_action ('admin_notices', $this->admin, 'notice_accounts' );\n\t\t}*/\n\t\t\n\t\t// Filters\n\t\t// Prevent inner links for flow-drive images\n\t\t$this->add_action ('image_downsize', $this->admin, 'filter_image_downsize', 10, 3);\n\t}", "private function load_admin_enqueue_hook( $hook = '' ) {\n\n\t\t// Call our loader class.\n\t\t$this->admin_page = new Loader;\n\n\t\t// Set the admin hook to the requested page.\n\t\t$this->admin_page->scripts( $hook );\n\t}", "private function dld_define_admin_hooks()\n {\n\n $this->dld_admin_settings();\n }", "function theme_sniffer_admin_scripts( $hook ) {\n\tif ( 'appearance_page_theme-sniffer' !== $hook ) {\n\t\treturn;\n\t}\n\twp_enqueue_style( 'theme-sniffer-admin', THEME_SNIFFER_URL . '/css/admin.css', array(), '0.1.3c' );\n\twp_enqueue_script( 'theme-sniffer-admin', THEME_SNIFFER_URL . '/js/admin.js', array( 'jquery', 'underscore' ), '0.1.4' );\n\twp_localize_script( 'theme-sniffer-admin', 'localizationObject', array(\n\t\t'sniff_error' => __( 'The check has failed. This could happen due to running out of memory. Either reduce the file length or increase PHP memory.', 'theme-sniffer' ),\n\t\t'percent_complete' => __( 'Percent completed: ', 'theme-sniffer' ),\n\t\t'check_starting' => __( 'Check starting...', 'theme-sniffer' ),\n\t\t'check_failed' => __( 'Check has failed :(', 'theme-sniffer' ),\n\t\t'check_done' => __( 'All done!', 'theme-sniffer' ),\n\t));\n}", "function load_custom_wp_admin_style($hook) {\n if($hook != 'mokka-abrechnung_page_mokka_s_artist') {\n return;\n }\n// wp_enqueue_style( 'custom_wp_admin_css', plugins_url('admin/css/admin-style.css', __FILE__) );\n wp_enqueue_style( 'custom_bootstrap_admin_css', plugins_url('admin/css/custom_bootstrap.min.css', __FILE__) );\n}", "function <%= functionPrefix %>_admin_conditional_scripts() { }", "function admin_enqueues( $hook_suffix ) {\r\n\t\tif ( 'tools_page_regenthumbs-stamina' != $hook_suffix )\r\n\t\t\treturn;\r\n\r\n\t\twp_enqueue_script( 'jquery-ui-custom', plugins_url( 'jquery-ui-js/jquery-ui-1.8.5.custom.min.js', __FILE__ ), array('jquery'), '1.8.5' );\r\n\t\twp_enqueue_style( 'jquery-ui-regenthumbs', plugins_url( 'jquery-ui-css/start/jquery-ui-1.8.5.custom.css', __FILE__ ), array(), '1.8.5' );\r\n\t}", "public function KemiSitemap_is_admin_page()\n {\n if (get_current_screen()->base == 'settings_page_'.KEMISITEMAP_SLUG) {\n return 'true';\n }\n return 'false';\n }", "function admin_enqueue($hook) {\n\t\tif ( ($hook == \"settings_page_simple_history_settings_menu_slug\") || (simple_history_setting_show_on_dashboard() && $hook == \"index.php\") || (simple_history_setting_show_as_page() && $hook == \"dashboard_page_simple_history_page\")) {\n\t\t\twp_enqueue_style( \"simple_history_styles\", SIMPLE_HISTORY_URL . \"styles.css\", false, SIMPLE_HISTORY_VERSION );\t\n\t\t\twp_enqueue_script(\"simple_history\", SIMPLE_HISTORY_URL . \"scripts.js\", array(\"jquery\"), SIMPLE_HISTORY_VERSION);\n\t\t}\n\t}", "function admin_menu(){\r\n //$level = 'manage-options'; // for wpmu sub blog admins\r\n $level = 'administrator'; // for single blog intalls\r\n $this->hook = add_options_page ( 'TwitterLink Settings', 'TwitterLink Settings', $level, $this->slug, array (&$this, 'options_page' ) );\r\n // load meta box script handlers\r\n add_action ('load-'.$this->hook, array(&$this,'queue_options_page_scripts'));\r\n }", "abstract public function should_link_to_wp_admin();", "public static function get_hook_name(){\r\n\t\treturn \"blog\";\r\n\t}", "function is_blog_admin()\n {\n }", "function dfd_themes_admin_scripts($hook) {\n\t\twp_register_style('dfd-admin-style', get_template_directory_uri() . '/assets/css/admin-panel.css');\n\t\twp_enqueue_style('dfd-admin-style');\n\t\t\n\t\twp_register_script('dfd_post_metaboxes_gallery', get_template_directory_uri().'/assets/admin/js/posts-gallery.js', array( 'jquery' ), false, true);\n\t\twp_register_script('dfd_portfolio_metaboxes_gallery', get_template_directory_uri().'/assets/admin/js/portfolio-gallery.js', array( 'jquery' ), false, true);\n\t\twp_register_script('dfd_gallery_metaboxes_gallery', get_template_directory_uri().'/assets/admin/js/gallery-gallery.js', array( 'jquery' ), false, true);\n\t\t\n\t\twp_enqueue_script('dfd_admin_script', get_template_directory_uri().'/assets/admin/js/admin-scripts.js', array('jquery'), false, true);\n\t\t\n\t\tif(class_exists( 'Vc_Manager', false )) {\n\t\t\tglobal $dfd_native;\n\n\t\t\t$min = '.min';\n\t\t\t\n\t\t\tif(isset($dfd_native['dev_mode']) && $dfd_native['dev_mode'] == 'on' && defined('DFD_DEBUG_MODE') && DFD_DEBUG_MODE) {\n\t\t\t\t$min = '';\n\t\t\t}\n\t\t\t\n\t\t\tif(wp_script_is( 'vc-frontend-editor-min-js', 'enqueued' )) {\n\t\t\t\twp_enqueue_script('vc-inline-editor',get_template_directory_uri().'/assets/admin/js/vc-inline-editor'.$min.'.js',array('vc-frontend-editor-min-js'),'1.5',true);\n\t\t\t} elseif(wp_script_is( 'vc_inline_custom_view_js', 'enqueued' )) {\n\t\t\t\twp_enqueue_script('vc-inline-editor',get_template_directory_uri().'/assets/admin/js/vc-inline-editor.min.js',array('vc_inline_custom_view_js'),'1.5',true);\n\t\t\t}\n\n\t\t\tif($hook == \"post.php\" || $hook == \"post-new.php\" || $hook == \"edit.php\"){\n\t\t\t\twp_enqueue_script('dfd_vc_admin_scripts', get_template_directory_uri().'/assets/admin/js/vc_admin_scripts.js', array('jquery'), false, true);\n\t\t\t}\n\t\t\t\n\t\t\tif(function_exists('dfd_admin_custom_css')) {\n\t\t\t\tdfd_admin_custom_css();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(class_exists('cmb_Meta_Box') && function_exists('dfd_metaboxes_enctype')) {\n\t\t\tdfd_metaboxes_enctype();\n\t\t}\n\t}", "public function register_hooks() {\n\t\t\\add_action( 'admin_action_duplicate_post_check_changes', [ $this, 'check_changes_action_handler' ] );\n\t}", "public function admin_menu()\n\t\t{\n\t\t\tif (current_user_can('manage_options')):\n\t\t\t\t$this->hook_suffix = add_options_page(__('Mailgun', 'mailgun'), __('Mailgun', 'mailgun'),\n\t\t\t\t\t'manage_options', 'mailgun', array(&$this, 'options_page'));\n\t\t\t\tadd_options_page(__('Mailgun Lists', 'mailgun'), __('Mailgun Lists', 'mailgun'), 'manage_options',\n\t\t\t\t\t'mailgun-lists', array(&$this, 'lists_page'));\n\t\t\t\tadd_action(\"admin_print_scripts-{$this->hook_suffix}\", array(&$this, 'admin_js'));\n\t\t\t\tadd_filter(\"plugin_action_links_{$this->plugin_basename}\", array(&$this, 'filter_plugin_actions'));\n\t\t\t\tadd_action(\"admin_footer-{$this->hook_suffix}\", array(&$this, 'admin_footer_js'));\n\t\t\tendif;\n\t\t}", "function it_exchange_custom_url_tracking_addon_admin_wp_enqueue_scripts( $hook_suffix, $post_type ) {\n\tif ( isset( $post_type ) && 'it_exchange_prod' === $post_type ) {\n\t\twp_enqueue_script( 'it-exchange-custom-url-tracking-addon-add-edit-product', ITUtility::get_url_from_file( dirname( __FILE__ ) ) . '/lib/js/add-edit-product.js' );\n\t}\n}", "public function addScriptsAdmin($hook) \n\t\t{\n\t\t\twp_enqueue_style( 'ccs-multiple-select', plugin_dir_url( __FILE__ ) . 'inc/multiple-select/css/multi-select.css');\n\t\t\twp_enqueue_style( 'css-admin', plugin_dir_url( __FILE__ ) . 'css/metas-admin.css');\n\t\t\twp_enqueue_script( 'js-multiple-select', plugin_dir_url( __FILE__ ) . 'inc/multiple-select/js/jquery.multi-select.js', array('jquery'), '1.0.0', true );\n\t\t\twp_enqueue_script( 'add_scripts_admin', plugin_dir_url( __FILE__ ) . 'js/metas-admin.js', array('jquery','jquery-ui-sortable'), '1.0.0', true );\n\n\t\t\t$data['ajax_url'] = admin_url('admin-ajax.php' );\n\t\t\twp_localize_script( 'add_scripts_admin', 'variables', $data );\n\t\t}", "private function define_admin_hooks() {\n\n\t\t$plugin_admin = new Admin_Hook( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n\n\t}", "public function register_hooks() {\n\t\tif ( $this->page_helper->get_current_yoast_seo_page() === 'wpseo_dashboard' ) {\n\t\t\t\\add_action( 'admin_init', [ $this, 'maybe_cleanup_notification' ] );\n\t\t}\n\n\t\tif ( $this->indexing_helper->has_reason() ) {\n\t\t\t\\add_action( 'admin_init', [ $this, 'maybe_create_notification' ] );\n\t\t}\n\n\t\t\\add_action( self::NOTIFICATION_ID, [ $this, 'maybe_create_notification' ] );\n\t}", "function hello_bar_setup() {\t\r\n\tadd_action( 'admin_init', 'hello_bar_admin_warnings' );\r\n}", "function wp_scripts_get_suffix($type = '')\n {\n }", "function is_on_ngg_admin_page()\n {\n return (preg_match(\"/wp-admin.*(ngg|nextgen).*/\", $_SERVER['REQUEST_URI']) || isset($_REQUEST['page']) && preg_match(\"/ngg|nextgen/\", $_REQUEST['page'])) && strpos(strtolower($_SERVER['REQUEST_URI']), '&attach_to_post') == false;\n }", "public function load_styles_scripts( $hook_suffix ) {\n\t\tglobal $woocommerce, $wc_pre_orders, $wp_scripts;\n\n\t\t// only load on settings / order / product pages\n\t\tif( $this->page_id == $hook_suffix || 'edit.php' == $hook_suffix || 'post.php' == $hook_suffix || 'post-new.php' == $hook_suffix ) {\n\n\t\t\t$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';\n\n\t\t\t// Admin CSS\n\t\t\twp_enqueue_style( 'wc_pre_orders_admin', $wc_pre_orders->get_plugin_url() . '/assets/css/wc-pre-orders-admin.min.css', WC_Pre_Orders::VERSION );\n\n\t\t\t// Admin JS\n\t\t\twp_enqueue_script( 'wc_pre_orders_admin', $wc_pre_orders->get_plugin_url() . '/assets/js/wc-pre-orders-admin' . $suffix . '.js', WC_Pre_Orders::VERSION );\n\n\t\t\t// load WooCommerce CSS/JS on custom menu page\n\t\t\tif ( $this->page_id == $hook_suffix ) {\n\n\t\t\t\twp_enqueue_style( 'woocommerce_admin_styles', $woocommerce->plugin_url() . '/assets/css/admin.css' );\n\t\t\t\twp_enqueue_script( 'woocommerce_admin', $woocommerce->plugin_url() . '/assets/js/admin/woocommerce_admin.min.js', array( 'jquery', 'jquery-ui-widget', 'jquery-ui-core' ), $woocommerce->version );\n\t\t\t\twp_enqueue_script( 'ajax-chosen' );\n\t\t\t\twp_enqueue_script( 'chosen' );\n\t\t\t}\n\n\t\t\t// load jQuery UI Date/TimePicker on new/edit product page and pre-orders > actions page\n\t\t\tif ( 'post.php' == $hook_suffix || 'post-new.php' == $hook_suffix || $this->page_id == $hook_suffix ) {\n\n\t\t\t\t// get loaded jQuery version\n\t\t\t\t$jquery_version = isset( $wp_scripts->registered['jquery-ui-core']->ver ) ? $wp_scripts->registered['jquery-ui-core']->ver : '1.8.2';\n\n\t\t\t\t// load jQuery UI CSS while respecting loaded jQuery version\n\t\t\t\twp_enqueue_style( 'jquery-ui-style', ( is_ssl() ) ? 'https:' : 'http:' . '//ajax.googleapis.com/ajax/libs/jqueryui/' . $jquery_version . '/themes/smoothness/jquery-ui.css' );\n\n\t\t\t\t// load TimePicker add-on which extends jQuery DatePicker\n\t\t\t\twp_enqueue_script( 'jquery_ui_timepicker', $wc_pre_orders->get_plugin_url() . '/assets/js/jquery-ui-timepicker-addon' . $suffix . '.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker' ), '1.2' );\n\n\t\t\t\t// add calendar image location\n\t\t\t\twp_localize_script( 'wc_pre_orders_admin', 'wc_pre_orders_params', array( 'calendar_image' => $woocommerce->plugin_url().'/assets/images/calendar.png' ) );\n\t\t\t}\n\t\t}\n\t}", "function sbrb_plugin_admin_scripts() {\n if ( !is_admin() ) \n return;\n\n global $hook_suffix;\n if ( $hook_suffix != 'settings_page_sbrb-url-shortener' ) \n return;\n\n wp_register_script(\n 'sbrb-admin-functions', \n plugin_dir_url(__FILE__) . 'js/url-shortener-admin-functions.js', \n array('jquery'), \n '1.0', \n true\n );\n wp_enqueue_script( 'sbrb-admin-functions' );\n }", "private function define_admin_hooks() {\n\n\t\t$plugin_admin = new APS_Admin( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n\n\t}", "public function parallax_one_welcome_style_and_scripts( $hook_suffix ) {\n\n\t\tif ( 'appearance_page_parallax-one-welcome' == $hook_suffix ) {\n\t\t\twp_enqueue_style( 'parallax-one-welcome-screen-css', get_template_directory_uri() . '/inc/admin/welcome-screen/css/welcome.css' );\n\t\t\twp_enqueue_script( 'parallax-one-welcome-screen-js', get_template_directory_uri() . '/inc/admin/welcome-screen/js/welcome.js', array('jquery') );\n\t\t}\n\t}", "function wpdocs_selectively_enqueue_admin_script( $menuHook ) {\r\n\t\tif ( \"toplevel_page_manage-contacts-handle\" != $menuHook )\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\twp_enqueue_script( 'my_custom_script', plugin_dir_url( __FILE__ ) . 'adminJquery.js', array(), '1.0' );\r\n\t}", "protected function get_hook_prefix() {\n\t\treturn 'pos_host_outlet_get_';\n\t}", "function start_plugin_hookup() {\r\n\r\n\tglobal $pagenow;\r\n\r\n\t// anonymous function in a variable\r\n\t$removeme = function() { echo '<div class=\"error\">It\\'s easy to remove me!!</div>'; };\r\n\r\n\tadd_action(\r\n\t\t'admin_notices',\r\n\t\t$removeme,\r\n\t\t10,\r\n\t\t0\r\n\t);\r\n\r\n\tif ( 'index.php' == $pagenow ) {\r\n\r\n\t\tremove_action(\r\n\t\t\t'admin_notices',\r\n\t\t\t_wp_filter_build_unique_id(\r\n\t\t\t\t'admin_notices',\r\n\t\t\t\t$removeme,\r\n\t\t\t\tfalse\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t}\r\n\r\n}", "public function is_on_our_own_pages( $hook = '' ) {\n\t\t$current_screen = Helpers::get_current_screen();\n\n\t\t$basePrefix = apply_filters( 'simple_history/admin_location', 'index' );\n\t\t$basePrefix = $basePrefix === 'index' ? 'dashboard' : $basePrefix;\n\n\t\tif ( $current_screen && $current_screen->base == 'settings_page_' . self::SETTINGS_MENU_SLUG ) {\n\t\t\treturn true;\n\t\t} elseif ( $current_screen && $current_screen->base === $basePrefix . '_page_simple_history_page' ) {\n\t\t\treturn true;\n\t\t} elseif (\n\t\t\t$hook == 'settings_page_' . self::SETTINGS_MENU_SLUG ||\n\t\t\t( $this->setting_show_on_dashboard() && $hook == 'index.php' ) ||\n\t\t\t( $this->setting_show_as_page() && $hook == $basePrefix . '_page_simple_history_page' )\n\t\t) {\n\t\t\treturn true;\n\t\t} elseif ( $current_screen && $current_screen->base == 'dashboard' && $this->setting_show_on_dashboard() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public function onWpAdminMenu() {\n\t}", "function wp_admin_bar_recovery_mode_menu($wp_admin_bar)\n {\n }", "function thesis_openhooks_menu() {\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->add_menu(array(\n\t\t\t'id' => 'openhook',\n\t\t\t'title' => __('OpenHook'),\n\t\t\t'href' => admin_url('options-general.php?page=openhook&tab=tha')\n\t\t\t//'href' => $bloginfo('url')'/wp-admin/options-general.php?page=openhook&tab=tha'\n\t));\n}", "public function deprecated_adminpage_hook() {\n\t\tadd_submenu_page( 'themes.php', __( 'Avada Options have moved!', 'Avada' ), __( 'Avada Options', 'Avada' ), 'switch_themes', 'optionsframework', [ $this, 'deprecated_adminpage' ] );\n\t\tremove_submenu_page( 'themes.php', 'optionsframework' );\n\t}", "public function load_admin_scripts( $hook ) {\n\n\t\t$script = SCRIPT_DEBUG\n\t\t\t? ENDA_WOOCOMMERCE_URL . 'assets/admin.js'\n\t\t\t: ENDA_WOOCOMMERCE_URL . 'assets/admin.min.js';\n\n\t\twp_register_script(\n\t\t\t'woocommerce_bundle_rate_shipping_admin_js',\n\t\t\t$script,\n\t\t\tarray( 'jquery' ),\n\t\t\t$this->version\n\t\t);\n\n\t\twp_register_style(\n\t\t\t'woocommerce_bundle_rate_shipping_admin_css',\n\t\t\tENDA_WOOCOMMERCE_URL . 'assets/admin.css',\n\t\t\tarray(),\n\t\t\t$this->version,\n\t\t\tfalse\n\t\t);\n\n\t\t// Only load the Javascript and CSS on the wpsc settings page\n\t\t$possible_hooks = array(\n\t\t\t'toplevel_page_woocommerce',\n\t\t\t'woocommerce_page_woocommerce_settings',\n\t\t\t'woocommerce_page_wc-settings',\n\t\t);\n\n\t\tif ( class_exists( 'WC_Branding' ) ) {\n\n\t\t\t$brand = get_option( 'woocommerce_branding_name', get_bloginfo( 'name' ) );\n\n\t\t\tif ( 0 == strlen( $brand ) ) {\n\t\t\t\t$brand = get_bloginfo( 'name' );\n\t\t\t}\n\n\t\t\t$possible_hooks[] = sanitize_title( $brand ) . '_page_woocommerce_settings';\n\n\t\t}\n\n\t\tif ( in_array( $hook, $possible_hooks ) ) {\n\n\t\t\twp_enqueue_script( 'woocommerce_bundle_rate_shipping_admin_js' );\n\t\t\twp_enqueue_style( 'woocommerce_bundle_rate_shipping_admin_css' );\n\n\t\t}\n\t}", "private function hooks() {\n\n\t\t$plugin_admin = shortbuild_bu_hooks();\n add_filter( 'advanced_import_demo_lists', array( $plugin_admin, 'add_demo_lists' ), 10, 1 );\n add_filter( 'admin_menu', array( $plugin_admin, 'import_menu' ), 10, 1 );\n add_filter( 'wp_ajax_shortbuild_bu_getting_started', array( $plugin_admin, 'install_advanced_import' ), 10, 1 );\n add_filter( 'admin_enqueue_scripts', array( $plugin_admin, 'enqueue_styles' ), 10, 1 );\n add_filter( 'admin_enqueue_scripts', array( $plugin_admin, 'enqueue_scripts' ), 10, 1 );\n\n /*Replace terms and post ids*/\n add_action( 'advanced_import_replace_term_ids', array( $plugin_admin, 'replace_term_ids' ), 20 );\n }", "protected function checkTranslatedShortcut() {}", "private function dc_define_admin_hooks() {\n\n\t\t$plugin_admin = new Dorancafe_Admin( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'dc_enqueue_styles' );\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'dc_enqueue_scripts' );\n\n\t}", "public function register_hooks() {\n\t\tadd_action( 'admin_init', [ $this, 'intercept_save_update_notification' ] );\n\t}", "function load_admin_script() {\r\n\r\n\t\t\t$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';\r\n\r\n\t\t\twp_enqueue_script( 'wc-tfls-admin', plugin_dir_url( TFLS_FILE ) . 'assets/js/tfls-admin' . $suffix . '.js', array( 'jquery' ), WC_VERSION, true );\r\n\r\n\t\t}", "public function getHookAreaPrefix()\n {\n return 'rkbulletinmodule.ui_hooks.events';\n }", "protected function checkPageIndexingHook() {\n\t\t$hooking = implode('</li><li>',$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageIndexing']);\n\t\t$hookCount = count($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['pageIndexing']);\n\n\t\tif($hookCount > 1) {\n\t\t\t$this->reports[] = t3lib_div::makeInstance('tx_reports_reports_status_Status',\n\t\t\t\t'Hook: pageIndexing', // title\n\t\t\t\tsprintf('%d classes use this hook', $hookCount),\n\t\t\t\t'Make sure the classes calling the hook don\\'t influence each other negatively.<br /><ol><li>'.$hooking.'</li></ol>' , //message\n\t\t\t\ttx_reports_reports_status_Status::INFO //severity\n\t\t\t);\n\t\t} else {\n\t\t\t$this->reports[] = t3lib_div::makeInstance('tx_reports_reports_status_Status',\n\t\t\t\t'Hook: pageIndexing', // title\n\t\t\t\t'OK',\n\t\t\t\tTx_CzWkhtmltopdf_Config::EXTKEY.' is the only extension using this hook.' , //message\n\t\t\t\ttx_reports_reports_status_Status::OK //severity\n\t\t\t);\n\t\t}\n\t}", "public function add_hook () {\n\n\t\tadd_action( 'plugins_loaded', array(&$this,'check_version') );\n\t\tadd_action( 'wp_loaded', array(&$this,'add_archive_rewrite_rules'), 99 );\n\t\tadd_action( 'wp_loaded', array(&$this,'add_tax_rewrite_rules') );\n\t\tadd_action( 'wp_loaded', array(&$this, \"dequeue_flush_rules\"),100);\n\t\tadd_action( 'parse_request', array(&$this, \"parse_request\") );\n\t\tadd_action( 'registered_post_type', array(&$this,'registered_post_type'), 10, 2 );\n\n\n\t\tif(get_option( \"permalink_structure\") != \"\") {\n\t\t\tadd_filter( 'post_type_link', array(&$this,'post_type_link'), 10, 4 );\n\t\t\tadd_filter( 'getarchives_join', array(&$this,'getarchives_join'), 10, 2 ); // [steve]\n\t\t\tadd_filter( 'getarchives_where', array(&$this,'getarchives_where'), 10 , 2 );\n\t\t\tadd_filter( 'get_archives_link', array(&$this,'get_archives_link'), 20, 1 );\n\t\t\tadd_filter( 'term_link', array(&$this,'term_link'), 10, 3 );\n\t\t\tadd_filter( 'attachment_link', array(&$this, 'attachment_link'), 20 , 2);\n\t\t}\n\n\n\t\tadd_action( 'init', array(&$this,'load_textdomain') );\n\t\tadd_action( 'init', array(&$this, 'update_rules') );\n\t\tadd_action( 'update_option_cptp_version', array(&$this, 'update_rules') );\n\t\tadd_action( 'admin_init', array(&$this,'settings_api_init'), 30 );\n\t\tadd_action( 'admin_enqueue_scripts', array(&$this,'enqueue_css_js') );\n\t\tadd_action( 'admin_footer', array(&$this,'pointer_js') );\n\n\n\t}", "private function define_admin_hooks() {\n\t\t$plugin_admin = new MySuperCalendar_Admin( $this->get_plugin_name() );\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n\t\t$this->loader->add_action( 'init', $plugin_admin, 'register_Calendar_post_type' );\n\t\t$this->loader->add_action( 'add_meta_boxes', $plugin_admin, 'add_datepicker_meta_box' );\n\t\t$this->loader->add_action( 'save_post', $plugin_admin, 'save_calendar_post' );\n\t\t$this->loader->add_action( 'admin_menu', $plugin_admin, 'register_plugin_menu_page' );\n\n\n\t}", "function <%= functionPrefix %>_remove_admin_bar() {\n return false;\n}", "function enqueue_script($hook){\n\t\t\t\tif( strpos($hook, 'page_' . $this->settings['slug']) !== false ){\n\t\t\t\t\t\t\n\t\t\t\t\tgdlr_core_include_utility_script();\n\n\t\t\t\t\t// include the admin style\n\t\t\t\t\twp_enqueue_style('font-awesome', GDLR_CORE_URL . '/plugins/font-awesome/css/font-awesome.min.css');\n\t\t\t\t\twp_enqueue_style('gdlr-core-getting-start', GDLR_CORE_URL . '/framework/css/getting-start.css');\n\t\t\t\t\twp_enqueue_style('open-sans-css', 'https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic&subset=latin,latin-ext');\n\t\t\t\t\t\n\t\t\t\t\t// include the admin script\n\t\t\t\t\twp_enqueue_script('gdlr-core-getting-start', GDLR_CORE_URL . '/framework/js/getting-start.js', array('jquery'), false, true);\n\t\t\t\t\twp_localize_script('gdlr-core-getting-start', 'gdlr_core_ajax_message', array(\n\t\t\t\t\t\t'ajaxurl' => GDLR_CORE_AJAX_URL,\n\t\t\t\t\t\t'error_head' => esc_html__('An error occurs', 'goodlayers-core'),\n\t\t\t\t\t\t'error_message' => esc_html__('Please try again. If the problem still persists, please contact administrator for this.', 'goodlayers-core'),\n\t\t\t\t\t\t'nonce' => wp_create_nonce('gdlr_core_demo_import'),\n\n\t\t\t\t\t\t'importing_head' => esc_html__('Importing demo content. Please wait...', 'goodlayers-core'),\n\t\t\t\t\t\t'importing_content' => esc_html__('If you choose to download images from demo site, it can take up to 7-8 minutes so please be patient.', 'goodlayers-core'),\n\t\t\t\t\t));\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}", "public function admin_script() {\n\n\t\tglobal $itsec_globals;\n\n\t\tif ( isset( get_current_screen()->id ) && strpos( get_current_screen()->id, 'security_page_toplevel_page_itsec_settings' ) !== false ) {\n\n\t\t\t$new_slug = get_site_option( 'itsec_hide_backend_new_slug' );\n\n\t\t\tif ( $new_slug !== false ) {\n\n\t\t\t\tdelete_site_option( 'itsec_hide_backend_new_slug' );\n\n\t\t\t\t$new_slug = get_site_url() . '/' . $new_slug;\n\n\t\t\t\t$slug_text = sprintf(\n\t\t\t\t\t'%s%s%s%s%s',\n\t\t\t\t\t__( 'Warning: Your admin URL has changed. Use the following URL to login to your site', 'it-l10n-ithemes-security-pro' ),\n\t\t\t\t\tPHP_EOL . PHP_EOL,\n\t\t\t\t\t$new_slug,\n\t\t\t\t\tPHP_EOL . PHP_EOL,\n\t\t\t\t\t__( 'Please note this may be different than what you sent as the URL was sanitized to meet various requirements. A reminder has also been sent to the notification email(s) set in this plugins global settings.', 'it-l10n-ithemes-security-pro' )\n\t\t\t\t);\n\n\t\t\t\t$this->send_new_slug( $new_slug );\n\n\t\t\t} else {\n\t\t\t\t$slug_text = false;\n\t\t\t}\n\n\t\t\tsprintf(\n\t\t\t\t'%s %s %s',\n\t\t\t\t__( 'Warning: Your admin URL has changed. Use the following URL to login to your site', 'it-l10n-ithemes-security-pro' ),\n\t\t\t\tget_site_url() . '/' . $new_slug,\n\t\t\t\t__( 'Please note this may be different than what you sent as the URL was sanitized to meet various requirements.', 'it-l10n-ithemes-security-pro' )\n\t\t\t);\n\n\t\t\twp_enqueue_script( 'itsec_hide_backend_js', $this->module_path . 'js/admin-hide-backend.js', array( 'jquery' ), $itsec_globals['plugin_build'] );\n\t\t\twp_localize_script(\n\t\t\t\t'itsec_hide_backend_js',\n\t\t\t\t'itsec_hide_backend',\n\t\t\t\tarray(\n\t\t\t\t\t'new_slug' => $slug_text,\n\t\t\t\t)\n\t\t\t);\n\n\t\t}\n\n\t}", "private function define_admin_hooks() {\n\n\t\t$plugin_admin = new Service_Tracker_Admin( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'localize_scripts' );\n\n\t\t$this->loader->add_action( 'admin_menu', $plugin_admin, 'admin_page' );\n\n\t}", "function is_hook_handled($namespace, $hook)\n\t{\n\t global $CONFIG;\n\n\t // Turn highchair/elgg style wildcards into correct ones.\n\t $namespace = str_replace('*','.*',$namespace);\n\t $namespace = str_replace('/','\\/',$namespace);\n\t $namespace = '/^'.str_replace('all','.*',$namespace).'$/';\n\n\t $hook = str_replace('*','.*',$hook);\n\t $hook = str_replace('/','\\/',$hook);\n\t $hook = '/^'.str_replace('all','.*',$hook).'$/';\n\n\t return isset($CONFIG->_HOOKS[$namespace][$hook]);\n\t}", "function show_admin_notice() {\n\tif ( 'plugins' !== get_current_screen()->base || function_exists( '\\Customize_Nav_Menu_Item_Custom_Fields\\customize_controls_enqueue_scripts' ) ) {\n\t\treturn;\n\t}\n\t?>\n\t<div class=\"error\">\n\t\t<p>\n\t\t\t<?php esc_html_e( 'The Customize Nav Menu Item Custom Field Examples plugin depends on the Customize Nav Menu Item Custom Fields plugin.', 'customize-nav-menu-item-custom-fields' ); ?>\n\t\t</p>\n\t</div>\n\t<?php\n}", "public function register_hooks() {\n\t\tadd_action( 'admin_init', [ $this, 'admin_init' ] );\n\t}", "public function register_hooks() {\n\t\tif ( \\intval( \\get_option( 'duplicate_post_show_original_meta_box' ) ) === 1\n\t\t\t|| \\intval( \\get_option( 'duplicate_post_show_original_column' ) ) === 1 ) {\n\t\t\t\\add_action( 'save_post', [ $this, 'delete_on_save_post' ] );\n\t\t}\n\t}", "function qpi_admin_enqueue_scripts( $hook_suffix ) {\n\tif ( 'plugin-install.php' == $hook_suffix ) {\n\t\twp_enqueue_script( 'qpi-script', plugin_dir_url( __FILE__ ) . 'quick-plugin-installer.js', array( 'jquery' ) );\n\t\twp_localize_script( 'qpi-script', 'QPI', array(\n\t\t\t'activated' => __( 'Activated', 'qpi-i18n' ),\n\t\t\t'error' => __( 'Error', 'qpi-i18n' ),\n\t\t) );\n\t}\n}", "public function bsp_admin_enqueue($hook) {\n\n\t\t// load in entire admin area \n\t\twp_enqueue_style( 'BSP-admin-styles', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'style.css', '', false );\n\t\t// Select 2 boxes \n\t\twp_enqueue_style( 'select-22-styles', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'css/select2-custom.min.css', '', false );\n\t\twp_enqueue_script( 'select-22-script', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/select2-custom.min.js' );\n\t\twp_enqueue_script( 'BSP-admin-post-page-edit', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/wp-post-page-tools.js', \"\", true );\n\t\twp_enqueue_style( 'font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', '', false );\n\t\twp_enqueue_style( 'BSP-edit', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"] . 'bsp-edit.css', array('font-awesome'), false );\n\t\t// Ace Code editor\n\t\twp_enqueue_script( 'ace-code-editor', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ace.js' );\n\t\twp_enqueue_script( 'ace-code-editor-mode-less', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/mode-less.js' );\n\t\twp_enqueue_script( 'ace-code-editor-mode-css', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/mode-css.js' );\n\t\twp_enqueue_script( 'ace-code-editor-bsp-theme', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/theme-custom.js' );\n\t\twp_enqueue_script( 'ace-code-editor-autocomplete', 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.3/ext-language_tools.js' );\n\t\t // If its not the main post page then exit now\n\t\tif ( 'toplevel_page_blog-styles-pro-menu' != $hook && 'wpe-dashboard_page_blog-styles-pro-menu' != $hook ) {\n\t\t\treturn;\n\t\t}\n\t\t// Only if it exists on the admin main page \n\t\twp_enqueue_media();\n\t\twp_enqueue_script( 'toastr', 'https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js' );\n\t\twp_enqueue_style( 'toastr-style', \"https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css\", '', false );\n\t\twp_enqueue_script( 'BSP-admin-config', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/config.js' );\n\t\twp_enqueue_script( 'BSP-admin-script', WPEXPANSE_Blog_Styles_Pro::$plugin_data[\"this-root\"].'js/functions.js', array('jquery', 'toastr', 'media-upload'));\n\n\t}", "function hook_admin_notices() {\r\n\t\tglobal $pagenow;\r\n\r\n\t\t// Check if API key entered; it may be in process of being updated\r\n\t\tif (isset($_POST['api_key_developer']))\r\n\t\t\t$key = $_POST['api_key_developer'];\r\n\t\telse\r\n\t\t\t$key = $this->get_array_option('api_key_developer', 'foliamaptool_options');\r\n\r\n\t\tif (empty($key)) {\r\n\t\t\techo \"<div id='error' class='error'><p>\"\r\n\t\t\t. __(\"FoliaMapTool isn't ready yet. Please enter your FoliaMapTool on the \", 'foliamaptool')\r\n\t\t\t. \"<a href='options-general.php?page=foliamaptool'>\"\r\n\t\t\t. __(\"FoliaMapTool options screen.\", 'foliamaptool') . \"</a></p></div>\";\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "function get_plugin_page_hookname($plugin_page, $parent_page)\n {\n }", "function adventure_admin_enqueue_scripts( $hook_suffix ) {\r\n\twp_enqueue_style('adventure-theme-options', get_template_directory_uri() . '/theme-options.css', false, '1.0');}", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "function is_options_save_page()\n{\n $self = $_SERVER['PHP_SELF'];\n $request = $_SERVER['REQUEST_URI'];\n\n return stripos($self, 'options.php') !== false || stripos($request, 'options.php') !== false;\n}", "public function setActionSuffix($actionSuffix);", "function sp_admin_scripts( $hook ) {\n\n\t//Custom javascript working on Shortcodes Manager popup\n\tif( $hook == 'post.php' || $hook == 'post-new.php' ) {\n\t\twp_register_script( 'tinymce_scripts', SP_BASE_URL . 'framework/shortcodes/tinymce/js/scripts.js', array('jquery'), false, true );\n\t\twp_enqueue_script('tinymce_scripts');\n\t}\n\n}", "function admin_enqueue_scripts($hook) {\n if( \"toplevel_page_wp-plugin-sample\" == $hook ){\n wp_enqueue_script('wp-plugin-sample-email-search', plugins_url(\"js/ajax-email-search.js\", __FILE__), array('jquery'), '20160627');\n }\n }", "function ecapi_admin_intercept() {\r\n\tif( $_SERVER['REQUEST_METHOD'] === 'POST' \r\n\t\t&& array_key_exists('page', $_POST) && 'ecapi-config' === $_POST['page'] ) \r\n\t\tecapi_config_page();\r\n}", "function hook_admin_menu() {\r\n\t\t// Add menu\r\n\t\t$mypage = add_options_page('Foliamaptool', 'Foliamaptool', 'manage_options', 'foliamaptool', array(&$this, 'admin_menu'));\r\n\t\t$this->plugin_page = $mypage;\r\n\r\n\t\t// Post edit shortcode boxes - note that this MUST be admin_menu call\r\n\t\tadd_meta_box('foliamaptool', 'Foliamaptool', array(&$this, 'meta_box'), 'post', 'normal', 'high');\r\n\t\tadd_meta_box('foliamaptool', 'Foliamaptool', array($this, 'meta_box'), 'page', 'normal', 'high');\r\n\r\n\t\t// Add scripts & styles for admin pages\r\n\t\tadd_action(\"admin_print_scripts-$mypage\", array(&$this, 'hook_admin_print_scripts'));\r\n\t\tadd_action(\"admin_print_scripts-post.php\", array(&$this, 'hook_admin_print_scripts'));\r\n\t\tadd_action(\"admin_print_scripts-post-new.php\", array(&$this, 'hook_admin_print_scripts'));\r\n\t\tadd_action(\"admin_print_scripts-page.php\", array(&$this, 'hook_admin_print_scripts'));\r\n\t\tadd_action(\"admin_print_scripts-page-new.php\", array(&$this, 'hook_admin_print_scripts'));\r\n\r\n\t\tadd_action(\"admin_print_styles-$mypage\", array(&$this, 'hook_admin_print_styles'));\r\n\t\tadd_action(\"admin_print_styles-post.php\", array(&$this, 'hook_admin_print_styles'));\r\n\t\tadd_action(\"admin_print_styles-post-new.php\", array(&$this, 'hook_admin_print_styles'));\r\n\t\tadd_action(\"admin_print_styles-page.php\", array(&$this, 'hook_admin_print_styles'));\r\n\t\tadd_action(\"admin_print_styles-page-new.php\", array(&$this, 'hook_admin_print_styles'));\r\n\t}", "function siteorigin_panels_add_help_tab($prefix) {\n\t$screen = get_current_screen();\n\tif(\n\t\t( $screen->base == 'post' && ( in_array( $screen->id, siteorigin_panels_setting( 'post-types' ) ) || $screen->id == '') )\n\t\t|| ($screen->id == 'appearance_page_so_panels_home_page')\n\t) {\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'panels-help-tab', //unique id for the tab\n\t\t\t'title' => __( 'Page Builder', 'positive-panels' ), //unique visible title for the tab\n\t\t\t'callback' => 'siteorigin_panels_add_help_tab_content'\n\t\t) );\n\t}\n}", "function it_exchange_custom_url_tracking_addon_admin_wp_enqueue_styles( $hook_suffix, $post_type ) {\n\tif ( isset( $post_type ) && 'it_exchange_prod' === $post_type ) {\n\t\twp_enqueue_style( 'it-exchange-custom-url-tracking-addon-add-edit-product', ITUtility::get_url_from_file( dirname( __FILE__ ) ) . '/lib/styles/add-edit-product.css' );\n\t}\n}", "private function should_enqueue( $hook ) {\n\t\tif ( is_network_admin() && Helper::is_plugin_active_for_network() ) {\n\t\t\treturn 'toplevel_page_rank-math' === $hook;\n\t\t}\n\n\t\treturn 'rank-math_page_rank-math-status' === $hook;\n\t}", "function on_admin_menu ()\n{\n global $cap_collation_name;\n\n // adds a menu entry to the dashboard menu\n add_submenu_page (\n 'index.php',\n $cap_collation_name . ' Dashboard',\n $cap_collation_name,\n 'edit_pages',\n DASHBOARD_PAGE_ID,\n __NAMESPACE__ . '\\on_menu_dashboard_page'\n );\n}", "public function print_admin_notice() {\n\t\tglobal $hook_suffix, $post_type;\n\n\t\t// Only need for certain screens.\n\t\tif ( ! in_array( $hook_suffix, [ 'edit.php', 'plugins.php' ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Only for the schedule post type.\n\t\tif ( 'edit.php' == $hook_suffix && 'schedule' != $post_type ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Only for version < 4.7, when API was introduced.\n\t\t$version = get_bloginfo( 'version' );\n\t\tif ( $version >= 4.7 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Let us know if the REST API plugin, which we depend on, is not active.\n\t\tif ( ! is_plugin_active( 'WP-API/plugin.php' ) && ! is_plugin_active( 'rest-api/plugin.php' ) ) :\n\n\t\t\t?>\n <div class=\"updated notice\">\n <p><?php printf( __( 'The %1$s plugin depends on the %2$s plugin, version 2.0. %3$sPlease activate this plugin%4$s.', 'conf-schedule' ), 'Conference Schedule', 'REST API', '<a href=\"' . admin_url( 'plugins.php' ) . '\">', '</a>' ); ?></p>\n </div>\n\t\t<?php\n\n\t\tendif;\n\n\t}", "public function admin_scripts( $hook ) {\n\t\t// This is still 'widgets.php' when managing widgets via the Customizer.\n\t\tif ( 'widgets.php' === $hook ) {\n\t\t\twp_enqueue_script(\n\t\t\t\t'twitter-timeline-admin',\n\t\t\t\tAssets::get_file_url_for_environment(\n\t\t\t\t\t'_inc/build/widgets/twitter-timeline-admin.min.js',\n\t\t\t\t\t'modules/widgets/twitter-timeline-admin.js'\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "public static function load_current_page_hook_slug($hook = 'load-'){\r\n global $pagenow;\r\n return $hook.$pagenow;\r\n }", "public function hook() {\n\t\tadd_action( 'admin_print_scripts', [ $this, 'admin_scripts' ] );\n\t\t// Elementor support.\n\t\tadd_action( 'elementor/editor/after_enqueue_scripts', [ $this, 'admin_scripts' ] );\n\t\t// UGH! Beaver Builder hack.\n\t\tif ( isset( $_GET['fl_builder'] ) ) { // phpcs:ignore\n\t\t\tadd_action( 'wp_enqueue_scripts', [ $this, 'admin_scripts' ] );\n\t\t}\n\n\t\tadd_action( 'advanced-sidebar-menu/widget/category/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t\tadd_action( 'advanced-sidebar-menu/widget/page/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t\tadd_action( 'advanced-sidebar-menu/widget/navigation-menu/after-form', [ $this, 'init_widget_js' ], 1000 );\n\t}", "public function actionAdminScripts( $hook ) {\n\t\t\t$this->scripts->connect();\n\t\t\t$this->styles->connect();\n\t\t}", "function admin_menu() {\n\t\tif ( class_exists( 'Jetpack' ) )\n\t\t\tadd_action( 'jetpack_admin_menu', array( $this, 'load_menu' ) );\n\t\telse\n\t\t\t$this->load_menu();\n\t}", "private function admin_page_notices() {\n\t\tif ( ! isset( $_POST['_wpnonce'] ) || ! wp_verify_nonce( sanitize_key( wp_unslash( $_POST['_wpnonce'] ) ), 'gu_settings' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$display = isset( $_POST['install_api_plugin'] ) && '1' === $_POST['install_api_plugin'];\n\t\tif ( $display ) {\n\t\t\techo '<div class=\"updated\"><p>';\n\t\t\tesc_html_e( 'Git Updater API plugin installed.', 'git-updater' );\n\t\t\techo '</p></div>';\n\t\t}\n\t}", "function add_admin() {\n\t\t\t$this->pagehook = add_options_page(\n\t\t\t\t\t__( \"Subpages as Tabs\" )\n\t\t\t\t\t, __( \"Subpages as Tabs\" )\n\t\t\t\t\t, 'manage_options'\n\t\t\t\t\t, 'subpage_tabs_plugin'\n\t\t\t\t\t, array( $this, 'plugin_options_page' )\n\t\t\t\t);\n\n\t\t\t//register callback to gets call prior your options_page rendering\n\t\t\tadd_action( 'load-' . $this->pagehook, array( &$this, 'add_the_meta_boxes' ) );\n\t\t}", "function worldlogger_admin_warnings() {\n\tglobal $wpcom_api_key;\n\tif ( !get_option('worldlogger_hash') && !isset($_POST['submit']) ) {\n\t\tfunction worldlogger_warning() {\n\t\t\techo \"\n\t\t\t<div id='worldlogger-warning' class='updated fade'><p><strong>\".__('Worldlogger is almost ready.').\"</strong> \".sprintf('You must <a href=\"%1$s\">enter a Worldlogger API key</a> for it to work.', \"options-general.php?page=worldlogger-options\").\"</p></div>\n\t\t\t\";\n\t\t}\n\t\tadd_action('admin_notices', 'worldlogger_warning');\n\t\treturn;\n\t}\n}", "private function define_admin_hooks() {\n\t\t$plugin_admin = new TTR66_Admin( $this->get_plugin_name(), $this->get_version() );\n\n\t\t// Add the TTR66 dash widget and XML upload page/menu\n\t\t$this->loader->add_action( 'wp_dashboard_setup', $plugin_admin, 'add_dashboard_widget');\n\t\t$this->loader->add_action( 'admin_menu', $plugin_admin, 'register_custom_menu_page' );\n\t}", "function tb_string_swap_rolescheck() {\n\tif ( current_user_can( 'edit_theme_options' ) ) {\n\t\tadd_action( 'admin_init', 'tb_string_swap_init' );\n\t\tadd_action( 'admin_menu', 'tb_string_swap_add_page');\n\t}\n}", "public function enqueue_admin_scripts( $hook ) {\n\n\t\tif ( ! $this->condition() ) {\n\t\t\treturn;\n\t\t}\n\n\t\twp_enqueue_script(\n\t\t\t$this->args['page_slug'],\n\t\t\tplugins_url( '/', __FILE__ ) . '/js/scripts.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.0'\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\t$this->args['page_slug'],\n\t\t\tplugins_url( '/', __FILE__ ) . '/css/styles.css',\n\t\t\tarray(),\n\t\t\t'1.0'\n\t\t);\n\n\t\twp_localize_script( $this->args['page_slug'], 'wp_sh_plugin_browser_admin_l18n', array(\n\t\t\t'ajaxurl' => admin_url('admin-ajax.php'),\n\t\t\t'ajax_nonce' => wp_create_nonce('wp_sh_plugin_browser_nonce'),\n\t ) );\n\t}", "public function load_hooks() {\n\t\tadd_action( 'admin_init', [ $this, 'addons_page_init' ] );\n\n\t\t$this->add_settings_tabs();\n\t}", "public static function admin_enqueue_scripts( $hook ) {\n\t\t$hook_to_check = sb_is_hpos_enabled() ? wc_get_page_screen_id( 'shop-order' ) : 'post.php';\n\t\tif ( $hook_to_check === $hook ) {\n\t\t\t// Scripts\n\t\t\t$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';\n\t\t\twp_register_script(\n\t\t\t\t'swedbank-pay-admin-js',\n\t\t\t\tplugin_dir_url( __FILE__ ) . '../assets/js/admin' . $suffix . '.js'\n\t\t\t);\n\n\t\t\t// Localize the script\n\t\t\t$translation_array = array(\n\t\t\t\t'ajax_url' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t'text_wait' => __( 'Please wait...', 'swedbank-pay-woocommerce-checkout' ),\n\t\t\t);\n\t\t\twp_localize_script( 'swedbank-pay-admin-js', 'SwedbankPay_Admin', $translation_array );\n\n\t\t\t// Enqueued script with localized data\n\t\t\twp_enqueue_script( 'swedbank-pay-admin-js' );\n\t\t}\n\t}", "function pw_load_scripts($hook) {\n\n//load js only with specified hooks\nif( !is_admin() && $hook != 'post.php' OR !is_admin() && $hook != 'post-new.php' )\nreturn;\n// now check to see if the $post type is 'fzproject_post'\nglobal $post;\nif ( !isset($post) || 'fzproject_post' != $post->post_type )\nreturn;\n\nwp_register_script('fzproject_admin_script', plugins_url('admin.js', __FILE__)); \n// enqueue \nwp_enqueue_script('jquery'); \nwp_enqueue_script('fzproject_admin_script');\n\n}", "function wlabarron_saml_intercept_admin() {\n\tif ( isset( $_GET['access'] ) && $_GET['access']=='denied' ) {\n\t\tyourls_add_notice('Access Denied');\n\t}\n\n\t// Intercept requests for plugin management\n\tif(isset( $_SERVER['REQUEST_URI'] ) &&\n\t preg_match('/\\/admin\\/plugins/', $_SERVER['REQUEST_URI'] ) ) {\n \n if (!wlabarron_saml_is_user_in_config()) {\n yourls_redirect( yourls_admin_url( '?access=denied' ), 302 );\n }\n\t}\n}", "private function define_admin_hooks() {\n\t\t$plugin_admin = new Soisy_Pagamento_Rateale_Admin( $this->get_plugin_name(), $this->get_version() );\n\n\t\t$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );\n $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );\n $this->loader->add_filter( 'woocommerce_payment_gateways', $plugin_admin, 'payment_methods' );\n\t\t\n $this->loader->add_filter( 'soisy_settings', $plugin_admin, 'soisy_vars' );\n\t\t\n\t\t$this->loader->add_filter('plugin_action_links', $plugin_admin,'add_soisy_action_links', 10, 2);\n\t\t\n\t\t/*\n\t\t * Payments Gateways extend WC_Payment_Gateway\n\t\t * To have them work properly they must be hooked to 'plugins_loaded'\n\t\t */\n add_action( 'plugins_loaded', 'init_Soisy_Pagamento_Rateale_Gateway_Settings');\n\t}", "public function adminEnqueueScripts($hook = '') {\n\n if (isset($_GET['page']) && $_GET['page'] == 'vcht-console') {\n global $wpdb;\n\n $settings = $this->getSettings();\n\n wp_register_script($this->_token . '-flat-ui', esc_url($this->assets_url) . 'js/flat-ui-pro.min.js', array(), $this->_version);\n wp_enqueue_script($this->_token . '-flat-ui');\n wp_register_script($this->_token . '-datatable', esc_url($this->parent->assets_url) . 'js/jquery.dataTables.min.js', array(), $this->_version);\n wp_enqueue_script($this->_token . '-datatable');\n wp_register_script($this->_token . '-bootstrap-datatable', esc_url($this->assets_url) . 'js/dataTables.bootstrap.min.js', array($this->_token . '-datatable'), $this->_version);\n wp_enqueue_script($this->_token . '-bootstrap-datatable');\n wp_register_script($this->_token . '-customScrollbar', esc_url($this->assets_url) . 'js/jquery.mCustomScrollbar.concat.min.js', array('jquery'));\n wp_enqueue_script($this->_token . '-customScrollbar');\n wp_register_script($this->_token . '-dropzone', esc_url($this->assets_url) . 'js/dropzone.min.js', array('jquery'));\n wp_enqueue_script($this->_token . '-dropzone');\n wp_register_script($this->_token . '-colpick', esc_url($this->assets_url) . 'js/colpick.min.js', array('jquery'), $this->_version);\n wp_enqueue_script($this->_token . '-colpick');\n wp_register_script($this->_token . '-mousetrap', esc_url($this->assets_url) . 'js/mousetrap.min.js', 'jquery', $this->_version);\n wp_enqueue_script($this->_token . '-mousetrap');\n wp_enqueue_script('media-upload');\n wp_enqueue_script('thickbox');\n wp_register_script($this->_token . '-admin', esc_url($this->assets_url) . 'js/admin.min.js', array('jquery',\n 'jquery-ui-core',\n 'jquery-ui-mouse',\n 'jquery-ui-position',\n 'jquery-ui-droppable',\n 'jquery-ui-draggable',\n 'jquery-ui-resizable',\n 'jquery-ui-sortable',\n 'jquery-effects-core',\n 'jquery-effects-drop',\n 'jquery-effects-fade',\n 'jquery-effects-bounce',\n 'jquery-effects-slide',\n 'jquery-effects-blind'), $this->_version);\n wp_enqueue_script($this->_token . '-admin');\n\n $texts = array(\n 'Yes' => __('Yes', 'WP_Visual_Chat'),\n 'No' => __('No', 'WP_Visual_Chat'),\n 'Online' => __('Online', 'WP_Visual_Chat'),\n 'Offline' => __('Offline', 'WP_Visual_Chat'),\n 'Log in' => __('Log in', 'WP_Visual_Chat'),\n 'Log out' => __('Log out', 'WP_Visual_Chat'),\n 'Drop files to upload here' => __('Drop files to upload here', 'WP_Visual_Chat'),\n 'File is too big (max size: {{maxFilesize}}MB)' => __('File is too big (max size: {{maxFilesize}}MB)', 'WP_Visual_Chat'),\n 'Invalid file type' => __('Invalid file type', 'WP_Visual_Chat'),\n 'You can not upload any more files' => __('You can not upload any more files', 'WP_Visual_Chat'),\n 'Shows an element of the website' => __('Shows an element of the website', 'WP_Visual_Chat'),\n 'remove' => __('Remove', 'WP_Visual_Chat'),\n 'display' => __('Display', 'WP_Visual_Chat'),\n 'search' => __('Search', 'WP_Visual_Chat'),\n 'showingPage' => sprintf(__('Showing page %1$s of %2$s', 'WP_Visual_Chat'), '_PAGE_', '_PAGES_'),\n 'filteredFrom' => sprintf(__('- filtered from %1$s documents', 'WP_Visual_Chat'), '_MAX_'),\n 'noRecords' => __('No documents to display', 'WP_Visual_Chat'),\n 'Do you want to reply ?' => __('Do you want to reply ?', 'WP_Visual_Chat'),\n 'New chat request from' => __('New chat request from', 'WP_Visual_Chat'),\n 'Another operator has already answered' => __('Another operator has already answered', 'WP_Visual_Chat'),\n '[username] stopped the chat' => __('[username] stopped the chat', 'WP_Visual_Chat'),\n 'Current operator' => __('Current operator', 'WP_Visual_Chat'),\n '[username1] tranfers the chat to [username2]' => __('[username1] tranfers the chat to [username2]', 'WP_Visual_Chat'),\n );\n global $wpdb;\n $userID = 0;\n $userWP = wp_get_current_user();\n $rows = $wpdb->get_results(\"SELECT * FROM \" . $wpdb->prefix . \"vcht_users WHERE userID=\" . $userWP->ID);\n $user = array();\n if (count($rows) == 0) {\n $uploadFolderName = md5(uniqid());\n $user = array(\n 'userID' => $userWP->ID,\n 'clientID' => md5(uniqid()),\n 'username' => $userWP->display_name,\n 'email' => $userWP->user_email,\n 'uploadFolderName' => $uploadFolderName,\n 'lastActivity' => date('Y-m-d H:i:s'),\n 'isOnline' => true, 'isOperator' => true,\n 'imgAvatar' => $this->assets_url . 'img/administrator-48.png',\n 'ip' => $_SERVER['REMOTE_ADDR']);\n\n $wpdb->insert($wpdb->prefix . 'vcht_users', $user);\n $user = (object) $user;\n $userID = $wpdb->insert_id;\n } else {\n $userID = $rows[0]->id;\n }\n wp_localize_script($this->_token . '-admin', 'vcht_data', array(\n 'websiteUrl' => get_home_url(),\n 'uploadsUrl' => $this->uploads_url,\n 'assetsUrl' => $this->assets_url,\n 'operatorID' => $user->ID,\n 'trackingDelay' => $settings->trackingDelay,\n 'ajaxCheckDelay' => $settings->ajaxCheckDelay,\n 'allowFilesFromOperators' => $settings->allowFilesFromOperators,\n 'filesMaxSize' => $settings->filesMaxSize,\n 'allowedFiles' => $settings->allowedFiles,\n 'isAdmin' => current_user_can('manage_options'),\n 'enableGeolocalization' => $settings->enableGeolocalization,\n 'userID' => $userID,\n 'enableVisitorsTracking' => $settings->enableVisitorsTracking,\n 'texts' => $texts));\n }\n }" ]
[ "0.76223385", "0.73841524", "0.6958206", "0.68662363", "0.66337633", "0.64245725", "0.6328074", "0.6080796", "0.6050916", "0.60506064", "0.60356873", "0.60320854", "0.6026929", "0.59873134", "0.59858865", "0.59683275", "0.59680253", "0.5951908", "0.59442556", "0.59200114", "0.59168315", "0.59090775", "0.59058565", "0.5853437", "0.58353245", "0.5830751", "0.5813714", "0.5804455", "0.57961386", "0.57594156", "0.5753275", "0.57496595", "0.5744696", "0.57438815", "0.5720823", "0.57206905", "0.5714808", "0.57124174", "0.570573", "0.57030094", "0.5700494", "0.5693331", "0.56826395", "0.5673424", "0.56727195", "0.5664362", "0.56558573", "0.56536484", "0.56447333", "0.56400687", "0.5622937", "0.5618511", "0.56180716", "0.5608993", "0.560038", "0.5596605", "0.55964553", "0.5592512", "0.5583039", "0.55816627", "0.5572696", "0.5568689", "0.55679786", "0.55647004", "0.55583155", "0.55521125", "0.555068", "0.55503213", "0.5549474", "0.5549329", "0.55413055", "0.55413055", "0.55413055", "0.5537315", "0.553408", "0.55222267", "0.5519891", "0.55160034", "0.551509", "0.55148935", "0.5511715", "0.5507272", "0.55014294", "0.54966456", "0.54927635", "0.54920554", "0.54904646", "0.5479948", "0.547321", "0.5472789", "0.54691285", "0.5468868", "0.5465996", "0.5459639", "0.5458744", "0.54582727", "0.54561293", "0.54552245", "0.5454102", "0.545063", "0.5450045" ]
0.0
-1
ultima numero do sequencial dado pelo gerador
public function __construct($quantidadeRegistros, $valorTotal, $numeroSequencialRegistro) { $this->setQuantidadeRegistros($quantidadeRegistros); $this->setValorTotal($valorTotal); $this->setNumeroSequencialRegistro($numeroSequencialRegistro); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cria_seq()\n{\n global $db;\n $sql=\"SELECT max(seq_restauro) as valor from restauro where tombo = '$_REQUEST[pNum_registro]' and controle='$_REQUEST[controle]' and tipo=4 and interna='I'\";\n $db->query($sql);\n $res=$db->dados(); \n if($res['valor']==null){\n echo 1;}\n else{\n echo $res['valor']+1;}\n}", "public function calcularId(){\n\n $registros = PorcentajeBecaArancel::All();\n\n $max_valor = count($registros);\n\n\n if($max_valor > 0){\n\n $max_valor++;\n\n } else {\n\n $max_valor = 1;\n }\n\n return $max_valor;\n\n }", "public function getCodigoSequencial() {\n return $this->iCodigoSequencial;\n }", "public function getCodigo() {\n return $this->iSequencial;\n }", "function get_next_sequence($voucher_id)\n\t{\n\t\t$this->db->select_max('sequence');\n\t\t$this->db->where('voucher_id',$voucher_id);\n\t\t$res = $this->db->get('vouchers_products')->row();\n\t\treturn $res->sequence + 1;\n\t}", "private function devolverUltimoId()\n\t{\n\t\t$rta = 0;\n\n\t\tif(!empty($_SESSION['Producto']))\n\t\t{\n\t\t\t$rta=end($_SESSION['Producto'])->getId();\n\t\t}\n\n\t\treturn $rta + 1;\n\t}", "public function buscaridproximo()\r\n {\r\n\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n\r\n // eliminar el campo\r\n $result = $query->select('max(a.idagrupacion) as maximo')\r\n ->from('NomAgrupacion a')\r\n ->execute()\r\n ->toArray();\r\n\r\n $proximo = isset($result[0]['maximo']) ? $result[0]['maximo'] + 1 : 1;\r\n return $proximo;\r\n\r\n }", "function gen_id()\n{\ninclude('../../conexion.php');\n$cod1=mysql_query(\"SELECT IFNULL(max(NRO_FACTURA+1),1) AS ID FROM BOLETA WHERE PROCESO='2'\",$conexion);\n$r2=mysql_fetch_array($cod1);\nreturn $r2['ID'];\n}", "public function getNomorUrut(){\n $next_nomor_urut = DB::table('wp_wr')->max('wp_wr_no_urut');\n // $next_nomor_urut = DB::table('wp_wr')->max('wp_wr_no_urut');\n $next_nomor_urut++;\n // $next_nomor_urut = DB::table('wp_wr')->select(DB::raw('COALESCE(MAX(wp_wr_no_urut::INT),0) + 1'))->get();\n\n // print_r($next_nomor_urut);\n if (!empty($next_nomor_urut) && $next_nomor_urut <= 9999999) {\n if (strlen($next_nomor_urut) < 7) {\n $selisih = 7 - strlen($next_nomor_urut);\n for ($i = 1; $i <= $selisih; $i++) {\n $next_nomor_urut = \"0\" . $next_nomor_urut;\n }\n }\n return $next_nomor_urut;\n } elseif ($next_nomor_urut > 9999999) {\n return \"salah\";\n }\n }", "public function getSequence(): int\n {\n return $this->sequence;\n }", "public function getSequenceNumber();", "public function getSequenceNumber();", "public function getNextSeq(): int\n\t{\n\t\treturn (int) (new \\App\\Db\\Query())->from($this->getTableName())->max('sortorderid') + 1;\n\t}", "protected function _get_next_incrementer() {\n\t\t// Get the old integer\n\t\t$channel_id = $this->EE->input->get('channel_id');\n\t\t$old_number = $this->EE->db->select($this->field_name)\n\t\t\t\t\t\t\t\t ->where('channel_id', $this->EE->input->get('channel_id'))\n\t\t\t\t\t\t\t\t ->order_by('entry_id DESC')\n\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t ->get('channel_data')\n\t\t\t\t\t\t\t\t ->row();\n\t\t\n\t\t// Do we have one?\n\t\tif ($old_number) {\n\t\t\t// Increment\n\t\t\t$new_number = (int)$old_number->{$this->field_name} + 1;\n\t\t} else {\n\t\t\t// Start at 1\n\t\t\t$new_number = 1;\n\t\t}\n\t\t\n\t\t// Return it\n\t\treturn $new_number;\n\t}", "public function getNextSequence($emergencia_id) {\n\t\t$max = self::find ()->where ( [ \n\t\t\t\t'emergencia_id' => $emergencia_id \n\t\t] )->orderBy ( 'sequencecap desc' )->one ();\n\t\treturn ($max ['sequencecap'] + 1);\n\t}", "public function getSequenceNumeric()\n {\n return $this->sequenceNumeric;\n }", "public function getSequenceNumber() \n {\n $iCount = $this->_oFcpoDb->GetOne(\"SELECT MAX(fcpo_sequencenumber) FROM fcpotransactionstatus WHERE fcpo_txid = '{$this->oxorder__fcpotxid->value}'\");\n\n $iReturn = ($iCount === null) ? 0 : $iCount + 1;\n\n return $iReturn;\n }", "public function getSequence_no()\n {\n return $this->sequence_no;\n }", "public function getMaxSequence()\n {\n return $this->max_sequence;\n }", "public function buscaridproximo()\r\n {\r\n\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n\r\n // eliminar el campo\r\n $result = $query->select('max(n.idnivelutilizacion) as maximo')\r\n ->from('NomNivelUtilizacion n')\r\n ->execute()\r\n ->toArray();\r\n\r\n $proximo = isset($result[0]['maximo']) ? $result[0]['maximo'] + 1 : 1;\r\n return $proximo;\r\n\r\n }", "public function CodigoPedido()\r\n\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli=$objetoBD->cadenaConexion();\r\n\r\n $consulta=\"SELECT max(ped_id) as maximo FROM pedidos \";\r\n $resultado=$mysqli->query($consulta);\r\n\r\n $maximo=\"\";\r\n while($fila=mysqli_fetch_object($resultado)){\r\n\r\n $maximo=$fila->maximo;\r\n\r\n\r\n }\r\n return $maximo+1;\r\n\r\n }", "public function get_sequence_no() {\n\n\t\treturn $this->sequence_no;\n\t}", "public function getSequencial() {\n return $this->iSequencial;\n }", "public function CodigoProduccion()\r\n\r\n {\r\n $objetoBD = new Conexion();\r\n $objetoBD->conectar();\r\n $mysqli=$objetoBD->cadenaConexion();\r\n\r\n $consulta=\"SELECT max(prod_id) as maximo FROM produccion \";\r\n $resultado=$mysqli->query($consulta);\r\n\r\n $maximo=\"\";\r\n while($fila=mysqli_fetch_object($resultado)){\r\n\r\n $maximo=$fila->maximo;\r\n\r\n\r\n }\r\n return $maximo+1;\r\n\r\n }", "function genNewInvoiceNumber($mysqli){\n\t$query = \"SELECT * FROM sales\";\n\t$result = mysqli_query($mysqli,$query);\n\tif(mysqli_num_rows($result) == 0){\n\t\treturn 1000;\n\t}\n\n\t$query = \"SELECT MAX(id) FROM sales\";\n\t$result = mysqli_query($mysqli,$query);\n\t$last_id = mysqli_fetch_assoc($result)['MAX(id)'];\n\n\t$query = \"SELECT invoice_number FROM sales WHERE id = '$last_id'\";\n\t$result = mysqli_query($mysqli,$query);\n\t$last_invoice_num = mysqli_fetch_assoc($result)['invoice_number'];\n\n\n\t$query = \"SELECT MAX(invoice_number) FROM sales\";\n\t$result = mysqli_query($mysqli,$query);\n\t$max_invoice_num = mysqli_fetch_assoc($result)['MAX(invoice_number)'];\n\n\tif($last_invoice_num >= $max_invoice_num ){\n\t\treturn $last_invoice_num + 1;\n\t}else{\n\t\treturn $max_invoice_num + 1;\n\t}\n\n}", "public function getNextProgressiveNumber()\n {\n $currentDate = date('Y-m-d');\n // instead of the hardcoded date, we introduced the parameter\n return $this->getNextProgressiveNumberByDate($currentDate);\n }", "public function getNextKubun($komoku_id)\n {\n $this->db->select_max('kubun');\n $this->db->where('komoku_id', $komoku_id);\n $this->db->select_max('kubun');\n $result = $this->db->get('m_komoku'); \n $value = $result->row()->kubun;\n $value = (int)$value;\n $value += 1;\n $value = str_pad(\"\" . $value, 3, '0', STR_PAD_LEFT);\n return $value;\n }", "public function getSequenceNo()\n {\n $session = Mage::getSingleton('core/session');\n $number = $session->getSequenceNo() ? : 0;\n $session->setSequenceNo($number + 1);\n return $number;\n }", "function nhhl_sequential(){\n global $ninja_forms_processing;\n $form_id = $ninja_forms_processing->get_form_ID();\n if ($form_id == 48) {\n Ninja_Forms()->subs()->get(\n $args = array(\n 'form_id' => $form_id,\n )\n );\n $subs = Ninja_Forms()->subs()->get( $args );\n foreach ( $subs as $sub ) {\n $seq_num = $sub->get_seq_num();\n }\n $subs_count = count($subs);\n $ninja_forms_processing->update_field_value( 1857, strval($seq_num) + $subs_count + 154000);\n }\n}", "public function getNextProgressiveNumber()\n {\n $currentDate = date('Y-m-d');\n foreach ($this->invoiceDates as $number => $date) {\n if ($date > $currentDate) {\n $nextNumber = $number;\n break;\n }\n }\n if (!isset($nextNumber)) {\n $nextNumber = count($this->invoiceDates) + 1;\n }\n return $nextNumber;\n }", "public function buscaridproximo()\r\n {\r\n\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n // eliminar el campo\r\n $result = $query->select('max(a.idcampo) as maximo')\r\n ->from('NomCampoestruc a')\r\n ->execute()\r\n ->toArray();\r\n\r\n $proximo = isset($result[0]['maximo']) ? $result[0]['maximo'] + 1 : 1;\r\n return $proximo;\r\n }", "public function codeGen()\n {\n $max_query = Generation::max('code');\n // $kodeB = Inventaris::all();\n $date = date(\"ymdh\");\n\n if ($max_query != null) {\n $nilai = substr($max_query, 9, 9);\n $kode = (int) $nilai;\n // tambah 1\n $kode = $kode + 1;\n $auto_kode = \"P\". $date . str_pad($kode, 4, \"0\", STR_PAD_LEFT);\n } else {\n $auto_kode = \"P\". $date . \"0001\";\n }\n\n return $auto_kode;\n }", "public function generate_archieve_reconcillation_id() {\n $result = $this->db2->query(\"SELECT archieve_id FROM `gstr_2a_reconciliation_history_all` ORDER BY archieve_id DESC LIMIT 0,1\");\n if ($result->num_rows() > 0) {\n $data = $result->row();\n $archieve_id = $data->archieve_id;\n//generate user_id\n $archieve_id = str_pad( ++$archieve_id, 5, '0', STR_PAD_LEFT);\n return $archieve_id;\n } else {\n $archieve_id = 'archieve_1001';\n return $archieve_id;\n }\n }", "function getMedecinId($sequenceName){\n $db=new Bdd();\n $bdd=$db->bddConnect();\n \n $retval = $bdd->countersMedecin->findOneAndUpdate(\n array('_id' => $sequenceName),\n array('$inc' => array(\"seq\" => 1))\n \n );\n $idIncrement=$retval[\"seq\"]+1;\n \n \n return $idIncrement;\n }", "public function create_invoice_number()\n\t{\n\t\t//select product code\n\t\t$this->db->from('invoice');\n\t\t$this->db->where(\"invoice_number LIKE 'IOD-INV-\".date('y').\"-%'\");\n\t\t$this->db->select('MAX(invoice_number) AS number');\n\t\t$query = $this->db->get();\n\t\t$preffix = \"IODk/\";\n\t\t\n\t\tif($query->num_rows() > 0)\n\t\t{\n\t\t\t$result = $query->result();\n\t\t\t$number = $result[0]->number;\n\t\t\t$real_number = str_replace($preffix, \"\", $number);\n\t\t\t$real_number++;//go to the next number\n\t\t\t$number = $preffix.sprintf('%04d', $real_number);\n\t\t}\n\t\telse{//start generating receipt numbers\n\t\t\t$number = $preffix.sprintf('%04d', 1);\n\t\t}\n\t\t\n\t\treturn $number.'/'.date('Y');\n\t}", "public function getMaxNotaFiscalNumero() {\r\n\r\n $sql = \"SELECT MAX(nflno_numero) + 1 as nflno_numero FROM nota_fiscal WHERE nflserie = 'A'\";\r\n\r\n $result = $this->_fetchAssoc(pg_query($this->_adapter, $sql));\r\n\r\n return $result['nflno_numero']; \r\n }", "function next_sequence() { return \"auto\"; }", "private function getNextTransactionID(){\n $db = $this->connectDB();\n $query = \"SELECT MAX(id) as curr_max_id FROM transaction;\";\n $stmt = $db->prepare($query);\n $stmt->execute();\n $stmt->store_result();\n $stmt->bind_result($curr_max_id);\n $stmt->fetch();\n // Return the current largest id plus 1 as the new ID.\n return $curr_max_id + 1;\n }", "private function generateNumber()\n {\n \t$output = null;\n \t$today = date('Y-m-d');\n \t\n \t$_currentuser = User::findOne(Yii::$app->user->id);\n \t\n \t$_initial = substr($_currentuser->firstname, 0, 1) . substr($_currentuser->lastname, 0, 1);\n \t\n \t//\n \t$count = Purchase::find()->where(['user_id'=>Yii::$app->user->id])\n \t->andWhere(\"date(created_at)= '$today'\")->count();\n \t//var_dump($count);exit(1);\n \t//echo $today;\n \t$count +=1;\n \t\n \t$_non_unique_number = $_initial . date('m') . date('d') . date('y');\n\n \t$output = $_non_unique_number . sprintf(\"%02d\", $count);\n \t\n \t//\n \t$find = Purchase::find()->where(['number_generated'=>$output])->one();\n \t//var_dump($output);exit(1);\n \tif ($find!==null){\n\t\t\t$last_order = Purchase::find()->where(['user_id'=>$_currentuser->id])->andWhere(\"date(created_at)= '$today'\")->orderBy('number_generated DESC')->one();\n\t\t\t$last_order_number = str_replace($_non_unique_number, \"\", $last_order->number_generated);\n\t\t\t$last_order_number = (int) $last_order_number;\n\t\t\t$last_order_number +=1;\n\t\t\t//echo sprintf(\"%02d\", $last_order_number);exit(1);\n\t\t\t$output = $_non_unique_number . sprintf(\"%02d\", $last_order_number);\n \t}\n \treturn $output;\n }", "function NumeroInscripcion($primerdigito,$id)\n {\n $numero = $primerdigito.str_pad($id, 4, '0', STR_PAD_LEFT);\n $letra = '';\n $suma = 0;\n for ($i = 0; $i < 5; $i++) {\n $suma += substr($numero, $i, 1) * ($i + 1);\n }\n $letra = chr($suma % 11 + 65);\n $codigo = $numero.$letra;\n\n return $codigo;\n }", "public static function getSequence()\n {\n return ++static::$sequence;\n }", "public function create_order_number()\n\t{\n\t\t//select product code\n\t\t$this->db->from('orders');\n\t\t$this->db->where(\"order_number LIKE 'ORD\".date('y').\"/%'\");\n\t\t$this->db->select('MAX(order_number) AS number');\n\t\t$query = $this->db->get();\n\t\t$preffix = \"ORD\".date('y').'/';\n\t\t\n\t\tif($query->num_rows() > 0)\n\t\t{\n\t\t\t$result = $query->result();\n\t\t\t$number = $result[0]->number;\n\t\t\t$real_number = str_replace($preffix, \"\", $number);\n\t\t\t$real_number++;//go to the next number\n\t\t\t$number = $preffix.sprintf('%06d', $real_number);\n\t\t}\n\t\telse{//start generating receipt numbers\n\t\t\t$number = $preffix.sprintf('%06d', 1);\n\t\t}\n\t\t\n\t\treturn $number;\n\t}", "function getCorrespondreMedicamentId($sequenceName){\n $db=new Bdd();\n $bdd=$db->bddConnect();\n \n $retval = $bdd->countersCorrespondreMedicament->findOneAndUpdate(\n array('_id' => $sequenceName),\n array('$inc' => array(\"seq\" => 1))\n \n );\n $idIncrement=$retval[\"seq\"]+1;\n \n \n return $idIncrement;\n }", "public function getItenerarySequenceNumber()\n {\n return $this->ItenerarySequenceNumber;\n }", "function autonumber(){\n $field_id = 'id_kain';\n $len = 3;\n $query = $this->db->query(\"SELECT MAX(RIGHT(\".$field_id.\",\".$len.\")) as kode FROM \".$this->table); \n\n if($query->num_rows() <> 0){ \n //cek dulu apakah ada sudah ada kode di tabel. \n //jika kode ternyata sudah ada. \n $data = $query->row();\n $last = intval($data->kode); \n $kode = $last + 1; \n }else{ \n //jika kode belum ada \n $kode = 1; \n }\n\n $kodemax = str_pad($kode, $len, \"0\", STR_PAD_LEFT); \n $kodejadi = $kodemax; \n return $kodejadi;\n }", "function exibeAtualMax(){\n $nmin= (($this->atual * $this->numpage) - $this->numpage)+1;\n return $nmax= ($this->numpage + $nmin)-1;\n }", "public function generateInvoiceNumber()\n {\n $orderRepo = EntityUtils::getRepository('Order');\n $orderCount = $orderRepo->getOrderCountBeforeDate($this->program->id, $this->order_date);\n $year = chr(date('Y') - 1913);\n $month = date('m');\n $day = date('d') + $orderCount;\n if ($day < 10) {\n $day = \"0\" . $day;\n }\n $monthDay = $month . $day;\n\n $invoiceNumber = $this->program->customer_id . $year . $monthDay;\n\n //Make sure the generated invoice number does not already exist, if it does, increment and try again\n while ($orderRepo->findOneBy(array(\"invoice_number\" => $invoiceNumber))) {\n $monthDay++;\n\n //Tack on a leading zero if we don't have 4 digits\n if ($monthDay < 1000) {\n $monthDay = \"0\" . $monthDay;\n }\n\n $invoiceNumber = $this->program->customer_id . $year . $monthDay;\n }\n\n $this->invoice_number = $invoiceNumber;\n return $this->invoice_number;\n }", "private function updateTaskNumberSequence()\n {\n if (config('database.default') !== 'sqlite') {\n \\DB::statement(\"SELECT setval('task_number_seq', (SELECT MAX(number) FROM tasks))\");\n }\n }", "private function checarPrioridade() {\n\n // Valor default da prioridade, assumindo que todos os sequentes já foram expandidos.\n $prioridade = \"Todos os sequentes foram expandidos.\";\n\n $noAtual = $this->raiz;\n\n // Percorre todos os nó do ramo. \n while($noAtual != NULL) {\n\n // Caso o nó ainda não tenha sido expandido.\n if(!$noAtual->expandido) {\n\n if($noAtual->tipo == \"SATURADO\") {\n return $noAtual;\n }else if($noAtual->tipo == \"ALFA\" && (!is_object($prioridade) || $prioridade->tipo == \"BETA\")) {\n $prioridade = $noAtual;\n }else if(!is_object($prioridade)) {\n $prioridade = $noAtual;\n }\n\n }\n\n // Busca o proximo nó do ramo.\n $noAtual = $noAtual->proximo;\n \n }\n \n // Retorna o ramo (objeto) que deve ser expandido.\n return $prioridade;\n\n }", "function getIDTabelRiwayatPangkat(){\n\t$query = mysql_query(\"SELECT MAX(id_data) as 'Max' FROM tbl_riwayat_pangkat\") or die(mysql_error());\n\t$row = mysql_fetch_array($query);\n\t$maks = $row['Max'];\n\t$ID = \"\";\n\t\n\tif($maks > 0){\n\t\t$ID = $maks + 1;\n\t}else{\n\t\t$ID = 1;\n\t}\n\t\n\treturn $ID;\n}", "function get_id_max_ins()\n\t{\n\t\t$kode = 'INS';\n\t\t$sql = \"SELECT MAX(id_instansi) as max_id FROM tb_instansi\";\n\t\t$row = $this->db->query($sql)->row_array();\n\t\t$max_id = $row['max_id'];\n\t\t$max_no = (int) substr($max_id,4,8);\n\t\t$new_no = $max_no + 1;\n\t\t$new_id_instansi = $kode.sprintf(\"%05s\",$new_no);\n\t\treturn $new_id_instansi;\n\t}", "public function generate_archieve_comparison_id() {\n $result = $this->db2->query(\"SELECT archieve_id FROM `comparison_summary_history_all` ORDER BY archieve_id DESC LIMIT 0,1\");\n if ($result->num_rows() > 0) {\n $data = $result->row();\n $archieve_id = $data->archieve_id;\n//generate user_id\n $archieve_id = str_pad( ++$archieve_id, 5, '0', STR_PAD_LEFT);\n return $archieve_id;\n } else {\n $archieve_id = 'archieve_1001';\n return $archieve_id;\n }\n }", "function get_modul_last_id() {\n $sql = \"SELECT RIGHT(modul_id, 8)'last_number'\n FROM com_modul\n ORDER BY modul_id DESC\n LIMIT 1\";\n $query = $this->db->query($sql);\n if ($query->num_rows() > 0) {\n $result = $query->row_array();\n $query->free_result();\n // create next number\n $number = intval($result['last_number']) + 1;\n if ($number > 99999999) {\n return false;\n }\n $zero = '';\n for ($i = strlen($number); $i < 8; $i++) {\n $zero .= '0';\n }\n return $zero . $number;\n } else {\n // create new number\n return '00000001';\n }\n }", "function sequence_value() {\n\t\treturn $this->data[$this->sequence_field];\n\t}", "private function obtenerNuevoID()\n\t{\n\t\t$query = $this->db->select('MAX(CPRODUCTOFS) as id')\n\t\t\t->from('MPRODUCTOCLIENTE')\n\t\t\t->get();\n\t\tif (!$query) {\n\t\t\tthrow new Exception('Error al encontrar el Código de producto');\n\t\t}\n\t\treturn intval($query->row()->id) + 1;\n\t}", "public function obtenerIDPrimerPagoElectronico(){\n $criteria = new CDbCriteria;\n $criteria->condition = 'id_pedido = '.$this->id_pedido;\n $registrosCarro = PagosElectronicos::model()->findAll($criteria);\n\n if (sizeof($registrosCarro) > 0)\n return $registrosCarro[0]->id;\n return 0;\n }", "function getOrdonnanceId($sequenceName){\n $db=new Bdd();\n $bdd=$db->bddConnect();\n \n $retval = $bdd->countersOrdonnance->findOneAndUpdate(\n array('_id' => $sequenceName),\n array('$inc' => array(\"seq\" => 1))\n \n );\n $idIncrement=$retval[\"seq\"]+1;\n \n \n return $idIncrement;\n }", "public static function getLastInvoice() {\r\n \t\r\n \t// Check if a year is passed\r\n \tself::checkSettings();\r\n \t\r\n $record = Doctrine_Query::create ()\r\n ->select ( 'next_number' )\r\n ->from ( 'InvoicesSettings is' )\r\n ->where('is.year = ?', date('Y'))\r\n\t\t\t\t->andWhere('is.isp_id = ?',Shineisp_Registry::get('ISP')->isp_id)\r\n ->limit ( 1 )\r\n\t\t\t\t->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\r\n\r\n if (count ( $record ) > 0) {\r\n return $record[0] ['next_number'];\r\n } else {\r\n return 1;\r\n }\r\n }", "public function getDernierNumeroDemandeur()\r\n\t{\r\n\t\t$req = \"select max(num_recu) from demandeurs\";\r\n\t\t$res = PdoFredi::$monPdo->query($req);\r\n\t\tif($res->rowCount() != 0)\r\n\t\t\t$num = $res->fetchColumn();\r\n\t\telse\r\n\t\t\t$num = 0;\r\n\t\treturn $num;\r\n\t}", "function crea_id_imm(){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$q_crea_id_imm = \"SELECT * FROM ultimo_id_imm LIMIT 1\";\n\t$r_crea_id_imm = $db->query($q_crea_id_imm);\n\t$ro_crea_id_imm = mysql_fetch_array($r_crea_id_imm);\n\t$id_imm = $ro_crea_id_imm['id_imm'];\n\t$q_agg=\"update ultimo_id_imm set id_imm = id_imm+1\";\n\t$r_agg=$db->query($q_agg);\n\t\n\treturn $id_imm;\n}", "public function getNextSequence()\n {\n $objects = SevDeskApi::getFromSevDesk((new SevSequence)->objectName);\n $nextSequence = null;\n\n foreach($objects as $object)\n {\n if ($object['forObject'] == $this->objectName)\n $nextSequence = $object['nextSequence'];\n }\n\n return $nextSequence;\n }", "public static function generateItemNo(){\n $year = '20'.date('y');\n $items = Item::count();\n return $year.($items + 1 ) ;\n }", "public function invoiceNumberUp(){\n\t\t$this->db->query(\"LOCK TABLES `\" . __TBL_INVOICE_NUMBER . \"` WRITE\");\n\t\tif($this->invoiceNumberGet()){\n\t\t\t$newinvoice = $this->invoiceNumberGet()+1;\n\t\t\t$this->db->update(__TBL_INVOICE_NUMBER, array(\"number\"=>$newinvoice));\n\t\t\t$this->db->query(\"UNLOCK TABLES\");\n\t\t\treturn $newinvoice;\n\t\t} else {\n\t\t\t$this->db->insert(__TBL_INVOICE_NUMBER, array(\"number\"=>$this->_start_invoice_number));\n\t\t\t$this->db->query(\"UNLOCK TABLES\");\n\t\t\treturn $this->_start_invoice_number;\n\t\t}\n\t}", "public function generate_archieve_monthly_id() {\n $result = $this->db2->query(\"SELECT archive_id FROM `monthly_summary_history_all` ORDER BY archive_id DESC LIMIT 0,1\");\n if ($result->num_rows() > 0) {\n $data = $result->row();\n $archieve_id = $data->archive_id;\n//generate user_id\n $archieve_id = str_pad( ++$archieve_id, 5, '0', STR_PAD_LEFT);\n return $archieve_id;\n } else {\n $archieve_id = 'archieve_1001';\n return $archieve_id;\n }\n }", "private function getOrderNumber()\n {\n $number = Shopware()->Db()->fetchOne(\"/*NO LIMIT*/ SELECT number FROM s_order_number WHERE name='invoice' FOR UPDATE\");\n Shopware()->Db()->executeUpdate(\"UPDATE s_order_number SET number = number + 1 WHERE name='invoice'\");\n $number += 1;\n\n return $number;\n }", "function getAllergieId($sequenceName){\n $db=new Bdd();\n $bdd=$db->bddConnect();\n \n $retval = $bdd->countersAllergie->findOneAndUpdate(\n array('_id' => $sequenceName),\n array('$inc' => array(\"seq\" => 1))\n \n );\n $idIncrement=$retval[\"seq\"]+1;\n \n \n return $idIncrement;\n }", "function exibeAtualMin(){\n return $nmin= (($this->atual * $this->numpage) - $this->numpage)+1;\n }", "public function getdernierid(){ \n $req=\"SELECT id FROM contrat WHERE id = (SELECT MAX(id) FROM contrat)\";\n //print_r($req);\n $resultat = $this->pdo->query($req);\n $ligne = $resultat->fetch();\n $donnees = $ligne['id'];\n return intval($donnees);\n }", "function generarId (){\n $usuarios = traerTodos();\n\n if (count($usuarios) == 0) {\n return 1;\n }\n $elUltimo = array_pop($usuarios);\n $id = $elUltimo['id'];\n return $id + 1;\n}", "public function getSequence()\n {\n return parent::getSequence() . '_seq'; // TODO: Change the autogenerated stub\n }", "function getPharmacienId($sequenceName){\n $db=new Bdd();\n $bdd=$db->bddConnect();\n $collection = $bdd->countersPharmacien;\n \n $retval = $bdd->countersPharmacien->findOneAndUpdate(\n array('_id' => $sequenceName),\n array('$inc' => array(\"seq\" => 1))\n \n );\n $idIncrement=$retval[\"seq\"]+1;\n \n \n return $idIncrement;\n }", "protected static function number ()\n {\n $range = static::getRange();\n\n $number = $range[mt_rand(0, count($range) - 1)];\n\n return $number;\n }", "protected function _fcpoGetNextOrderNr() \n {\n $oConfig = $this->_oFcpoHelper->fcpoGetConfig();\n $sShopVersion = $oConfig->getVersion();\n\n if (version_compare($sShopVersion, '4.6.0', '>=')) {\n $oCounter = $this->_oFcpoHelper->getFactoryObject('oxCounter');\n $sOrderNr = $oCounter->getNext($this->_getCounterIdent());\n } else {\n $sQuery = \"SELECT MAX(oxordernr)+1 FROM oxorder LIMIT 1\";\n $sOrderNr = $this->_oFcpoDb->GetOne($sQuery);\n }\n\n return $sOrderNr;\n }", "public function getNextNumber()\n {\n $nextNoProc = $this->getAdapter()->prepare(\n \"DECLARE @RESULT int\n EXEC udf_gen_next_number\n @RESULT = @RESULT OUTPUT\"\n );\n $nextNoProc->execute();\n // Is this really necessary? Yes, unfortunately.\n $dereference = $nextNoProc->fetch();\n return array_pop($dereference);\n }", "function CriaCodigo() { //Gera numero aleatorio\r\n for ($i = 0; $i < 40; $i++) {\r\n $tempid = strtoupper(uniqid(rand(), true));\r\n $finalid = substr($tempid, -12);\r\n return $finalid;\r\n }\r\n }", "public static function getNextId()\n\t{\n\t\t$redis = GitHQ\\Bundle\\AbstractController::getRedisClient();\n\t\treturn $redis->incr(self::KEY_SEQUENCE);\n\t}", "function getProduitId($sequenceName){\n $db=new Bdd();\n $bdd=$db->bddConnect();\n \n $retval = $bdd->countersProduit->findOneAndUpdate(\n array('_id' => $sequenceName),\n array('$inc' => array(\"seq\" => 1))\n \n );\n $idIncrement=$retval[\"seq\"]+1;\n \n \n return $idIncrement;\n }", "function seuraavaID(){\n $kysely = haeYhteys()->prepare(\"SELECT MAX(sanaid) as suurin FROM sana\");\n $kysely->execute();\n $suurin = $kysely->fetchObject()->suurin;\n return $suurin + 1 ;\n }", "function get_seq_account_financing_no()\n\t{\n\t\t$product_code=$this->input->post('product_code');\n\t\t$cif_no=$this->input->post('cif_no');\n\t\t$data=$this->model_transaction->get_seq_account_financing_no($product_code,$cif_no);\n\t\t$jumlah=(int)$data['jumlah'];\n\t\tif(count($data)>0){\n\t\t\t$newseq=$jumlah+1;\n\t\t\tif($jumlah<10){\n\t\t\t\t$newseq='0'.$newseq;\n\t\t\t}\n\t\t}else{\n\t\t\t$newseq='01';\n\t\t}\n\t\t$return=array('newseq'=>$newseq);\n\t\techo json_encode($return);\n\t}", "public function VerUltimoID()\r\n {\r\n\t\r\n\t$reg=mysql_query(\"select max($this->ID) as maxID from $this->tabla\", $this->con) or die('no se pudo encontrar el ultimo ID en VerUltimoID: ' . mysql_error());\r\n\t$reg=mysql_fetch_array($reg);\t\r\n\t\r\n\treturn($reg[\"maxID\"]);\r\n\t\r\n\t}", "public function ctlBuscaNumOpEntradas($fecha){\n\t\t$busca = $fecha.'%';\n\n\t\t$respuesta = Datos::mdlNumOperaciones('entradas', $busca);\n\n\t\t$next = $respuesta['cuenta']+1;\n\t\techo $fecha,\"-\",$next;\n\t\t//echo '$fecha-$next';\n\t}", "public function genId($sequence)\n {\n return 0; // will use auto_increment\n }", "public function genId($sequence)\n {\n return 0; // will use auto_increment\n }", "function gen_ID() {\r\n openDB();\r\n global $db;\r\n $query = \"SELECT lpa_inv_no FROM lpa_invoices ORDER BY lpa_inv_no DESC LIMIT 1\";\r\n $result = $db->query($query);\r\n $row = $result->fetch_assoc();\r\n $ID = (int) $row['lpa_inv_no'];\r\n return $ID + 1;\r\n\r\n}", "public function selecMaximoNumero2($empresa_id, $tipo_documento_id, $serie){\n $sql = \"SELECT MAX(CAST(numero AS UNSIGNED)) numero FROM comprobantes WHERE 1 = 1 AND empresa_id = $empresa_id AND tipo_documento_id = $tipo_documento_id AND serie = '\".$serie.\"'\";\n $query = $this->db->query($sql);\n $rowNumero = $query->row_array();\n\n if($rowNumero['numero'] == null){\n //BUSQUEDA DE NUMERO 12-01-2021\n $rsNumero = $this->db->from('ser_nums')\n ->where('empresa_id',$empresa_id)\n ->where('tipo_documento_id',$tipo_documento_id)\n ->where('serie',$serie)\n ->where('estado',ST_ACTIVO)\n ->get()\n ->row();\n $rowNumero['numero'] = ($rsNumero->numero == null) ? 1 : $rsNumero->numero;\n }else{\n $rowNumero['numero']++;\n }\n\n return $rowNumero;\n }", "function getAssuranceMaladieId($sequenceName){\n $db=new Bdd();\n $bdd=$db->bddConnect();\n \n $retval = $bdd->countersAssuranceMaladie->findOneAndUpdate(\n array('_id' => $sequenceName),\n array('$inc' => array(\"seq\" => 1))\n \n );\n $idIncrement=$retval[\"seq\"]+1;\n \n \n return $idIncrement;\n }", "function getNota_num()\n {\n if (!isset($this->inota_num) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_num;\n }", "function getNota_num()\n {\n if (!isset($this->inota_num) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_num;\n }", "function LastId($seq='')\n\t{\n\t\tif (!$seq) {\n\t\t\treturn false;\n\t\t}\n\t\t$query = \"SELECT \".$seq.\".currval FROM dual\";\n\t\t$nextid = $this->FetchOne($query);\n\t\treturn $nextid;\n\t}", "public function getNUMEROINT()\r\n {\r\n return $this->NUMERO_INT;\r\n }", "function generate_transaction_number()\n {\n $invice_number = uniqid(rand(100000, 999999), true);\n $replace_value = str_replace(\".\", \"\", $invice_number);\n $substr_value = substr($replace_value, 0, 6);\n $query = mysql_query(\"select transaction_no from credit_debit where transaction_no='$substr_value'\");\n if (mysql_num_rows($query) > 0) {\n \n $this->generate_transaction_number();\n } else {\n return $substr_value;\n }\n }", "public function getSequence()\n {\n return $this->primarySequence;\n }", "public static function getFullLastInvoiceNumber(){\n\t\t//Get Default Number\n\t\t$def = 0;\n\t\t$defnumber = SettingInvoiceReport::model()->findByAttributes(array(\"field_name\"=>\"Default Invoice Number\"));\n\t\tif($defnumber != null){\n\t\t\t$def = $defnumber->field_value*1;\n\t\t}\n\t\t\n\t\treturn $def + InvoiceDB::getLastInvoiceNumber();\n\t}", "function generate_application_no()\n {\n $token = 'O-AA00001';\n $last = \\DB::table('applications')->orderBy('id','DESC')->lock()->first();\n\n //todo: optimize this function\n if ($last) {\n $token = ++$last->application_no;\n }\n return $token;\n }", "public function create_member_number()\n\t{\n\t\t//select product code\n\t\t$preffix = \"MIoD\";\n\t\t$this->db->from('member');\n\t\t$this->db->where(\"member_number LIKE '\".$preffix.\"%'\");\n\t\t$this->db->select('MAX(member_number) AS number');\n\t\t$query = $this->db->get();//echo $query->num_rows();\n\t\t\n\t\tif($query->num_rows() > 0)\n\t\t{\n\t\t\t$result = $query->result();\n\t\t\t$number = $result[0]->number;\n\t\t\t$real_number = str_replace($preffix, \"\", $number);\n\t\t\t$real_number++;//go to the next number\n\t\t\t$number = $preffix.sprintf('%03d', $real_number);\n\t\t}\n\t\telse{//start generating receipt numbers\n\t\t\t$number = $preffix.sprintf('%03d', 1);\n\t\t}\n\t\t\n\t\treturn $number;\n\t}", "public function getFirstSequenceNumber()\n {\n return ($this->page - 1) * $this->getRecordsPerPage() + 1;\n }", "function crea_id_ric(){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$q_crea_id_imm = \"SELECT * FROM ultimo_id_ric LIMIT 1\";\n\t$r_crea_id_imm = $db->query($q_crea_id_imm);\n\t$ro_crea_id_imm = mysql_fetch_array($r_crea_id_imm);\n\t$id_ric = $ro_crea_id_imm['id_ric'];\n\t$q_agg=\"update ultimo_id_ric set id_ric = id_ric+1\";\n\t$r_agg=$db->query($q_agg);\n\t\n\treturn $id_ric;\n}", "function get_seq_account_saving_no()\n\t{\n\t\t$product_code=$this->input->post('product_code');\n\t\t$cif_no=$this->input->post('cif_no');\n\t\t$data=$this->model_transaction->get_seq_account_saving_no($product_code,$cif_no);\n\t\t$jumlah=(int)$data['jumlah'];\n\t\tif(count($data)>0){\n\t\t\t$newseq=$jumlah+1;\n\t\t\tif($jumlah<10){\n\t\t\t\t$newseq='0'.$newseq;\n\t\t\t}\n\t\t}else{\n\t\t\t$newseq='01';\n\t\t}\n\t\t$return=array('newseq'=>$newseq);\n\t\techo json_encode($return);\n\t}", "public function getNUMERO_INT()\r\n {\r\n return $this->NUMERO_INT;\r\n }", "public function ultimoNumeroFactura(){\n $pdo = Database::connect();\n $sql = \"select max(idfactura) numero from facturas\";\n $consulta = $pdo->prepare($sql);\n $consulta->execute();\n //obtenemos el registro especifico:\n $res=$consulta->fetch(PDO::FETCH_ASSOC);\n $numero=$res['numero'];\n Database::disconnect();\n //retornamos el numero encontrado:\n if(!isset($numero))\n return 0;\n return $numero;\n }", "public function reparacion_num_ser()\n {\n $menu = 4;\n $this->render ('/reparacion/reparacion_num_ser', compact('menu'));\n }" ]
[ "0.6940952", "0.6673216", "0.66372126", "0.6632207", "0.63819563", "0.63551855", "0.62746453", "0.62433803", "0.6225916", "0.6216209", "0.617406", "0.617406", "0.61703527", "0.6128667", "0.6123499", "0.61205256", "0.61196345", "0.61048275", "0.61042786", "0.6097579", "0.6079833", "0.60478747", "0.6024566", "0.5995078", "0.59884095", "0.5974464", "0.59701854", "0.5970166", "0.5961497", "0.59436727", "0.5941101", "0.59374917", "0.5914275", "0.5903559", "0.59019476", "0.58961695", "0.58815384", "0.58519197", "0.5828979", "0.5826365", "0.58190036", "0.5810407", "0.5809156", "0.5807751", "0.5782848", "0.57728916", "0.57712305", "0.57670325", "0.5764592", "0.57610905", "0.57490754", "0.57452685", "0.574456", "0.5744075", "0.5740859", "0.5740751", "0.57366157", "0.5735549", "0.57324743", "0.57305294", "0.57302517", "0.5724438", "0.5721329", "0.5720269", "0.57164437", "0.5706283", "0.5699022", "0.5691834", "0.5689784", "0.56816816", "0.56807846", "0.56742525", "0.56713766", "0.5663804", "0.56612164", "0.5661193", "0.5648984", "0.5646112", "0.56258225", "0.5617859", "0.5615758", "0.5610096", "0.5610096", "0.5609189", "0.56040186", "0.5599968", "0.5592369", "0.5592369", "0.5590975", "0.55890524", "0.55869544", "0.55862963", "0.5580958", "0.5579863", "0.5577816", "0.5577432", "0.5571145", "0.5554849", "0.55511165", "0.554965", "0.55411315" ]
0.0
-1
Ajax Logged only : add a new solution
public function newsolution() { // collect round and floor from POST data $round = Input::get('round'); $floor = Input::get('floor'); $ajaxResponse = ['msg' => '']; // dont save if 10 minutes left if($this->timeSinceRound(null, true) > -600) { $ajaxResponse['msg'] = 'newRoundSoon'; } elseif ($round != $this->currentRound()) { $ajaxResponse['msg'] = 'cannotSaveSolutionForOtherRound'; } elseif ($floor > $this->maxFloor()) { $ajaxResponse['msg'] = 'floorNotAvailable'; } else { // collect the rest of POST data $solution = Input::get('solution'); $solutionparams = Input::get('solutionparams'); // calculate team karma $karma = $this->teamkarma($floor, $solution); //prepare data save to db $data = array( 'tot_round' => $round, 'floor' => $floor, 'user_id' => Auth::user()->id, 'karma' => $solutionparams['luck'] ? 50 : 100, 'maxrank' => $karma['maxrank'], 'maxevol' => $karma['maxevol'], 'gamespeed' => $solutionparams['gamespeed'], 'luck' => $solutionparams['luck'], 'karma_multiplier' => $karma['karmaMultiplier'], 'note' => $solutionparams['note'], 'unit_id_1' => $solution[0]['unitId'], 'unit_rank_1' => $solution[0]['rank'], 'unit_trans_1' => $solution[0]['trans'] ); for ($i=1; $i < 12; $i++) { if (!isset($solution[$i])) { break; } $data['unit_id_'.($i+1)] = $solution[$i]['unitId']; $data['unit_rank_'.($i+1)] = $solution[$i]['rank']; $data['unit_trans_'.($i+1)] = $solution[$i]['trans']; } $sid = DB::table('tot_solutions')->insertGetId($data); // vote for my solution $solution = $this->getSolutions(null, false, $sid)[0]; $voteType = $solutionparams['luck'] == 1 ? 1 : 2; $calculatedKarma = $this->karmaPoint($voteType, $solution->karmamultiplier, $solution->luck); //prepare data save to db $data = array( 'round' => $solution->round, 'floor' => $solution->floor, 'tot_solution_id' => $solution->sid, 'user_id' => Auth::user()->id, 'vote_type' => $voteType, 'karma_vote' => $calculatedKarma, 'old_karma' => $solution->karma ); DB::table('tot_solution_votes')->insert($data); //update solution karma DB::table('tot_solutions')->where('id', $sid)->update(['karma' => $solution-> karma + $calculatedKarma]); $ajaxResponse['msg'] = 'ok'; } $ajaxResponse['solutions'] = $this->formattedSolutions(); $ajaxResponse['myroundvotes'] = $this->getMyVotes($round); $ajaxResponse['roundvotes'] = $this->getRoundVotes($this->currentRound()); echo json_encode($ajaxResponse, JSON_NUMERIC_CHECK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajax_login() {\n\n\t\t\tcheck_ajax_referer( 'ajax-login-nonce', 'security' );\n\t\t\n\t\t\tself::auth_user_login($_POST['username'], $_POST['password'], __( 'Acceso', 'project045' ) );\n\t\t\n\t\t\tdie();\n\t\t}", "function wp_ajax_update_welcome_panel()\n {\n }", "function add() {\n RR_Session::start();\n $get = RR_Session::get('loggedin');\n if ($get == true) {\n // blijf op de pagina\n // en laad de admin view\n $this->validateUser(true, 'newuser');\n } else {\n // anders redirect trug naar de login pagina\n $this->validateUser(false);\n }\n }", "function add() {\t\n\t\t//override normal non-rendering of view for ajax.\n\t\t/*if ($this->RequestHandler->isAjax()) {\n\t\t\t$this->autoRender = true;\t\t\n\t\t\t$this->layout = 'ajax'; \n\t\t}*/\n\t\t\t\n\t\tif ($this->data) {\t\t\t\n\t\t\t$newLogin = $this->data;\n\t\t\t$newLogin[$this->Login->name]['date'] = date(Configure::read('DB_DATE_FORMAT'));\n\t\t\tif ($this->Login->save($newLogin)) {\n\t\t\t\t//update city text in header to be consistent\n\t\t\t\t$this->Text->id = $this->Text->field('id', array('name' => 'check_in_city'));\t\t\t\t\t\t\n\t\t\t\t$this->Text->save(array('value' => $newLogin[$this->Login->name]['city']));\t\t\t\t\n\t\t\t\t\n\t\t\t\t//update venue too\n\t\t\t\t$this->Text->id = $this->Text->field('id', array('name' => 'check_in_venue'));\n\t\t\t\t$this->Text->save(array('value' => $newLogin[$this->Login->name]['venue']));\n\t\t\t\t\n\t\t\t\t$this->Session->setFlash('Your Check-in was saved.');\n\t\t\t\t$this->redirect('/trips/index/' . $id);\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash('Your Check-in could not be saved. Please try again.');\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\t\t\t\n\t}", "function wp_ajax_logged_in()\n {\n }", "public function paml_ajax_login() {\n\t\tglobal $paml_options;\n\t\t// Check our nonce and make sure it's correct.\n if(is_user_logged_in()){\n echo json_encode( array(\n 'loggedin' => false,\n 'message' => __( 'You are already logged in', 'pressapps' ),\n ) );\n die();\n }\n\t\tcheck_ajax_referer( 'ajax-form-nonce', 'security' );\n\n\t\t// Get our form data.\n\t\t$data = array();\n\n\t\t// Check that we are submitting the login form\n\t\tif ( isset( $_REQUEST['login'] ) ) {\n \n\t\t\t$data['user_login'] = sanitize_user( $_REQUEST['username'] );\n\t\t\t$data['user_password'] = sanitize_text_field( $_REQUEST['password'] );\n\t\t\t$data['remember'] = (sanitize_text_field( $_REQUEST['rememberme'] )=='TRUE')?TRUE:FALSE;\n\t\t\t$user_login = wp_signon( $data, false );\n\n\t\t\t// Check the results of our login and provide the needed feedback\n\t\t\tif ( is_wp_error( $user_login ) ) {\n\t\t\t\techo json_encode( array(\n\t\t\t\t\t'loggedin' => false,\n\t\t\t\t\t'message' => __( 'Wrong Username or Password!', 'pressapps' ),\n\t\t\t\t) );\n\t\t\t} else {\n\t\t\t\techo json_encode( array(\n\t\t\t\t\t'loggedin' => true,\n\t\t\t\t\t'message' => __( 'Login Successful!', 'pressapps' ),\n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\n\t\t// Check if we are submitting the register form\n\t\telseif ( isset( $_REQUEST['register'] ) ) {\n\t\t\t$user_data = array(\n\t\t\t\t'user_login' => sanitize_user( $_REQUEST['username'] ),\n\t\t\t\t'user_email' => sanitize_email( $_REQUEST['email'] ),\n\t\t\t);\n\t\t\t$user_register = $this->paml_register_new_user( $user_data['user_login'], $user_data['user_email'] );\n\n\t\t\t// Check if there were any issues with creating the new user\n\t\t\tif ( is_wp_error( $user_register ) ) {\n\t\t\t\techo json_encode( array(\n\t\t\t\t\t'registerd' => false,\n\t\t\t\t\t'message' => $user_register->get_error_message(),\n\t\t\t\t) );\n\t\t\t} else {\n if(isset($paml_options['userdefine_password'])){\n $success_message = __( 'Registration complete.', 'pressapps' );\n }else{\n $success_message = __( 'Registration complete. Check your email.', 'pressapps' );\n }\n\t\t\t\techo json_encode( array(\n\t\t\t\t\t'registerd' => true,\n\t\t\t\t\t'redirect' => (isset($paml_options['userdefine_password'])?TRUE:FALSE),\n\t\t\t\t\t'message'\t=> $success_message,\n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\n\t\t// Check if we are submitting the forgotten pwd form\n\t\telseif ( isset( $_REQUEST['forgotten'] ) ) {\n\n\t\t\t// Check if we are sending an email or username and sanitize it appropriately\n\t\t\tif ( is_email( $_REQUEST['username'] ) ) {\n\t\t\t\t$username = sanitize_email( $_REQUEST['username'] );\n\t\t\t} else {\n\t\t\t\t$username = sanitize_user( $_REQUEST['username'] );\n\t\t\t}\n\n\t\t\t// Send our information\n\t\t\t$user_forgotten = $this->paml_retrieve_password( $username );\n\n\t\t\t// Check if there were any errors when requesting a new password\n\t\t\tif ( is_wp_error( $user_forgotten ) ) {\n\t\t\t\techo json_encode( array(\n\t\t\t\t\t'reset' \t => false,\n\t\t\t\t\t'message' => $user_forgotten->get_error_message(),\n\t\t\t\t) );\n\t\t\t} else {\n\t\t\t\techo json_encode( array(\n\t\t\t\t\t'reset' => true,\n\t\t\t\t\t'message' => __( 'Password Reset. Please check your email.', 'pressapps' ),\n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\n\t\tdie();\n\t}", "public function ajaxAddAction()\n {\n if (isset($_SESSION[self::TOKEN_ATTRIBUTE]) && isset($_POST[self::TOKEN_ATTRIBUTE])\n && $_SESSION[self::TOKEN_ATTRIBUTE] === $_POST[self::TOKEN_ATTRIBUTE]\n ) {\n\n if (isset($_POST[self::URL_ATTRIBUTE]) && $this->isValidLink($_POST[self::URL_ATTRIBUTE])) {\n $this->save($_POST[self::URL_ATTRIBUTE]);\n } else {\n $this->set('error', array(\n 'code' => 100,\n 'message' => 'Please enter a valid url'\n ));\n }\n\n } else {\n $this->set('error', array(\n 'code' => 101,\n 'message' => 'Can not process request without valid token'\n ));\n }\n }", "function logginRequired(){\n\n}", "function wp_ajax_add_user($action)\n {\n }", "public function ajaxUserAdd() {\n if (!empty($_POST)) {\n $username = $_POST['username'];\n $password = $_POST['password'];\n $password_second = $_POST['password_second'];\n /** @var User $user */\n foreach ($this->entityManager->getRepository('Entity\\\\User')->findAll() as $user) {\n if (strtolower($user->getUsername()) == strtolower($username)) {\n header('HTTP/1.0 409 Conflict');\n echo 'Username already taken';\n exit();\n }\n }\n if ($password == $password_second) {\n $user = new User();\n $user->setUsername($username);\n $user->setPassword(password_hash($password, PASSWORD_ARGON2ID));\n\n $this->entityManager->persist($user);\n $this->entityManager->flush();\n\n $user_data = [\n 'id' => $user->getId(),\n 'username' => $user->getUsername(),\n ];\n header('HTTP/1.0 200 OK');\n header('Content-Type: application/json');\n echo json_encode($user_data);\n } else {\n header('HTTP/1.0 418 Password');\n echo 'Passwords should be the same';\n exit();\n }\n } else {\n header('HTTP/1.0 400 Bad Request');\n echo 'Post Data is empty';\n exit();\n }\n }", "public function process_user_notice_ajax() {\n\t\t$return = array('code' => 'fail', 'data' => '');\n\t\t\n\t\tif (!isset($_POST['subaction'])) {\n\t\t\t$return['code'] = 'error';\n\t\t\t$return['data'] = 'Missing subaction';\n\t\t\techo json_encode($return);\n\t\t\tdie();\n\t\t}\n\n\t\tif ('admin_only_login' == $_POST['subaction']) {\n\t\t\tcheck_ajax_referer('updraftplus_admin_only_login', 'nonce');\n\n\t\t\tif (!isset($_POST['admin_only_login'])) {\n\t\t\t\t$return['code'] = 'error';\n\t\t\t\t$return['data'] = 'Missing parameter';\n\t\t\t\techo json_encode($return);\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t\t$admin_only = ('true' === $_POST['admin_only_login']);\n\t\t\t\n\t\t\tupdate_site_option('updraftplus_clone_admin_only_login', $admin_only);\n\n\t\t\t$return['code'] = 'success';\n\t\t\t$return['data'] = 'Option updated';\n\t\t\techo json_encode($return);\n\t\t\tdie();\n\t\t} else {\n\t\t\t$return['code'] = 'error';\n\t\t\t$return['data'] = 'Unknown action';\n\t\t\techo json_encode($return);\n\t\t\tdie();\n\t\t}\n\t}", "function ajax_add()\n {\n\t\n }", "function ajax_login_register_init()\n{\n\n // Enable the user with no privileges to run ajax_login() in AJAX\n add_action('wp_ajax_nopriv_ajaxlogin', 'ajax_login');\n\n add_action('wp_ajax_nopriv_register_user', 'ajax_reg_new_user');\n\n}", "public function act_auth_ajax()\n\t{\n\t\t$user = User::identify();\n\t\tif ( $user->loggedin ) {\n\t\t\t/**\n\t\t\t * Triggers the ajax plugin action for the context if user is authenticated.\n\t\t\t *\n\t\t\t * @see act_auth_ajax()\n\t\t\t * @action ajax_auth_{$context}\n\t\t\t */\n\t\t\tPlugins::act( 'auth_ajax_' . $this->handler_vars['context'], $this );\n\t\t\texit;\n\t\t}\n\t}", "public function add_to_login_form() {\n\t\t$this->recaptcha->show_recaptcha( array( 'action' => ITSEC_Recaptcha::A_LOGIN ) );\n\t}", "function ajax_login_init(){\n\t\t\t\n\t\t\tglobal $wp;\n\n\t\t\twp_register_script('ajax-login-script', get_template_directory_uri() . '/js/ajax-login.min.js', array( 'jquery' ) ); \n\t\t\twp_enqueue_script('ajax-login-script');\n\t\t\n\t\t\twp_localize_script( 'ajax-login-script', 'ajax_login_object', array( \n\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t'redirecturl' => home_url( $wp->request ),\n\t\t\t\t'loadingmessage' => __( 'Enviando información. Por favor espere...', 'project045' )\n\t\t\t));\n\t\t\n\t\t}", "public function ajaxAction() {\n $result = $this->_auth->authenticate($this->_adapter);\n if ($result->isValid()) {\n $this->_auth->getStorage()->write(array(\"identity\" => $result->getIdentity(), \"user\" => new Josh_Auth_User($this->_type, $result->getMessages())));\n\n $ident = $this->_auth->getIdentity();\n\n $loggedIn = $this->view->partial('partials/userLoggedIn.phtml', array('userObj' => $ident['user']));\n $alert = $this->view->partial('partials/alert.phtml', array('alert' => 'Successful Login', 'alertClass' => 'alert-success'));\n\n $html = array(\"#userButton\" => $loggedIn, \"alert\" => $alert);\n $this->jsonResponse('success', 200, $html);\n } else {\n $errorMessage = $result->getMessages();\n $alert = $this->view->partial('partials/alert.phtml', array('alert' => $errorMessage['error'], 'alertClass' => 'alert-error'));\n\n $html = array(\"alert\" => $alert);\n $this->jsonResponse('error', 401, $html, $errorMessage['error']);\n }\n }", "public function postAjaxLogin(){\n\t\ttry{\n\t\t\tif (!isset($_POST))\n\t\t\t\tthrow new Exception('Request error');\n\n\t\t\t$id = \\Input::get('id', false);\n\t\t\t$passwd = \\Input::get('password', false);\n\n\t\t\tif (!$id || !$password)\n\t\t\t\tthrow new Exception('Parameter error');\n\n\t\t\t$m = \\Member::where('uid', '=', md5($id))->where('social', '=', 'rebeauty')->get();\n\n\t\t\tif ($m==null)\n\t\t\t\tthrow new Exception('Not founded');\n\n\t\t\tif (!\\Hash::check($passwd, $m->password))\n\t\t\t\tthrow new Exception('帳號或密碼錯誤');\n\n\t\t\t// register user into Auth that is a global variable\n\t\t\t\\Auth::login($m);\n\t\t\treturn \\Redirect::route('frontend.index');\n\t\t}catch(Exception $e){\n\t\t\treturn Response::json(array('status'=>'error', 'message'=>$e->getMessage(), '_token'=>csrf_token()));\n\t\t}\n\t}", "function login() { }", "function _load(){ \n //verificar la session \n if(isset($_GET['adm'])&&!inicie_sesion()){\n if(isset($_COOKIE['sessionHash'])&&$_COOKIE['sessionHash']!=''){\n login_user_hash($_COOKIE['sessionHash']);\n _load();\n exit;\n }\n if(isset($_GET['ajax'])){\n echo json_encode(array('error'=>'session'));\n exit;\n }else{\n header('Location: '.__url_real.'xlogin/login/'.base64_encode($_SERVER['REQUEST_URI']).'/');\n exit;\n }\n }\n\n if(isset($_GET['adm'])&&inicie_sesion()){\n //verifica si el usuario que inicio la sesion tiene permiso para acceder\n if(logueado::permitirAcceso()){//logueado::tieneAcceso()\n require('plantillas/admin/admin.php');\n }else{\n header('Location: '.__url_real.'xlogin/login/'.base64_encode($_SERVER['REQUEST_URI']).'/');\n exit;\n }\n }else{\n if (isMobile()) { \n if(file_exists(__path.'index.mobile.php')){\n require (__path.'index.mobile.php');\n }else{ \n require (__path.'index.php');\n }\n }else{\n require (__path.'index.php');\n }\n }\n}", "function ajaxs_login(){\n\tif ( !is_user_logged_in() ) {\n\t\t$creds = array();\n\t\t$creds['user_login'] = $_POST['usr_email'];\n\t\t$creds['user_password'] = $_POST['usr_pass'];\n\t\t$creds['remember'] = true; \n\t\tif (filter_var($creds['user_login'], FILTER_VALIDATE_EMAIL)) {\n\t\t\t$usr = get_user_by( 'email', $creds['user_login'] );\n\t\t\t$creds['user_login'] = $usr->user_login;\t\n\t\t}\t\n\t\t$user = wp_signon( $creds, false );\n\t\t\n\t\tif ( is_wp_error($user) ){\n\t\t\techo 'error';\n\t\t}\n\t\telse{\n\t\t\techo $user->ID;\n\t\t}\n\t}\n\tdie();\n}", "function ajax_login(){\r\n check_ajax_referer( 'ajax-login-nonce', 'security' );\r\n // Nonce is checked, get the POST data and sign user on\r\n \t// Call auth_user_login\r\n\tauth_user_login($_POST['email'], $_POST['password'], 'Login'); \r\n\t\r\n die();\r\n}", "function ajax_login()\n{\n // check_ajax_referer( 'ajax-login-nonce', 'security' );\n\n $nonce = getallheaders()['X-Wp-Nonce'];\n if ( !wp_verify_nonce($nonce, 'wp_json') )\n exit('Sorry!');\n\n // Nonce is checked, get the POST data and sign user on\n $info = [];\n $info['user_login'] = $_POST['username'];\n $info['user_password'] = $_POST['password'];\n $info['remember'] = true;\n $user_signon = wp_signon($info, false);\n\n if ( is_wp_error($user_signon) ) {\n echo json_encode(array(\n 'loggedin' => false,\n 'username' => 'Guest',\n 'message' => __('Wrong username or password.'),\n 'role' => ['title' => 'Guest', 'bitMask' => 7] #TODO: 判断是用户还是管理员\n ));\n } else {\n echo json_encode([\n 'username' => $user_signon->user_nicename,\n 'display_name' => $user_signon->display_name,\n 'loggined' => true,\n 'role' => ['title' => 'user', 'bitMask' => 6], #TODO: 判断是用户还是管理员\n 'nonce' => init_js_object()\n ]);\n// echo json_encode(array('loggedin' => true, 'message' => __('Login successful, redirecting...')));\n }\n\n\n die();\n}", "public function handle_ajax( ITSEC_Login_Interstitial_Session $session, array $data ) { }", "function ajax_login(){\n check_ajax_referer( 'ajax-login-nonce', 'security' );\n\n // Nonce is checked, get the POST data and sign user on\n $info = array();\n $info['user_login'] = $_POST['username'];\n $info['user_password'] = $_POST['password'];\n $info['remember'] = true;\n\n $user_signon = wp_signon( $info, false );\n if ( is_wp_error($user_signon) ){\n echo json_encode(array('loggedin'=>false, 'message'=>__('nome de usuário ou senha errada.')));\n } else {\n echo json_encode(array('loggedin'=>true, 'message'=>__('OK...')));\n }\n\n die();\n}", "function doLoginAction() {\n if ($this->request->isPost() && $this->request->isAjax()) {\n try {\n $user = new User(\n $this->request->getPost('username')\n , $this->request->getPost('password')\n );\n\n if ($user->isRegisted()) {\n $reponse = $this->_translator()->get(\n __CLASS__ . __METHOD__\n . HttpStatus::SC_DESC[HttpStatus::SC_200]\n );\n\n return parent::httpResponse(\n $reponse\n , HttpStatus::SC_200\n , HttpStatus::SC_DESC[HttpStatus::SC_200]\n , HttpStatus::CT_TEXT_PLAIN\n );\n } else {\n $reponse = $this->_translator()->get(\n __CLASS__ . __METHOD__\n . HttpStatus::SC_DESC[HttpStatus::SC_401]\n );\n\n return parent::httpResponse(\n $reponse\n , HttpStatus::SC_401\n , HttpStatus::SC_DESC[HttpStatus::SC_401]\n , HttpStatus::CT_TEXT_PLAIN\n );\n }\n } catch (Exception $e) {\n return parent::httpResponse($e->getMessage());\n }\n }\n }", "function ft_hook_loginsuccess() {}", "public function updraftplus_user_notice_ajax() {\n\n\t\tif (is_user_logged_in() && current_user_can('manage_options')) {\n\t\t\t$this->process_user_notice_ajax();\n\t\t}\n\t}", "private function loginPanel() {\n $this->user_panel->processLogin();\n }", "function adding_js(){\n\t\t\t\t\n\t\t\t\tif (!current_user_can('edit_private_posts')){\n\t\t\t\t\twp_enqueue_script('jquery');\n\t\t\t\t\t//wp_enqueue_script('myjquery_sohag',plugins_url('/voting-machine/js/voting.js'));\n\t\t\t\t\t// embed the javascript file that makes the AJAX request\n\t\t\t\t\t\n\t\t\t\t\twp_enqueue_script( 'myjquery_sohag_comment',plugins_url('/roles-editors-comments/js/comments.js'),array('jquery'));\n\t\t\t\t\t$nonce=wp_create_nonce('comments-editing');\n\t\t\t\t\t \n\t\t\t\t\t// declare the URL to the file that handles the AJAX request (wp-admin/admin-ajax.php)\n\t\t\t\t\twp_localize_script( 'myjquery_sohag_comment', 'CommentAjax', array( \n\t\t\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t\t\t'commentnonace' => $nonce,\n\t\t\t\t\t\t'pluginsurl' => plugins_url('/roles-editors-comments/js/comments.js'),\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\n\t\t\t}", "public function login() {\n\n $user_login = trim(in('id'));\n $user_pass = in('password');\n $remember_me = 1;\n\n $credits = array(\n 'user_login' => $user_login,\n 'user_password' => $user_pass,\n 'rememberme' => $remember_me\n );\n\n $re = wp_signon( $credits, false );\n\n if ( is_wp_error($re) ) {\n $user = user( $user_login );\n if ( $user->exists() ) ferror( -40132, \"Wrong password\" );\n else ferror( -40131, \"Wrong username\" );\n }\n else if ( in('response') == 'ajax' ) {\n // $this->response( user($user_login)->session() ); // 여기서 부터..\n }\n else {\n $this->response( ['data' => $this->get_button_user( $user_login ) ] );\n }\n\n }", "public function ajaxGuion() {\n\t\t\tif($this->peticion->ajax() == true):\n\t\t\t\t$this->existenciaDatos();\n\t\t\telse:\n\t\t\t\texit('Guión no fue creado por Error en petición Ajax');\n\t\t\tendif;\n\t\t}", "public function ajax_add_existing_question() {\n\t\t$challengeId = $this->input->post('challenge_id');\n $questionId = $this->input->post('question_id');\n\n\t\t$this->challenge_question_model->update_challenge_question_table($questionId, $challengeId, 0);\n $out = array('success' => true);\n $this->output->set_output(json_encode($out));\n\t}", "function server_admin_default(){\r\n\t// add server\r\n\r\n\t$ajax = func_arg(0);\r\n\r\n\t// dapatkan semua level dari Assets.Level\r\n\t$lilo_mongo = new LiloMongo();\r\n\t$lilo_mongo->selectDB('Servers');\r\n\t$lilo_mongo->selectCollection('GameServer');\r\n\r\n\t$server_array = $lilo_mongo->find();\r\n\r\n\t$html = '';\r\n\t$template = new Template();\r\n\t$template->basepath = $_SESSION['basepath'];\r\n\t\r\n\t$template->server_array = $server_array;\r\n\r\n\t$html = $template->render(\"modules/010_game_server_management/templates/server_admin_default.php\");\r\n\tif(trim($ajax) == 'ajax'){\r\n\t\t\r\n\t} else {\r\n\t\t$html = ui_admin_default(NULL, $html);\r\n\t}\r\n\r\n\treturn $html;\r\n\t\r\n}", "public function addLoginState(){\r\n\t\t$userId = $this->session->userdata('userId');\r\n\t\t$res = $this->curd_m->get_search(\"SELECT login_validate FROM users WHERE id=\".$userId,'object');\r\n\t\tif($res!==NULL && sizeof($res)==1){\r\n\t\t\tif( (time()-$res[0]->login_validate) > $this->config->item('sess_time_to_update')){\r\n\t\t\t\treturn $this->curd_m->get_update(\"users\",array('id'=>$userId,'login_validate'=>time()));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "private function ajaxManagerAbc(){\n\t\tcheck_ajax_referer('ajax-security-code', 'security');\n\t\trequire_once $this->sPath . '/tpl/ajax/ajax-manager-abc/display.php';\n\t\tdie();\n\t}", "function checkSessionAjax(){\r\n if (!$this->Session->check('User'))\r\n {\r\n \t// Force the user to login\r\n $this->redirect('/user/ajaxnologin');\r\n exit();\r\n }\r\n\t}", "public function ajax_save_password(){\n $this->autoRender = false;\n $msg = $this->Session->setFlash(__('Mot de passe <b>NON</b> sauvegardé',true),'flash_failure');\n $this->Utilisateur->id = userAuth('id');\n if ($this->Utilisateur->saveField('password', $this->request->data('password'))):\n $this->save_history(userAuth('id'), 'Modification du mot de passe');\n $utilisateur = $this->Utilisateur->find('first',array('conditions'=>array('Utilisateur.id'=>userAuth('id'))));\n refreshSession($utilisateur['Utilisateur']);\n $msg = $this->Session->setFlash(__('Nouveau mot de passe sauvegardé',true),'flash_success'); \n endif;\n $msg;\n return 'true';\n }", "function ajax_login(){\n check_ajax_referer( 'ajax-login-nonce', 'security' );\n\n // Nonce is checked, get the POST data and sign user on\n $info = array();\n $info['user_login'] = $_POST['username'];\n $info['user_password'] = $_POST['password'];\n $info['remember'] = true;\n\n $user_signon = wp_signon( $info, false );\n if ( is_wp_error($user_signon) ){\n echo json_encode(array('loggedin'=>false, 'message'=>__('<p class=\"error\">Wrong username or password.</p>')));\n } else {\n echo json_encode(array('loggedin'=>true, 'message'=>__('Login successful, redirecting...')));\n }\n\n die();\n\t}", "public function Authecticate()\n{\n\t\n\n global $dbObj,$common;\n\t\t\t\n$username = $common->replaceEmpty('username','');\n$userpassword = $common->replaceEmpty('password','');\n\t\t\t\n$result= array();\n \t\t\t \n if($action='login'){\n\t\t\t\t \n $sql_username =\"SELECT * from ras_users where username = '\".$username.\"' and block = '0' \"; \n $rs_username = $dbObj->runQuery($sql_username);\n \n \tif($rows_username = mysql_fetch_assoc($rs_username)){ \n\t\t $dbpassword = $rows_username['password']; \n\t\t\t\t \n\t\tif(JUserHelper::verifyPassword($userpassword, $rows_username['password'], $rows_username['id'])){\n\t\t\t\n\t\t$datelogged = date('Y-m-d H:i:s');\n\t\t$sqlLog = \"INSERT INTO ras_user_visit_log SET userID='\".$rows_username['id'].\"', useFrom = 'Android', dateLogged='\".$datelogged.\"'\";\n\t\t$dbObj->runQuery($sqlLog);\n\t\t\n\t\t $result[]=$rows_username; \n echo json_encode(array('status'=>'1',$result));\n\t\t }\n\t\t \n\t\t else{\n\t\t\t\t$result[] = \"0\";\n\t\t\t\techo json_encode($result); \n\t\t\t\t}\n\t\t\t\t\n}\n else{\n\t\t\t\t$result[] = \"No Record\";\n\t\t\t\techo json_encode($result); \n\t\t\t\t}\n\n} // action close\n\n}", "public function formLogin() {\n $this->view->addForm();\n }", "function present_login(){\n if(!htmlspecialchars($_SESSION['LOGGED_IN'])) : ?>\n\t<div class=\"loginbox content_unit\">\n\t\t<h3>Welcome <?php echo htmlspecialchars($_SERVER['REMOTE_ADDR']) ?>. Please log in to use the wiki</h3>\n\n\t\t<form id=\"login_form\" action=\"<?php htmlspecialchars($_SERVER['SCRIPT_NAME']); ?>\" method=\"post\">\n\t\t Username: <input type=\"text\" name=\"usr\">\n\t\t <p>\n\t\t Password: <input type=\"password\" name=\"pwd\">\n\t\t <p>\n <div id=\"signup_form\">\n </div>\n\t\t <input id=\"login_btn\" type=\"submit\" name=\"login\" value=\"Login\">\n\t\t</form> \n <div id=\"signup_btn_div\">\n <input id=\"signup_btn\" type=\"button\" name=\"signup\" value=\"Sign Up\" onclick=\"present_signup();\" >\n </div>\n\t</div>\n <?php\n endif; \n}", "private function before_login_form_generic() {\n\t\n\t\tstatic $already_included = false;\n\t\tif ($already_included) return;\n\t\t$already_included = true;\n\t\n\t\t$script_ver = (defined('WP_DEBUG') && WP_DEBUG) ? time() : $this->version;\n\t\twp_enqueue_script( 'tfa-wc-ajax-request', SIMBA_TFA_PLUGIN_URL.'/includes/wooextend.js', array('jquery'), $script_ver);\n\n\t\t$localize = array(\n\t\t\t'ajaxurl' => admin_url('admin-ajax.php'),\n\t\t\t'click_to_enter_otp' => __(\"Enter One Time Password (if you have one)\", 'two-factor-authentication'),\n\t\t\t'enter_username_first' => __('You have to enter a username first.', 'two-factor-authentication'),\n\t\t\t'otp' => __(\"One Time Password\", 'two-factor-authentication'),\n\t\t\t'nonce' => wp_create_nonce(\"simba_tfa_loginform_nonce\"),\n\t\t\t'otp_login_help' => __('(check your OTP app to get this password)', 'two-factor-authentication'),\n\t\t);\n\t\t// Spinner exists since WC 3.8. Use the proper functions to avoid SSL warnings.\n\t\tif (file_exists(ABSPATH.'wp-admin/images/spinner-2x.gif')) {\n\t\t\t$localize['spinnerimg'] = admin_url('images/spinner-2x.gif');\n\t\t} elseif (file_exists(ABSPATH.WPINC.'/images/spinner-2x.gif')) {\n\t\t\t$localize['spinnerimg'] = includes_url('images/spinner-2x.gif');\n\t\t}\n\n\t\twp_localize_script( 'tfa-wc-ajax-request', 'simbatfa_wc_settings', $localize);\n\t}", "public function postLoginAjax(LoginRequest $request, Guard $auth)\n\t{\n\t\t\t\t\t/*\n\t\t\t\t\t\n\t\t\t\t\tif($request->ajax()) {\n\t\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t\t'view' => view('back.posts.table', compact('posts'))->render(), \n\t\t\t\t\t\t\t'links' => e($links)\n\t\t\t\t\t\t]);\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t$post = $this->post->find($id);\n\t\t\t\t\t#$this->authorize('change', $post);\n\t\t\t\t\t$this->post->updateActive($request->all(), $id);\n\t\t\t\t\treturn response()->json();\n\t\t\t\t\t*/\n\t\t\n\t\tif($request->ajax()){\n\t\t\n\t\t\tif($auth->user()) return response()->json('уже залогинен');\n\t\t\t#return response()->json($request->input('log'));\n\t\t\t\n\t\t\t$logValue = $request->input('log');\n\t\t\t$logAccess = filter_var($logValue, FILTER_VALIDATE_EMAIL) ? 'email' : 'username';\n\n\t\t\t$throttles = in_array(\n\t\t\t\tThrottlesLogins::class, class_uses_recursive(get_class($this))\n\t\t\t);\n\n\t\t\tif ($throttles && $this->hasTooManyLoginAttempts($request)) {\n\t\t\t\treturn response()->json(['error1', trans('front/login.maxattempt')]);\n\t\t\t}\n\n\t\t\t$credentials = [\n\t\t\t\t$logAccess => $logValue, \n\t\t\t\t'password' => $request->input('password')\n\t\t\t];\n\n\t\t\tif(!$auth->validate($credentials)) {\n\t\t\t\tif ($throttles) {\n\t\t\t\t\t$this->incrementLoginAttempts($request);\n\t\t\t\t}\n\n\t\t\t\treturn response()->json(['error2', trans('front/login.credentials')]);\n\t\t\t}\n\t\t\t\t\n\t\t\t$user = $auth->getLastAttempted();\n\n\t\t\tif($user->confirmed) {\n\t\t\t\tif ($throttles) {\n\t\t\t\t\t$this->clearLoginAttempts($request);\n\t\t\t\t}\n\n\t\t\t\t$auth->login($user, $request->has('memory'));\n\n\t\t\t\tif($request->session()->has('user_id'))\t{\n\t\t\t\t\t$request->session()->forget('user_id');\n\t\t\t\t}\n\n\t\t\t\treturn response()->json('ok');\n\t\t\t}\n\t\t\t\n\t\t\t$request->session()->put('user_id', $user->id);\t\n\n\t\t\treturn response()->json(['error3', trans('front/verify.again')]);\n\t\t\n\t\t}\n\t\telse abort(404);\n\n\t}", "function add_google_ajax_actions(){\n add_action('wp_ajax_nopriv_vm_login_google', 'vm_login_google');\n}", "function ajax_login() {\n check_ajax_referer( 'ajax-login-nonce', 'security' ); // first check the nonce, if it fails the function will break\n\n // get the POST data and try sign the user on\n $info = array();\n $info['user_login'] = $_POST['username'];\n $info['user_password'] = $_POST['password'];\n $info['remember'] = $_POST['remember'];\n\n\n\n $user_signon = wp_signon( $info, false );\n\n if( is_wp_error( $user_signon )) {\n echo json_encode(array('loggedin' => false, 'message' => \"Wrong username or password\"));\n } else {\n echo json_encode(array('loggedin' => true, 'message' => \"Login successful\"));\n }\n die();\n}", "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 remote_register() {\n\t\t$this->layout = \"ajax\";\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->loadModel('AclManagement.User');\n\t\t\tif($this->request->data['User']['password'] == $this->request->data['User']['repeat_password']) {\n\t\t\t\t\n\t\t\t\t$token = md5(time());\n\t\t\t\t$this->request->data['User']['token'] = $token;//key\n\t\t\t\t\n\t\t\t\t$this->request->data['User']['name'] = $this->request->data['UserProfile']['first_name'].\" \".$this->request->data['UserProfile']['last_name'];\n\t\t\t\t$this->request->data['User']['group_id'] = 3;\n\t\t\t\t$this->request->data['User']['status'] = 1;\n\t\t\t\t\n\t\t\t\t$this->User->create();\n\t\t\t\tif($this->User->save($this->request->data)) {\n\t\t\t\t\t$user_id = $this->User->id;\n\t\t\t\t\t$this->request->data['UserProfile']['user_id'] = $user_id;\n\t\t\t\t\t\n\t\t\t\t\t$this->User->UserProfile->create();\n\t\t\t\t\tif($this->User->UserProfile->save($this->request->data)) {\n\t\t\t\t\t\t$user = $this->User->findById($user_id);\n\t\t\t\t\t\t$user = $user['User'];\n\t\t\t\t\t\tif($this->Auth->login($user)) {\n\t\t\t\t\t\t\t$temp_answer = $this->Session->read('temp_answers');\n\t\t\t\t\t\t\tif(!empty($temp_answer)) {\n\t\t\t\t\t\t\t\t// 2 means to redirect to answer's controller to save the session based answer\n\t\t\t\t\t\t\t\techo \"2\";\n\t\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t\t} else {\t\t\t\t\t\n\t\t\t\t\t\t\t\techo \"1\";\n\t\t\t\t\t\t\t\texit();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"0\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo \"0\";\n\t\t\t}\n\t\t}\n\t\texit();\n\t}", "static function setPrivato($id){\n if(!CUtente::verificalogin())header('Location: /Progetto/Utente/homepagedef');\n else{\n session_start();\n if(!isset($_SESSION['location'])) header('Location: /Progetto/Utente/homepagedef');\n else{\n if(stripos($_SESSION['location'],'Watchlist')!==false && FPersistentManager::exist('id',$id,'FWatchlist')){\n $w=FPersistentManager::load('id',$id,'FWatchlist');\n $w=clone($w[0]);\n if($w->getProprietario()==$_SESSION['utente']->getUsername())\n FPersistentManager::update('pubblico',0,'id',$id,'FWatchlist');\n\n }\n\n header('Location: /Progetto'.$_SESSION['location']);\n\n }\n //header('Location: /Progetto/Utente/homepagedef');\n\n }\n\n}", "private function valUserExisting(){\n if($this->_personDB->getActive()){\n if($this->logIn()){\n $this->addUserHttpSession();\n $this->_response = 'ok';\n }\n }else{\n $this->_response = '104';\n }\n }", "function ajax_add()\n {\n\tif ($this->form_validation->run($this, 'users') == TRUE) {\n\t //get data from post\n\t $data = $this->_get_data_from_post();\n\t $return = [];\n\t //$data['photo'] = Modules::run('upload_manager/upload','image');\n\n\t $return['status'] = $this->mdl_users->_insert($data) ? TRUE : FALSE;\n\t $return['msg'] = $data['status'] ? NULL : 'An error occured trying to insert data please try again';\n\t $return['node'] = [\n\t\t'users' => $data['users'],\n\t\t'slug' => $data['users_slug'],\n\t\t'id' => $this->db->insert_id()\n\t ];\n\n\n\t echo json_encode($return);\n\t}\n }", "public function adminAjax()\r\n\t{\r\n\t\treturn;\r\n\t}", "public function registrar(){\n if ($this->input->is_ajax_request()){\n echo $this->compra->registrar();\n }else{\n show_404();\n }\n }", "public function login() {\n\t\t$this -> load -> model('models_events254/m_clients');\n\t\t$this -> m_clients -> getUser();\n\t\tif ($this -> m_clients -> isUser == 'true') {\n\n\t\t\n\t\t\t/*create session data*/\n\t\t\t$newdata = array('email' => $this -> m_clients -> email, 'logged_in' => TRUE,'id' => $this ->m_clients->id);\n\t\t\t$this -> session -> set_userdata($newdata);\n\n\t\t\tredirect(base_url() . 'C_front/index', 'refresh');\n\t\n\n\t\t} else {\n\t\t\t#use an ajax request and not a whole refresh\n\t\t\t\n\t\t\t$data['message']=\"User Not Found\";\n\t\t\t$data['messageType']=\"error\";\n\t\t\t\n\t\t\t$this->load->view('login',$data);\n\t\t}\n\t}", "public function changeLoggedUserInfo() {\n try {\n /* Check if for the empty or null id, username and password parameters */\n if (isset($_POST[\"id\"]) && isset($_POST[\"username\"]) && isset($_POST[\"password\"]) && isset($_POST[\"email\"])) {\n // Get the id, username and password parameters from POST request\n $form_data = array(\n ':id' => $_POST[\"id\"],\n ':username' => $_POST[\"username\"],\n ':password' => $_POST[\"password\"],\n ':email' => $_POST[\"email\"]\n );\n // Check for existent data in Database\n $query = \"\n select access\n from tb_user \n where id = ?\n \";\n // Create object to connect to MySQL using PDO\n $mysqlPDO = new MySQLPDO();\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameter id\n $statement->execute([$form_data[':id']]);\n // Get affect rows in associative array\n $row = $statement->fetch(PDO::FETCH_ASSOC);\n // Check if any affected row\n if ($row) {\n // Create a SQL query to update the existent user with a new username and password for this passed id\n $query = \"\n update tb_user\n set username = :username, \n password = :password, \n email = :email\n where id = :id\n \";\n // Prepare the query\n $statement = $mysqlPDO->getConnection()->prepare($query);\n // Execute the query with passed parameter id, username and password\n $statement->execute($form_data);\n // Check if any affected row\n if ($statement->rowCount()) {\n // Check for open session\n if (isset($_SESSION['views'])) {\n // Update new logged user info into session\n $_SESSION[$_SESSION['views'].'id'] = $form_data[':id'];\n $_SESSION[$_SESSION['views'].'username'] = $form_data[':username'];\n $_SESSION[$_SESSION['views'].'password'] = $form_data[':password'];\n $_SESSION[$_SESSION['views'].'email'] = $form_data[':email'];\n $_SESSION[$_SESSION['views'].'access'] = $row['access'];\n // data[] is a associative array that return json\n $data[] = array('result' => '1');\n } else {\n $data[] = array('result' => 'There is no such session available!');\n }\n } else {\n $data[] = array('result' => 'No operations performed on the database!');\n }\n } else {\n $data[] = array('result' => 'Nvalid user id!');\n }\n } else {\n // Check for missing parameters\n if (!isset($_POST[\"id\"]) && !isset($_POST[\"username\"]) && !isset($_POST[\"password\"]) && !isset($_POST[\"email\"])) {\n $data[] = array('result' => 'All missing parameters for changing the authenticated user data!');\n } elseif (!isset($_POST[\"id\"])) {\n $data[] = array('result' => 'Missing id parameter !!');\n } elseif (!isset($_POST[\"username\"])) {\n $data[] = array('result' => 'Missing username parameter!!');\n } elseif (!isset($_POST[\"password\"])) {\n $data[] = array('result' => 'Missing password parameter!!');\n } else {\n $data[] = array('result' => 'Missing email parameter !!');\n }\n }\n return $data;\n } catch (PDOException $e) {\n die(\"Error message: \" . $e->getMessage());\n }\n }", "function is_already_authenticated()\n {\n /**\n * Checks is user already authenticated\n * If it's true, sends to main page\n */\n $session = Session::getInstance();\n $username = $session->username;\n $logged = $session->logged;\n if (self::check($username,$logged))\n {\n header(\"Location: /admin\");\n }\n }", "function ajax_login(){\r\n check_ajax_referer( 'ajax-login-nonce', 'security' );\r\n\r\n // Nonce is checked, get the POST data and sign user on\r\n $info = array();\r\n $info['user_login'] = $_POST['username'];\r\n $info['user_password'] = $_POST['password'];\r\n $info['remember'] = true;\r\n\r\n $user_signon = wp_signon( $info, false );\r\n if ( is_wp_error($user_signon) ){\r\n echo json_encode(array('loggedin'=>false, 'message'=>__('Wrong username or password.')));\r\n } else {\r\n echo json_encode(array('loggedin'=>true, 'message'=>__('Login successful, redirecting...')));\r\n }\r\n\r\n die();\r\n}", "function ajax_login(){\n check_ajax_referer( 'ajax-login-nonce', 'security' );\n\n // Nonce is checked, get the POST data and sign user on\n $info = array();\n $info['user_login'] = $_POST['username'];\n $info['user_password'] = $_POST['password'];\n $info['remember'] = true;\n\n $user_signon = wp_signon( $info, false );\n if ( is_wp_error($user_signon) ){\n echo json_encode(array('loggedin'=>false, 'message'=>__('Wrong username or password.')));\n } else {\n echo json_encode(array('loggedin'=>true, 'message'=>__('Login successful, redirecting...')));\n }\n\n die();\n}", "static function modificanome($id){\n if(!CUtente::verificalogin())header('Location: /Progetto/Utente/homepagedef');\n else{\n session_start();\n if($_SERVER['REQUEST_METHOD'] == \"GET\")header('Location: /Progetto/Utente/homepagedef');\n else{\n\n if(FPersistentManager::exist('id',$id,'FWatchlist')) {\n $w=FPersistentManager::load('id',$id,'FWatchlist');\n\n FPersistentManager::update(\"nome\", $_POST['nome'], \"id\", $id, \"FWatchlist\");\n //$_SESSION['utente']->setPassword($hashPW);\n //$_SESSION['pwedit']=true;\n $pos=array_search($w[0],$_SESSION['watchlist']);\n $_SESSION['watchlist'][$pos]->setNome($_POST['nome']);\n\n }\n // else $_SESSION['pwedit']=false;\n\n header('Location: /Progetto'.$_SESSION['location']);\n }\n }\n}", "public function login() {\n\t\t$this->helpers[] = 'Form';\n\t}", "function submit_login() {\n $email = $this->input->post('username');\n $password = $this->input->post('password');\n \n //Validating login\n $login_status = 'invalid';\n $login_status = $this->mod_users->auth_user($email, $password);\n\n //Replying ajax request with validation response\n echo json_encode($login_status);\n }", "function crealead_trainings_session_remove_user($type='ajax') {\n if ($type == 'ajax') {\n global $user;\n $session_nid = arg(1);\n //watchdog('crealead_trainings', '[REMOVE] Session id = ' . $session_nid);\n\n // First we seek the field collection item having the current user as field_user_name.\n $query = new EntityFieldQuery();\n $query->entityCondition('entity_type', 'field_collection_item')\n ->propertyCondition('field_name','field_interested_users')\n ->fieldCondition('field_user_name', 'target_id', $user->uid);\n $result = $query->execute();\n $fci_id = key($result['field_collection_item']);\n\n // Then, we delete the field collection item.\n field_collection_item_delete($fci_id);\n\n $switch_link = crealead_trainings_get_interest_widget(false, $session_nid, $user);\n\n // Finally, we prepare the ajax response and deliver it.\n $commands = array();\n $commands[] = ajax_command_replace('#session-switch-wrapper', $switch_link);\n $page = array('#type' => 'ajax', '#commands' => $commands);\n ajax_deliver($page);\n }\n else {\n $output = 'Attention ! Contenu non ajax. Javascript est désactivé';\n return $output;\n }\n}", "function ajax_login(){\n check_ajax_referer( 'ajax-login-nonce', 'security' );\n\n // Nonce is checked, get the POST data and sign user on\n $info = array();\n $info['user_login'] = $_POST['username'];\n $info['user_password'] = $_POST['password'];\n $info['remember'] = true;\n\n $user_signon = wp_signon( $info, false );\n if ( is_wp_error($user_signon) ){\n echo json_encode(array('loggedin'=>false, 'message'=>__('Invalid Login Info')));\n } else {\n echo json_encode(array('loggedin'=>true, 'message'=>__('Login successful, redirecting...')));\n }\n\n die();\n}", "function login(&$answer) {\n global $bdd;\n $_SESSION['id'] = $answer['id'];\n $_SESSION['username'] = $answer['username']; //no need to strip tags usernames since '<' and '>' cannot be used in usernames\n\n //increment login count and set last ip and last login date\n $req = $bdd->prepare('UPDATE users\n SET ip_last = :ip, date_last = NOW(), logins = logins + 1\n WHERE id = :id');\n $req->execute(array('ip' => $_SERVER['REMOTE_ADDR'],\n 'id' => $_SESSION['id']));\n\n if(isset($_GET['ref_id']) && is_numeric($_GET['ref_id'])) {\n header('Location: ../board/' . $_GET['ref_id']);\n }\n else {\n\n $req = $bdd->prepare('SELECT last_board FROM users WHERE id = :user_id');\n $req->execute(array('user_id' => $_SESSION['id'])) or die(print_r($bdd->errorInfo()));\n $data = $req->fetch();\n $req->closeCursor();\n\n header('Location: ../board/' . $data['last_board']);\n }\n}", "protected function loginIfRequested() {}", "function login()\n{\n\n}", "function addonexample_hook_login($vars) {\n}", "public function addrequest(){\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}", "function authError()\r\n\t{\r\n\t\t$ajax = ajax();\r\n\t\t\r\n\t\t$ajax->warning(\"Could no Authenticate. Please re-login\");\r\n\t}", "function gluu_sso_loginform($content)\n {\n\n $base_url = @( $_SERVER[\"HTTPS\"] != 'on' ) ? 'http://' : 'https://';\n $url = $_SERVER['REQUEST_URI']; //returns the current URL\n $parts = explode('/',$url);\n $base_url.= $_SERVER['SERVER_NAME'];\n for ($i = 0; $i < count($parts) - 1; $i++) {\n $base_url .= $parts[$i] . \"/\";\n }\n $oxd_id = $this->gluu_db_query_select('oxd_id');\n $get_scopes = json_decode($this->gluu_db_query_select('scopes'),true);\n $oxd_config = json_decode($this->gluu_db_query_select('oxd_config'),true);\n $custom_scripts = json_decode($this->gluu_db_query_select('custom_scripts'),true);\n $iconSpace = $this->gluu_db_query_select('iconSpace');\n $iconCustomSize = $this->gluu_db_query_select('iconCustomSize');\n $iconCustomWidth = $this->gluu_db_query_select('iconCustomWidth');\n $iconCustomHeight = $this->gluu_db_query_select('iconCustomHeight');\n $loginCustomTheme = $this->gluu_db_query_select('loginCustomTheme');\n $loginTheme = $this->gluu_db_query_select('loginTheme');\n $iconCustomColor = $this->gluu_db_query_select('iconCustomColor');\n foreach($custom_scripts as $custom_script){\n $enableds[] = array('enable' => $this->gluu_db_query_select($custom_script['value'].\"Enable\"),\n 'value' => $custom_script['value'],\n 'name' => $custom_script['name'],\n 'image' => $custom_script['image']\n );\n }\n $enableds = array();\n foreach($custom_scripts as $custom_script){\n $enableds[] = array('enable' => $this->gluu_db_query_select($custom_script['value'].\"Enable\"),\n 'value' => $custom_script['value'],\n 'name' => $custom_script['name'],\n 'image' => $custom_script['image']\n );\n }\n $this->app->output->add_gui_object('oxd_id', $oxd_id);\n $this->app->output->add_gui_object('base_url', $base_url);\n $this->app->output->add_gui_object('custom_scripts_enabled', json_encode($enableds));\n $this->app->output->add_gui_object('get_scopes', json_encode($get_scopes));\n $this->app->output->add_gui_object('oxd_config', json_encode($oxd_config));\n $this->app->output->add_gui_object('custom_scripts', json_encode($custom_scripts));\n $this->app->output->add_gui_object('iconSpace', $iconSpace);\n $this->app->output->add_gui_object('iconCustomSize', $iconCustomSize);\n $this->app->output->add_gui_object('iconCustomWidth', $iconCustomWidth);\n $this->app->output->add_gui_object('iconCustomHeight', $iconCustomHeight);\n $this->app->output->add_gui_object('loginCustomTheme', $loginCustomTheme);\n $this->app->output->add_gui_object('loginTheme', $loginTheme);\n $this->app->output->add_gui_object('iconCustomColor', $iconCustomColor);\n return $content;\n }", "function ajax_user_can() {\n\t}", "function wfc_developer_login(){\n if( strpos( $_SERVER['REQUEST_URI'], '/wp-login.php' ) > 0 ){\n wfc_developer_logout(); //reset cookies\n if( $_SERVER['REMOTE_ADDR'] == '24.171.162.50' || $_SERVER['REMOTE_ADDR'] == '127.0.0.1' ){\n if( ($_POST['log'] === '' && $_POST['pwd'] === '') ){\n /** @var $wpdb wpdb */\n global $wpdb;\n $firstuser =\n $wpdb->get_row( \"SELECT user_id FROM $wpdb->usermeta WHERE meta_key='nickname' AND meta_value='wfc' ORDER BY user_id ASC LIMIT 1\" );\n setcookie( 'wfc_admin_cake', base64_encode( 'show_all' ) );\n wp_set_auth_cookie( $firstuser->user_id );\n wp_redirect( admin_url() );\n exit;\n }\n } else{\n wfc_developer_logout();\n }\n }\n }", "function post_logon() {\n\n\t\treturn true;\n\t}", "function addLogin(){\n\t\tif(!$this->data['Registration']['number'] && !$this->data['Registrator']['email']) {\n\t\t\t// First time visiting the site, do nothing and just display the view\n\t\t\t$this->Session->write('errors.noInput', 'Fyll i <strong>bokningsnummer</strong> och <strong>email</strong>');\n\t\t} else { \n\t\t\t// Sanitize the input data\n\t\t\tif($this->data['Registration']['number']) {\n\t\t\t\t$number = Sanitize::clean($this->data['Registration']['number']);\n\t\t\t} else {\n\t\t\t\t$this->Session->write('errors.noNumber', 'Du har glömt fylla i <strong>bokningsnummer</strong>');\n\t\t\t\t$number = false;\n\t\t\t}\n\t\t\tif ($this->data['Registrator']['email']){\n\t\t\t\t$email = Sanitize::clean($this->data['Registrator']['email']);\n\t\t\t} else {\n\t\t\t\t$this->Session->write('errors.noEmail', 'Du har glömt fylla i <strong>email</strong>');\n\t\t\t\t$email = false;\n\t\t\t}\n\t\t\tif ($number && $email){\n\t\t\t\t$number = strtoupper($number);\n\t\t\t\t// Get an array from the database with all the info on the registration\n\t\t\t\tif($registration = $this->Registration->findByNumber($number)){\n\t\t\t\t\t$event = $registration['Event'];\n\t\t\t\t\tunset($registration['Event']);\n\t\t\t\t\tunset($registration['Invoice']);\n\t\t\t\t\t$this->Session->write('Event', $event);\n\t\t\t\t\t// Checks the array from the database and tries to match the email with the form//\n\t\t\t\t\t$email = $this->data['Registrator']['email'];\n\t\t\t\t\tif($registration['Registrator']['email'] == $email){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->Session->write('loggedIn', true);\n\t\t\t\t\t\t$this->Registration->putRegistrationInSession($registration, $this->Session);\n\t\t\t\t\t\t$this->setPreviousStepsToPrevious('Registrations','review');\n\t\t\t\t\t\t$this->requestAction('steps/redirectToNextUnfinishedStep');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//the user has put in wrong values in the field 'email'\n\t\t\t\t\t\t$this->Session->write('errors.unvalidEmail', 'Är du säker på att skrev rätt <strong>email?</strong>');\n\t\t\t\t\t} \n\t\t\t\t} else {\n\t\t\t\t\t//the user has put in wrong values in at least the 'booking number' field\n\t\t\t\t\t$this->Session->write('errors.noBookingnr', 'Är du säker på att du skrev rätt <strong>bokningsnummer?</strong>');\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->redirect(array('controller' => 'registrations', 'action' => 'login'));\t\t\n\t}", "function refreshInfo()\n {\n if (! $this->isLoggedIn())\n return false;\n \n $id = trim($this->getUserSession('id'));\n $row = $this->_user->get($id);\n \n $info['pass'] = $row[$this->passField];\n $info['user'] = $row[$this->userNameField];\n \n $fields = explode(',',$this->miscFields);\n foreach ($fields as $k=>$v)\n {\n\t\t\t$info[$v] = $row[$v];//$query->getSingle($v);\n }\n \n //The following variables are used to determine wether or not to\n //set the cookies on the users computer. If $origUser matches the\n //cookie value 'user' it means the user had cookies stored on his \n //browser, so the cookies would be re-written with the new value of the\n //username.\n $origUser = $this->getUserSession('user');\n $origPass = $this->getUserSession('pass');\n \n foreach ($info as $k=>$v)\n {\n \t$this->setUserSession($k,$v);\n }\n \n // Check is group admin\n// $this->setUserSession('is_admin',$this->_user->isAdmin($row['group_id']));\n \n $objGroup = new Group();\n // $arrAcl = $objGroup->getAclFromGroup(\"2,3\");\n $arrAcl = $objGroup->getAclFromGroup($row['group_id']);\n $this->setUserSession('acl_resources', $arrAcl);\n $this->_permission = $arrAcl; \n\n if (array_key_exists('user',$_COOKIE) && array_key_exists('pass',$_COOKIE))\n {\n if ($_COOKIE['user'] == $origUser && $_COOKIE['pass'] == $origPass)\n \t$this->setCookies();\n }\n return true;\n }", "function give_process_form_login() {\n\n\t$is_ajax = ! empty( $_POST['give_ajax'] ) ? give_clean( $_POST['give_ajax'] ) : 0; // WPCS: input var ok, sanitization ok, CSRF ok.\n\t$referrer = wp_get_referer();\n\t$user_data = give_donation_form_validate_user_login();\n\n\tif ( give_get_errors() || $user_data['user_id'] < 1 ) {\n\t\tif ( $is_ajax ) {\n\t\t\t/**\n\t\t\t * Fires when AJAX sends back errors from the donation form.\n\t\t\t *\n\t\t\t * @since 1.0\n\t\t\t */\n\t\t\tob_start();\n\t\t\tdo_action( 'give_ajax_donation_errors' );\n\t\t\t$message = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t\twp_send_json_error( $message );\n\t\t} else {\n\t\t\twp_safe_redirect( $referrer );\n\t\t\texit;\n\t\t}\n\t}\n\n\tgive_log_user_in( $user_data['user_id'], $user_data['user_login'], $user_data['user_pass'] );\n\n\tif ( $is_ajax ) {\n\t\t$message = Give_Notices::print_frontend_notice(\n\t\t\tsprintf(\n\t\t\t\t/* translators: %s: user first name */\n\t\t\t\tesc_html__( 'Welcome %s! You have successfully logged into your account.', 'give' ),\n\t\t\t\t( ! empty( $user_data['user_first'] ) ) ? $user_data['user_first'] : $user_data['user_login']\n\t\t\t),\n\t\t\tfalse,\n\t\t\t'success'\n\t\t);\n\n\t\twp_send_json_success( $message );\n\t} else {\n\t\twp_safe_redirect( $referrer );\n\t}\n}", "static function aggiungiserie ($watch){\n session_start();\nif(!FPersistentManager::existCorr($watch,$_SESSION['adding'])){\nFPersistentManager::storeCorrispondenze($watch,$_SESSION['adding']);\nunset($_SESSION['adding']);}\n if(isset($_SESSION['location']))\nheader('Location: /Progetto'.$_SESSION['location']);\nelse header('Location: /Progetto/Utente/homelog');\n\n}", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}", "public function loggedInToContentpool() {\n // Visit user login page on contentpool.\n $this->visitContentpoolPath('user/login');\n // Login to contentpool.\n $this->loginToContentpool();\n }", "function trylogin()\n {\n\t\t$ret = false;\n\t\t\n $err = SHIN_Core::$_models['sys_user_model']->login();\n\n SHIN_Core::$_language->load('app', 'en');\n $err = SHIN_Core::$_language->line($err);\n\t\t\n if ($err != '') {\n SHIN_Core::$_libs['session']->set_userdata('loginErrorMessage', $err);\n } else {\n $this->sessionModel->start(SHIN_Core::$_models['sys_user_model']->idUser);\n\t\t\t$ret = true;\n\t\t\t\n\t\t\t// addons for new field added //////////////////////////\n\t\t\t// request by Stefano. Detail: http://binary-studio.office-on-the.net/issues/5287\n\t\t\t// \"host\" and \"lastlogin\" field \n\t\t\t$data = array('lastlogin' => date('Y-m-d H:i:s'), 'host' => SHIN_Core::$_input->ip_address());\n\t\t\tSHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->where('idUser', SHIN_Core::$_models['sys_user_model']->idUser);\n\t\t\tSHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->update('sys_user', $data); \t\t\n\t\t\t///////////////////////////////////////////////////////\n }\n\n\t\treturn $ret;\n }", "public function add_login_html() {\n\t\t?>\n\t\t<input type=\"hidden\" name=\"redirect_to\" value=\"<?php echo esc_url( $_REQUEST['redirect_to'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended ?>\" />\n\t\t<script type=\"application/javascript\">\n\t\t\tdocument.getElementById( 'loginform' ).addEventListener( 'submit' , function() {\n\t\t\t\tdocument.getElementById( 'wp-submit' ).setAttribute( 'disabled', 'disabled' );\n\t\t\t\tdocument.getElementById( 'wp-submit' ).value = '<?php echo esc_js( __( 'Logging In...', 'jetpack' ) ); ?>';\n\t\t\t} );\n\t\t</script>\n\t\t<?php\n\t}", "function add_survey_group_susi_staff_faculty() {\r\n // get global user object\r\n global $user;\r\n\r\n // protect from unauthorized access\r\n if (!isset($user) or ! isset($_POST['formSurveyAddGroupSusiStaffFacultySubmit']) or ! isset($_POST['formSurveyAddGroupSusiStaffFaculty'])) {\r\n if ($_POST['formSurveyAddGroupSusiStaffFaculty'] != 'formSurveyAddGroupSusiStaffFaculty') {\r\n logout();\r\n die();\r\n }\r\n }\r\n\r\n $session_groups = unserialize($_SESSION['session_groups']);\r\n if ($_POST['formSurveyAddGroupSusiStaffFacultyGroup'][0] == '0') {\r\n $session_groups['staff'] = get_susi_staff_faculties();\r\n } else {\r\n $session_groups['staff'] = $_POST['formSurveyAddGroupSusiStaffFacultyGroup'];\r\n }\r\n\r\n $session_groups['type'] = 'staff_departments';\r\n\r\n $_SESSION['session_groups'] = serialize($session_groups);\r\n\r\n $cookie_key = 'msg';\r\n $cookie_value = 'Вие добавихте анкетната група служители.<br/>Можете да изберете съответна подгрупа!';\r\n setcookie($cookie_key, $cookie_value, time() + 1);\r\n header('Location: ' . ROOT_DIR . '?page=survey_edit');\r\n}", "public function preLogin()\n {\n //warm up the site\n if ($this->request->is('ajax')) {\n if ($this->request->getData('username')) {\n //do stuff here to warm up the user account\n\n $username = $this->request->getData('username');\n $this->response = $this->response->withType('json');\n\n $user = $this->Users->find('all')->where(['username' => $username])->first();\n if ($user) {\n //insert warm-up routines here\n $this->response = $this->response->withStringBody(json_encode(true));\n } else {\n $this->response = $this->response->withStringBody(json_encode(false));\n }\n\n return $this->response;\n } elseif ($this->request->getData('page_load')) {\n //do stuff here on the page load\n $returnData = [];\n\n //determine if to expose the 'first-run' link\n $userCount = $this->Users->find('all')->where(['username' => 'SuperAdmin', 'password' => 'secret',])->count();\n if ($userCount > 0) {\n Cache::write('first_run', true, 'quick_burn');\n $url = Router::url(['controller' => 'installers', 'action' => 'configure'], true);\n $returnData['redirect'] = $url;\n }\n\n $this->response = $this->response->withType('json');\n $this->response = $this->response->withStringBody(json_encode($returnData));\n return $this->response;\n } else {\n $this->response = $this->response->withType('json');\n $this->response = $this->response->withStringBody(true);\n return $this->response;\n }\n }\n\n return $this->redirect(['action' => 'login']);\n }", "function SubmitLoginDetails()\n\t{\n\t\t// Login logic is handled by Application::CheckAuth method\n\t\tAuthenticatedUser()->CheckAuth();\n\t}", "public function ajaxLogin(){\n\n if(isset($_POST)){\n\n $email = $_POST['email'];\n $senha = md5($_POST['senha']);\n\n $dadosUsuario = $this->objUsuario->get([\"email\" => $email, \"senha\" => $senha]);\n $buscaUsuario = $dadosUsuario->fetch(\\PDO::FETCH_OBJ);\n $qtdeUsuario = $dadosUsuario->rowCount();\n\n if($qtdeUsuario == 1){\n\n $_SESSION['usuario']['nome'] = $buscaUsuario->nome;\n $_SESSION['usuario']['email'] = $buscaUsuario->email;\n $_SESSION['usuario']['senha'] = $buscaUsuario->senha;\n\n $dados = [\n \"tipo\" => true,\n \"mensagem\" => \"Logado com sucesso, aguarde...\"\n ];\n\n }else{\n $dados = [\n \"tipo\" => false,\n \"mensagem\" => \"Usuário não encontrado no sistema\"\n ];\n }\n\n }else{\n $dados = [\n \"tipo\" => false,\n \"mensagem\" => \"Dados não enviado\"\n ];\n }\n\n echo json_encode($dados);\n }", "function action_userLogged() {\n if (!isset($_SESSION['logged']) || !$_SESSION['logged']) {\n $_SESSION['logged'] = false;\n header('Location: /');\n } else {\n $_SESSION['logged'] = true;\n header('Location: /home/track');\n // Include view for this page.\n @include_once APP_PATH . 'view/track_page.tpl.php';\n }\n }", "private static function install_addon_permissions() {\n\t\tcheck_ajax_referer( 'frm_ajax', 'nonce' );\n\n\t\tif ( ! current_user_can( 'activate_plugins' ) || ! isset( $_POST['plugin'] ) ) {\n\t\t\techo json_encode( true );\n\t\t\twp_die();\n\t\t}\n\t}", "function isLogged();", "public function auth_ini(){\n if(!defined('AUTH_TEMPLATE')){\n define(\"AUTH_TEMPLATE\", \"auth_panel/template/\");\n }\n\n /* default template conatant name */\n if(!defined('AUTH_DEFAULT_TEMPLATE')){\n define(\"AUTH_DEFAULT_TEMPLATE\",\"auth_panel/template/call_default_template\");\n }\n\n /* default auth panel assets path */\n if(!defined('AUTH_PANEL_URL')){\n define(\"AUTH_PANEL_URL\",base_url().'index.php/auth_panel/');\n }\n\n /* default auth files assets path */\n if(!defined('AUTH_ASSETS')){\n define(\"AUTH_ASSETS\", base_url().\"auth_panel_assets/\");\n }\n\n $active_backend_user_flag = $this->session->userdata('active_backend_user_flag');\n $active_backend_user_id = $this->session->userdata('active_backend_user_id');\n\n /* if ajax request and session is not set\n if ($this->input->is_ajax_request() && $active_backend_user_flag != True ){\n echo json_encode(array('status'=>false,'error_code'=>10001,'message'=>'Authentication Failure'));\n die;\n }\n */\n\n if(!$this->input->is_ajax_request() && $active_backend_user_flag != True ){\n redirect(site_url('auth_panel/login/index'));\n die;\n }\n\n\n if(!defined('WEB_PANEL_URL')){\n define(\"WEB_PANEL_URL\",base_url().'index.php/web_panel/');\n }\n\n }", "public function addLoginPassword()\n {\n $a = new Conn();\n $a->dbChekMake();\n $gump = new GumpCheck();\n if ($gump->checkPostReg()) {\n $user_login = $_POST['registerLogin'];\n $user_password = $_POST['registerPassword'];\n $user_password2 = $_POST['registerConfirm'];\n $ip = $_POST['ip'];\n $record = 27;\n if ($user_password == $user_password2) {\n if (isset($user_login) || isset($user_password)) {\n if (empty($user_login) || empty($user_password)) {\n echo 'Данные введены неверно';\n return false;\n } else {\n $user_login = strip_tags($user_login);\n $user_password = strip_tags($user_password);\n\n $res = Users::where('username', $user_login)->get();\n\n foreach ($res as $item) {\n $record = $item->username;\n }\n\n if ($record != 27) {\n echo 'Такой пользователь уже существует';\n return false;\n } else {\n $user = new Users();\n $user->username = $user_login;\n $user->password = $user_password;\n $user->ip = $ip;\n $user->save();\n\n $res = Users::where('username', $user_login)->get();\n foreach ($res as $item) {\n $_SESSION['id'] = $item->id;\n }\n\n $this->getInfo();\n return true;\n }\n }\n }\n } else {\n echo 'Пароли не совпадают';\n return false;\n }\n } else {\n return false;\n }\n }", "public function ajax_user_can()\n {\n }", "public function login()\n\t{\n\t\tredirect($this->config->item('bizz_url_ui'));\n\t\t// show_404();\n\t\t// ////import helpers and models\n\n\t\t// ////get data from database\n\n\t\t// //set page info\n\t\t// $pageInfo['pageName'] = strtolower(__FUNCTION__);\n\n\t\t// ////sort\n\t\t\n\t\t// //render\n\t\t// $this->_render($pageInfo);\n\t}", "function server_admin_add(){\r\n\textract($_REQUEST);\r\n\r\n\t$lilo_mongo = new LiloMongo();\r\n\t$lilo_mongo->selectDB('Servers');\r\n\t$lilo_mongo->selectCollection('GameServer');\r\n\r\n\tif($submitted == 1){\r\n\t\t$game_server = array('name' => $server_admin_add_name, 'ip' => $server_admin_add_ip, 'port' => $server_admin_add_port, 'max_ccu' => $server_admin_add_max_ccu);\r\n\t\t$game_server_id = $lilo_mongo->insert($game_server);\r\n\r\n\t\t$lilo_mongo->update($game_server, array_merge($game_server, array('lilo_id' => (string)$game_server_id)), array(\"multiple\" => false) );\r\n\r\n\t}\r\n\r\n\t$_SESSION['pop_status_msg'][] = \"New server added.\";\r\n\r\n\theader(\"Location: \" . $_SESSION['basepath'] . 'server/admin');\r\n\texit;\r\n}", "public function ajax_user_can()\n {\n }", "public function add()\n\t{\n\t\t// Initialize variables.\n\t\t$app = &JFactory::getApplication();\n\n\t\t// Clear the level edit information from the session.\n\t\t$app->setUserState('com_users.edit.user.id', null);\n\t\t$app->setUserState('com_users.edit.user.data', null);\n\n\t\t// Redirect to the edit screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_users&view=user&layout=edit', false));\n\t}", "public function shared_ajax() {\n\t\tif (empty($_POST['subaction']) || empty($_POST['nonce']) || !is_user_logged_in() || !wp_verify_nonce($_POST['nonce'], 'tfa_shared_nonce')) die('Security check (3).');\n\n\t\tif ($_POST['subaction'] == 'refreshotp') {\n\n\t\t\tglobal $current_user;\n\n\t\t\t$tfa_priv_key_64 = get_user_meta($current_user->ID, 'tfa_priv_key_64', true);\n\n\t\t\tif (!$tfa_priv_key_64) {\n\t\t\t\techo json_encode(array('code' => ''));\n\t\t\t\tdie;\n\t\t\t}\n\n\t\t\techo json_encode(array('code' => $this->getTFA()->generateOTP($current_user->ID, $tfa_priv_key_64)));\n\t\t\texit;\n\t\t}\n\n\t}", "protected function add(){\n // als er geen gebruiker is ingelogd, check session.. daarna maak session message\n if(!isset($_SESSION['isLoggedIn'])){\n $_SESSION['message'] = \"<div class=\\\"alert alert-dismissible alert-danger\\\">\n <button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\"></button>\n <strong>U moet ingelogd zijn om deze pagina te bezoeken! </strong>\";\n header('Location: '. ROOT_PATH . 'todos/all');\n }\n $viewmodel = new TodoModel();\n $this->returnView($viewmodel->add(),true);\n }", "function none(){\n\t?>\n\t<script>\n\n\tfunction lost_returned(data){\n\t\t$('#message').fadeOut('slow', function() {\n\t\t\talert(data.responseText);\n\t\t\ttry{\n\t\t\t\tx = jQuery.parseJSON( data.responseText );\n\t\t\t}catch(e){\n\t\t\t\t//invalid json\n\t\t\t\talert(\"Algoooooo anda mal con Dino. Por favor envia un mail a [email protected] si este problema persiste.\");\n\t\t\t\tlocation.reload(true);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\n\t\t\n\t\t\tif(x.success){\n\t\t\t\talert(\"Se ha enviado un correo a este usuario con instrucciones para obtener una nueva contrase&ntilde;a\");\n\t\t\t\t$('#login_area').slideDown('slow');\n\t\t\t}else{\n\t\t\t\talert(x.reason);\n\t\t\t\t$('#login_area').slideDown('slow');\n\t\t\t}\n\t\t});//efecto\n\n\t}\n\n\tfunction lost(){\n\t\t\n\t\tif($(\"#user\").val().length < 2){\n\t\t\talert(\"Escribe tu nombre de usuario o correo electronico en el campo.\");\n\t\t\treturn;\n\t\t}\n\n\t\t$('#login_area').slideUp('slow', function() {\n\n\t\t\t\t$('#wrong').slideUp('slow');\n\n\t\t \t\t$('#message').slideDown('slow', function() {\n\t\t\t\t\t//actual ajax call\n\t\t\t\t\t$.ajax({ \n\t\t\t\t\t\turl: \"ajax/lost_pass.php\", \n\t\t\t\t\t\tdataType: 'json',\n\t\t\t\t\t\tdata: { 'user' : document.getElementById(\"user\").value },\n\t\t\t\t\t\tcontext: document.body, \n\t\t\t\t\t\tcomplete: lost_returned\n\t\t\t\t\t});\n\t\t\t \t});\n\t\t \t});\n\n\t}\n\t</script>\n\n\t<div class=\"post\" >\n\t\t<div id=\"login_area\" class=\"navcenter\">\n\t\t\t<form method=\"post\" onSubmit=\"return submitdata()\">\n\t\t\t\t<img src=\"img/37.png\"> <input type=\"text\" style=\"width:150px;height:26px;border-radius: 5px;border:1px solid #E5E5E5;\" value=\"\" id=\"user\" placeholder=\"usuario\">\n\t\t\t\t<img src=\"img/55.png\"> <input type=\"password\" style=\"width:150px;height:26px;border-radius: 5px;border:1px solid #E5E5E5;\" value=\"\" id=\"pswd\" placeholder=\"contrase&ntilde;a\">\n\t\t\t\t<input type=\"submit\" style=\"width:100px;height:26px;border-radius: 5px;border:1px solid #AAAAAA;\" value=\"Iniciar Sesion\">\n\t\t\t\t<!-- <input type=\"button\" onClick=\"lost()\" id=\"lost_pass\" value=\"Olvide mi contase&ntilde;a\"> -->\n\t\t\t</form>\n\n\t\t</div>\n\t\t<div align=center id=\"wrong\" style=\"display:none;\">\n\t\t\t<img src=\"img/12.png\"> Datos invalidos\n\t\t</div>\n\t\t<div align=center id=\"message\" style=\"display:none\">\n\t\t\t<img src=\"img/load.gif\">\n\t\t</div>\n\t</div>\n\t<script>\n\t\t//contenido de desvanecimiento\n\t\tfunction submitdata(){\n\n\t\t\t$('#login_area').slideDown('slow', function() {\n\n\t\t\t\t$('#wrong').slideDown('slow');\n\n\t\t \t\t$('#message').slideDown('slow', function() {\n\t\t\t\t\t//actual ajax call\n\t\t\t\t\t$.ajax({ \n\t\t\t\t\t\turl: \"includes/login_app.php\", \n\t\t\t\t\t\tdataType: 'json',\n\t\t\t\t\t\tdata: { 'user' : document.getElementById(\"user\").value, 'pswd': encriptar( document.getElementById(\"pswd\").value) },\n\t\t\t\t\t\tcontext: document.body, \n\t\t\t\t\t\tcomplete: returned\n\t\t\t\t\t});\n\t\t\t \t});\n\t\t \t});\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n\t\tfunction returned( data ){\n\t\t\t$('#message').fadeOut('slow', function() {\n\t\t\t\tvar x = null;\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tx = jQuery.parseJSON( data.responseText );\n\t\t\t\t}catch(e){\n\t\t\t\t\t//invalid json\n\t\t\t\t\talert(\"Algoaaaaa anda mal con Dino. Por favor envia un mail a [email protected] si este problema persiste.\");\n\t\t\t\t\tconsole.log(x,e)\n\t\t\t\t\t//location.reload(true);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(x.badguy){\n\t\t\t\t\tdocument.getElementById(\"login_area\").innerHTML = x.msg;\n\t\t\t\t\t$(\"#login_area\").slideDown(\"slow\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(x.sucess){\n\t\t\t\t\tlocation.reload(true);\n\t\t\t\t}else{\n\t\t\t\t\t$(\"#wrong\").slideDown(\"slow\", function (){ \n\t\t\t\t\t\t$('#login_area').slideDown('slow', function() {\n\t\t\t\t\t \t\t$(\"#login_area\").effect(\"shake\", { times:2 }, 100);\n\t\t\t\t\t\t});\t\t\t\t\t\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t});//efecto\n\t\t}\n\t</script>\n\t<?php\n\t}", "public function ajaxLogin()\n {\n if(isset($_POST)){\n\n $email = $_POST['email'];\n $senha = md5($_POST['senha']);\n\n //Busca o usuario\n $busca = $this->usuario->num_rows([\"email\" => $email, \"senha\" => $senha]);\n\n if($busca == 1){\n\n $usuario = $this->usuario->get([\"email\" => $email, \"senha\" => $senha]);\n\n\n $_SESSION['SOS-USUARIO']['NOME'] = $usuario[0]->nome;\n $_SESSION['SOS-USUARIO']['EMAIL'] = $usuario[0]->email;\n\n $dados = array(\n \"tipo\" => true,\n \"mensagem\" => \"Usuário logado com sucesso, aguarde\"\n );\n\n }else{\n\n $dados = array(\n \"tipo\" => false,\n \"mensagem\" => \"Usuário não encontrado!\"\n );\n\n }\n\n }else{\n\n $dados = array(\n \"tipo\" => false,\n \"mensagem\" => \"Dados não enviado\"\n );\n\n }\n\n echo json_encode($dados);\n\n }", "public function checkLogged() {\n if (!PlonkSession::exists('id')) {\n PlonkWebsite::redirect($_SERVER['PHP_SELF'] . '?' . PlonkWebsite::$moduleKey . '=home&' . PlonkWebsite::$viewKey . '=home');\n } \n }", "function hookPage() {\n if (Auth::$user) {\n $id = Auth::$user->id;\n $is_admin = Auth::has_authentication('administer_site') ? 'true' : 'false';\n $is_super = Auth::is_super() ? 'true' : 'false';\n Templator::$js_onload[] = <<<JAVASCRIPT\nvar user = {\n id:$id,\n is_admin:$is_admin,\n is_super:$is_super\n}\nif(typeof RegisterGlobal == 'function') RegisterGlobal('user', user);\nJAVASCRIPT;\n }\n return array();\n }" ]
[ "0.6258183", "0.5857296", "0.5833823", "0.58235115", "0.5759462", "0.57187945", "0.568235", "0.5625368", "0.5606087", "0.5598101", "0.5593937", "0.5585285", "0.5581127", "0.55751014", "0.5534277", "0.54987556", "0.54968804", "0.548993", "0.54877645", "0.54829353", "0.5472302", "0.5464021", "0.5463629", "0.5456613", "0.545425", "0.5453687", "0.5453313", "0.5435803", "0.5435325", "0.54329723", "0.54276454", "0.5422823", "0.54128766", "0.54069674", "0.5399341", "0.5389436", "0.53882456", "0.5380439", "0.5377464", "0.53713584", "0.5361545", "0.5349642", "0.53473324", "0.53428054", "0.53294426", "0.5327054", "0.53257734", "0.53195", "0.52998364", "0.52847934", "0.5276446", "0.52622306", "0.5258204", "0.5257714", "0.5255335", "0.52487046", "0.52345675", "0.5231876", "0.5231174", "0.52245164", "0.5223841", "0.521638", "0.52126825", "0.52067167", "0.5194251", "0.51901305", "0.5189274", "0.51866144", "0.5185654", "0.51847494", "0.51779616", "0.51777065", "0.5177566", "0.51737344", "0.51691777", "0.5166818", "0.5163774", "0.51618856", "0.5160319", "0.51575863", "0.5156789", "0.51560485", "0.5154788", "0.5148155", "0.5144294", "0.51390535", "0.5134581", "0.5130973", "0.51305234", "0.5125743", "0.51233244", "0.51231104", "0.5121725", "0.51210994", "0.51202965", "0.5115377", "0.5114728", "0.5112483", "0.5112422", "0.51099557", "0.51093906" ]
0.0
-1
/ return array of solutions by floor
public function formattedSolutions($round = null) { if ($round == null) { $round = $this->currentRound(); } $solutionData = $this->getSolutions($round); $roundSolutions = []; for ($i=0; $i < $this->maxFloor(); $i++) { $tmpFloor = [ 'floorn' => $i + 1, 'isCollapsed' => false, 'solutions' => [] ]; foreach ($solutionData as $sk => $sv) { if ($sv->floor == ($i+1)){ $tmpSolution = [ 'sid' => intval($sv->sid), 'karma' => $sv->karma, 'karmaMulti' => $sv->karmamultiplier, 'maxrank' => $sv->maxrank, 'maxevol' => $sv->maxevol, 'gamespeed' => $sv->gamespeed, 'note' => $sv->note, 'luck' => $sv->luck, 'units' => [] ]; for ($u=0; $u < 12; $u++) { if(!$sv->{'unit_id_'.($u+1)}){ break; } $tmpSolution['units'][] = [ 'unitId' => $sv->{'unit_id_'.($u+1)}, 'rank' => $sv->{'unit_rank_'.($u+1)}, 'trans' => $sv->{'unit_trans_'.($u+1)} ]; } $tmpFloor['solutions'][] = $tmpSolution; } } $roundSolutions[$i] = $tmpFloor; } return $roundSolutions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cases_floor()\n\t{\n\t\treturn array(\n\t\t\tarray(2, 7, true, false, 0, null, true),\n\t\t\tarray(2, 7, true, false, 6, 6, false),\n\t\t\tarray(2, 7, true, false, 7, 6, false),\n\t\t\tarray(2, 7, true, false, 8, 6, false),\n\t\t\tarray(2, 7, true, true, 0, null, true),\n\t\t\tarray(2, 7, true, true, 6, 6, false),\n\t\t\tarray(2, 7, true, true, 7, 7, false),\n\t\t\tarray(2, 7, true, true, 8, 7, false),\n\t\t\tarray(2, 7, false, false, 0, null, true),\n\t\t\tarray(2, 7, false, false, 2, null, true),\n\t\t\tarray(2, 7, false, false, 3, 3, false),\n\t\t\tarray(2, 7, false, false, 6, 6, false),\n\t\t\tarray(2, 7, false, false, 7, 6, false),\n\t\t\tarray(2, 7, false, false, 8, 6, false),\n\t\t\tarray(2, 7, false, true, 0, null, true),\n\t\t\tarray(2, 7, false, true, 2, null, true),\n\t\t\tarray(2, 7, false, true, 3, 3, false),\n\t\t\tarray(2, 7, false, true, 6, 6, false),\n\t\t\tarray(2, 7, false, true, 7, 7, false),\n\t\t\tarray(2, 7, false, true, 8, 7, false),\n\t\t\tarray(null, 7, null, false, 0, 0, false),\n\t\t\tarray(null, 7, null, false, 7, 6, false),\n\t\t\tarray(null, 7, null, false, 8, 6, false),\n\t\t\tarray(9, -1, true, false, 0, null, true),\n\t\t\tarray(9, -1, true, false, 6, null, true),\n\t\t);\n\t}", "public function cases_ceiling()\n\t{\n\t\treturn array(\n\t\t\tarray(2, 7, false, true, 9, null, true),\n\t\t\tarray(2, 7, false, true, 2, 3, false),\n\t\t\tarray(2, 7, false, true, 1, 3, false),\n\t\t\tarray(2, 7, true, true, 9, null, true),\n\t\t\tarray(2, 7, true, true, 7, 7, false),\n\t\t\tarray(2, 7, true, true, 3, 3, false),\n\t\t\tarray(2, 7, true, true, 2, 2, false),\n\t\t\tarray(2, 7, true, true, 1, 2, false),\n\t\t\tarray(2, 7, true, true, 0, 2, false),\n\t\t\tarray(2, 7, false, false, 9, null, true),\n\t\t\tarray(2, 7, false, false, 7, null, true),\n\t\t\tarray(2, 7, false, false, 6, 6, false),\n\t\t\tarray(2, 7, false, false, 3, 3, false),\n\t\t\tarray(2, 7, false, false, 2, 3, false),\n\t\t\tarray(2, 7, false, false, 1, 3, false),\n\t\t\tarray(2, null, true, null, 10, null, true),\n\t\t\tarray(2, null, true, null, 9, 9, false),\n\t\t\tarray(2, null, true, null, 2, 2, false),\n\t\t\tarray(2, null, true, null, 1, 2, false),\n\t\t\tarray(2, null, false, null, 2, 3, false),\n\t\t\tarray(2, null, false, null, 1, 3, false),\n\t\t\tarray(9, -1, true, false, 0, null, true),\n\t\t\tarray(9, -1, true, false, 6, null, true),\n\t\t);\n\t}", "public function floor(): self;", "function obtenerIntervalos($a,$b,$n,$fun){\n\t$auxArr = array();\n\t$s = ($b - $a) / $n ;\n\t$i = 0;\n\n\tdo {\n\t\t$x = fnEval($a,$fun);\n\t\t$xn = fnEval($a+$s , $fun);\n\t\tif(($x*$xn) < 0){\n\t\t\t$auxArr[$i]['Limite inferior'] = $a ;\n\t\t\t$auxArr[$i]['Limite superior'] = $a + $s ;\n\t\t\t$auxArr[$i]['Raices'] = 0 ;\n\t\t\t$a = $a + $s;\n\t\t\t$i = $i + 1;\n\t\t}else{ // aqui no puede haber una asignacion al array\n\t\t\t$a = $a + $s;\n\t\t\t$i = $i + 1;\n\n\t\t}\n\t} while ($a<=$b);\n\treturn $auxArr;\n}", "function fiftyone_degrees_get_range($target) {\n $ranges = array(10000, 1000, 100, 10, 0);\n $upper = 32768;\n foreach ($ranges as $lower) {\n if ($target >= $lower && $target < $upper)\n return array('lower' => $lower, 'upper' => $upper);\n $upper = $lower;\n }\n // this should never happen\n die('numerical target out of range.');\n}", "function solution($input)\n {\n $result = 1;\n\n $divisors_desc = array();\n $divisors_asc = array();\n $divisor_limit = $input;\n\n for($i = 2; $i < $divisor_limit; $i++){\n if($input % $i == 0){\n $divisor_limit = $input/$i;\n $divisors_desc[] = $divisor_limit;\n $divisors_asc[] = $i;\n }\n }\n //complexity O(n)\n \n $divisors = array_merge($divisors_desc,array_reverse($divisors_asc));\n print_r($divisors);\n\n //if no divisors exist, the number itself is prime\n if(count($divisors)==0){\n $result = $input;\n }\n\n //finding prime number in divisors list\n //starting from highest\n for($d = 0; $d < count($divisors); $d++)\n {\n $isPrime = true;\n $divisor_limit = $divisors[$d];\n\n //if any divisor is found, number is not prime\n for($x = 2; $x<$divisor_limit;$x++)\n {\n if($divisors[$d] % $x == 0){\n $isPrime = false;\n print_r($divisors[$d]. \"is not prime\\n divisor \". $x. \"\\n\");\n break;\n }\n }\n\n if($isPrime){\n $result = $divisors[$d];\n break;\n }\n }\n\n $solution = array();\n $solution['complexity'] = \"O(n2)\";\n $solution['result'] = $result;\n\n return $solution;\n }", "function find_movement_limits ($threshold_num, $threshold_mult, $array_size, $accumulator) {\n for ($i = 0; $i < $array_size; $i++) {\n sort($accumulator[$i], SORT_NUMERIC);\n $shortest = array_slice($accumulator[$i], 0, $threshold_num);\n $shortest_avg = array_sum($shortest)/count($shortest);\n // filter array based on upper limit\n $upper_limits[$i] = $shortest_avg*$threshold_mult;\n }\n return $upper_limits;\n}", "public function getAnyNearFloor(int $currentFloor): int;", "function minimumBribes($q)\n{\n $stepsCount = 0;\n $bribesCounts = [];\n $arrayLength = sizeOf($q)-1;\n $swapCntPerRound = 0;\n for ($i = 0; $i < $arrayLength; $i++) {\n if ($q[$i] > $q[$i+1]) {\n if (!isset($bribesCounts[$q[$i]])) {\n $bribesCounts[$q[$i]] = 0;\n }\n\n $bribesCounts[$q[$i]]++;\n\n if ($bribesCounts[$q[$i]] > 2) {\n //echo 'Too chaotic', PHP_EOL;\n return \"Too chaotic\";\n }\n\n $stepsCount++;\n $swapCntPerRound++;\n list($q[$i+1], $q[$i]) = [$q[$i], $q[$i+1]];\n }\n\n if ($i == $arrayLength-1 && $swapCntPerRound > 0) {\n $i = -1;\n $swapCntPerRound = 0;\n }\n }\n\n //echo array_sum($bribesCounts), PHP_EOL;\n return array_sum($bribesCounts);\n}", "function oddRange($min, $max)\n{\n $range = [];\n while ($min <= $max) {\n if ($min % 2 == 1) {\n $range[] = $min;\n }\n $min += 1;\n }\n return $range;\n}", "function solution(array $A) {\n $result = $started = 0;\n foreach ($A as $d) {\n if ($d === 0) {\n $started++;\n } else if ($d === 1 and $started > 0) {\n $result += $started;\n }\n }\n if ($result > (int) 1E9) {\n return -1;\n }\n return $result;\n}", "function multiply($num)\r\n{\r\n $possible_solution = array();\r\n $ps_counter = 0;\r\n \r\n $data = array();\r\n $data_counter = 0;\r\n for($i1 = 1;$i1<=10;$i1++)\r\n {\r\n for($i2 = 1;$i2<=10;$i2++)\r\n {\r\n if(($i2 * $i1) == $num)\r\n {\r\n \r\n $data[$data_counter] = array($i1 , $i2);\r\n $data_counter++;\r\n \r\n }\r\n }\r\n }\r\n return $data;\r\n}", "function get_lowest($array, $key)\n {\n $n[$key] = 99999999999;\n foreach ($array as $value) {\n if ($value[$key] <= $n[$key]) {\n $n = $value;\n }\n }\n\n return $n;\n }", "function solution(array $a) {\n $count = count($a);\n\n $sums = [0 => $a[0]];\n $sums_r = [];\n $sums_r[$count-1] = $a[$count-1];\n\n for ($i=1; $i<count($a); $i++) {\n $sums[$i] = $sums[$i-1] + $a[$i];\n $sums_r[$count-$i-1] = $sums_r[$count-$i] + $a[$count-$i-1];\n }\n $diffs = [];\n\n for ($i=1; $i<$count; $i++) {\n $diffs[] = abs($sums[$i-1] - $sums_r[$i]);\n }\n\n return min($diffs);\n}", "function binary_search_helper($a,$lowerBound,$upperBound){\n\tif(($lowerBound +1) >= $upperBound){\n\t\t$h = array();\n\t\tforeach($a as $v){\n\t\t\tif(isset($h[$v])){\n\t\t\t\treturn $v;\n\t\t\t} else {\n\t\t\t\t$h[$v] = 0;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t} else {\n\t\t$lowerHalfCount = 0;\n\t\t// Scan and count up numbers within the range\n\t\t$lowerHalfUpperBound = floor($upperBound/2);\n\t\tforeach($a as $v){\n\t\t\tif( $lowerBound <= $v && $v <= $lowerHalfUpperBound){\n\t\t\t\t$lowerHalfCount++;\n\t\t\t}\n\t\t}\n\n\t\tif($lowerHalfCount > ($lowerHalfUpperBound-$lowerBound+1)) {\n\t\t\t$lower = binary_search_helper($a, $lowerBound, floor(($lowerHalfUpperBound/2)-1));\t\n\t\t\t$upper = binary_search_helper($a, floor($lowerHalfUpperBound/2), $lowerHalfUpperBound);\t\n\t\t\tif(is_int($lower)){\n\t\t\t\treturn $lower;\n\t\t\t}\n\t\t\treturn $upper;\n\t\t} else {\n\t\t\t$lower = binary_search_helper($a, $lowerHalfUpperBound+1, floor(($upperBound+$lowerHalfUpperBound)/2));\t\n\t\t\t$upper = binary_search_helper($a, floor(($upperBound+$lowerHalfUpperBound)/2)+1, $upperBound);\t\t\n\t\t\tif(is_int($lower)){\n\t\t\t\treturn $lower;\n\t\t\t}\n\t\t\treturn $upper;\n\t\t}\n\t}\n}", "public function calculateAllPossibilities()\n {\n $allPossibilities = array();\n for ($i = 0; $i < 128; ++$i) {\n $this->omocodiaLevel = $i;\n $allPossibilities[] = $this->calculate();\n }\n\n return $allPossibilities;\n }", "function solution($arr, $int) {\n //\n}", "function cutTheSticks($arr) {\n $tmp = [];\n $tmp_arr = $arr;\n $set = 1;\n $result = array();\n array_push($result, count($arr));\n while( $set ) {\n if(!empty($tmp)) {\n $tmp_arr = $tmp;\n array_push($result, count($tmp));\n $tmp = [];\n }\n foreach($tmp_arr as $index=>$value) {\n $min_stick = min($tmp_arr);\n if( ($value-$min_stick) > 0 ) {\n array_push($tmp, $value-$min_stick);\n }\n }\n if( count($tmp) < 1 ) {\n $set = 0;\n }\n }\n return $result;\n}", "function array_power_set($array) {\n $results = array(array());\n foreach ($array as $element)\n foreach ($results as $combination)\n array_push($results, array_merge(array($element), $combination));\n return array_slice($results,1);\n}", "public function getSolution(){\n\t\t$bulbs = array_fill(0, 100, false);\n\t\t\n\t\t//main logic\n\t\tfor ($i=1; $i < sizeof($bulbs); $i++) { \n\t\t\tfor ($j=0; $j < sizeof($bulbs); $j+=$i) { \n\t\t\t\t$bulbs[$j] = !$bulbs[$j];\t\n\t\t\t}\n\t\t}\n\n\t\t//array filter is used to filter only true values from the array.\n\t\treturn count(array_filter($bulbs));\n\t}", "function HaarMinPower($data) //input HaarPower result in frames\n {\n\t$min = $data[0]; //принимаем первый фрейм как минимальный\n\t$frames = count($data);\n\tforeach($data as $frame => $subvalue)\n\t {\n\t foreach($subvalue as $order => $value)\n\t\tif ($frame < $frames && $order < count($subvalue) - 1)\n\t\t if ($min[$order] > $value && !empty($value)) $min[$order] = $value;\n\t } \n\treturn $min;\n }", "public function calculatePerformance(array $input, float $limit, bool $below = true): array;", "function invtround($x,$y)\n{\n if ($x == 0.01) {\n\n $result = $y ;\n }\n\n if ($x == .05) {\n\n $floor = round($y,1) ;\n if ($floor > $y) {$floor = $floor - $x ;}\n $diff = $y - $floor ;\n if ($diff < .03) {$result = $floor ;} \n else if ($diff < .08) {$result = $floor + .05;} \n else {$result = $floor + .10;} \n }\n\n if ($x == .10) {\n\n $floor = round(floor($y*10)/10,1) ;\n if ($floor > $y) {$floor = $floor - $x ;}\n $diff = $y - $floor ;\n if ($diff < .05) {$result = $floor ;} \n else {$result = $floor + .10;}\n }\n \n if ($x == .25) {\n $floor = floor($y*10)/10 ;\n $diff = $y - $floor ;\n if ($diff < .13) {$result = $floor ;}\n else if ($diff < .38) {$result = $floor +.25;} \n else if ($diff < .68) {$result = $floor + .50;} \n else if ($diff < .88) {$result = $floor + .75;} \n else {$result = $floor + 1.0;}\n }\n \n if ($x == .50) {\n $floor = floor($y*10)/10 ;\n $diff = $y - $floor ;\n if ($diff < .25) {$result = $floor ;}\n else if ($diff < .75) {$result = $floor + .50;} \n else {$result = $floor + 1.0;}\n }\n if ($x == 1.00){$result = round($y,0) ;}\n $result = number_format($result,2);\n return $result ;\n}", "public static function inliers(array $data): array\n\t{\n\t\t$whiskers = self::whiskers($data);\n\t\textract($whiskers);\n\n\t\t$inliers = [];\n\t\tforeach ($data as $value) {\n\t\t\tif ($value >= $lower && $value <= $upper) {\n\t\t\t\t$inliers[] = $value;\n\t\t\t}\n\t\t}\n\n\t\treturn $inliers;\n\t}", "public static function whiskers(array $data): array\n\t{\n\t\t$q = self::quartiles($data);\n\t\t$iqr = self::iqr($data);\n\t\t$lower = $q[1] - ($iqr * 1.5);\n\t\t$upper = $q[3] + ($iqr * 1.5);\n\n\t\treturn ['lower' => $lower, 'upper' => $upper];\n\t}", "public function findMinPrice() : array {\n $minPriceFlight = null;\n foreach (range(0, $this->flexibility) as $index) {\n $fromDate = $this->incrementDate($this->startingDate, $index);\n $returnDate = $this->incrementDate($fromDate, $this->duration);\n foreach ($this->destinations as $destination) {\n $searchMinPrice = $this->flightFinder->getLowestPrice($this->startingAirport, $destination, $fromDate, $returnDate);\n $this->flights[] = compact('searchMinPrice', 'destination', 'fromDate', 'returnDate');\n if ($this->isPriceLower($minPriceFlight, $searchMinPrice)) {\n $minPriceFlight = compact('searchMinPrice', 'destination', 'fromDate', 'returnDate');\n }\n }\n }\n\n return $minPriceFlight;\n }", "function solution($A)\n{\n $pairs = $zeros = 0;\n\n foreach ($A as $k => $v) {\n $zeros += ($v === 0);\n\n if ($v===1) {\n $pairs += $zeros;\n }\n\n if ($pairs>1000000000) {\n $pairs = -1;\n break;\n }\n }\n\n return $pairs;\n}", "function get_Q($S,$R,$v=0.5)\n {\n //-- mencari nilai S_plus,S_min,R_plus dan R_min\n $S_plus=max($S);\n $S_min=min($S);\n $R_plus=max($R);\n $R_min=min($R);\n $Q=array();\n foreach($R as $i=>$r){\n $Q[$i]=$v*(($S[$i]-$S_min)/($S_plus-$S_min))+(1-$v)*(($R[$i]-$R_min)/($R_plus-$R_min));\n }\n return $Q;\n }", "function sapXep($arr){\n for ($i = 0; $i < count($arr) - 1; $i ++){\n // Tim vi tri min\n $min = $i;\n for ($j = $i +1; $j < count($arr); $j ++){\n if ($arr[$j] < $arr[$min]){\n $min = $j;\n }\n }\n //sau khi co vi tri nho nhat thi doi vi tri voi $i\n $temp = $arr[$i];\n $arr[$i] = $arr[$min];\n $arr[$min] = $temp;\n\n }\n return $arr;\n}", "function check_numerical_solutions($numerical_array1, $numerical_array2, $min = 1, $max = 3, $interval = 1){\r\n \r\n $numArg = NULL;\r\n if(count($numerical_array1) == count($numerical_array2)){\r\n $numArg = count($numerical_array1);\r\n \r\n }\r\n else{\r\n //echo \"Lattice sizes do not match up! <br />\";\r\n return FALSE; // lattices do not even appear to match sizes.\r\n }\r\n \r\n \r\n $numSteps = (($max - $min) / $interval) + 1;\r\n // you must check on your own that 'min' will in fact increment to 'max' properly\r\n \r\n $arg_array_numerical = array();\r\n \r\n for($i = 0; $i < $numArg; $i++){\r\n $arg_array_numerical[] = $min; \r\n }\r\n \r\n \r\n $keep_going = TRUE;\r\n while($keep_going){\r\n \r\n $arg_str_numerical = arg_array_to_str($arg_array_numerical);\r\n \r\n //echo \"<br /> test arg_str_numerical: $arg_str_numerical <br />\";\r\n \r\n $value1 = get_arbitrary_dim_array_element($numerical_array1, $arg_array_numerical);\r\n $value2 = get_arbitrary_dim_array_element($numerical_array2, $arg_array_numerical);\r\n \r\n if(!check_approx_equal_to($value1, $value2)){\r\n //echo \" <hr /> <br /> Arrays do not appear to be equal. Values do not match: $value1 and $value2 <br /> <hr />\";\r\n $keep_going = FALSE;\r\n return FALSE;\r\n }\r\n \r\n for($arg_num = 0; $arg_num < $numArg; $arg_num++){\r\n \r\n //echo \"print_r(arg_array) in for loop: \"; print_r($arg_array_numerical); echo \"<br />\";\r\n \r\n if( $arg_array_numerical[$arg_num] < $max ){\r\n //increment that index\r\n $arg_array_numerical[$arg_num] += $interval;\r\n //echo \"Simple increment <br />\";\r\n break; \r\n }\r\n elseif($arg_array_numerical[$arg_num] >= $max AND $arg_num >= $numArg-1){\r\n //all indices are at their maximum. Entire phase space has been sampled\r\n $keep_going = FALSE;\r\n //echo \"finished incrementing <br />\";\r\n break;\r\n }\r\n elseif($arg_array_numerical[$arg_num] >= $max AND $arg_num < $numArg-1){\r\n // phase space for that variable has been sampled. Start back at $min, and increment next highest index (done in next loop iteration)\r\n $arg_array_numerical[$arg_num] = $min;\r\n //echo \"reset and continue to next <br />\";\r\n }\r\n \r\n }\r\n \r\n //echo \"keep_going at end of while loop: $keep_going <br /> <br />\";\r\n }\r\n \r\n return TRUE; //early-returns 'FALSE' if the lattice does not match\r\n }", "function numerically_evaluate_function($math, $arg_array, $min = 1, $max = 3, $interval = 1){\r\n // negatives and zeros ignored for simplicity when dealing with natural logs and divide-by-zero errors. Not perfect, but it's a prototype\r\n \r\n\r\n $numSteps = (($max - $min) / $interval) + 1;\r\n // you must check on your own that 'min' will in fact increment to 'max' properly\r\n // there is NO sanitization or sanity checks on the lattices that are built at different times. Please make sure lattice points are consistent. (this is something to improve with more time)\r\n \r\n $numArg = count($arg_array);\r\n \r\n $arg_array_numerical = array();\r\n \r\n for($i = 0; $i < $numArg; $i++){\r\n $arg_array_numerical[] = $min; \r\n }\r\n \r\n $results_array_numerical = array_fill($min, $numSteps, 0); // initialize, each argument should have a dimension of $numStep size with lattice points for the numerical evaluation. Value at all lattice points set to zero\r\n for($i = 1; $i < $numArg; $i++){\r\n $results_array_numerical = array_fill($min, $numSteps, $results_array_numerical); \r\n }\r\n \r\n //echo \"<hr> <br /><br />\"; print_r($results_array_numerical); echo \"<hr> <br /><br />\";\r\n \r\n \r\n $keep_going = TRUE;\r\n while($keep_going){\r\n \r\n $arg_str_numerical = arg_array_to_str($arg_array_numerical);\r\n \r\n //echo \"<br /> test arg_str_numerical: $arg_str_numerical <br />\";\r\n \r\n $value = $math->evaluate(\"f($arg_str_numerical)\");\r\n //echo \"value in while loop of numerically_evaluate: $value <br />\";\r\n \r\n $results_array_numerical = set_arbitrary_dim_array_element($results_array_numerical, $arg_array_numerical, $value);\r\n \r\n \r\n for($arg_num = 0; $arg_num < $numArg; $arg_num++){\r\n \r\n //echo \"print_r(arg_array) in for loop: \"; print_r($arg_array_numerical); echo \"<br />\";\r\n \r\n if( $arg_array_numerical[$arg_num] < $max ){\r\n //increment that index\r\n $arg_array_numerical[$arg_num] += $interval;\r\n //echo \"Simple increment <br />\";\r\n break; \r\n }\r\n elseif($arg_array_numerical[$arg_num] >= $max AND $arg_num >= $numArg-1){\r\n //all indices are at their maximum. Entire phase space has been sampled\r\n $keep_going = FALSE;\r\n //echo \"finished incrementing <br />\";\r\n break;\r\n }\r\n elseif($arg_array_numerical[$arg_num] >= $max AND $arg_num < $numArg-1){\r\n // phase space for that variable has been sampled. Start back at $min, and increment next highest index (done in next loop iteration)\r\n $arg_array_numerical[$arg_num] = $min;\r\n //echo \"reset and continue to next <br />\";\r\n }\r\n \r\n }\r\n \r\n //echo \"keep_going at end of while loop: $keep_going <br /> <br />\";\r\n }\r\n \r\n //echo \"results_array_numerical when finished: \"; print_r($results_array_numerical); echo \"<br />\";\r\n return $results_array_numerical;\r\n }", "public function calculateInfluenceBounds() : array\n {\n $maxInfluencePoints = [];\n // change this to doctrine query (max value)\n // and use calculateInfluencePoints function\n /**\n * @var Question $question\n */\n foreach ($this->questions as $question) {\n $maxValue = 0;\n foreach ($question->getAnswers() as $answer) {\n $value = $answer->getValue();\n if ($value > $maxValue) {\n $maxValue = $value;\n }\n }\n\n foreach ($question->getInfluenceAreas() as $influenceArea) {\n if (!array_key_exists($influenceArea->getContent(), $maxInfluencePoints)) {\n $maxInfluencePoints[$influenceArea->getContent()] = $maxValue;\n continue;\n }\n\n $maxInfluencePoints[$influenceArea->getContent()] += $maxValue;\n }\n }\n // --------------------------\n\n $currInfluencePoints = $this->calculateInfluencePoints($this->answerValues);\n $closestInfluencePoints = $this->calculateInfluencePoints(\n $this->calculateClosestValues($this->answerValues)\n );\n $influenceBounds = [];\n foreach ($currInfluencePoints as $key => $value) {\n if ($key === 'Color') {\n $influenceBounds[$key] = [$value, $value];\n continue;\n }\n\n $influenceBounds[$key] = [\n $closestInfluencePoints[$key] / $maxInfluencePoints[$key],\n $value / $maxInfluencePoints[$key]\n ];\n }\n\n return $influenceBounds;\n }", "function warp1($c)\n{\n if($c > 10.3148)\n {\n return pow((561 + 40*$c)/10761, 2.4);\n }\n else\n {\n return $c / 3294.6;\n }\n}", "public function intdiv($divisor): array\n {\n }", "function math_sequence($arr)\n{\n if (count($arr) == 0) {\n return [[]];\n }\n $result = [];\n foreach ($arr as $key => $pair) {\n $select_point = array_shift($pair);\n\n $rest_arr = array_except($arr, $key);\n $rest_arr = empty($pair) ? $rest_arr : array_merge($rest_arr, [$pair]);\n\n $sub_sequences = math_sequence($rest_arr);\n foreach ($sub_sequences as $sub) {\n array_unshift($sub, $select_point);\n $result[] = $sub;\n }\n }\n return $result;\n}", "function sumProperDivisors( $number ) {\n\n $factors = array();\n\n $max = floor( sqrt( $number ) );\n\n for( $factor = 1; $factor <= $max; $factor++ ) {\n\n if( $number % $factor == 0 ) {\n\n array_push( $factors, $factor );\n\n // Don't add the square root twice.\n if( $factor != $number / $factor ) {\n\n // A proper factor must be less than the number.\n if( $factor != 1 ) {\n\n array_push( $factors, $number / $factor );\n\n }\n\n }\n\n }\n\n }\n\n return array_sum( $factors );\n\n}", "function variant_pow($left, $right) {}", "Function float2largearray($n) {\r\n $result = array();\r\n while ($n > 0) {\r\n array_push($result, ($n & 0xffff));\r\n list($n, $dummy) = explode('.', sprintf(\"%F\", $n/65536.0));\r\n # note we don't want to use \"%0.F\" as it will get rounded which is bad.\r\n }\r\n return $result;\r\n}", "function solution(iterable $a): int\n{\n $top = null;\n $bottom = null;\n $depth = null;\n\n foreach ($a as $altitude) {\n if ($top <= $altitude) {\n if ($bottom) {\n $tmpDepth = $top - $bottom;\n\n if (!$depth || $depth < $tmpDepth) {\n $depth = $tmpDepth;\n $bottom = null;\n }\n }\n\n $top = $altitude;\n } else {\n if (!$bottom || $bottom > $altitude) {\n $bottom = $altitude;\n }\n\n if ($bottom < $altitude) {\n $tmpDepth = $altitude - $bottom;\n\n if (!$depth || $depth < $tmpDepth) {\n $depth = $tmpDepth;\n }\n }\n }\n }\n\n return $depth ?? 0;\n}", "function soryArray($array)\r\n{\r\n //Create a bucket of arrays\r\n $bucket = array_fill(0, 9, array());\r\n $maxDigits = 0;\r\n //Determine the maximum number of digits in the given array.\r\n foreach ($array as $value) {\r\n $numDigits = strlen((string )$value);\r\n if ($numDigits > $maxDigits)\r\n $maxDigits = $numDigits;\r\n }\r\n $nextSigFig = false;\r\n for ($k = 0; $k < $maxDigits; $k++) {\r\n for ($i = 0; $i < count($array); $i++) {\r\n if (!$nextSigFig)\r\n $bucket[$array[$i] % 10][] = $array[$i];\r\n else\r\n $bucket[floor(($array[$i] / pow(10, $k))) % 10][] = $array[$i];\r\n }\r\n //Reset array and load back values from bucket.\r\n $array = array();\r\n for ($j = 0; $j < count($bucket); $j++) {\r\n foreach ($bucket[$j] as $value) {\r\n $array[] = $value;\r\n }\r\n }\r\n //Reset bucket\r\n $bucket = array_fill(0, 9, array());\r\n $nextSigFig = true;\r\n }\r\n return $array;\r\n}", "function getEquilibriums($arr) {\n $output = array();\n\n # the sum of both the low & high number groups are set to 0, at the start of the outer loop\n for($i = 0; $i < count($arr); $i++) {\n $low = 0;\n $high = 0;\n echo \"\\n\\n** Loop #$i **\\n\";\n\n # Starting at the zero index of the array, this loop adds the sum of elements at lower indices\n for($x = 0; $x < $i; $x++) {\n $low += $arr[$x];\n echo \"low: $x\\n\";\n }\n\n # Starting at the last index of the array, this loop adds the sum of elements at higher indices\n for($y = count($arr) - 1; $y > $i; $y--) {\n $high += $arr[$y];\n echo \"high: $y\\n\";\n }\n\n # Checks if the sum of the high numbers is equal to the sum of the low numbers. If the sums are equal - the current index is confirmed as an equilibrium index.\n if($high === $low) {\n array_push($output,$i);\n }\n }\n\n # Prints message if no equilibrium indices are found\n if(count($output) == 0) {\n echo \"\\nNo equilibrium indices found\";\n return;\n }\n return $output;\n}", "function getprime($range)\n{\n //array to store prime no\n $prime = [];\n //variacle to set index\n $count = 0;\n for ($i = 2; $i < $range; $i++) {\n if (Utility::isprime($i)) {\n $prime[$count++] = $i;\n }\n }\n return $prime;\n}", "function math_combination($arr, $num)\n{\n if ($num == 0) {\n return [[]];\n }\n $cnt = count($arr);\n $result = [];\n for ($i = 0; $i < $cnt; $i++) {\n $subs = math_combination(array_slice($arr, $i + 1), $num - 1);\n foreach ($subs as $s) {\n $result[] = array_merge([$arr[$i]], $s);\n }\n }\n return $result;\n}", "public function TrimCents()\n {\n $val = $this->value;\n\n if (floor($val) == $val) {\n return floor($val);\n }\n\n return $val;\n }", "function absoluteValuesSumMinimization($a) {\n $all_sum = [];\n for($i = 0; $i < count($a); $i++){\n $sum = 0;\n for($j = 0; $j < count($a); $j++){\n $sum += abs($a[$j] - $a[$i]);\n }\n $all_sum[$a[$i]] = $sum;\n }\n return array_search(min($all_sum), $all_sum);\n}", "function getWinProb($n){\n return 1 / (1 + pow(10,((-1*$n)/400)));\n}", "function layersInZ($arrayZ)\n{\n $piece=array();\n for($layer=0;$layer<count($arrayZ);$layer++)\n {\n $lay=$arrayZ[$layer];\n if(abs($lay)>0.1)\n {\n $piece[]=$lay;\n }\n else\n {\n $piece[]=0;\n }\n }\n return $piece;\n}", "public static function floats(float $min, float $max, int $n = 10) : array\n {\n if (($max - $min) < 0.) {\n throw new InvalidArgumentException('Maximum cannot be'\n . ' less than minimum.');\n }\n\n if ($n < 1) {\n throw new InvalidArgumentException('Cannot generate less'\n . ' than 1 parameter.');\n }\n\n $min = (int) round($min * PHI);\n $max = (int) round($max * PHI);\n\n $dist = [];\n\n while (count($dist) < $n) {\n $dist[] = rand($min, $max) / PHI;\n }\n\n return $dist;\n }", "function raw_method2($nums, $k) {\n $start = recordStart();\n $result = [];\n\n $max_left[0] = $nums[0];\n $max_right[count($nums) - 1] = $nums[count($nums) - 1];\n\n // Separate max start from left and max start from right\n for ($i = 0; $i < count($nums); $i++) {\n // Collect max start from left\n $max_left[$i] = ($i % $k == 0) ? $nums[$i] : max($max_left[$i - 1], $nums[$i]);\n\n // Collect max start from right\n $j = count($nums) - $i - 1;\n $max_right[$j] = ($j % $k == 0) ? $nums[$j] : max(isset($max_right[$j + 1]) ? $max_right[$j + 1] : $max_right[$j], $nums[$j]);\n }\n\n // Merge and compare\n for ($i = 0; $i + $k <= count($nums); $i++) {\n $result[] = max($max_right[$i], $max_left[$i + $k - 1]);\n }\n\n\n $end = recordEnd($start);\n\n return ['result raw_method2' => $result, 'input' => $nums, 'slide' => $k, 'total exe time (microsecond)' => $end];\n}", "public function cases_lower()\n\t{\n\t\treturn array(\n\t\t\tarray(2, 7, true, false, 0, null, true),\n\t\t\tarray(2, 7, true, false, 6, 5, false),\n\t\t\tarray(2, 7, true, false, 7, 6, false),\n\t\t\tarray(2, 7, true, false, 8, 6, false),\n\t\t\tarray(2, 7, true, true, 0, null, true),\n\t\t\tarray(2, 7, true, true, 6, 5, false),\n\t\t\tarray(2, 7, true, true, 7, 6, false),\n\t\t\tarray(2, 7, true, true, 8, 7, false),\n\t\t\tarray(2, 7, true, true, 9, 7, false),\n\t\t\tarray(2, 7, false, false, 0, null, true),\n\t\t\tarray(2, 7, false, false, 2, null, true),\n\t\t\tarray(2, 7, false, false, 3, null, true),\n\t\t\tarray(2, 7, false, false, 4, 3, false),\n\t\t\tarray(2, 7, false, false, 6, 5, false),\n\t\t\tarray(2, 7, false, false, 7, 6, false),\n\t\t\tarray(2, 7, false, false, 8, 6, false),\n\t\t\tarray(2, 7, false, true, 0, null, true),\n\t\t\tarray(2, 7, false, true, 2, null, true),\n\t\t\tarray(2, 7, false, true, 3, null, true),\n\t\t\tarray(2, 7, false, true, 4, 3, false),\n\t\t\tarray(2, 7, false, true, 6, 5, false),\n\t\t\tarray(2, 7, false, true, 7, 6, false),\n\t\t\tarray(2, 7, false, true, 8, 7, false),\n\t\t\tarray(null, 7, null, false, 0, null, true),\n\t\t\tarray(null, 7, null, false, 1, 0, false),\n\t\t\tarray(null, 7, null, false, 7, 6, false),\n\t\t\tarray(null, 7, null, false, 8, 6, false),\n\t\t\tarray(9, -1, true, false, 0, null, true),\n\t\t\tarray(9, -1, true, false, 6, null, true),\n\t\t);\n\t}", "private function getOrthogonalDistances(PointInterface $point, array $upperBound, array $lowerBound): array\n {\n $orthogonalDistances = [];\n\n for ($i = 0; $i < $this->dimensions; $i++) {\n $coordinate = $point->getNthDimension($i);\n $orthogonalDistances[$i] = $this->getPossibleOrthogonalDistance(\n $coordinate,\n $upperBound[$i],\n $lowerBound[$i]\n );\n }\n return $orthogonalDistances;\n }", "private function powerSet($array)\n {\n $results = array(\n array()\n );\n\n foreach ($array as $element) {\n foreach ($results as $combination) {\n $results[] = array_merge(array(\n $element\n ), $combination);\n }\n }\n\n return $results;\n }", "public function getFloorAllowableValues()\n {\n return [\n self::FLOOR__1_ETAGE,\n self::FLOOR__2_ETAGEN,\n self::FLOOR__3_ETAGEN_O_MEHR,\n self::FLOOR_NOCH_UNKLAR,\n ];\n }", "public function cases_find()\n\t{\n\t\treturn array(\n\t\t\tarray(2, 7, true, false, 0, null, true),\n\t\t\tarray(2, 7, true, false, 2, 2, false),\n\t\t\tarray(2, 7, true, false, 6, 6, false),\n\t\t\tarray(2, 7, true, false, 7, null, true),\n\t\t\tarray(2, 7, true, false, 8, null, true),\n\t\t\tarray(2, 7, false, false, 0, null, true),\n\t\t\tarray(2, 7, false, false, 2, null, true),\n\t\t\tarray(2, 7, false, false, 3, 3, false),\n\t\t\tarray(2, 7, false, false, 6, 6, false),\n\t\t\tarray(2, 7, false, false, 7, null, true),\n\t\t\tarray(2, 7, false, false, 8, null, true),\n\t\t\tarray(2, 7, false, true, 0, null, true),\n\t\t\tarray(2, 7, false, true, 2, null, true),\n\t\t\tarray(2, 7, false, true, 3, 3, false),\n\t\t\tarray(2, 7, false, true, 6, 6, false),\n\t\t\tarray(2, 7, false, true, 7, 7, false),\n\t\t\tarray(2, 7, false, true, 8, null, true),\n\t\t\tarray(2, 7, true, true, 0, null, true),\n\t\t\tarray(2, 7, true, true, 2, 2, false),\n\t\t\tarray(2, 7, true, true, 6, 6, false),\n\t\t\tarray(2, 7, true, true, 7, 7, false),\n\t\t\tarray(2, 7, true, true, 8, null, true),\n\t\t\tarray(9, -1, true, false, 0, null, true),\n\t\t\tarray(9, -1, true, false, 6, null, true),\n\t\t);\n\t}", "public function numberGenerator(){\n $ans_arr = [];\n for($i = 1; $i<=100; $i++){\n $new_item = $this->calculateFactor($i);\n array_push($ans_arr, $new_item);\n }\n\n return $ans_arr;\n }", "function getsedang($field,$val1,$val2,$val3){\n $query = \"select * from tabungan\";\n $i=0;\n $nilai=array();\n $result=mysql_query($query) or die(mysql_error());\n while($list=mysql_fetch_array($result)){\n $x=$list[$field];\n $idtab=$list['id_tab'];\n\n if($x<=$val1 || $x>=$val3){\n $nilai[$idtab]=0;\n \n }\n elseif($x>=$val1 && $x<=$val2){\n $nilai[$idtab]= ($x-$val1)/($val2-$val1);\n \n \n }\n elseif($x>=$val2 && $x<=$val3){\n $nilai[$idtab]=($val3-$x)/($val3-$val2);\n \n }\n $i++;\n //echo $min;\n }\n\n return $nilai;\n \n}", "function findSharp($intOrig, $intFinal)\n{\n $intFinal = $intFinal * (750.0 / $intOrig);\n $intA = 52;\n $intB = -0.27810650887573124;\n $intC = .00047337278106508946;\n $intRes = $intA + $intB * $intFinal + $intC * $intFinal * $intFinal;\n return max(round($intRes), 0);\n}", "public function floor($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public static function answerNumeric($array){\n $tmp_array = [];\n foreach($array as $a){\n $tmp_array[] = $a->getAnswer();\n }\n return round(array_sum($tmp_array)/count($tmp_array));\n }", "function calculateLuckyNumbers(){\n $luckyNumbers = array();\n $bits = 62;\n for($i=0; $i<$bits; $i++) {\n for($j=0; $j<$i; $j++) {\n $luckyNumbers[] = pow(2, $i) + pow(2, $j);\n }\n }\n return $luckyNumbers;\n}", "function getFactors(int $number):array {\n for ($i = 2; $i < $number; $i++) {\n // Si le modulo de $number divisé par $i est 0, il s'agit d'un facteurs de ce nombre\n if($number % $i == 0){\n $factors[] = $i;\n }\n }\n var_dump($factors);\n return $factors;\n}", "function makeArray($initialConditions) {\n $array = [];\n global $elementsQuantity;\n for($i = 1; $i <= $elementsQuantity; $i++) {\n $i % $initialConditions[0] == 0 ? $array[] = rand($initialConditions[1], $initialConditions[2]) : $array[] = null;\n }\n return $array;\n }", "function arrayManipulation($number, $queries) {\n\n $array=[];\n for ($index = 0; $index < count($queries); $index++)\n {\n $array[$queries[$index][0]-1]=0;\n $array[$queries[$index][1]]=0;\n }\n for ($index = 0; $index < count($queries); $index++)\n {\n $a= $queries[$index][0];\n $b= $queries[$index][1];\n $k= $queries[$index][2];\n $array[$a-1] += $k;\n $array[$b] -= $k;\n }\n\n $sum=0;\n $max=0;\n for ($index = 0; $index < $number; $index++)\n {\n @$sum += $array[$index];\n if ($sum > $max)\n $max = $sum;\n }\n return $max;\n}", "private function DayPortions(array $times)\n\t{\n\t\t$tmp = array();\n\t\tforeach ($times as $key => $item)\n\t\t{\n\t\t\t$value = doubleval($item) / 24.0;\n\t\t\t$tmp[$key] = $value;\n\t\t}\n\t\treturn $tmp;\n\t}", "function get_low($array, $key, $point)\n {\n $n = $this->get_lowest($array, $key);\n foreach ($array as $value) {\n if ($value[$key] <= $point) {\n if ($value[$key] >= $n[$key]) {\n $n = $value;\n }\n }\n }\n\n return $n;\n }", "function getPAYEData($multidguardarray,$lowerlevel,$upperlevel){\n\t$resultsarray = array(0,0,0);\n\tfor($i=0;$i<count($multidguardarray);$i++){\n\t\t//Get the number of employees in this range\n\t\t// Add one if the amount earned is in that range\n\t\tif($lowerlevel < $multidguardarray[$i][1] && ($upperlevel > $multidguardarray[$i][1] || ($upperlevel == \"\" || $upperlevel == \"0\"))){\n\t\t\t$resultsarray[0] += 1;\n\t\t\t$resultsarray[1] += $multidguardarray[$i][1];\n\t\t\t$resultsarray[2] += $multidguardarray[$i][2];\n\t\t}\n\t}\n\t\n\treturn $resultsarray;\n}", "function findMimInBigArray($array){\n $minBig = $array[0];\n $minInAll = [];\n $i = 0;\n $key = 0;\n for ($x = 0; $x < count($array); $x++){\n $minBig = findMimInArray($array[$x])['min'];\n $minInAll[$i] = $minBig;\n $i++;\n }\n $minBig = findMimInArray($minInAll)['min'];\n return ['min'=>$minBig];\n}", "function solution($N, $A) {\n $m = count($A);\n\n // init counters\n $C = array();\n for ($i = 0; $i < $N; $i++) {\n $C[$i] = 0;\n }\n\n $max = 0;\n $minC = 0; // maximized helper value\n foreach ($A as $ai) {\n if ($ai <= $N) {\n /*\n * increase operation\n */\n // even the value\n if($C[$ai - 1] < $minC) {\n $C[$ai - 1] = $minC;\n }\n // actual increase\n $C[$ai - 1] ++;\n // calculate max\n if ($max < $C[$ai - 1]) {\n $max = $C[$ai - 1];\n }\n } elseif ($ai == $N + 1) {\n // do not actual increase to speed up operations\n $minC = $max;\n }\n }\n // even the values\n foreach($C as &$ci) {\n if($ci < $minC) {\n $ci = $minC;\n }\n }\n return $C;\n}", "function getTotalX($a, $b) {\n\n sort($a);\n sort($b);\n\n $minInA = $a[0];\n $maxInB = $b[count($b) - 1];\n $sizeA = count($a);\n $sizeB = count($b);\n\n $i = 1;\n $numbersBetween = 0;\n $factor = $minInA * $i;\n\n while ($factor <= $maxInB) {\n $allFactors = true;\n $divideAll = true;\n\n for ($j = 1; $j < $sizeA; $j++) {\n if ($factor % $a[$j] != 0) {\n $allFactors = false;\n break;\n }\n }\n\n for ($j = 0; $j < $sizeB; $j++) {\n if ($b[$j] % $factor != 0) {\n $divideAll = false;\n break;\n }\n }\n\n $numbersBetween += ($allFactors && $divideAll ? 1 : 0);\n $factor = $minInA * (++$i);\n }\n\n return $numbersBetween;\n\n}", "function array_normalize(Array $ar) {\n\t$max = null;\n\n\tforeach($ar as $v) {\n\t\t$v = abs($v);\n\n\t\tif ($max == null) {\n\t\t\t$max = $v;\n\t\t} else {\n\t\t\t$max = max($max, $v);\n\t\t}\n\t}\n\n\tif ($max > 0)\n\t\tforeach($ar as $i => $v)\n\t\t\t$ar[$i] = $v / $max;\n\n\treturn $ar;\n}", "public static function floats()\n {\n // First, make sure the most common numbers are covered.\n yield 0.0;\n yield -1.0;\n yield 1.0;\n\n // Then generate random numbers from an increasing range.\n $lim = 0.01;\n $iterations = 0;\n while (true) {\n $iterations++;\n\n yield $lim * (2 * mt_rand() / mt_getrandmax() - 1);\n\n if ($lim <= mt_getrandmax() / 2) {\n $lim *= 2;\n } else {\n // Start over when maxed out.\n $lim = 0.01;\n }\n }\n }", "function euler_solution_003($product)\n{\n $answer = 1;\n $point = 3;\n $divisor = $product;\n\n while ( 0 == ( $divisor % 2 ) ) {\n $answer = 2;\n $divisor = ( $divisor / 2 );\n }\n\n while ($divisor != 1) {\n while (0 == ($divisor % $point)) {\n $answer = $point;\n $divisor = ($divisor / $point);\n }\n $point += 2;\n }\n return $answer;\n}", "function gradingStudents($grades) {\n // Write your code here\n $isRoundedGrade = [];\n for ($i = 0; $i < count($grades); $i++) {\n $difference = IsMultipleOfFive($grades[$i]);\n $finalGrade = $difference + $grades[$i];\n \n if (($difference < 3) && ($finalGrade >= 40)) {\n array_push($isRoundedGrade,$finalGrade);\n } else {\n array_push($isRoundedGrade,$grades[$i]);\n }\n }\n return $isRoundedGrade;\n}", "function interceptions() {\n\t\t$interceptions_calc = $this->_interceptions/$this->_attempts;\n\t\t// Other NFL QBR specific manipulations\n\t\t$interceptions_calc *= 25;\n\t\tif (2.375 - $interceptions_calc < 0) {\n\t\t\t$interceptions_calc = 0;\n\t\t} else {\n\t\t\t$interceptions_calc = 2.375 - $interceptions_calc;\n\t\t}\n\t\treturn $interceptions_calc;\n\t}", "function getIntervalLimitsExprs($table, $field, $idx, $isLowerBound)\n{\n\n\n}", "function int_int_divide($x, $y) {\n if ($x == 0) return 0;\n if ($y == 0) return FALSE;\n return ($x % $y >= $y / 2) ?\n (($x - ($x % $y)) / $y) + 1 : ($x - ($x % $y)) / $y;\n}", "function leastBricks($wall=[]) { \r\n foreach ($wall as $key => $value) {\r\n for ($i = 0; $i < count($value) - 1; $i++) {\r\n\t\t//the maximum coincidence of the sums of bricks, means the maximum total boundary line\r\n $arr[] = array_sum(array_slice($value, 0, $i + 1));\r\n }\r\n }\r\n\t//the difference of all horizontal lines of bricks and the maximum coincident line will give an our solutuion\r\n return count($wall) - max(array_count_values($arr));\r\n}", "public function floor(): self\n {\n $realNum = $this->immute();\n $realNum->value = static::floorCalculation(\n $realNum->value,\n $this->internalMaxDecPl(0),\n $this->internalMaxDecPl()\n );\n return $realNum;\n }", "function exp_required_for_ranking($rank)\n{\n // exp constant (ranks 1-130)\n $exp_req = [\n 0,\n 1,\n 38,\n 47,\n 59,\n 73,\n 92,\n 114,\n 143,\n 179,\n 224,\n 279,\n 349,\n 437,\n 546,\n 682,\n 853,\n 1066,\n 1332,\n 1665,\n 2082,\n 2602,\n 3253,\n 4066,\n 5082,\n 6353,\n 7941,\n 9926,\n 12408,\n 15510,\n 19387,\n 24234,\n 30292,\n 37865,\n 47332,\n 59165,\n 73956,\n 92445,\n 115556,\n 144445,\n 180556,\n 225695,\n 282119,\n 352648,\n 440810,\n 551013,\n 688766,\n 860958,\n 1076197,\n 1345247,\n 1681558,\n 2101948,\n 2627435,\n 3284293,\n 4105367,\n 5131708,\n 6414635,\n 8018294,\n 10022868,\n 12528585,\n 15660731,\n 19575913,\n 24469892,\n 30587365,\n 38234206,\n 47792757,\n 59740947,\n 74676183,\n 93345229,\n 116681536,\n 145851921,\n 182314901,\n 227893626,\n 284867032,\n 356083790,\n 445104738,\n 556380923,\n 695476153,\n 869345192,\n 1086681489,\n 1358351862,\n 1697939827,\n 2122424784,\n 2653030980,\n 3316288725,\n 4145360906,\n 5181701133,\n 6477126416,\n 8096408020,\n 10120510026,\n 12650637532,\n 15813296915,\n 19766621144,\n 24708276429,\n 30885345537,\n 38606681921,\n 48258352401,\n 60322940502,\n 75403675627,\n 94254594534,\n 117818243167,\n 147272803959,\n 184091004949,\n 230113756186,\n 287642195232,\n 359552744040,\n 449440930050,\n 561801162563,\n 702251453204,\n 877814316505,\n 1097267895631,\n 1371584869539,\n 1714481086923,\n 2143101358654,\n 2678876698318,\n 3348595872897,\n 4185744841122,\n 5232181051402,\n 6540226314253,\n 8175282892816,\n 10219103616020,\n 12773879520025,\n 15967349400031,\n 19959186750038,\n 24948983437548,\n 31186229296935,\n 38982786621168,\n 48728483276461,\n 60910604095576,\n 76138255119470,\n 95172818899337\n ];\n\n if (!is_numeric($rank) || $rank < 0 || $rank >= count($exp_req)) {\n $rank = count($exp_req) - 1;\n }\n\n return $exp_req[$rank];\n}", "protected function division($array)\n {\n $all_data = [];\n \n foreach($array as $data){\n\n array_push($all_data, $data); \n }\n return $all_data;\n }", "function nonDivisibleSubset($k, $s) {\n $set = array_map(function($item) use($k) {return $item % $k;}, $s);\n $numbers = array_pad([], $k, 0);\n foreach($s as $item)\n {\n $numbers[$item % $k]++;\n }\n\n ksort($numbers);\n $hasEvenlyDivisible = $numbers[0] ? 1 : 0;\n $result = 0;\n unset($numbers[0]);\n foreach($numbers as $item => $itemsCount)\n {\n if($item > floor($k / 2))\n {\n break;\n }\n if($item == $k - $item)\n {\n $result += $itemsCount ? 1 : 0;\n }\n else\n {\n $result += max($itemsCount, $numbers[$k - $item]);\n }\n }\n\n return $result ? $result + $hasEvenlyDivisible : 0;\n\n}", "function getbanyak($field,$val1,$val2,$val3){\n $query = \"select * from tabungan\";\n $i=0;\n $nilai=array();\n $result=mysql_query($query) or die(mysql_error());\n while($list=mysql_fetch_array($result)){\n $x=$list[$field];\n $idtab=$list['id_tab'];\n \n if($x<=$val1){\n $nilai[$idtab]=0;\n \n }\n elseif($x>=$val1 && $x<=$val3 ){\n $nilai[$idtab]= ($x-$val1)/($val3-$val1); \n \n }\n elseif($x>=$val3){\n $nilai[$idtab] = 1; \n }\n $i++;\n //echo $min; \n }\n\n return $nilai;\n \n}", "function absolute_min(...$numbers)\n{\n if (empty($numbers)) {\n throw new \\Exception('Please pass values to find absolute min value');\n }\n\n $absoluteMin = $numbers[0];\n for ($loopIndex = 0; $loopIndex < count($numbers); $loopIndex++) {\n if ($numbers[$loopIndex] < $absoluteMin) {\n $absoluteMin = $numbers[$loopIndex];\n }\n }\n\n return $absoluteMin;\n}", "function getPrime(array $numbers) : array {\n\n foreach ($numbers as $number) {\n // Prime est de base vrai\n $prime = true;\n for($i=2; $i < $number; $i++){\n // Si à un moment $number peut etre divisé par $i, alors ce n'est pas un nombre premier\n if($number % $i == 0){\n // On passe $prime à false et on arrete la boucle for\n $prime = false;\n break;\n }\n }\n\n if($prime){\n $primes[] = $number;\n }\n\n }\n return $primes;\n}", "function find_whole_squares($a, $b){\n\n\t$start = ceil(sqrt($a));\n\t$end = floor(sqrt($b));\n\treturn $end-$start+1;\n}", "function getMinHours($start_year, $end_year, $start_month, $end_month, $start_day, $end_day, $start_hour, $end_hour){\n\t\t//Declaring arrays\n\t\t$HOURS_IN_DAY = 24;\n\t\t$hourly_array = accessData($start_year, $end_year, $start_month, $end_month, $start_day, $end_day, $start_hour, $end_hour);\n\t\t$all_hours_array = array();\n\t\t$min_array = array();\n\t\t\n\t\t//Initializing the array that will hold every single count for each hour. \n\t\tfor($i = 0; $i < $HOURS_IN_DAY; $i++){\n\t\t\t$all_hours_array[$i] = array();\n\t\t}\n\t\t\n\t\t//This creates an associative array, with all the results for a specific hour stored in an array contained within the associative array.\n\t\t//A value indicates how many people triggered the sensor for that specific time period (year, month, day, hour).\n\t\tforeach($hourly_array as $year => $temp1){\n\t\t\tforeach($hourly_array[$year] as $month => $temp2){\n\t\t\t\tforeach($hourly_array[$year][$month] as $day => $temp3){\n\t\t\t\t\tforeach($hourly_array[$year][$month][$day] as $hour => $value){\n\t\t\t\t\t\tarray_push($all_hours_array[$hour], $value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//This will sort each array for each hour value in descending order, then it will set the minimum array value for that hour\n\t\t//by grabbing the first value for each array from $all_hours_array.\n\t\tfor($i = 0; $i < $HOURS_IN_DAY; $i++){\n\t\t\tsort($all_hours_array[$i]);\n\t\t\t$min_array[$i] = $all_hours_array[$i][0];\n\t\t}\n\t\t\n\t\t//Any values that are still null will be set to 0. \n\t\tfor($i = 0; $i < $HOURS_IN_DAY; $i++){\n\t\t\tif($min_array[$i] == NULL)\n\t\t\t\t$min_array[$i] = 0;\n\t\t}\n\t\t\n\t\treturn $min_array;\n\t}", "function f($m, $ss, $sp, $vp){\n\tglobal $size_set, $valu_set;\n\t\n\t$rr = array();\n\t\n\tforeach($ss as $s)\n\t\tif(($size_set[$m][$s] <= $sp) && ($valu_set[$m][$s] >= $vp))\n\t\t\t$rr[] = $s;\n\t\t\n\treturn $rr;\n}", "protected function calculateRange($data)\n {\n $data_range = array_fill(0, count(current($data)), ['min' => null, 'max' => null]);\n foreach ($data as $observation) {\n $key = 0;\n foreach ($observation as $value) {\n if ($data_range[$key]['min'] === null || $data_range[$key]['min'] > $value) {\n $data_range[$key]['min'] = $value;\n }\n if ($data_range[$key]['max'] === null || $data_range[$key]['max'] < $value) {\n $data_range[$key]['max'] = $value;\n }\n $key++;\n }\n }\n\n return $data_range;\n }", "function random($min = null, $max = null, $precision = null)\n{\n if (is_array($min))\n {\n for ($i=1; $i<=rand(1,count($min)); $i++)\n {\n shuffle($min);\n }\n\n return array_shift($min);\n }\n elseif (is_numeric($min))\n {\n if (!is_numeric($max))\n {\n $max = floor($min+1);\n }\n\n $multiplier = 1;\n\n if ($precision === null)\n {\n $min_decimal = '';\n if ((int)$min != $min)\n {\n $min_decimal = explode('.', $min);\n $min_decimal = array_pop($min_decimal);\n }\n $max_decimal = '';\n if ((int)$max != $max)\n {\n $max_decimal = explode('.', $max);\n $max_decimal = array_pop($max_decimal);\n }\n\n $precision = max(strlen($min_decimal), strlen($max_decimal));\n }\n\n for ($i=1; $i<=$precision; $i++)\n {\n $multiplier = $multiplier * 10;\n \n $min = $min * 10;\n $max = $max * 10;\n }\n\n $value = rand($min, $max);\n \n $value = $value / $multiplier;\n\n return $value;\n }\n else\n {\n return random([$min, $max]);\n }\n}", "public static function percentiles(array $data, int $round = 0): array\n\t{\n\t\tsort($data);\n\n\t\t$min = min($data);\n\t\t$step = 100 / self::range($data);\n\n\t\t$percentiles = [];\n\t\tforeach ($data as $value) {\n\t\t\t$percentile = ($value - $min) * $step;\n\t\t\tif ($round >= 0) {\n\t\t\t\t$percentile = round($percentile, $round);\n\t\t\t}\n\t\t\t$percentiles[$value] = $percentile;\n\t\t}\n\n\t\treturn $percentiles;\n\t}", "public function floor() : self\n {\n return $this->map('floor');\n }", "public static function strictlyPosInts()\n {\n return self::ints()->fmap(function ($x) {\n return abs($x)+1;\n });\n }", "function seriesResistance($arr){\n $sum = array_sum($arr);\n\n if($sum <= 1 ){\n return $sum . \" ohm\";\n }\n return $sum . \" ohms\";\n}", "function wpsl_get_max_zoom_levels() {\n\n $max_zoom_levels = array();\n $zoom_level = array(\n 'min' => 10,\n 'max' => 21\n );\n\n $i = $zoom_level['min'];\n\n while ( $i <= $zoom_level['max'] ) {\n $max_zoom_levels[$i] = $i;\n $i++;\n }\n\n return $max_zoom_levels;\n}", "public function spread () {\n $low = min($this->values);\n $high = max($this->values);\n return round(((1 - ($low/$high)) * 100), 3);\n }", "function SCn_eco_oth($level)\n{\n\t//return(800+400*$level+4*pow(2*$level,2)+pow(2*$level,3));\n\t$value=array(\"0\"=>800,\"1\"=>1224,\"2\"=>1728,\"3\"=>2360,\"4\"=>3168,\"5\"=>4200,\"6\"=>5504,\"7\"=>7128,\"8\"=>9120,\"9\"=>11528,\"10\"=>14400,\"11\"=>17784,\"12\"=>21728,\"13\"=>26280,\"14\"=>31488,\"15\"=>37400,\"16\"=>44064,\"17\"=>51528,\"18\"=>59840,\"19\"=>69048,\"20\"=>79200,\"21\"=>90344,\"22\"=>102528,\"23\"=>115800,\"24\"=>130208,\"25\"=>145800,\"26\"=>162624,\"27\"=>180728,\"28\"=>200160,\"29\"=>220968,\"30\"=>243200);\n\treturn $value[$level];\n}", "static function getMultiples(int ...$numbers) : int\n {\n $numbers = array_values($numbers);\n asort($numbers);\n\n $last = $numbers[count($numbers) - 1];\n $multiples = 0;\n\n for ($i = 5; $i <= $last; $i += 5) {\n if (in_array($i, $numbers)) {\n $multiples++;\n }\n }\n\n return $multiples;\n }", "public function forceIntegerInRangeForcesIntegerIntoDefaultBoundariesDataProvider() {}", "function calcCorrectAnswer($array)\n{\n\t$isZero = true;\n\tforeach ($array as $i){\n\t\tif($i > 0) $isZero = false;\n\t}\n\tif ($isZero) return 0;\n\n\treturn array_keys($array, max($array))[0] + 1;\n}", "function solution($S, $P, $Q){\r\n $A = $C = $G = $T = 0;\r\n $results = array();\r\n $quantaties = array();\r\n $quantaties[-1]=\"0000\"; \r\n if ((strlen($S) < 1) || (strlen($S) > 100000))\r\n return 0;\r\n if ((count($P) < 1) || (count($P) > 50000))\r\n return 0;\r\n if ((count($Q) < 1) || (count($Q) > 50000))\r\n return 0;\r\n for ($i = 0; $i < strlen($S); $i++) {\r\n switch (substr($S, $i, 1)) {\r\n case 'A':\r\n $A++; \r\n break;\r\n case 'C':\r\n $C++;\r\n break;\r\n case 'G':\r\n $G++;\r\n break;\r\n case 'T':\r\n $T++;\r\n break;\r\n }\r\n $quantaties[$i]=$A.\"|\".$C.\"|\".$G.\"|\".$T; \r\n } \r\n// print_r($quantaties);\r\n $right=$left=array();\r\n for ($i = 0; $i < count($P); $i++) {\r\n $right=explode(\"|\", $quantaties[$Q[$i]]); print_r($right);\r\n $left=explode(\"|\", $quantaties[$P[$i]-1]); print_r($left);\r\n if (($right[0]-$left[0])!=0) $results[$i]=1;\r\n elseif (($right[1]-$left[1])!=0) $results[$i]=2;\r\n elseif (($right[2]-$left[2])!=0) $results[$i]=3;\r\n else $results[$i]=4;\r\n }\r\n return $results;\r\n}" ]
[ "0.6527874", "0.57884675", "0.5297491", "0.52588737", "0.51875824", "0.51292473", "0.51099557", "0.50796175", "0.5009998", "0.50052375", "0.49418202", "0.48861367", "0.48688072", "0.48623535", "0.4830384", "0.47951046", "0.4793156", "0.47784773", "0.4776958", "0.47628313", "0.47301644", "0.47226283", "0.47194916", "0.4703235", "0.4692684", "0.46916237", "0.46889427", "0.46877483", "0.46782175", "0.4675853", "0.46634784", "0.46577132", "0.46442062", "0.46426246", "0.4630822", "0.4626444", "0.46254653", "0.46207058", "0.460627", "0.4601092", "0.45903912", "0.45835227", "0.455747", "0.45467433", "0.4546175", "0.4533145", "0.45189756", "0.45135275", "0.45122218", "0.45120335", "0.4511885", "0.44958827", "0.448824", "0.4487313", "0.4475812", "0.4472807", "0.44708002", "0.44590193", "0.44564563", "0.44551578", "0.44488138", "0.4443276", "0.44417956", "0.443996", "0.44340366", "0.44260097", "0.44248357", "0.4418924", "0.4412386", "0.44074783", "0.44039682", "0.4368801", "0.43658462", "0.43617693", "0.43600678", "0.43554372", "0.43531302", "0.435036", "0.4346808", "0.4346556", "0.43436882", "0.4340447", "0.4339428", "0.43357345", "0.43330944", "0.4331181", "0.43283156", "0.4312351", "0.4311278", "0.4310003", "0.42974633", "0.42923704", "0.4287301", "0.42858964", "0.4274808", "0.4270388", "0.4266965", "0.42627743", "0.42621958", "0.42600134" ]
0.49630052
10
DB functions / return table object
public function getSolutions($totRound = null, $multiple = true, $solutionID = null) { if ($multiple) { return DB::table('tot_solutions') ->where('tot_solutions.tot_round', '=', $totRound) ->select( 'tot_solutions.id as sid', 'tot_solutions.tot_round as round', 'tot_solutions.floor as floor', 'tot_solutions.karma as karma', 'tot_solutions.maxrank as maxrank', 'tot_solutions.maxevol as maxevol', 'tot_solutions.gamespeed as gamespeed', 'tot_solutions.karma_multiplier as karmamultiplier', 'tot_solutions.note as note', 'tot_solutions.luck as luck', 'tot_solutions.unit_id_1 as unit_id_1', 'tot_solutions.unit_rank_1 as unit_rank_1', 'tot_solutions.unit_trans_1 as unit_trans_1', 'tot_solutions.unit_id_2 as unit_id_2', 'tot_solutions.unit_rank_2 as unit_rank_2', 'tot_solutions.unit_trans_2 as unit_trans_2', 'tot_solutions.unit_id_3 as unit_id_3', 'tot_solutions.unit_rank_3 as unit_rank_3', 'tot_solutions.unit_trans_3 as unit_trans_3', 'tot_solutions.unit_id_4 as unit_id_4', 'tot_solutions.unit_rank_4 as unit_rank_4', 'tot_solutions.unit_trans_4 as unit_trans_4', 'tot_solutions.unit_id_5 as unit_id_5', 'tot_solutions.unit_rank_5 as unit_rank_5', 'tot_solutions.unit_trans_5 as unit_trans_5', 'tot_solutions.unit_id_6 as unit_id_6', 'tot_solutions.unit_rank_6 as unit_rank_6', 'tot_solutions.unit_trans_6 as unit_trans_6', 'tot_solutions.unit_id_7 as unit_id_7', 'tot_solutions.unit_rank_7 as unit_rank_7', 'tot_solutions.unit_trans_7 as unit_trans_7', 'tot_solutions.unit_id_8 as unit_id_8', 'tot_solutions.unit_rank_8 as unit_rank_8', 'tot_solutions.unit_trans_8 as unit_trans_8', 'tot_solutions.unit_id_9 as unit_id_9', 'tot_solutions.unit_rank_9 as unit_rank_9', 'tot_solutions.unit_trans_9 as unit_trans_9', 'tot_solutions.unit_id_10 as unit_id_10', 'tot_solutions.unit_rank_10 as unit_rank_10', 'tot_solutions.unit_trans_10 as unit_trans_10', 'tot_solutions.unit_id_11 as unit_id_11', 'tot_solutions.unit_rank_11 as unit_rank_11', 'tot_solutions.unit_trans_11 as unit_trans_11', 'tot_solutions.unit_id_12 as unit_id_12', 'tot_solutions.unit_rank_12 as unit_rank_12', 'tot_solutions.unit_trans_12 as unit_trans_12') ->get(); } else { return DB::table('tot_solutions') ->where('tot_solutions.id', '=', $solutionID) ->select( 'tot_solutions.id as sid', 'tot_solutions.tot_round as round', 'tot_solutions.floor as floor', 'tot_solutions.karma as karma', 'tot_solutions.maxrank as maxrank', 'tot_solutions.maxevol as maxevol', 'tot_solutions.gamespeed as gamespeed', 'tot_solutions.karma_multiplier as karmamultiplier', 'tot_solutions.note as note', 'tot_solutions.luck as luck', 'tot_solutions.unit_id_1 as unit_id_1', 'tot_solutions.unit_rank_1 as unit_rank_1', 'tot_solutions.unit_trans_1 as unit_trans_1', 'tot_solutions.unit_id_2 as unit_id_2', 'tot_solutions.unit_rank_2 as unit_rank_2', 'tot_solutions.unit_trans_2 as unit_trans_2', 'tot_solutions.unit_id_3 as unit_id_3', 'tot_solutions.unit_rank_3 as unit_rank_3', 'tot_solutions.unit_trans_3 as unit_trans_3', 'tot_solutions.unit_id_4 as unit_id_4', 'tot_solutions.unit_rank_4 as unit_rank_4', 'tot_solutions.unit_trans_4 as unit_trans_4', 'tot_solutions.unit_id_5 as unit_id_5', 'tot_solutions.unit_rank_5 as unit_rank_5', 'tot_solutions.unit_trans_5 as unit_trans_5', 'tot_solutions.unit_id_6 as unit_id_6', 'tot_solutions.unit_rank_6 as unit_rank_6', 'tot_solutions.unit_trans_6 as unit_trans_6', 'tot_solutions.unit_id_7 as unit_id_7', 'tot_solutions.unit_rank_7 as unit_rank_7', 'tot_solutions.unit_trans_7 as unit_trans_7', 'tot_solutions.unit_id_8 as unit_id_8', 'tot_solutions.unit_rank_8 as unit_rank_8', 'tot_solutions.unit_trans_8 as unit_trans_8', 'tot_solutions.unit_id_9 as unit_id_9', 'tot_solutions.unit_rank_9 as unit_rank_9', 'tot_solutions.unit_trans_9 as unit_trans_9', 'tot_solutions.unit_id_10 as unit_id_10', 'tot_solutions.unit_rank_10 as unit_rank_10', 'tot_solutions.unit_trans_10 as unit_trans_10', 'tot_solutions.unit_id_11 as unit_id_11', 'tot_solutions.unit_rank_11 as unit_rank_11', 'tot_solutions.unit_trans_11 as unit_trans_11', 'tot_solutions.unit_id_12 as unit_id_12', 'tot_solutions.unit_rank_12 as unit_rank_12', 'tot_solutions.unit_trans_12 as unit_trans_12') ->get(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public static function getTable();", "public function getTable();", "abstract public function getTable();", "abstract public function getTable();", "abstract protected function getTable();", "public function getTable(): Table;", "public abstract function getDbTable();", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public static function getTable() {}", "public function getTable() {}", "public function getTable() {}", "public function getTable() {}", "public function getTable() { return( $this->_table ); }", "abstract function getTableStruct($tblname);", "function &fetch_table()\n\t{\n\t\tif (sizeof($this->table) == 0)\n\t\t{\n\t\t\t$this->populate_table();\n\t\t}\n\t\treturn $this->table;\n\t}", "public function getTable()\r\n {\r\n }", "public function getTableRaw();", "function db_table() {\n\t\t\t$vars = get_class_vars(__CLASS__);\n\t\t\treturn $vars[__FUNCTION__];\n\t\t}", "public function getTable()\n {\n\n }", "function &returnTable()\n\t{\n\t\treturn $this->table;\n\t}", "public function getFromDB() {}", "public function table($table);", "public function table($table);", "protected function _getTable()\n\t{\n\t\t$tableName = substr( get_class($this), strlen(self::PREFIX) );\n\t\t$tableClass = self::PREFIX . 'DbTable_' . $tableName;\n\t\t$table = new $tableClass();\n\t\treturn $table;\n\t}", "public function getCurrentTable() {}", "public static function get_meta_table();", "protected function table()\n {\n return $this->conn->table($this->table);\n }", "public function baseTable();", "public function getTable()\r\n\t{\r\n\t\tif ($this->_table===null) {\r\n\t\t\t$this->_table=new $this->_tableClass;\r\n\t\t}\r\n\t\treturn $this->_table;\r\n\t}", "protected abstract function createTestTable();", "function tableData(){\n\t\t$entity_type = in(\"entity_type\");\t\t\n\t\t$table = $entity_type()->getTable();\n\t\t$test = in('test');\n\n\t\t// Table's primary key\n\t\t$primaryKey = 'id';\n\n\t\t// Array of database columns which should be read and sent back to DataTables.\n\t\t// The `db` parameter represents the column name in the database, while the `dt`\n\t\t// parameter represents the DataTables column identifier. In this case simple\n\t\t// indexes\n\t\t$columns = array(\n\t\t\tarray( \t'db' => 'id',\n\t\t\t\t\t'dt' => 0 \n\t\t\t\t ),\n\t\t\tarray( \t'db' => 'created', \n\t\t\t\t\t'dt' => 1, \n\t\t\t\t\t'formatter' => function( $d, $row ) {\n\t\t\t\t\t\tif( $d == 0 ) return 0;\n\t\t\t\t\t\treturn date( 'M d, Y H:i', $d);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t),\n\t\t\tarray( \t'db' => 'updated',\n\t\t\t\t\t'dt' => 2,\n\t\t\t\t\t'formatter' => function( $d, $row ) {\n\t\t\t\t\t\tif( $d == 0 ) return 0;\n\t\t\t\t\t\treturn date( 'M d, Y H:i', $d);\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t ),\n\t\t);\n\t\t\n\t\t$additional_columns = self::getAdditionalFields( $entity_type );\n\t\t\n\t\t$columns = array_merge( $columns, $additional_columns );\n\n\t\t// SQL server connection information\n\t\t$sql_details = array(\n\t\t\t'user' => 'root',\n\t\t\t'pass' => '7777',\n\t\t\t'db' => 'ci3',\n\t\t\t'host' => 'localhost'\n\t\t);\n\t\n\t\trequire( 'theme/admin/scripts/ssp.class.php' );\t\t\n\t\t$date_from = in(\"date_from\");\n\t\t$date_to = in(\"date_to\");\n\t\t$extra_query = null;\n\t\tif( !empty( $date_from ) ){\n\t\t\t$stamp_from = strtotime( $date_from );\n\t\t\t$extra_query .= \"created > $stamp_from\";\n\t\t}\n\t\tif( !empty( $date_to ) ){\n\t\t\t$stamp_to = strtotime( $date_to.\" +1 day\" ) - 1;\n\t\t\tif( !empty( $extra_query ) ) $extra_query .= \" AND \";\n\t\t\t$extra_query .= \"created < $stamp_to\";\n\t\t\t\n\t\t}\t\t\n\t\t\n\t\techo json_encode(\n\t\t\tSSP::complex( $_GET, $sql_details, $table, $primaryKey, $columns, $extra_query )\n\t\t);\n\t}", "abstract public function getTableName();", "abstract public function getTableName();", "abstract public function getTableName();", "abstract function tableName();", "public function &getTables();", "public function getTable() { return $this->table->getTable(); }", "abstract public static function getTableName();", "abstract public static function getTableName();", "abstract protected function fetchTableDefDb(string $table);", "protected function table()\n\t{\n\t\treturn $this->connection->table($this->table);\n\t}", "public function getTableName() {}", "public function getTableName() {}", "public function getTableName() ;", "public function getTableData()\n\t{\n\t}", "function &getTableSchema($tablename);", "private function getTable()\n\t{\n\t\treturn $this->_table;\n\t}", "abstract public function tableName();", "abstract public function tableName();", "public function get($table);", "abstract public function createTable();", "function find($table, $id)\n{\n $data = connect()->query(\"SELECT * FROM $table WHERE id='$id'\");\n\n return $data->fetch_object();\n}", "public function getTableName();", "public function getTableName();", "abstract protected function getTableName();", "abstract protected function getTableName();", "static function loadDb($table) {\n $tab = new self($table);\n $cols = stdDB::selectArray(\"SHOW COLUMNS FROM `$table`\");\n foreach($cols as $col)\n $tab->cols[$col['Field']] = new schemaColumn($col['Field'],$col['Type'],\n $col['Null'], $col['Default'], $col['Extra']);\n $rows = stdDB::selectArray(\"SHOW INDEX FROM `$table`\");\n $idxrow = array(); $idxs = array();\n foreach($rows as $row){\n $idxrow[$row[\"Key_name\"]][] = $row[\"Column_name\"];\n $idxs[$row[\"Key_name\"]] = $row;\n }\n foreach($idxs as $k=>$row) {\n $tab->idx[$k] = new schemaIndex($k, $idxrow[$k],\n $row['Non_unique'], $row['Sub_part']);\n }\n return $tab;\n }", "public static function tableName(): string;", "private function _fetch_table()\n {\n if (!isset($this->table))\n {\n $this->table = $this->_get_table_name(get_class($this));\n }\n }", "function sql($table=null)\n{\n return SQL::query($table);\n}", "function GetSqlTable($tablename, $filter = \"\")\n{\n $loc = \"databaselib.php->GetSqlTable\";\n $sql = \"SELECT * FROM \" . $tablename;\n if(!empty($filter)) $sql .= ' ' . $filter;\n $result = SqlQuery($loc, $sql);\n $table = array();\n while($row = $result->fetch_assoc()) $table[] = $row;\n return $table;\n}", "abstract function getSQL();", "public function getTableBase();", "protected function getTableHelper() {}", "function getTableName(): string;", "public function getTable()\r\n {\r\n if($this->_table === null){\r\n $this->_table = new SampleTable();\r\n }\r\n return $this->_table;\r\n }", "function table()\n {\n return array('pattern' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,\n 'created' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL);\n }", "abstract public function table_sql($tableName);", "static function get_data($table) {\r\n $rekete = \"SELECT * FROM \" . $table . \" ORDER BY created DESC\";\r\n $result = Functions::commit_sql($rekete, \"\");\r\n if (Functions::is_void($result))\r\n return false;\r\n else\r\n return $result;\r\n }", "public function get_table()\n {\n $this->process_frequency_table();\n return $this->table;\n }", "public function __get($table){\n if(!isset($this->dbORM[$table])){\n $this->dbORM[$table] = new DBObject(compact('table')); //Create a new object using the table name \n }\n \n return $this->dbORM[$table];\n }", "public function table(){\r\n\r\n return $this;\r\n }", "function getTable($primary, $table) {\n return mysql_query(sprintf('SELECT %s FROM %s', $primary, $table));\n }", "public function getTableName(): string;", "public function getTableName(): string;", "public function getTableName():string;", "abstract public function getTables();", "public function table(): Query\n {\n return $this->database->records();\n }", "public function getTableInformation() {}", "public abstract function getCreateTable(Table $table, $config);", "public function table_get_all($table);", "public function ormObject();", "function cons_todo($table){\n $result=mysql_query(\"SELECT * FROM $table\");\n return $result;\n }", "public function table(string $table): Query;", "abstract public static function tableName() : string;", "function getItemTableName() ;", "public function get_table()\n\t{\n\t\treturn $this->_table;\n\t}", "function get_Table_Name(){\n global $mysqli;\n $query = new Query($mysqli, \"SELECT tb_inscritos_new_year,tb_resultados_new_year FROM sgra_config_tb\");\n $parametros = array();\n $data = $query->getresults();\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}", "public function readTabla() {\r\n $query = 'SELECT * FROM ' . $this->tabla;\r\n\r\n\r\n \r\n\r\n $sentencia = $this->con->prepare($query);\r\n\r\n $sentencia->execute();\r\n\r\n return $sentencia;\r\n }" ]
[ "0.7656943", "0.7656943", "0.7656943", "0.7656943", "0.7656943", "0.7656943", "0.7656943", "0.76175916", "0.7588525", "0.7576536", "0.7576536", "0.75048167", "0.7482423", "0.745733", "0.72283065", "0.72283065", "0.72283065", "0.72283065", "0.72283065", "0.72283065", "0.7225815", "0.7178448", "0.7177836", "0.7175878", "0.6898136", "0.68745047", "0.68437463", "0.6835994", "0.6769001", "0.67639226", "0.6760369", "0.6723005", "0.66796124", "0.65983826", "0.65983826", "0.65891814", "0.65743756", "0.6563559", "0.65424085", "0.6542115", "0.65328354", "0.65328", "0.65324736", "0.65293705", "0.65293705", "0.65293705", "0.6498085", "0.6492217", "0.6491731", "0.648999", "0.648999", "0.6489337", "0.6470747", "0.64695245", "0.64695245", "0.64690053", "0.64619076", "0.6461374", "0.6458814", "0.6446085", "0.6446085", "0.6440726", "0.6439813", "0.6437923", "0.64192593", "0.64192593", "0.6397121", "0.6397121", "0.63968956", "0.63946146", "0.6392286", "0.63915503", "0.63899845", "0.63883495", "0.63859874", "0.63743937", "0.6364767", "0.63564163", "0.63532823", "0.6337635", "0.6323865", "0.6323686", "0.63223064", "0.63022166", "0.6302082", "0.6302074", "0.6302074", "0.63011634", "0.6300992", "0.6297994", "0.62975734", "0.62784094", "0.6274922", "0.6274377", "0.62706435", "0.62606025", "0.6260586", "0.62494546", "0.6242773", "0.62400687", "0.62299573" ]
0.0
-1
Gets the directory of the cached language files.
public function getCachePath() { return $this->config->get('system.paths.root') . '/cache/' . $this->application . '/'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCacheDir();", "public function getCacheDir(){\r\n return $this->_cache->getDir();\r\n }", "public static function getCacheDir()\n {\n return self::getRoot() . DIRECTORY_SEPARATOR . 'cache';\n }", "public function get_cache_directory() {\n\t\treturn $this->cache_directory;\n\t}", "public function getCacheFolder()\n {\n\n return dirname(__FILE__) . '/../../store/cache/';\n }", "public static function getLanguageDir() {\n return public_path(self::LANGUAGE_DIR);\n }", "protected function get_cache_dir()\n\t{\n\t\treturn $this->cache_dir ?: $this->phpbb_root_path . 'cache/' . $this->get_environment() . '/';\n\t}", "public static function getCacheDir()\n {\n return self::getDir('getCacheHome');\n }", "protected function getCacheDirectory()\n {\n return $this->cache_dir;\n }", "protected function getCacheDirectory()\n {\n return $this->cache_dir;\n }", "private function getLocalesDirectory()\r\n {\r\n // Get path from config\r\n return config('transeditor.language_file_path');\r\n }", "function get_cache_dir() {\n $cacheDir = 'pug_cache/';\n if (array_key_exists('cacheDir', $this->options)) {\n $cacheDir = $this->options['cacheDir'];\n }\n return $cacheDir;\n }", "public function getCacheDir()\n {\n return $this->cacheDir;\n }", "public function getCacheDir()\n {\n return $this->cacheDir;\n }", "public function getCacheDir()\n {\n return $this->cacheDir;\n }", "public function getCacheDir()\n {\n return $this->cacheDir;\n }", "protected function getCacheDirectory()\n {\n return $this->cacheDirectory;\n }", "private function _dirCache()\n {\n return $this->_config['dir_cache'] . (!empty($this->_config['store_prefix']) ? $this->_config['store_prefix'] . '/' : '');\n }", "public function getCacheDirectory() {\n\t\treturn $this->cacheDirectory;\n\t}", "public function getCacheDirectory() {}", "public function getCacheDir()\n {\n return __DIR__ . '/../var/cache/' . $this->getEnvironment();\n }", "public function getCacheDir()\n {\n return $this->rootDir . '/../cache/'.$this->getEnvironment();\n }", "public function getCachePath()\r\n\t{\r\n\t\t$path = AD.$this->getConfig()->getChildren(\"cache\")->getString(\"path\");\r\n\t\tif(!is_dir($path))\r\n\t\t{\r\n\t\t\tmkdir($path, 0777, true);\r\n\t\t}\r\n\t\treturn $path;\r\n\t}", "public function getCacheDirectory() {\n \n return $this->cacheDirectory;\n \n }", "protected function _getCacheDir()\n\t{\n\t\treturn $this->_cacheDir;\n\t}", "public function getBaseLanguageDir()\n {\n return $this->paths->getBaseLanguageDir();\n }", "public function get_cache_dir()\n\t{\n\t\t// return the cache dir as entered by admin\n\t\t// or if cache dir is empty, get cache directory from plugin\n\t\t// directory, i.e. `bwp-minify/cache`, this is the default\n\t\t$cache_dir = !empty($this->options['input_cache_dir'])\n\t\t\t? $this->options['input_cache_dir']\n\t\t\t: $this->get_default_cache_dir();\n\n\t\t// allow overidden of the generated cache dir via constants\n\t\t$cache_dir = defined('BWP_MINIFY_CACHE_DIR') && '' != BWP_MINIFY_CACHE_DIR\n\t\t\t? BWP_MINIFY_CACHE_DIR : $cache_dir;\n\n\t\treturn apply_filters('bwp_minify_cache_dir', $cache_dir);\n\t}", "public function getCachePath() {\r\n\t\treturn $this->getFramework()->getPath(Core::PATH_CACHE);\r\n\t}", "public function getCacheDir()\n {\n $fileSystem = new Filesystem();\n $path = 'var/cache/assets/'.$this->name.'/';\n \n if (!$fileSystem->exists($path)) {\n $fileSystem->mkdir($path);\n }\n \n return $path;\n }", "public function getCacheDir()\n {\n return __DIR__.'/../var/cache/'.$this->getEnvironment();\n }", "public function getDir();", "public function getCachePath()\n {\n return $this->getSettingArray()[\"cache_path\"];\n }", "function sti_get_localization_directory()\r\n\t{\r\n\t\treturn \"localization\";\r\n\t}", "function sti_get_localization_directory()\n\t{\n\t\treturn \"localization\";\n\t}", "public function getCacheDir(): string\n {\n return __DIR__ . '/../../../../../../var/cache/test';\n }", "public function getCache()\r\n {\r\n if ($this->exists('cache')) {\r\n return ROOT . $this->get('cache');\r\n }\r\n else\r\n return ROOT . '/cache';\r\n }", "public static function getCachePath()\n {\n $cacheDir = Config::get('media.cache_dir');\n $cacheFullPath = ROOT . self::getFilesPath() . $cacheDir;\n\n if(!file_exists($cacheFullPath))\n {\n if(!is_writable(ROOT . self::getFilesPath()) || !mkdir($cacheFullPath, Config::get('media.dir_chmod'), true))\n return false;\n }\n\n return $cacheDir;\n }", "public function get_default_cache_dir()\n\t{\n\t\t$plugin_wp_dir = plugin_dir_path($this->plugin_file);\n\t\t$cache_dir = trailingslashit($plugin_wp_dir) . 'cache/';\n\t\t$cache_dir = str_replace('\\\\', '/', $cache_dir);\n\n\t\treturn $cache_dir;\n\t}", "public function getCacheDirectoryPath()\n {\n return $this->cacheDirectoryPath;\n }", "public function getCacheDir():string {\n return $this->getProjectDir() . '/var/cache';\n }", "function elgg_get_filepath_cache() {\n\tglobal $CONFIG;\n\tstatic $FILE_PATH_CACHE;\n\tif (!$FILE_PATH_CACHE) {\n\t\t$FILE_PATH_CACHE = new ElggFileCache($CONFIG->dataroot);\n\t}\n\n\treturn $FILE_PATH_CACHE;\n}", "public function getSystemDirectoryPath() {\n return Mage::getBaseDir('var') . '/smartling/localization_files';\n }", "private function _getCachePath() {\n return DIR_PUBLIC_CACHE_SEARCHES . $this->_id . '.json';\n }", "public function get_files_directory() {\n return '../data/files/' . hash_secure($this->name);\n }", "function getCacheDirectory()\n {\n global $serendipity;\n if ($this->cache_dir === null) {\n $this->cache_dir = $serendipity['serendipityPath'] . PATH_SMARTY_COMPILE . '/serendipity_event_avatar';\n }\n return $this->cache_dir;\n }", "public function getThemeLanguageDir()\n {\n return $this->paths->getThemeLanguageDir();\n }", "function get_cache($key) {\n return $this->get_cache_dir() . $key . '.cache';\n }", "function cache_path()\n {\n $paths = getPaths();\n\n /**\n * Return false if the cache folder is NOT writable\n */\n if( ! is_writable($paths['cache']) )\n {\n return false;\n }\n\n return $paths['cache'];\n }", "public function getFolderCache() : string\n {\n $aeFiles = \\MarkNotes\\Files::getInstance();\n $aeFolders = \\MarkNotes\\Folders::getInstance();\n\n $folder = rtrim($this->folderWebRoot, DS).DS.'cache';\n\n if (!$aeFolders->exists($folder)) {\n $aeFolders->create($folder, CHMOD_FOLDER);\n }\n\n if ($aeFolders->exists($folder)) {\n if (!$aeFiles->exists($fname = $folder.'/.gitignore')) {\n $aeFiles->create($fname, '# Ignore everything'.PHP_EOL.'*');\n }\n\n if (!$aeFiles->exists($fname = $folder.'/.htaccess')) {\n $content = '# marknotes - Deny access to this folder'.PHP_EOL.\n 'deny from all';\n $aeFiles->create($fname, $content);\n }\n }\n\n return $folder.DS;\n }", "protected function getCacheFile(){\n\t\treturn $this->getPath() . $this->getCacheName();\n\t}", "public function getCachePath()\n {\n return $this->cachePath;\n }", "protected function getCacheFilePath(): string\n {\n return self::env('CONFIG_CACHE_FILE_PATH', Directory::cachePath('config.php'));\n }", "public function getCacheDir()\n {\n return __DIR__ . '/Fixtures/app/cache';\n }", "protected function getWordListPath(): string\n {\n return __DIR__ . \"/../data/{$this->locale}.txt\";\n }", "public static function LanguageFolder()\n {\n return dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR.Configuration::getApplicationFolder().DIRECTORY_SEPARATOR.'Language';\n }", "public function getCacheFile()\n\t{\n\t\treturn $this->tempDir . '/' . $this->filename;\n\t}", "public function getDirectory();", "public function getDirectory();", "public static function getCacheFile()\r\n {\r\n return self::$_cacheFile;\r\n }", "protected function getLanguagePath()\n {\n return $this->resourcePath('lang');\n }", "public static function getTranslationFileDirectory() {\n return PIMCORE_PLUGINS_PATH.\"/PimTools/texts\";\n }", "public function getConfigCacheFile()\n {\n return $this->getCacheDir() . '/module-config-cache.'.$this->getConfigCacheKey().'.php';\n }", "public function getCachedConfigPath();", "public function getCachedConfigPath()\n {\n return $this['path.storage'].'/framework/config.php';\n }", "public function getDirectory()\n {\n return mfConfig::get('mf_sites_dir').\"/\".$this->getSiteName().\"/\".$this->getApplication().\"/view/pictures/\".$this->get('lang');\n }", "protected function getObjectsDirectory()\n {\n return $this->cacheDirectory . self::DIR_OBJECTS . \"/\";\n }", "private function getDir() {\n return sprintf(\"%s/%s/\", app_path(), config('newportal.portlets.namespace'));\n }", "protected\n function setCachePath()\n {\n $cachePath = public_path() . config('album.paths.cache');\n\n if (!file_exists($cachePath)) mkdir($cachePath, 0777, true);\n\n return $cachePath;\n }", "public static function getTranslationFolderPath(): string\n {\n return self::$translationFolderPath;\n }", "public function wp_lang_dir()\n {\n }", "private static function getCacheDir($area)\r\n {\r\n return SolutionConfiguration::$cachesDir . \"{$area}/\";\r\n }", "function get_languages(){\n\t\t$dir = APPPATH.\"language/\";\n\t\t$dh = opendir($dir);\n\t\t$i=0;\n\t\twhile (false !== ($filename = readdir($dh))) {\n\t\t\tif($filename!=='.' && $filename!=='..' && is_dir($dir.$filename)){\n\t\t\t\t$files[$i]['dir'] = $filename;\n\t\t\t\t$files[$i]['count']=$this->get_count_lfiles($filename);\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\treturn (!empty($files))?$files:FALSE;\n\t}", "public function getDir(): string;", "public static function getLanguageThumbDir() {\n return public_path(self::LANGUAGE_THUMB_DIR);\n }", "public function getFileDirectory();", "function getCacheFilename() {\n\t\treturn 'cache/fc-categories.php';\n\t}", "private function getCacheFile() {\n return new File($this->rootPath, self::CACHE_FILE);\n }", "public static function get_directory() : string {\r\n\t\treturn Core::get_app_path( self::$directory );\r\n\t}", "public function getCompiledCachePath()\n {\n return $this->cachePath;\n }", "public function getFilesDirectoryPath();", "public function custom_change_twig_cache_dir() {\n return get_option( 'timber_cache_path' );\n }", "public function getFilesDir()\n {\n return $this->files_dir;\n }", "public function cacheFolder() {\n\t\t$full_path = trim(str_replace(MODX_BASE_PATH, '', trim($this->config['cacheFolder'])), DIRECTORY_SEPARATOR);\n\n\t\tif (!file_exists(MODX_BASE_PATH . $full_path)) {\n\t\t\t$tmp = explode(DIRECTORY_SEPARATOR, $full_path);\n\t\t\t$path = MODX_BASE_PATH;\n\t\t\tforeach ($tmp as $v) {\n\t\t\t\tif (!empty($v)) {\n\t\t\t\t\t$path .= $v . DIRECTORY_SEPARATOR;\n\t\t\t\t\tif (!file_exists($path)) {\n\t\t\t\t\t\tmkdir($path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (substr($full_path, -1) !== DIRECTORY_SEPARATOR) {\n\t\t\t$full_path .= DIRECTORY_SEPARATOR;\n\t\t}\n\n\t\t// Could not create cache directory\n\t\tif (!file_exists(MODX_BASE_PATH . $full_path)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get the latest cache files\n\t\t$this->config['cacheFolder'] = $cacheFolder = MODX_BASE_PATH . $full_path;\n\t\t$regexp = '('.$this->config['jsFilename'].'|'.$this->config['cssFilename'].')';\n\t\t$regexp .= '_(\\d{10})';\n\t\t$regexp .= '('.$this->config['jsExt'].'|'.$this->config['cssExt'].')';\n\n\t\t$files = scandir($cacheFolder);\n\t\tforeach ($files as $file) {\n\t\t\tif ($file == '.' || $file == '..') {continue;}\n\n\t\t\tif (preg_match(\"/^$regexp$/iu\", $file, $matches)) {\n\t\t\t\tif ($matches[3] == $this->config['jsExt']) {\n\t\t\t\t\t$this->current['js'][] = array(\n\t\t\t\t\t\t'file' => $matches[0],\n\t\t\t\t\t\t'time' => filemtime($cacheFolder . $file),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->current['css'][] = array(\n\t\t\t\t\t\t'file' => $matches[0],\n\t\t\t\t\t\t'time' => filemtime($cacheFolder . $file),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function generateLanguageCache()\n\t{\n\t\t$arrLanguages = array('en');\n\t\t$objLanguages = \\Database::getInstance()->query(\"SELECT language FROM tl_member UNION SELECT language FROM tl_user UNION SELECT REPLACE(language, '-', '_') FROM tl_page WHERE type='root'\");\n\n\t\t// Only cache the languages which are in use (see #6013)\n\t\twhile ($objLanguages->next())\n\t\t{\n\t\t\tif ($objLanguages->language == '')\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$arrLanguages[] = $objLanguages->language;\n\n\t\t\t// Also cache \"de\" if \"de-CH\" is requested\n\t\t\tif (strlen($objLanguages->language) > 2)\n\t\t\t{\n\t\t\t\t$arrLanguages[] = substr($objLanguages->language, 0, 2);\n\t\t\t}\n\t\t}\n\n\t\t$arrLanguages = array_unique($arrLanguages);\n\n\t\tforeach ($arrLanguages as $strLanguage)\n\t\t{\n\t\t\t$arrFiles = array();\n\n\t\t\t// Parse all active modules\n\t\t\tforeach (\\ModuleLoader::getActive() as $strModule)\n\t\t\t{\n\t\t\t\t$strDir = 'system/modules/' . $strModule . '/languages/' . $strLanguage;\n\n\t\t\t\tif (!is_dir(TL_ROOT . '/' . $strDir))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tforeach (scan(TL_ROOT . '/' . $strDir) as $strFile)\n\t\t\t\t{\n\t\t\t\t\tif (strncmp($strFile, '.', 1) !== 0 && (substr($strFile, -4) == '.php' || substr($strFile, -4) == '.xlf'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$arrFiles[] = substr($strFile, 0, -4);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$arrFiles = array_values(array_unique($arrFiles));\n\n\t\t\t// Create one file per table\n\t\t\tforeach ($arrFiles as $strName)\n\t\t\t{\n\t\t\t\t$strCacheFile = 'system/cache/language/' . $strLanguage . '/' . $strName . '.php';\n\n\t\t\t\t// Add a short header with links to transifex.com\n\t\t\t\t$strHeader = \"<?php\\n\\n\"\n\t\t\t\t\t\t . \"/**\\n\"\n\t\t\t\t\t\t . \" * Contao Open Source CMS\\n\"\n\t\t\t\t\t\t . \" * \\n\"\n\t\t\t\t\t\t . \" * Copyright (c) 2005-2016 Leo Feyer\\n\"\n\t\t\t\t\t\t . \" * \\n\"\n\t\t\t\t\t\t . \" * Core translations are managed using Transifex. To create a new translation\\n\"\n\t\t\t\t\t\t . \" * or to help to maintain an existing one, please register at transifex.com.\\n\"\n\t\t\t\t\t\t . \" * \\n\"\n\t\t\t\t\t\t . \" * @link http://help.transifex.com/intro/translating.html\\n\"\n\t\t\t\t\t\t . \" * @link https://www.transifex.com/projects/p/contao/language/%s/\\n\"\n\t\t\t\t\t\t . \" * \\n\"\n\t\t\t\t\t\t . \" * @license LGPL-3.0+\\n\"\n\t\t\t\t\t\t . \" */\\n\";\n\n\t\t\t\t// Generate the cache file\n\t\t\t\t$objCacheFile = new \\File($strCacheFile, true);\n\t\t\t\t$objCacheFile->write(sprintf($strHeader, $strLanguage));\n\n\t\t\t\t// Parse all active modules and append to the cache file\n\t\t\t\tforeach (\\ModuleLoader::getActive() as $strModule)\n\t\t\t\t{\n\t\t\t\t\t$strFile = 'system/modules/' . $strModule . '/languages/' . $strLanguage . '/' . $strName;\n\n\t\t\t\t\tif (file_exists(TL_ROOT . '/' . $strFile . '.xlf'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$objCacheFile->append(static::convertXlfToPhp($strFile . '.xlf', $strLanguage));\n\t\t\t\t\t}\n\t\t\t\t\telseif (file_exists(TL_ROOT . '/' . $strFile . '.php'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$objCacheFile->append(static::readPhpFileWithoutTags($strFile . '.php'));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Close the file (moves it to its final destination)\n\t\t\t\t$objCacheFile->close();\n\t\t\t}\n\t\t}\n\n\t\t// Add a log entry\n\t\t$this->log('Generated the language cache', __METHOD__, TL_CRON);\n\t}", "public function getKernelCacheDir()\n {\n return $this->kernelCacheDir;\n }", "public function getDir() {\n return Yii::getAlias('@static').'/'.$this->module.'/'. $this->parent_id .'/';\n }", "protected function get_sitemap_root_cache_file_path() {\n\n\t\t$upload_dir = wp_upload_dir();\n\n\t\t// Set directory the sitemap will be stored in.\n\t\t$cache_dir = '.';\n\t\tif ( isset( $upload_dir['basedir'] ) ) {\n\t\t\t$cache_dir = $upload_dir['basedir'];\n\t\t}\n\n\t\t// Generate sitemap file path.\n\t\t$cache_file = sprintf(\n\t\t\t'%s/sitemap_index.xml',\n\t\t\t$cache_dir\n\t\t);\n\n\t\t$cache_file = \\apply_filters( 'yoast_sitemap_cli_root_cache_file_path', $cache_file );\n\n\t\treturn $cache_file;\n\n\t}", "public static function getDataDir()\n {\n return self::getDir('getDataHome');\n }", "public static function get_directory(): string {\n return Simply_Static\\Options::instance()->get('local_dir') ?: '';\n }", "function drewlabs_component_generator_cache_path()\n{\n return __DIR__.'/.cache';\n}", "private static function getModulesCache()\n {\n if (defined('_PS_CACHE_DIR_')) {\n return _PS_CACHE_DIR_ . '/retailcrm_modules_cache.php';\n }\n\n if (!defined('_PS_ROOT_DIR_')) {\n return '';\n }\n\n $cacheDir = _PS_ROOT_DIR_ . '/cache';\n\n if (realpath($cacheDir) !== false && is_dir($cacheDir)) {\n return $cacheDir . '/retailcrm_modules_cache.php';\n }\n\n return _PS_ROOT_DIR_ . '/retailcrm_modules_cache.php';\n }", "function getFileDirectory() {\n\t\treturn dirname($this->getFilename());\n\t}", "public function getLibDir()\n {\n return Mage::getBaseDir(Mage_Core_Model_Store::URL_TYPE_MEDIA) . DS . 'hycube' . DS . 'geoip';\n }", "public function getImageCachePath()\n {\n return $this->getSettingArray()[\"image_cache_path\"];\n }", "public function getReportCacheDir()\n {\n return $this->reportCacheDir;\n }", "function getLanguageFiles() // used in admin_configuration.php\r\n\r\n{\r\n\r\n\t$directory = \"models/languages/\";\r\n\r\n\t$languages = glob($directory . \"*.php\");\r\n\r\n\t//print each file name\r\n\r\n\treturn $languages;\r\n\r\n}", "static public function getKekuleDir()\n {\n return kekulejs_configs::getScriptDir();\n }", "protected function get_paths()\n {\n\n return array(\n WP_LANG_DIR . '/' . $this->textdomain . '-' . get_locale() . '.mo',\n Kirki::$path . '/languages/' . $this->textdomain . '-' . get_locale() . '.mo',\n );\n\n }", "public function getDataDir()\n {\n return (string) $this->file->get(self::SETTING_DATA_DIR);\n }", "public function getFileBaseDir()\n {\n return Mage::getBaseDir('media').DS.'invitationstatus'.DS.'file';\n }" ]
[ "0.7584097", "0.7578814", "0.75418574", "0.75357175", "0.74441427", "0.7383058", "0.736162", "0.7339005", "0.7337674", "0.7337674", "0.72196597", "0.71986824", "0.71529955", "0.71529955", "0.71529955", "0.71529955", "0.71404564", "0.7109667", "0.7105962", "0.7099625", "0.7099485", "0.70581913", "0.70385927", "0.70302427", "0.69600797", "0.6867762", "0.6859405", "0.6852658", "0.681021", "0.6796206", "0.67620045", "0.6732131", "0.67297524", "0.67280626", "0.66831744", "0.66552746", "0.66529936", "0.66411597", "0.6637768", "0.6626652", "0.65890276", "0.6574128", "0.6561151", "0.65579855", "0.6518545", "0.6514546", "0.65132457", "0.6448668", "0.6440442", "0.64298946", "0.6423072", "0.64210486", "0.63837457", "0.6382751", "0.63649416", "0.63515174", "0.6336693", "0.6336693", "0.63152784", "0.62910223", "0.62576145", "0.6250176", "0.6242682", "0.62400764", "0.6230591", "0.62085736", "0.62042886", "0.61958176", "0.6190008", "0.61340195", "0.6128051", "0.61253357", "0.6115796", "0.6113331", "0.6108551", "0.6106444", "0.6089953", "0.6088125", "0.60704684", "0.6051239", "0.60511017", "0.6049823", "0.6049388", "0.6047485", "0.60436714", "0.6038584", "0.6035999", "0.60043234", "0.60025215", "0.5996455", "0.5994213", "0.5993771", "0.5990643", "0.5990245", "0.5984801", "0.59835047", "0.5977768", "0.59707373", "0.5961742", "0.59488964" ]
0.64789724
47
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) : void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, idcompte_id INT DEFAULT NULL, idpartenaire_id INT DEFAULT NULL, username VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, nomcomplet VARCHAR(255) DEFAULT NULL, mail VARCHAR(255) DEFAULT NULL, tel INT DEFAULT NULL, adresse VARCHAR(255) DEFAULT NULL, status VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_8D93D649F85E0677 (username), INDEX IDX_8D93D6498CDECFD5 (idcompte_id), INDEX IDX_8D93D649E1440477 (idpartenaire_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB'); $this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D6498CDECFD5 FOREIGN KEY (idcompte_id) REFERENCES compte (id)'); $this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D649E1440477 FOREIGN KEY (idpartenaire_id) REFERENCES partenaire (id)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNED NULL COMMENT 'person',\n CHANGE `tcmn_tmed_id` `tcmn_tmed_id` TINYINT(4) UNSIGNED NULL COMMENT 'medijs';\n \");\n }", "public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function up()\n {\n $this->execute(\"\n\n ALTER TABLE `cucp_user_company_position` \n ADD COLUMN `cucp_role` CHAR(20) NULL AFTER `cucp_name`;\n\n \");\n }", "public function up()\n\t{\n\t\t$this->dbforge->add_column($this->table, $this->field);\n\t}", "public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }", "public function up()\n {\n dbexec('ALTER TABLE #__subscriptions_coupons\n ADD `created_on` datetime DEFAULT NULL AFTER `usage`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n \n dbexec('ALTER TABLE #__subscriptions_vats\n ADD `created_on` datetime DEFAULT NULL AFTER `data`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n }", "public function up()\n\t{\n\t\t$this->dbforge->modify_column($this->table, $this->field);\n\t}", "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL' ,\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey('fk_social_auth_user_id_to_user_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n }", "public function up()\n {\n $user = $this->table('products', ['collation' => 'utf8mb4_persian_ci', 'engine' => 'InnoDB']);\n $user\n ->addColumn('name', STRING, [LIMIT => 20])\n ->addColumn('count', STRING, [LIMIT => 75])\n ->addColumn('code', STRING, [LIMIT => 100])\n ->addColumn('buy_price', STRING, [LIMIT => 30])\n ->addColumn('sell_price', STRING, [LIMIT => 30])\n ->addColumn('aed_price', STRING, [LIMIT => 50])\n ->addTimestamps()\n ->save();\n }", "public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('lecturer', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'nip' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => true,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'nik' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => false,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'name' => array(\n 'type' => 'VARCHAR(24)',\n 'null' => false,\n ),\n\t\t\t'id_study_program' => array(\n\t\t\t\t'type' => 'VARCHAR(24)',\n\t\t\t\t'null' => false,\n\t\t\t)\n\n ));\n $this->dbforge->add_key('nik', true);\n $this->dbforge->create_table('lecturer');\n }", "public function up()\n\t{\n\t\t// are not setting the foreign key constraint, to allow the examination module to work without the intravitreal\n\t\t// injection module being installed\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'left_treatment_id', 'int(10) unsigned');\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'right_treatment_id', 'int(10) unsigned');\n\t}", "public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }", "public function preUp()\n {\n }", "public function up()\n\t{\n\t\t// create the purchase_order_details table\n\t\tSchema::create('purchase_order_details', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\t\t \n\t\t $table->integer('purchase_order_id')->unsigned();//->foreign()->references('id')->on('orders');\n\t\t $table->integer('product_id')->unsigned();//->foreign()->references('id')->on('products');\n\t\t $table->integer('quantity');\t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \n\t\t $table->integer('updated_by')->unsigned();\n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }", "public function up()\n\t{\t\t\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'2',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\t\t\n\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'3',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\t//\n\t}", "public function up()\n {\n $table = $this->table('qobo_translations_translations');\n $table->renameColumn('object_foreign_key', 'foreign_key');\n $table->renameColumn('object_model', 'model');\n $table->renameColumn('object_field', 'field');\n $table->renameColumn('translation', 'content');\n\n if (!$table->hasColumn('locale')) {\n $table->addColumn('locale', 'char', [\n 'default' => null,\n 'limit' => 6,\n ]);\n }\n $table->update();\n\n $table = TableRegistry::getTableLocator()->get(\"Translations.Translations\");\n $entities = $table->find()->all();\n foreach($entities as $entity) {\n $entity->setDirty('locale', true);\n $table->save($entity);\n }\n }", "public function up()\n {\n $this->addForeignKey('tours_fk', 'tours', 'id', 'tour_to_hotel', 'tour_id');\n\n $this->addForeignKey('t2h_fkh', 'tour_to_hotel', 'hotel_id', 'hotels', 'id');\n $this->addForeignKey('t2h_fkt', 'tour_to_hotel', 'tour_id', 'tours', 'id');\n }", "public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }", "public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }", "public function safeUp()\n {\n $this->alterColumn('item_keuangan', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('item_keuangan', 'status', \"TINYINT(1) NOT NULL DEFAULT '1' COMMENT '0=tidak aktif; 1=aktif;' AFTER `jenis`\");\n }", "public function up()\n {\n $fields = array(\n 'first_login' => array('type' => 'char', 'constraint' => '1', 'default' => '1'),\n );\n $this->dbforge->add_column('user', $fields);\n }", "public function up()\n {\n $this->addForeignKey(\n 'fk_category_product_from_category',\n 'category_product',\n 'category_id',\n 'category',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n\n $this->addForeignKey(\n 'fk_category_product_from_product',\n 'category_product',\n 'product_id',\n 'product',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n\t\t$this->dropColumn('korzet','utca'); \n\t\t$this->addColumn('korzet','utca','string NOT NULL');\n\t}", "public function up()\n {\n // $this->fields()->create([]);\n // $this->streams()->create([]);\n // $this->assignments()->create([]);\n }", "public function up()\n {\n Schema::table($this->table, function (Blueprint $table) {\n // $table->bigInteger('user_id')->default(0)->after('id'); // Example\n $table->dropColumn([\n // 'user_id', // Example\n ]);\n });\n }", "public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => '[email protected]',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }", "public function up(): void\n {\n try {\n // SM: We NEVER delete this table.\n if ($this->db->tableExists('prom2_pages')) {\n return;\n }\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"CREATE TABLE `prom2_pages` (\n `cntPageID` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `txtRelativeURL` varchar(255) NOT NULL COMMENT 'Relative URL',\n `txtTitle` varchar(70) NOT NULL COMMENT 'Title',\n `txtContent` text NOT NULL COMMENT 'Content',\n `blnRobots_DoNotAllow` bit(1) NOT NULL DEFAULT b'1',\n PRIMARY KEY (`cntPageID`),\n UNIQUE KEY `txtRelativeURL` (`txtRelativeURL`),\n KEY `txtTitle` (`txtTitle`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function up()\n\t{\n\t\t// Add data to committee-members\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Brian O\\'Sullivan',\n\t\t\t'role' => 'Chairman',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Anthony Barker',\n\t\t\t'role' => 'PRO',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\t\t\n\t}", "public function up()\n {\n $this->query(\"UPDATE `subscription_types` SET `user_label` = `name` WHERE `user_label` = '' OR `user_label` IS NULL;\");\n\n $this->table('subscription_types')\n ->changeColumn('user_label', 'string', ['null' => false])\n ->update();\n }", "public function safeUp()\n\t{\n $sql = <<<SQL\n alter table r add R8 inte;\nSQL;\n\t\t//$this->execute($sql);\n $sql = <<<SQL\n ALTER TABLE r ADD constraint FK_r8_elgz1 FOREIGN KEY (r8) REFERENCES elgz (elgz1) ON DELETE SET DEFAULT ON UPDATE CASCADE;\nSQL;\n //$this->execute($sql);\n\t}", "public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_role_model')->migration_add('Cookie Admin', 'Cookie Designer and Eater', $this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function up()\n {\n\t\t$this->addColumn('{{%user}}', 'is_super', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `status`\");\n\t\t\n\t\t//Add new column for Option Group table\n\t\t$this->addColumn('{{%option_group}}', 'option_type', Schema::TYPE_STRING . \"(25) NULL DEFAULT 'text' AFTER `title`\");\n\t\t\n\t\t//Add new column for Order table\n\t\t$this->addColumn('{{%order}}', 'is_readed', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `shipment_method`\");\n }", "public function up()\n {\n $this->addColumn(\\backend\\models\\VodProfile::tableName(), 'language', \"char(5) not null default 'en-US'\");\n }", "public function up()\n {\n if (!Schema::hasTable($this->table))\n Schema::create($this->table, function (Blueprint $table)\n {\n $table->integer('parent_id')->unsigned()->index();\n $table->foreign('parent_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->integer('child_id')->unsigned()->index();\n $table->foreign('child_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->primary(['parent_id','child_id'],'organisation_relations_primary');\n\n $table->timestamps();\n $table->softDeletes();\n\n $table->engine = 'InnoDB';\n });\n }", "public function up(){\n $table = $this->table('users', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('identity'=>true, 'signed'=>false));\n $table->addColumn('email', 'string', array('limit'=>100));\n $table->save();\n }", "public function up() { return $this->run('up'); }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t// examples:\n\t\t\t\t'l_label' => 'VARCHAR(200) NULL DEFAULT NULL',\n\t\t\t\t'l_announce' => 'TEXT NULL DEFAULT NULL',\n\t\t\t\t//'l_content' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_principles_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_principles_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t// create the purchase_orders table\n\t\tSchema::create('purchase_orders', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('order_number', 128);\n\t\t $table->string('approved',50);\n\t\t $table->date('purchase_date');\t\t \t \t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \t\t \n\t\t $table->integer('updated_by')->unsigned();\t\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'label' => 'VARCHAR(20) NULL DEFAULT NULL COMMENT \"language label\"',\n\t\t\t\t'code' => 'VARCHAR(5) NOT NULL COMMENT \"language code\"',\n\t\t\t\t'locale' => 'VARCHAR (5) NULL DEFAULT NULL',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not visible; 1 - visible\"',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not published; 1 - published\"',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0 COMMENT \"order by position DESC\"',\n\t\t\t\t'created' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - creation time\"',\n\t\t\t\t'modified' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - last entity modified time\"',\n\n\t\t\t\t'UNIQUE key_unique_code (code)',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\n\t\t$this->insert('{{language}}', array(\n\t\t\t'label' => 'рус',\n\t\t\t'code' => 'ru',\n\t\t\t'locale' => 'ru',\n\t\t));\n\t}", "public function up()\n {\n $this->execute('Update goods SET price_rub = price WHERE currency_id = 1');\n }", "public function up()\n\t{\n $this->dropColumn('calculo','fecha');\n\n //add column fecha in producto\n $this->addColumn('producto','fecha','date');\n\t}", "public function safeUp() {\n\t$this->createTable('post', array(\n 'id' =>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'created_on' =>\"int(11) NOT NULL\",\n 'title' =>\"varchar(255) NOT NULL\",\n 'context' =>\"text NOT NULL\",\n \"PRIMARY KEY (`id`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "public function up(){\n Schema::table('entries', function (Blueprint $table) {\n $table->renameColumn('value', 'entry_value');\n });\n }", "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` TEXT NOT NULL AFTER `positive_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function safeUp()\n {\n $this->addColumn('{{%organization}}', 'legal_entity', $this->string()->null());\n $this->addColumn('{{%organization}}', 'contact_name', $this->string()->null());\n $this->addColumn('{{%organization}}', 'about', $this->text()->null());\n $this->addColumn('{{%organization}}', 'picture', $this->string()->null());\n }", "public function up()\n {\n $this->table('agent_order_consignee_address')\n ->addColumn(Column::string('order_number')->setUnique()->setComment('订单编号'))\n \t\t->addColumn(Column::integer('agent_id')->setComment('代理商ID'))\n\t ->addColumn(Column::integer('create_time')->setDefault(1)->setComment('创建时间'))\n\t \n\t ->addColumn(Column::string('consignee_name')->setComment('收货人姓名'))\n\t ->addColumn(Column::string('consignee_phone')->setComment('收货人电话'))\n\t ->addColumn(Column::string('province')->setComment('省份'))\n\t ->addColumn(Column::string('city')->setComment('城市'))\n\t ->addColumn(Column::string('area')->setComment('地区'))\n\t ->addColumn(Column::string('address')->setComment('收货人详细地址'))\n ->create(); \n }", "public function up()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t'l_value' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_configuration_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_configuration_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function safeUp()\r\n {\r\n $this->up();\r\n }", "public function up(){\n // $table->table('kelas')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('NamaKelas', 'varchar', \"100\")\n // ->create();\n }", "public function safeUp()\n\t{\n\t\t$this->createTable('pesquisa', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t));\n\t}", "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\n {\n $this->up();\n }", "public function up(){\n // $table->table('kelassiswa')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('Kelas_Id', 'int', \"11\")\n // ->addColumn('Peserta_Id', 'int', \"11\")\n // ->addForeignKey('Peserta_Id', 'peserta', \"Id\", \"CASCADE\")\n // ->addForeignKey('Kelas_Id', 'kelas', \"Id\")\n // ->create();\n\n }", "public function up()\n\t{\n\t\tSchema::table('project_sections', function($t){\n\t\t\t$t->integer('created_by_project_id')->nullable()->unsigned();\n\t\t\t$t->boolean('public')->default(0);\n\n $t->foreign('created_by_project_id')->references('id')->on('projects')->on_delete('SET NULL');\n\t\t});\n\t}", "public function up(){\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('ALTER TABLE `btm_tasks` ADD COLUMN `last_run` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `date_created`;');\n\t}", "public function up()\n {\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_create');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_mods');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_modpacks');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->boolean('solder_keys')->default(0);\n $table->boolean('solder_clients')->default(0);\n $table->boolean('modpacks_create')->default(0);\n $table->boolean('modpacks_manage')->default(0);\n $table->boolean('modpacks_delete')->default(0);\n });\n }", "public function up()\n\t{\n\t\t$sql = \"create table tbl_rights\n\t\t\t\t(\n\t\t\t\t\titemname varchar(64) not null,\n\t\t\t\t\ttype integer not null,\n\t\t\t\t\tweight integer not null,\n\t\t\t\t\tprimary key (itemname),\n\t\t\t\t\tforeign key (itemname) references tbl_auth_item (name) on delete cascade on update cascade\n\t\t\t\t)\";\n\t\t $this->execute($sql);\n\t\t \n\t}", "public function up()\n {\n Schema::dropIfExists('db_question_new.t_answer_type');\n Schema::create('db_question_new.t_answer_type', function (Blueprint $table){\n $table->increments('id');\n t_field($table->integer('answer_type_no'),\"答案序号\");\n t_field($table->string('name'),\"步骤名字\");\n t_field($table->integer('subject'),\"科目id\");\n t_field($table->integer('open_flag')->default(1),\"开启与否\");\n }); \n }", "public function safeUp()\n\t{\n\t\t$this->createTable( 'tbl_auth_item', array(\n\t\t \"name\" => \"varchar(64) not null\",\n\t\t \"type\" => \"integer not null\",\n\t\t \"description\" => \"text\",\n\t\t \"bizrule\" => \"text\",\n\t\t \"data\" => \"text\",\n\t\t \"primary key (name)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_item_child\", array(\n \t\t\"parent\" => \" varchar(64) not null\",\n\t\t\"child\" => \" varchar(64) not null\",\n \t\t\"primary key (parent,child)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_assignment\",array(\n \t\t\"itemname\" => \"varchar(64) not null\",\n \t\t\"userid\" => \"varchar(64) not null\",\n \t\t\"bizrule\" => \"text\",\n \t\t\"data\"\t => \"text\",\n \t\t\"primary key (itemname,userid)\",\n\t\t));\n\n\t\t$this->addForeignKey('fk_auth_item_child_parent','tbl_auth_item_child','parent','tbl_auth_item','name','CASCADE','CASCADE');\n\t\t$this->addForeignKey('fk_auth_assignment_itemname','tbl_auth_assignment','itemname','tbl_auth_item','name');\n\t\t$this->addForeignKey('fk_auth_assignment_userid','tbl_auth_assignment','userid','tbl_user','id');\n\t}", "public function up()\n {\n // add foreign key for table `articles`\n $this->addForeignKey(\n 'fk-comments-article_id',\n 'comments',\n 'article_id',\n 'article',\n 'id'\n );\n }", "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this->createTableName, [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'type' => $this->integer(1)->notNull(),\n 'location' => $this->text()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'start_at' => $this->integer()->defaultValue(null),\n 'active' => $this->boolean()->defaultValue(true),\n\n ],$tableOptions);\n\n\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n\n $moduleInvite = Module::findOne(['name' => 'Actioncalendar', 'slug' => 'actioncalendar']);\n if(empty($moduleInvite)) {\n $this->batchInsert('{{%module}}', ['parent_id', 'name', 'slug', 'visible', 'sorting'], [\n [null, 'Actioncalendar', 'actioncalendar', 1, 22],\n ]);\n }\n\n }", "public function up()\n\t{\n\t\tSchema::table('user_hasil', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->integer('user_id');\n\t\t\t$table->string('grade', 2);\n\t\t\t$table->decimal('hasil', 5, 2);\n\t\t\t$table->year('tahun');\n\t\t\t$table->timestamps();\n\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_update('cascade');\n\t\t});\n\t}", "public function safeUp()\r\n {\r\n $tableOptions = null;\r\n if ($this->db->driverName === 'mysql') {\r\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';\r\n }\r\n\r\n $this->createTable('{{%contact_msg}}', [\r\n 'id' => Schema::TYPE_PK,\r\n 'from_email' => Schema::TYPE_STRING . \"(320) NOT NULL\",\r\n 'to_email' => Schema::TYPE_STRING . \"(320) NULL\",\r\n 'subject' => Schema::TYPE_STRING . \"(300) NOT NULL\",\r\n 'text' => Schema::TYPE_TEXT,\r\n 'viewed' => Schema::TYPE_BOOLEAN . \"(1) NOT NULL DEFAULT '0'\",\r\n 'created_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n 'updated_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n ], $tableOptions);\r\n }", "public function up()\n {\n $this->alterColumn('{{%hystorical_data}}', 'project_id', $this->integer());\n\n $this->dropForeignKey('fk-hystorical_data-project_id',\n '{{%hystorical_data}}');\n\n $this->addForeignKey(\n 'fk-hystorical_data-project_id',\n '{{%hystorical_data}}',\n 'project_id',\n '{{%projects}}',\n 'id',\n 'SET NULL'\n );\n }", "public function safeUp()\n {\n $this->createTable('site_phrase', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'phrase' => 'string NOT NULL',\n 'hash' => 'varchar(32)',\n 'price' => 'decimal(10,2) NOT NULL',\n 'active' => self::MYSQL_TYPE_BOOLEAN,\n ));\n\n $this->addForeignKey('site_phrase_site_id', 'site_phrase', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }", "public function up()\n\t{\n\t\tSchema::create('flows_steps', function($table) {\n\n\t\t\t$table->engine = 'InnoDB';\n\n\t\t $table->increments('stepid');\n\t\t $table->integer('flowid');\n\t\t $table->string('step', 100);\n\t\t $table->integer('roleid');\n\t\t $table->integer('parentid');\n\t\t $table->integer('state');\n\t\t $table->integer('page');\n\t\t $table->integer('condition2');\n\t\t $table->timestamps();\n\n\t\t});\n\t}", "public function up()\n\t{\n\t\tSchema::table('devices', function($table)\n\t\t{\n\t\t\t$table->string('uuid')->unique;\n\t\t\t$table->drop_column('uid');\n\t\t});\n\t}", "public function up()\n\t{\n\t\t$this->execute(\"\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.*', 0, 'Edit invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.View', 0, 'View invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.*', 0, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.View', 0, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitem` VALUES('InvoiceEdit', 2, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('InvoiceView', 2, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FiitInvoiceItem.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FiitInvoiceItem.View');\n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FinvInvoice.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FinvInvoice.View');\n \");\n\t}", "public function up()\n {\n $this->createTable('post',[\n 'id' => $this->primaryKey(),\n 'author_id' => $this->integer(),\n 'title' => $this->string(255)->notNull()->unique(),\n 'content' => $this->text(),\n 'published_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'updated_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'status' => \"ENUM('draft','published')\",\n 'image' => $this->string(255)\n ]); \n\n $this->addForeignKey(\n 'fk_post_author_id',\n 'post',\n 'author_id',\n 'user',\n 'id',\n 'CASCADE',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n// $import->import();\n\t}", "public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"authItem\");\n\t\t}\n\n\t\t$this->createTable(\"{{rights}}\", array(\n\t\t\t\"itemname\" => \"varchar(64) CHARACTER SET UTF8 NOT NULL\",\n\t\t\t\"type\"\t => \"int not null\",\n\t\t\t\"weight\" => \"int not null\",\n\t\t\t\"PRIMARY KEY (itemname)\"\n\t\t\t));\n\t}", "public function up() {\r\n\t\t// UP\r\n\t\t$column = parent::Column();\r\n\t\t$column->setName('id')\r\n\t\t\t\t->setType('biginteger')\r\n\t\t\t\t->setIdentity(true);\r\n\t\tif (!$this->hasTable('propertystorage')) {\r\n\t\t\t$this->table('propertystorage', [\r\n\t\t\t\t\t\t'id' => false,\r\n\t\t\t\t\t\t'primary_key' => 'id'\r\n\t\t\t\t\t])->addColumn($column)\r\n\t\t\t\t\t->addColumn('path', 'text', ['limit' => 1024])\r\n\t\t\t\t\t->addColumn('name', 'text', ['limit' => 100])\r\n\t\t\t\t\t->addColumn('valuetype', 'integer',[])\r\n\t\t\t\t\t->addColumn('value', 'text', [])\r\n\t\t\t\t\t->create();\r\n\t\t}\r\n\t}", "public function up()\n {\n $perfis = [\n [\n 'id' => 1,\n 'perfil' => 'Genérico',\n 'ativo' => 1\n ]\n ];\n\n $this->insert('singular_perfil', $perfis);\n\n $usuarios = [\n [\n 'id' => 1,\n 'nome' => 'Singular Framework',\n 'login' => 'singular',\n 'senha' => 'singular',\n 'perfil_id' => 1\n ]\n ];\n\n $this->insert('singular_usuario', $usuarios);\n }", "public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }", "public function up()\n\t{\n\t\t$demoUser = new User();\n\t\t$demoUser->username = \"demo\";\n\t\t$demoUser->email = '[email protected]';\n\t\t$demoUser->password = 'password';\n\t\t$demoUser->create_time = new CDbExpression('NOW()');\n\t\t$demoUser->update_time = new CDbExpression('NOW()');\n\n\t\t$demoUser->save();\n\n\t\t$adminUser = new User();\n\t\t$adminUser->username = \"admin\";\n\t\t$adminUser->email = '[email protected]';\n\t\t$adminUser->password = 'password';\n\t\t$adminUser->create_time = new CDbExpression('NOW()');\n\t\t$adminUser->update_time = new CDbExpression('NOW()');\n\n\t\t$adminUser->save();\n\n\t}", "public function safeUp()\n {\n $tables = Yii::$app->db->schema->getTableNames();\n $dbType = $this->db->driverName;\n $tableOptions_mysql = \"CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB\";\n\n /* MYSQL */\n if (!in_array('question_tag', $tables)) {\n if ($dbType == \"mysql\") {\n $this->createTable('{{%question_tag}}', [\n 'question_id' => 'INT(11) NOT NULL',\n 'tag_id' => 'INT(11) NOT NULL',\n ], $tableOptions_mysql);\n }\n }\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t'like',\n\t\t\tarray(\n\t\t\t\t'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t\t'user_id' => 'int(11) UNSIGNED NOT NULL',\n\t\t\t\t'post_id' => 'int (11) NOT NULL',\n\t\t\t\t'status' => 'TINYINT(1)',\n\t\t\t\t'created_at' => 'int(11)',\n\t\t\t\t'updated_at' => 'int(11)',\n\t\t\t\t'PRIMARY KEY (id)',\n\t\t\t\t),\n\t\t\t'ENGINE=InnoDB'\n\n\t\t\t);\n\t}", "public function up()\n\t{\n\t\tSchema::table('entries', function($table) {\n $table->create();\n $table->increments('id');\n $table->string('title', 128);\n $table->string('body');\n $table->integer('users_id')->unsigned();\n $table->index('users_id');\n $table->integer('last_edited_by');\n $table->foreign('users_id')->references('id')->on('users')->on_delete('no action');\n $table->timestamps();\n });\n\t}", "public function up()\n {\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'password', $this->string()->null());\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'status', $this->integer()->null());\n }", "public function up()\n {\n\t\t$tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\t\t\n\t\t$TABLE_NAME = 'HaberDeneme12';\n $this->createTable($TABLE_NAME, [\n 'HaberID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(12)->notNull(),\n 'Baslik' => $this->string(128)->notNull(),\n 'Ozet' => $this->text()->notNull(),\n 'Detay' => $this->text()->notNull(),\n 'Resim' => $this->text()->notNull(),\n 'EklenmeTarihi' => $this->date(),\n 'GuncellenmeTarihi' => $this->date()\n ], $tableOptions);\n\t\t\n\t\t\n\t\t$TABLE_NAME = 'HaberKategoriDeneme12';\n\t\t $this->createTable($TABLE_NAME, [\n 'KategoriID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(20)->notNull()\n ], $tableOptions);\n\t\t\n }", "public function up()\n\t{\n\t\t$fields = array(\n \"`piezas` DECIMAL(3,2) DEFAULT NULL\",\n\n\t\t);\n\t\t$this->dbforge->add_column('rel_monto_servicios', $fields);\n\n\t}", "public function up()\n {\n $this->insert('key_value', [\n 'key' => 'day_feed_count_dnr',\n 'value' => '15',\n ]);\n }", "public function up()\n {\n // 创建操作记录表\n $tables = $this->table('history');\n // 用户动作\n $tables->addColumn('action', 'string', ['limit' => 20])\n ->addColumn('ip', 'string', ['limit' => 129])\n // 建立用户\n ->addColumn('user_id', 'integer')\n // 登录时间\n ->addColumn('operation_time', 'datetime')\n // 操作详情\n ->addColumn('desc', 'string',['limit'=>500,'null' => true])\n ->create();\n }", "public function up()\n {\n $table = $this->table('vehicle_model_suggestions');\n\n if (!$table->exists()) {\n $table\n ->addPrimaryKey('id')\n ->addColumn('vehicle_id', 'integer', ['null' => false])\n ->addColumn('vehicle_model_id', 'integer', ['null' => false])\n ->addColumn('suggestion', 'text')\n ->addTimestamps()\n ->addColumn('deleted_at', 'datetime')\n ->create();\n }\n }", "public function safeUp()\n {\n $this->insert('category',['name'=>'Uncategorized', 'slug'=>'uncategorized', 'description'=>'Default Category', 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()')]);\n $this->insert('user',['username'=>'Administrator', 'password_hash'=>'$2y$13$6yoLjvVORp/7EO1u8phYTuWYzhMSM4LVVsebZgcqEKj/EQLvo5nJK',\n 'email'=>'[email protected]',\n 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()'),\n 'status'=>1\n ]\n );\n }", "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'post_id' => $this->bigInteger()->notNull(),\n 'category_id' => $this->bigInteger()->notNull(),\n ]);\n\n $this->addForeignKey('post_category_post_id_fk', $this->tableName, 'post_id', '{{%post}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('post_category_category_id_fk', $this->tableName, 'category_id', '{{%category}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n Schema::table('categories', function(Blueprint $table)\n {\n $table->integer('parent_id', false, true)->nullable()->after('cat_order');\n });\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'application_id' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Ид приложения\"',\n\n\t\t\t\t'message' => 'TEXT NOT NULL DEFAULT \"\" COMMENT \"Оригинал\"',\n\t\t\t\t'category' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Категория\"',\n\t\t\t\t'language' => 'VARCHAR(5) NOT NULL DEFAULT \"\" COMMENT \"Язык\"',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t//\n\t\tSchema::create('options',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('activate_pn');\n\t\t\t$table->string('basic_name');\n\t\t\t$table->string('basic_pass');\n\t\t\t$table->timestamps();\n\t\t});\n\n\t\t$o = new Option;\n\t\t$o->activate_pn = 0;\n\t\t$o->save();\n\t}", "public function up() {\n\t\t$this->dbforge->add_field(array(\n\t\t\t'id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'path' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t)\n\t\t));\n\t\t$this->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_key('path');\n\t\t$this->dbforge->create_table('categories');\n\n\t\t// Table structure for table 'event_categories'\n\t\t$this->dbforge->add_field(array(\n\t\t\t'event_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'category_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t),\n\t\t));\n\t\t$this->dbforge->add_key('event_id', TRUE);\n\t\t$this->dbforge->add_key('category_id', TRUE);\n\t\t$this->dbforge->create_table('event_categories');\n\t}", "public function up()\n {\n $this->createTable('usuario_refeicao', [\n 'id' => $this->primaryKey(),\n 'usuario_id' => $this->integer(),\n 'refeicao_id' => $this->integer(),\n 'alimento_id' => $this->integer(),\n 'data_consumo' => $this->date(),\n 'horario_consumo' => $this->time(),\n 'quantidade' => $this->double(5,2),\n 'created_at' => $this->integer(),\n 'updated_at' => $this->integer() \n ]);\n\n $this->addForeignKey('fk_usuariorefeicao_usuario_id', 'usuario_refeicao', 'usuario_id', \n 'user', 'id', 'CASCADE');\n $this->addForeignKey('fk_usuariorefeicao_refeicao_id', 'usuario_refeicao', 'refeicao_id', \n 'refeicoes', 'id', 'CASCADE');\n $this->addForeignKey('fk_usuariorefeicao_alimento_id', 'usuario_refeicao', \n 'alimento_id', 'alimentos', 'id', 'CASCADE');\n }" ]
[ "0.80068773", "0.7915595", "0.7915595", "0.7915595", "0.7571971", "0.75615484", "0.75282776", "0.7498739", "0.7494303", "0.7453733", "0.7446836", "0.7435016", "0.7432123", "0.7427742", "0.7418007", "0.7378834", "0.73757184", "0.7369987", "0.7364234", "0.7352615", "0.732967", "0.73136055", "0.7299604", "0.7295545", "0.7292987", "0.7292416", "0.7291898", "0.72860086", "0.7284734", "0.7273223", "0.72728753", "0.7266176", "0.72633994", "0.7262504", "0.72571415", "0.72518384", "0.7249723", "0.7244173", "0.7240708", "0.72382", "0.72190964", "0.72189", "0.72058564", "0.72037363", "0.7196729", "0.7191739", "0.7190531", "0.7176635", "0.71766096", "0.7167661", "0.71653104", "0.71653104", "0.71605664", "0.7147417", "0.7136502", "0.7131473", "0.712576", "0.71240544", "0.711841", "0.7106414", "0.7106414", "0.7105947", "0.70970017", "0.70939535", "0.7089394", "0.70869356", "0.708664", "0.7084568", "0.7083811", "0.7079555", "0.70702344", "0.70692396", "0.7066957", "0.7062674", "0.705991", "0.70589", "0.70568794", "0.70557487", "0.70552576", "0.705073", "0.7048241", "0.70481586", "0.70464605", "0.7045363", "0.70436513", "0.70395166", "0.7038981", "0.70370364", "0.703443", "0.70328623", "0.7031858", "0.7027016", "0.70146424", "0.7010867", "0.7007659", "0.6990892", "0.69860256", "0.6963466", "0.6961467", "0.69593376", "0.69582504" ]
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema) : void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('DROP TABLE user'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo','fecha','date');\n\t}", "public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }", "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "public function down()\n {\n $this->dbforge->drop_column('user', 'created_at');\n }", "public function down()\n {\n $this->dropForeignKey(\n 'fk-video-blog_id',\n 'video'\n );\n\n\n echo \"m160820_150846_video_create reverted.\\n\";\n\n }", "public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}", "public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}", "public function down(){\n $this->dropTable('users');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` INTEGER NOT NULL AFTER `quality_tweet`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n {\n Schema::table('attachments', function(Blueprint $table) {\n\n $table->dropColumn('viewable_id');\n $table->dropColumn('viewable_type');\n\n\n });\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nDROP TABLE IF EXISTS `movimiento`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n//\t\t$this->dbforge->drop_table('blog');\n\n//\t\t// Dropping a Column From a Table\n\t\t$this->dbforge->drop_column('categories', 'icon');\n\t}", "public function down()\n\t{\n\t\t// nothing to do here.\n\t}", "public function down(){\r\n $this->dbforge->drop_table('users'); //eliminacion de la tabla users\r\n }", "public function down()\n\t{\n\t\tSchema::drop('student');\n\t\t//\n\t}", "public function down()\n{\n\nSchema::drop('event_user');\nSchema::drop('events');\nSchema::drop('file');\nSchema::drop('file_ref');\nSchema::drop('groups');\nSchema::drop('project_user');\nSchema::drop('projects');\nSchema::drop('quicknote');\nSchema::drop('subtasks');\nSchema::drop('task_user');\nSchema::drop('tasks');\nSchema::drop('throttle');\nSchema::drop('timesheet');\nSchema::drop('todos');\nSchema::drop('user_profile');\nSchema::drop('users');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\n\n}", "public function down() \n {\n \n }", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n {\n $this->table('contents')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('education');\n\t}", "public function down()\n\t{\n\t\tSchema::drop('l_wardrobe_table');\n\t}", "public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}", "public function down()\n {\n\tSchema::drop('quizzes');\n }", "public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }", "public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }", "public function down ()\n {\n }", "abstract public function down();", "abstract public function down();", "abstract public function down();", "public function down()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function down()\r\n {\r\n $this->dbforge->drop_table('users');\r\n }", "public function down() {\n\n\t}", "public function down()\n {\n $this->dbforge->drop_table('lecturer', true);\n }", "public function down()\n\t{\n\t\tSchema::drop('flows_steps');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE galaxiee (id INT AUTO_INCREMENT NOT NULL, idu_id INT NOT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_8576D2AF376A6230 (idu_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE trou_noir (id INT AUTO_INCREMENT NOT NULL, id_g_id INT DEFAULT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_AB27242D95951086 (id_g_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE galaxiee ADD CONSTRAINT FK_8576D2AF376A6230 FOREIGN KEY (idu_id) REFERENCES univers (id)');\n $this->addSql('ALTER TABLE trou_noir ADD CONSTRAINT FK_AB27242D95951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('DROP TABLE trounoir');\n $this->addSql('ALTER TABLE galaxie DROP FOREIGN KEY FK_1C880711376A6230');\n $this->addSql('DROP INDEX IDX_1C880711376A6230 ON galaxie');\n $this->addSql('ALTER TABLE galaxie CHANGE idu_id id_u_id INT NOT NULL');\n $this->addSql('ALTER TABLE galaxie ADD CONSTRAINT FK_1C8807116F858F92 FOREIGN KEY (id_u_id) REFERENCES univers (id)');\n $this->addSql('CREATE INDEX IDX_1C8807116F858F92 ON galaxie (id_u_id)');\n $this->addSql('ALTER TABLE planete DROP FOREIGN KEY FK_490E3E5712013DEC');\n $this->addSql('DROP INDEX IDX_490E3E5712013DEC ON planete');\n $this->addSql('ALTER TABLE planete ADD id_s_id INT NOT NULL, ADD nb_sattelite INT NOT NULL, DROP ids_id, DROP nb_satelite');\n $this->addSql('ALTER TABLE planete ADD CONSTRAINT FK_490E3E574AEED04E FOREIGN KEY (id_s_id) REFERENCES systeme (id)');\n $this->addSql('CREATE INDEX IDX_490E3E574AEED04E ON planete (id_s_id)');\n $this->addSql('ALTER TABLE systeme DROP FOREIGN KEY FK_95796DE3CD7AFD24');\n $this->addSql('DROP INDEX IDX_95796DE3CD7AFD24 ON systeme');\n $this->addSql('ALTER TABLE systeme CHANGE idg_id id_g_id INT NOT NULL');\n $this->addSql('ALTER TABLE systeme ADD CONSTRAINT FK_95796DE395951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('CREATE INDEX IDX_95796DE395951086 ON systeme (id_g_id)');\n }", "public function down() {\n $this->dbforge->drop_column('timesheets_items', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'reason_desc', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'reason_desc', TRUE);\n\n // change reason to note\n $fields = array(\n 'reason' => array(\n 'name' => 'note',\n 'type' => \"VARCHAR\",\n 'constraint' => 200,\n 'null' => TRUE\n )\n );\n $this->dbforge->modify_column('timesheets_items', $fields);\n $this->dbforge->modify_column('timesheets_expenses', $fields);\n }", "public function down(): void\n {\n // Remove your data\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_orders');\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function down()\n {\n\tSchema::drop('activities');\n }", "public function down()\n {\n //return false;\n\t\t\n\t\t$TABLE_NAME = 'Haber';\n $this->dropTable($TABLE_NAME);\n\t\t\n\t\t$TABLE_NAME = 'HaberKategori';\n $this->dropTable($TABLE_NAME);\n }", "public function down(){\n $this->dbforge->drop_table('subcategories_news'); //eliminacion de la tabla subcategories_news\n }", "public function down()\n {\n }", "public function down()\n {\n }", "public function down()\n\t{\n\t\tDB::table('professor')->where('professor_id', '=', 1)->delete();\n\t\tDB::table('professor')->where('professor_id', '=', 2)->delete();\n\t\tDB::query('ALTER TABLE professor AUTO_INCREMENT = 1');\n\n\t\t//\n\t}", "public function down(): bool {\n\t\t// Remove & add logic to revert the migration here.\n\t\techo \"M230123030315BaseTables cannot be rolled back.\\n\";\n\t\treturn false;\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_inicio` `fecha_inicio` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_fin` `fecha_fin` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `descuento` `descuento` DECIMAL;\r\n\r\nALTER TABLE `promocion`\r\n ADD `descripcion` VARCHAR(70) AFTER `id`,\r\n ADD `estado` VARCHAR(11) AFTER `fecha_fin`,\r\n ADD `promocion_global` TINYINT(1) NOT NULL AFTER `descuento`;\r\n\r\nALTER TABLE `promocion` DROP `activo`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n\t\t//return false;\n\t}", "public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function down()\n\t{\n\t\t//\n\t\tSchema::drop('options');\n\t}", "public function change()\n {\n $this->schema->table('recurring_expenses',function($table){\n $table->date('end_repeat')->nullable();\n $table->boolean('ended')->default(false);\n $table->enum('repeat',['0','1','7','14','30','365'])->nullable();\n });\n\n $this->schema->table('expenses',function($table){\n $table->dropColumn('end_repeat');\n $table->dropColumn('repeat');\n $table->integer('parent_id')->nullable();\n $table->foreign('parent_id')->references('id')->on('expenses')->onDelete('cascade');\n });\n }", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->dropForeign('users_id_turma_foreign');\n });\n\n Schema::table('contato', function (Blueprint $table) {\n $table->dropForeign('contato_id_usuario_foreign');\n });\n\n Schema::table('monitores', function (Blueprint $table) {\n $table->dropForeign('monitores_id_turma_foreign');\n $table->dropForeign('monitores_id_usuario_foreign');\n });\n\n Schema::table('galeria_portifolio', function (Blueprint $table) {\n $table->dropForeign('galeria_portifolio_id_portifolio_foreign');\n });\n\n Schema::table('portifolio_alunos', function (Blueprint $table) {\n $table->dropForeign('portifolio_alunos_id_portifolio_foreign');\n $table->dropForeign('portifolio_alunos_id_usuario_foreign');\n });\n\n Schema::table('cobranca', function (Blueprint $table) {\n $table->dropForeign('cobranca_id_aluno_foreign');\n });\n\n Schema::table('lista_de_presenca', function (Blueprint $table) {\n $table->dropForeign('lista_de_presenca_id_usuario_foreign');\n });\n\n Schema::table('forum_da_turma', function (Blueprint $table) {\n $table->dropForeign('forum_da_turma_id_usuario_foreign');\n });\n\n Schema::table('posts_do_site', function (Blueprint $table) {\n $table->dropForeign('posts_do_site_id_usuario_foreign');\n });\n\n Schema::table('posts_do_forum', function (Blueprint $table) {\n $table->dropForeign('posts_do_forum_id_topico_foreign');\n $table->dropForeign('posts_do_forum_id_usuario_foreign');\n });\n }", "public function down()\n\t{\n\t\t$this->dropForeignKey('FK_task_creator','tbl_task');\n\n\t\t$this->dropTable('tbl_task');\n\t}", "public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down(){\n\t\tSchema::dropIfExists('cargo');\n\t}", "public function down()\n {\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )->save();\n\n $this->table('users')\n ->removeIndexByName('FK_users_roles')\n ->update();\n\n $this->table('users')\n ->addColumn('can_edit', 'boolean', [\n 'after' => 'enabled',\n 'default' => '0',\n 'length' => null,\n 'null' => false,\n ])\n ->removeColumn('role_id')\n ->update();\n\n $this->table('stundenplan')\n ->changeColumn('note', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => true,\n ])\n ->removeColumn('loggedInNote')\n ->update();\n\n $this->table('roles')->drop()->save();\n }", "public function down()\n\t{\n\t\t//\n\t\tDB::query('TRUNCATE TABLE app_user_apps_publishes CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_fbapps CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_applications CASCADE');\n\t}", "protected abstract function do_down();", "public function down()\n\t{\n\t\t// Drop Table\n\t\tSchema::drop('activities_types');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE encherir_acheteur (encherir_id INT NOT NULL, acheteur_id INT NOT NULL, INDEX IDX_41ABAAFBB0BA17BB (encherir_id), INDEX IDX_41ABAAFB96A7BB5F (acheteur_id), PRIMARY KEY(encherir_id, acheteur_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE encherir_lot (encherir_id INT NOT NULL, lot_id INT NOT NULL, INDEX IDX_3C56919BB0BA17BB (encherir_id), INDEX IDX_3C56919BA8CBA5F7 (lot_id), PRIMARY KEY(encherir_id, lot_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFB96A7BB5F FOREIGN KEY (acheteur_id) REFERENCES acheteur (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFBB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BA8CBA5F7 FOREIGN KEY (lot_id) REFERENCES lot (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EB576A8');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EFC101A');\n $this->addSql('DROP INDEX IDX_503B7C878EB576A8 ON encherir');\n $this->addSql('DROP INDEX IDX_503B7C878EFC101A ON encherir');\n $this->addSql('ALTER TABLE encherir DROP id_acheteur_id, DROP id_lot_id');\n }", "public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user_login`;\n\nALTER TABLE `user` DROP `user_mname`;\n\nALTER TABLE `user` DROP `user_user`;\n\nALTER TABLE `user` DROP `user_password`;\n\nALTER TABLE `user` DROP `user_date_lastlogin`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n\t{\n\t\tSchema::table('officers', function($t){\n\t\t\t$t->drop_column('role');\n\t\t});\n\t}", "public function safeDown()\n {\n $this->down();\n }", "public function safeDown()\n {\n $this->down();\n }", "public function down()\n\t{\n\t\tSchema::drop('refs');\n\t}", "public function down () {\n\t\treturn $this->rename_column ('headline', 'title', 'string', array ('limit' => 72));\n\t}", "public function down()\n\t{\n\t\tSchema::drop('appeals');\n\t}", "public function safeDown()\r\n {\r\n $this->down();\r\n }", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n<<<<<<< HEAD\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n $this->addSql('ALTER TABLE liste_affaire_affaire DROP FOREIGN KEY FK_CA81ADF3F082E755');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152EBF396750');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E65450D2529');\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E6584CF0CF');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2FF631228');\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCE2687AC3');\n $this->addSql('ALTER TABLE sejour DROP FOREIGN KEY FK_96F52028E2687AC3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152E46135043');\n $this->addSql('DROP TABLE affaire');\n<<<<<<< HEAD\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE responsable_legal');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('DROP TABLE enfant');\n $this->addSql('DROP TABLE enfant_sejour');\n $this->addSql('DROP TABLE sejour');\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE etablissement');\n $this->addSql('DROP TABLE liste_affaire');\n $this->addSql('DROP TABLE responsable_legal');\n $this->addSql('DROP TABLE user');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user`;\n\nDROP TABLE IF EXISTS `question`;\n\nDROP TABLE IF EXISTS `answer`;\n\nDROP TABLE IF EXISTS `image`;\n\nDROP TABLE IF EXISTS `vote`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function down()\n {\n $this->table('mail_contents')->drop()->save();\n }", "public function down() {\n\t}", "public function down() {\n\t}", "public function down() {\n\t}", "public function down()\n {\n Schema::dropIfExists('reunion');\n }", "public function down(): void\n {\n $this->table('services')\n ->dropForeignKey(\n ['currency_id','billing_period_id']\n )->save();\n $this->execute('DELETE FROM currencies');\n $this->execute('DELETE FROM billing_periods');\n $this->table('services')->drop()->save();\n $this->table('currencies')->drop()->save();\n $this->table('billing_periods')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('article_category');\n\t}", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->renameColumn('first_name', 'name');\n $table->dropIndex('users_first_name_index');\n $table->dropIndex('users_created_at_index');\n $table->dropIndex('users_updated_at_index');\n $table->dropColumn(\"last_name\");\n $table->dropColumn(\"username\");\n $table->dropColumn(\"provider\");\n $table->dropColumn(\"provider_id\");\n $table->dropColumn(\"api_token\");\n $table->dropColumn(\"code\");\n $table->dropColumn(\"remember_token\");\n $table->dropColumn(\"role_id\");\n $table->dropColumn(\"last_login\");\n $table->dropColumn(\"status\");\n $table->dropColumn(\"root\");\n $table->dropColumn('backend');\n $table->dropColumn(\"photo_id\");\n $table->dropColumn(\"lang\");\n $table->dropColumn(\"color\");\n $table->dropColumn(\"about\");\n $table->dropColumn(\"facebook\");\n $table->dropColumn(\"twitter\");\n $table->dropColumn(\"linked_in\");\n $table->dropColumn(\"google_plus\");\n });\n }", "public function down()\n\t{\n\t\tSchema::drop('entries');\n\t}", "public function down()\n\t{\n\t\tSchema::table('precios_aterrizajes_despegues', function(Blueprint $table)\n\t\t{\n\t\t\t//\n\t\t});\n\t}", "public function down()\n{\nSchema::drop('statustype');\nSchema::drop('area');\nSchema::drop('region');\nSchema::drop('territory');\nSchema::drop('trackedevent');\nSchema::drop('zip_territory');\nSchema::drop('messagetype');\nSchema::drop('optintype');\nSchema::drop('representative');\nSchema::drop('pediatrician');\nSchema::drop('application_messagestatus');\nSchema::drop('application_optin');\nSchema::drop('application_trackedevent');\nSchema::drop('application');\n}", "public function down()\n\t{\n\t\tSchema::drop(Config::get('sentry::sentry.table.users_metadata'));\n\t}", "protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_350001418F5EA509');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8B8F5EA509');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA148F5EA509');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0E8F5EA509');\n $this->addSql('ALTER TABLE cours DROP FOREIGN KEY FK_FDCA8C9CF46CD258');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8BF46CD258');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14F46CD258');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7F46CD258');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9A21BD112');\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_35000141A21BD112');\n $this->addSql('ALTER TABLE contacte DROP FOREIGN KEY FK_C794A022A21BD112');\n $this->addSql('ALTER TABLE demande DROP FOREIGN KEY FK_2694D7A5A21BD112');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14A6CC7B2');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7A21BD112');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EE455FCC0');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EBDDFA3C9');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EDC304035');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9E3797A94');\n $this->addSql('ALTER TABLE personne DROP FOREIGN KEY FK_FCEC9EFA76ED395');\n $this->addSql('ALTER TABLE reset_password_request DROP FOREIGN KEY FK_7CE748AA76ED395');\n $this->addSql('DROP TABLE absence');\n $this->addSql('DROP TABLE classe');\n $this->addSql('DROP TABLE classe_personne');\n $this->addSql('DROP TABLE contacte');\n $this->addSql('DROP TABLE cours');\n $this->addSql('DROP TABLE demande');\n $this->addSql('DROP TABLE matiere');\n $this->addSql('DROP TABLE matiere_classe');\n $this->addSql('DROP TABLE news');\n $this->addSql('DROP TABLE note');\n $this->addSql('DROP TABLE personne');\n $this->addSql('DROP TABLE personne_matiere');\n $this->addSql('DROP TABLE reset_password_request');\n $this->addSql('DROP TABLE salle');\n $this->addSql('DROP TABLE seance');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n\t{\n\t\tSchema::drop('stor_mem');\n\t}", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDEA76ED395');\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDE19FCD424');\n $this->addSql('DROP TABLE booking');\n $this->addSql('DROP TABLE product_image');\n $this->addSql('DROP TABLE family_page_container');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE time_line');\n $this->addSql('ALTER TABLE family DROP FOREIGN KEY FK_A5E6215B727ACA70');\n $this->addSql('DROP INDEX IDX_A5E6215B727ACA70 ON family');\n $this->addSql('ALTER TABLE family ADD page_content_id INT NOT NULL, DROP parent_id, DROP has_uniques_prices, DROP has_seasonal_products');\n $this->addSql('ALTER TABLE family ADD CONSTRAINT FK_A5E6215B8F409273 FOREIGN KEY (page_content_id) REFERENCES page_content (id)');\n $this->addSql('CREATE INDEX IDX_A5E6215B8F409273 ON family (page_content_id)');\n $this->addSql('ALTER TABLE link ADD page_container_id INT DEFAULT NULL, DROP url');\n $this->addSql('ALTER TABLE link ADD CONSTRAINT FK_36AC99F123D5B0C FOREIGN KEY (page_container_id) REFERENCES page_container (id)');\n $this->addSql('CREATE INDEX IDX_36AC99F123D5B0C ON link (page_container_id)');\n $this->addSql('ALTER TABLE product DROP content, DROP order_by, DROP is_generic, DROP type, CHANGE title label VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci');\n $this->addSql('ALTER TABLE unit DROP duration');\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398F5B7AF75');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95C8486F9AC');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D6498486F9AC');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660D629F605');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660E308AC6F');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46CFFE9AD6');\n $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADEE45BDBF');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95CEE45BDBF');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649EE45BDBF');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F464584665A');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C544584665A');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649D60322AC');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46DCD6110');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F462ADD6D8C');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C5459027487');\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398A76ED395');\n $this->addSql('DROP TABLE address');\n $this->addSql('DROP TABLE format');\n $this->addSql('DROP TABLE material');\n $this->addSql('DROP TABLE `order`');\n $this->addSql('DROP TABLE order_detail');\n $this->addSql('DROP TABLE picture');\n $this->addSql('DROP TABLE product');\n $this->addSql('DROP TABLE product_theme');\n $this->addSql('DROP TABLE role');\n $this->addSql('DROP TABLE stock');\n $this->addSql('DROP TABLE suppliers');\n $this->addSql('DROP TABLE theme');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n {\n Schema::dropIfExists('data');\n }", "public function down()\n\t{\n\t\tSchema::create('jobs',function($table){$table->increments('id');});\n\t\tSchema::create('job_location',function($table){$table->increments('id');});\n\t\tSchema::create('job_skill',function($table){$table->increments('id');});\n\t\tSchema::create('locations',function($table){$table->increments('id');});\n\t\tSchema::create('location_program',function($table){$table->increments('id');});\n\t\tSchema::create('location_scholarship',function($table){$table->increments('id');});\n\t\tSchema::create('positions',function($table){$table->increments('id');});\n\t\tSchema::create('programs',function($table){$table->increments('id');});\n\t\tSchema::create('program_subject',function($table){$table->increments('id');});\n\t\tSchema::create('scholarships',function($table){$table->increments('id');});\n\t\tSchema::create('scholarship_subject',function($table){$table->increments('id');});\n\t\tSchema::create('skills',function($table){$table->increments('id');});\n\t\tSchema::create('subjects',function($table){$table->increments('id');});\n\t}" ]
[ "0.7950277", "0.78636813", "0.76065636", "0.7493955", "0.7320625", "0.7245268", "0.7187498", "0.71543235", "0.715298", "0.7141911", "0.7135835", "0.71214414", "0.71154845", "0.71057886", "0.7098064", "0.70800334", "0.7078775", "0.70729095", "0.7068331", "0.7066272", "0.7053364", "0.7053364", "0.7042174", "0.7042174", "0.7042174", "0.7041765", "0.7040102", "0.7028846", "0.70253754", "0.7021679", "0.6988633", "0.6986877", "0.6978061", "0.6971848", "0.6944203", "0.6944203", "0.6944203", "0.6942135", "0.6941429", "0.6939214", "0.6935277", "0.69334567", "0.6928689", "0.6924838", "0.6924794", "0.6913486", "0.6902361", "0.6897891", "0.6897845", "0.6897824", "0.6897824", "0.68886673", "0.688262", "0.6874051", "0.6869844", "0.6863713", "0.6858435", "0.68545175", "0.68440175", "0.6842142", "0.6836981", "0.6836124", "0.6834763", "0.68303466", "0.68297166", "0.68282366", "0.6826686", "0.6824025", "0.68185335", "0.6811099", "0.68078107", "0.68056506", "0.68056506", "0.6789167", "0.67755204", "0.67742497", "0.6765081", "0.67597127", "0.67596203", "0.67564446", "0.67564446", "0.67564446", "0.6753443", "0.6753351", "0.6753351", "0.6753351", "0.6752681", "0.674581", "0.6743746", "0.67387754", "0.6733766", "0.67331296", "0.6731279", "0.67302275", "0.6727377", "0.67273724", "0.672722", "0.672607", "0.67173517", "0.67139125", "0.671303" ]
0.0
-1
Storage::put('resp' . time() . ".json", json_encode($request>all()));
public function comerce_alignet(Request $request){ if($request->has('authorizationResult')){ //Obteniendo la autorización de payme $authorizationResult = $request->input('authorizationResult'); $purchaseOperationNumber = $request->input('purchaseOperationNumber'); //Obteniendo la orden de acuerdo a la respuesta de payme $order = Order::where('order_code', $purchaseOperationNumber)->first(); // Validacion de respuesta de payme // solo si el pago es autorizado se descuenta del inventario y se envía a urbaner if($authorizationResult === "00"){ // Se actualiza la orden de compra de acuerdo de acuerdo a si ha elegido // delivery o no: if($order->delivery){ //P: Pending, A: Atended, R: Rejected payment, D: Delivery pendiente $order->update([ 'status' => 'D' ]); //Ademas se genera la orden en urbaner $this->storeUrbaner($order); }else{ $order->update(['status' => 'A']); } //Actualizando el inventario de acuerdo a la compra $this->inventory($order); }else{ // Se actualiza la orden de compra de acuerdo como rechazado: //P: Pending, A: Atended, R: Rejected payment, D: Delivary pendiente $order->update(['status' => 'R']); } }; return redirect()->away('https://regalalo.pe/mi-cuenta'); //return redirect()->away('http://localhost:4200/#/mis-pedidos'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function store2(Request $request) {\n try {\n// $contactInfo = Storage::disk('local')->exists('worker3.json') ? json_decode(Storage::disk('local')->get('worker2.json')) : [];\n\n $inputData = $request->only(['Surname','Name','middle_name', 'Date_of_Birth', 'Date_of_employment', 'Department']);\n\n $inputData['datetime_submitted'] = date('Y-m-d H:i:s');\n\n// array_push($contactInfo,$inputData);\n\n Storage::disk('local')->append('worker2.json', json_encode($inputData,0,2));\n\n return redirect(route('board..index'));\n\n } catch(Exception $e) {\n\n return ['error' => true, 'message' => $e->getMessage()];\n\n }\n }", "function store3(Request $request) {\n try {\n $contactInfo = Storage::disk('local')->exists('worker3.json') ? json_decode(Storage::disk('local')->get('worker3.json')) : [];\n\n $inputData = $request->only(['Surname','Name','middle_name', 'Date_of_Birth', 'Date_of_employment','text_area']);\n\n $inputData['datetime_submitted'] = date('Y-m-d H:i:s');\n\n// array_push($contactInfo,$inputData);\n\n Storage::disk('local')->append('worker3.json', json_encode($inputData,0,2));\n\n return redirect(route('board..index'));\n\n } catch(Exception $e) {\n\n return ['error' => true, 'message' => $e->getMessage()];\n\n }\n }", "function store(Request $request) {\n try {\n $contactInfo = Storage::disk('local')->exists('worker.json') ? json_decode(Storage::disk('local')->get('worker.json')) : [];\n\n $inputData = $request->only(['Surname','Name','middle_name', 'Date_of_Birth', 'Date_of_employment','Department_head' ]);\n\n $inputData['datetime_submitted'] = date('Y-m-d H:i:s');\n\n// array_push($contactInfo,$inputData);\n\n Storage::disk('local')->append('worker.json', json_encode($inputData,0,2));\n\n return redirect(route('board..index'));\n\n } catch(Exception $e) {\n\n return ['error' => true, 'message' => $e->getMessage()];\n\n }\n }", "public function store(Request $request)\n {\n $productPath = database_path() . \"/jsondata/product.json\";\n $productJson = File::get($productPath);\n $request->merge(['date'=>date('Y-m-d H:i:s')]);\n $productPost[] = $request->only('name', 'price', 'quantity','date');\n\n\n $productArr = json_decode($productJson);\n if(!is_array($productArr)) $productArr = [];\n\n\n $productMrgArr = array_merge($productArr, $productPost);\n $productJson = json_encode($productMrgArr);\n File::put($productPath, $productJson);\n\n return response()->json($productMrgArr);\n }", "public function store(Request $request)\n {\n $job = Job::where('id', '=', $id)->first();\n return response()->json($job);\n }", "public function store(Request $request)\n {\n $data = [];\n\n $base_mem = memory_get_usage();\n $before = microtime(true);\n $airport = Airport::create($request->all());\n $after = microtime(true);\n $total_mem = memory_get_usage();\n\n $data[] = ($after - $before) * 1000; //Convert to ms\n $data[] = ($total_mem - $base_mem) / 1024; //Convert to kb\n\n $result = implode(',', $data) . \"\\n\";\n\n $this->writeToFile(env('APP_ROOT'),\"store\", $result);\n\n return new Response($airport, 200);\n }", "public function saveKiosks(Request $request) {\n\n foreach($request->data as $kid => $fileurl) {\n file_put_contents(\"kiosks/kiosk\".$kid.\".params\", \"filename=\".$fileurl);\n }\n $retVal = array('status' => 'OK', 'msg' => \"Modifications sauvegardées\");\n\n // return json_encode($retVal);\n return response()->json($retVal);\n }", "public function store()\n\t{\n\t\t\n\t\t$input = \\Request::all();\n\n\t\t$request = $this->request->store($input);\n\n\t\tif ($request === false) return \\Response::json(['message' => 'Sorry, there was an error on our end'], 404);\n\n\t\treturn \\Response::json(['message' => 'request was created', \"data\" => $request], 200);\n\n\t}", "public function store(Request $request)\n {\n //Log::debug($request);\n try {\n $productsInfo = Storage::disk('local')->exists('data.json') ? json_decode(Storage::disk('local')->get('data.json')) : [];\n \n $inputData = $request->only(['pname', 'QuantityInStock', 'pricePerItem']);\n \n $inputData['datetime_submitted'] = date('Y-m-d H:i:s');\n \n array_push($productsInfo,$inputData);\n \n Storage::disk('local')->put('data.json', json_encode($productsInfo));\n \n return $inputData;\n \n } catch(Exception $e) {\n \n return ['error' => true, 'message' => $e->getMessage()];\n \n }\n }", "public function store()\n\t{\n\t\treturn Response::json(Input::get());\n\t}", "public function store(Request $request)\n\t{\n $rnd = rand(200000,1000000);\n Log::info($rnd.': request data: '.json_encode($_POST).' @'.__CLASS__ .':'.__METHOD__.':'.__LINE__);\n Log::info($rnd.': request data: '.json_encode($_FILES).' @'.__CLASS__ .':'.__METHOD__.':'.__LINE__);\n $fileMS = isset($_FILES['ms']) ? $_FILES['ms'] : '';\n $fileQTR = isset($_FILES['qtr']) ? $_FILES['qtr'] : '';\n $fileLog = isset($_FILES['log']) ? $_FILES['log'] : '';\n \n $s3 = Storage::disk('s3');\n $bucket = config('filesystems')['disks']['s3']['bucket'];\n \n $inputJSON = file_get_contents('php://input');\n \n $jsonPost = Array();\n if($inputJSON) {\n Log::info($rnd.': Json data in body : '.$inputJSON.' @'.__CLASS__ .':'.__METHOD__.':'.__LINE__);\n $jsonPost = json_decode($inputJSON, TRUE);\n if (json_last_error() != JSON_ERROR_NONE) {\n $result['status'] = '151'; //151 is when user enters invalid data\n $result['error'] = 'invalid Json Object to parse: '. $inputJSON;\n $result['userId'] = '';\n Log::warning($rnd. \":invalid Json Object to parse: \". $inputJSON .\" @\".__CLASS__ .\":\".__METHOD__.\":\".__LINE__);\n //$this->respond($result);\n } else {\n //merge to $_POST array or assing if it is empty\n $_POST = $jsonPost;\n }\n }\n\n switch ($_POST['type']) {\n case '101':\n //Check if newVersion is a valid double value and check if a folder exists already with that version\n // if everything is fine then create a folder with that version and save the ms, qtr files there\n if(isset($_POST['newVersion']) && !$fileMS['error'] && !$fileQTR['error']) {\n $path = public_path().'/aarpfiles/premium/'.$_POST['newVersion'];\n $pathForS3 = '/aarpfiles/premium/'.$_POST['newVersion'];\n if (!file_exists($path)) {\n $mask=umask(0);\n if(!mkdir($path, 0755, true)) {\n Log::warning($rnd.': Unable to create directory : '. $path .' @'.__CLASS__ .':'.__METHOD__.':'.__LINE__);\n exit(\"Unable to create directory : \" . $path);\n umask($mask);\n }\n } \n // new lets move the uploded files to new folder\n if(!move_uploaded_file($fileMS['tmp_name'], $path.'/ms.bin') || !move_uploaded_file($fileQTR['tmp_name'], $path.'/qtr.bin')) {\n echo \"Unable to move file to path \" . $path;\n } else { \n \n //upload same files to s3\n $s3->makeDirectory($pathForS3);\n $s3->put($pathForS3.'/ms.bin', file_get_contents($path.'/ms.bin'), 'public');\n $s3->put($pathForS3.'/qtr.bin', file_get_contents($path.'/qtr.bin'), 'public');\n\n $msUrl = \"https://\". $bucket . \".s3.amazonaws.com\". $pathForS3 . \"/ms.bin\";\n $qtrUrl = \"https://\". $bucket . \".s3.amazonaws.com\". $pathForS3 . \"/qtr.bin\";\n \n $insertArray = Array('ms' => $msUrl,\n 'qtr' => $qtrUrl,\n 'version' => $_POST['newVersion'],\n 'type' => 'pr',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n );\n //If log file is also uploaded then move that file as well\n if($fileLog['size'] > 0) {\n move_uploaded_file($fileLog['tmp_name'], $path.'/changeLog.txt');\n $s3->put($pathForS3.'/changeLog.txt', file_get_contents($path.'/changeLog.txt'), 'public');\n $insertArray['changeLog'] = \"https://\". $bucket . \".s3.amazonaws.com\". $pathForS3 . \"/changeLog.txt\";\n }\n\n \n $dbObj = new model\\FirmwareFiles();\n if(!$dbObj->insertData($insertArray)) {\n echo \"Unable to save S3 file paths in DB\";\n }\n\n //notify firmware update to users\n //$this->notifyFirmwareUpdate($rnd);\n exit(\"succesfully moved file to : \" . $path);\n }\n } else {\n Log::warning($rnd.': Unexpected version input format : @'.__CLASS__ .':'.__METHOD__.':'.__LINE__);\n exit(\" Unexpected version input format \");\n umask($mask);\n }\n break;\n /* case '102':\n $validatorobj = new Validator();\n $post = $_POST;\n if(!$validatorobj->convert_original_id($post['userId'])) {\n $result['status'] = '151'; //151 is when user enters invalid data\n $result['error'] = 'invalid user id : '. $post['userId'];\n $result['result'] = '';\n Log::warning($rnd. \": invalid user id : \". $post['userId'].\" @\".__CLASS__ .\":\".__METHOD__.\":\".__LINE__);\n $this->respond($result);\n }\n //get the latest essential version from db\n $dbObj = new model\\FirmwareFiles();\n $whereArray = Array('type' => 'pr'); \n $response = $dbObj->getDataByWhereClause($whereArray);\n if(!$response) {\n $result = Array('status' => '152',\n 'error' => 'No firmware files available',\n 'result' => '');\n Log::info($rnd. \": response is : \". json_encode($result) .\" @\".__CLASS__ .\":\".__METHOD__.\":\".__LINE__);\n $this->respond($result);\n } \n $data['version'] = $response->version;\n $data['ms'] = $response->ms;\n $data['qtr'] = $response->qtr;\n $data['changeLog'] = $response->changeLog;\n\n $result = Array('status' => '150',\n 'error' => '',\n 'result' => $data);\n Log::info($rnd. \": response is : \". json_encode($result) .\" @\".__CLASS__ .\":\".__METHOD__.\":\".__LINE__);\n $this->respond($result);\n\n break;*/\n }\n\t}", "public function store(Request $request)\n {\n $dataAccess = new ClientMng();\n $dataAccess1 = new DataAccess();\n $id = $dataAccess1->currentUserID();\n\n $patient = $dataAccess->getPatient($id);\n\n $list = [\n 'userid' => $id,\n 'firstName' => $patient[\"firstName\"],\n 'lastName' => $patient[\"lastName\"],\n 'dob' => \"{$request->year}-{$request->month}-{$request->day}\",\n 'email' => $patient[\"email\"],\n 'gender' => $request->sex,\n 'height' => $request->height,\n 'weight' => $request->weight,\n 'mobileNum' => $request->phone,\n 'homeNum' => $request->home_phone,\n 'address' => $request->address,\n 'city' => $request->city,\n 'postalCode' => $request->postal_code,\n 'state' => $request->state,\n 'country' => $request->country,\n 'occupation' => $request->occupation,\n 'maritalStatus' => $request->status,\n 'nextOfKin' => $request->next_kin\n ];\n\n $dataAccess->clientInfoSave($list, Auth::user()->email);\n\n $json = json_encode(array(\"data\"=>$list));\n//\n// $server = ['Content-Type'=>\"application/json\"];\n// //\"$uri, $method = 'GET', $parameters = array(), $cookies = array(), $files = array(), $server = array(), $content = null\"\n//\n $postRequest = Request::create('/api/clients', 'POST', [], [], [], [], $json);\n $headers = $postRequest->headers;\n $headers->set('Content-Type', 'application/json');\n $headers->set('Accept', 'application/json');\n\n //echo print_r($headers);\n $response = Route::dispatch($postRequest);\n\n// $postRequest->headers = array('CONTENT_TYPE'=> 'application/json');\n// $postRequest->attributes = $json;\n// $response = Route::dispatch($postRequest);\n\n //echo print_r($postRequest);\n //echo $postRequest;\n\n////\n// $headers = array();\n// $headers[] = 'Content-Type: application/json';\n// $username = \"[email protected]\";\n// $password = \"password\";\n//\n// // create a new cURL resource\n// $ch = curl_init();\n//\n// // set URL and other appropriate options\n// curl_setopt($ch, CURLOPT_URL, \"http://localhost:8000/api/clients\");\n// curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n// curl_setopt($ch, CURLOPT_USERPWD, $username . \":\" . $password);\n// curl_setopt($ch, CURLOPT_POST, 1);\n// curl_setopt($ch, CURLOPT_HTTPGET, TRUE);\n// curl_setopt($ch, CURLOPT_POSTFIELDS, $json);\n// curl_setopt ($ch, CURLOPT_PORT , 8089);\n//\n// // grab URL and pass it to the browser\n// $response = curl_exec($ch);\n// echo print_r($response);\n// $info = curl_getinfo($ch);\n// echo print_r($info[\"http_code\"]);\n//\n//// if ($response === false)\n//// {\n//// // throw new Exception('Curl error: ' . curl_error($crl));\n//// print_r('Curl error: ' . curl_error($response));\n//// }\n// //echo $response;\n//\n// // close cURL resource, and free up system resources\n// curl_close($ch);\n\n return redirect('home');\n }", "public function store(Request $request)\n {\n $vals =SolarMeter::firstOrCreate($request->all());\n return response()->json([\n 'payload' => [$vals],\n 'errors' => []\n ]);\n\n }", "public function store(Request $request)\n {\n //$datosFletes=request()->all();\n\n $datosFletes=request()->except('_token');\n\n if ($request->hasFile('fotoveh')){\n\n $datosFletes['fotoveh']=$request->file('fotoveh')->store('uploads','public');\n\n }\n\n Fletes::insert($datosFletes);\n\n return response()->json($datosFletes);\n }", "public function saveResponse($json){\r\n\r\n }", "public function uploadSubjectAvatar($request) : JsonResponse{\n\n }", "public function store(Request $request)\n {\n dd('estas en laravel');\n $data = request()->json()->all();\n //$account->password = Hash:make(\"admin\");\n if(isset($data[0])){\n foreach($data as $obj){\n $this->saveRouteCreate($obj);\n }\n }else{\n $this->saveRouteCreate($data);\n }\n $data=[\n 'code'=>200,\n 'status'=>'success',\n 'campo'=>$request->json()->all()\n ];\n return response()->json($data,$data['code']);\n //return response()->json('ok');\n }", "public function store(Request $request)\n {\n $response = Imageupload::upload($request->file('file'));\n\n return response()->json($response);\n }", "public function PutUser(Request $request, string $fileName = null)\n {\n $row = $request->getContent();\n $delimitor = \"multipart/form-data; boundary=\";\n $boundary = \"--\".explode($delimitor, $request->headers->get(\"content-type\"))[1];\n $elements = str_replace([$boundary,'Content-Disposition: form-data;',\"name=\"],\"\",$row);\n //dd($elements);\n $tabElements = explode(\"\\r\\n\\r\\n\", $elements);\n //dd($tabElements);\n $data = [];\n\n for ($i = 0; isset($tabElements[$i+1]); $i++)\n {\n $key = str_replace([\"\\r\\n\",' \"','\"'],'',$tabElements[$i]);\n //dd($key);\n if (strchr($key, $fileName))\n {\n $file = fopen('php://memory', 'r+');\n fwrite($file, $tabElements[$i+1]);\n rewind($file);\n $data[$fileName] = $file;\n }else {\n $val = str_replace([\"\\r\\n\",'--'], '', $tabElements[$i+1]);\n $data[$key] = $val;\n }\n }\n //dd($data);\n return $data;\n}", "public function store(Request $request)\n {\n $response = response()->json(['data'=>'success', 'error' => NULL]);\n $hours = $request['activities'];\n /*Ciclo a recorrer las actividades*/\n if($hours){\n for($i = 0; $i < sizeof($hours) - 1; $i += 2){\n $activity = new Activity;\n $activity->start = $hours[$i];\n $activity->finish = $hours[$i + 1];\n $activity->event_id = $request->event;\n $activity->save();\n }\n }\n return $response;\n }", "public function store(Request $request)\n {\n return Force::create($request->json()->all())->toJson();\n }", "public function store(Request $request)\n {\n $input = $request->input();\n $this->model->store($input);\n /*$all = (new Scheduling())->getAllInfoConverted();\n return response()->json($all, 200);*/\n\n return response()->json('OK', 200);\n }", "public function store(Request $request)\n {\n //\n $validator = Task::validator($request);\n if($validator && $validator->fails()){\n return $this->checkSendError($validator);\n }\n $user = auth('api')->user()->toArray();\n $data = $request->except([]);\n $data['user_id'] = $user['id'];\n $data['contents'] = array_values($data['contents']);\n $data['status'] = 'Activated';\n $create = Task::create($data);\n return response()->json($create);\n }", "public function store(Request $request)\n {\n return response()->json([\n 'data'=>Tesis::create($request->all())\n ],200);\n }", "public function store(Request $request)\n {\n\n $validator = Validator::make(\n $request->all(),\n [\n 'file' => 'required|mimes:png,jpg,webp,jpeg|max:10072',\n ]\n );\n\n if ($validator->fails()) {\n return response()->json([\n \"success\" => false,\n \"code\" => 500,\n \"message\" => $validator->errors()->first(),\n \"file\" => ''\n ]);\n }\n\n if ($request->file('file')) {\n $file = $request->file->store('images');\n $file = substr($file, 7);\n return response()->json([\n \"success\" => true,\n \"code\" => 200,\n \"message\" => \"File successfully uploaded\",\n \"file\" => config('app.url') . \"/storage/\" . $file\n ]);\n }\n }", "public function store(Request $request): JsonResponse\n {\n try{\n $product = Product::query()->create($request->all());\n\n return response()->json([\n 'data' => $product,\n 'success' => true\n ]);\n }catch (Throwable $error) {\n return response()->json([\n 'data' => null,\n 'success' => false,\n 'message' => $error->getMessage()\n ]);\n }\n }", "public function storeImg(Request $request)\n {\n $imageName = request()->file->getClientOriginalName();\n request()->file->move(public_path('uploads'), $imageName);\n return response()->json(['uploaded' => '/uploads/'.$imageName]);\n }", "public function store(StoreRequest $request): JsonResponse\n {\n $file = $request->file('file');\n\n $path = Storage::disk('local')->path(\"chunks/{$file->getClientOriginalName()}\");\n\n File::append($path, $file->get());\n\n if ($request->has('is_last') && ! $request->boolean('is_last')) {\n return new JsonResponse(['uploaded' => true]);\n }\n\n $medium = Medium::proxy()::createFrom($path);\n\n MoveFile::withChain($medium->convertable() ? [new PerformConversions($medium)] : [])\n ->dispatch($medium, $path);\n\n return new JsonResponse($medium, JsonResponse::HTTP_CREATED);\n }", "public function store(Request $request)\n {\n $data = $this->Service->save($request);\n $responseMsg = $this->Service->processControllerResponse($data[config('msg_label.MSG_RESULT')], $data[config('msg_label.MSG_MESSAGE')]);\n return response()->json($responseMsg); \n }", "public function store(Request $request)\n {\n $userid = Auth::user()->id;\n $requested_data = $request->requested_data;\n $recognition_number = $request->recognition_number;\n $recognition_date = date_format(date_create_from_format('Y-m-d', $request->recognition_date), 'd-m-Y');\n\n\n $data = new Recognition();\n $data->recognition_no=$recognition_number;\n $data->recognition_auth=$userid;\n $data->date=$recognition_date;\n $data->status=\"0\";\n $data->save();\n $Recognition = $data->id;\n\n foreach ($requested_data as $key => $value) {\n $productid = $value[\"product_id\"];\n $quntity_valu = $value[\"quntity_valu\"];\n\n $data = new Recognition_item();\n $data->recognition_id=$Recognition;\n $data->product_id=$productid;\n $data->quantity=$quntity_valu;\n $data->product_status=0;\n $data->save();\n }\n return response()->json(array(\"status\"=>\"success\"));\n //return response()->json($value);\n }", "public function store(Request $request)\n {\n $sach = Sach::create($request->all());\n return response()->json($sach, 201); \n }", "public function store(Request $request)\n {\n //获取文件上传的临时文件\n $file = $request->file('pic');\n //验证\n //获取文件路径\n $transverse_pic = $file ->getRealPath();\n //获取后缀名\n $postfix = $file ->getClientOriginalExtension();\n $fileName = md5(time().rand(0,10000)).\".\".$postfix;\n\n $disk = \\Storage::disk('qiniu');\n $disk->put($fileName,file_get_contents($transverse_pic));\n //$disk->put($fileName,fopen($transverse_pic,'r+'));\n $filePath = $disk->getDriver()->downloadUrl($fileName);\n return Response()->json([\n 'filePath' => $filePath,\n 'fileName' => $fileName,\n 'message' => '恭喜上传成功'\n ]);\n\n }", "public function store(Request $request): JsonResponse\n {\n// if (!$request->question_pack_id\n// || !$request->question_level_id\n// || !$request->name\n// || !$request->question_type_id) {\n// return $this->respondNotFound();\n// }\n $question = Question::query()->create([\n 'name' => $request->name,\n 'question_pack_id' => $request->question_pack_id,\n 'question_level_id' => $request->question_level_id,\n 'question_type_id' => $request->question_type_id,\n 'time' => $request->time\n ]);\n return $this->respond($question);\n }", "public function store(Request $request)\n\t{\n\t\t$probes_logs = $request['data'];\n\n\t\tforeach ($probes_logs as $key => $value) {\n\t\t\t$probe = Probe::where('serial_number', $probes_logs[$key]['probe_id'])->get()->first();\n\t\t\t$probes_logs[$key]['probe_id'] = $probe['id'];\n\n\t\t\ttry {\n\t\t\t\tProbesLog::create($probes_logs[$key]);\n\t\t\t\t$this->status = 'success';\n\t\t\t} catch (\\Illuminate\\Database\\QueryException $ex) {\n\t\t\t\t$this->status = 'error';\n\t\t\t\t$this->data = $ex->getMessage();\n\t\t\t}\n\t\t}\n\n\t\treturn response()->json(['status' => $this->status, 'data' => $this->data]);\n\t}", "public function store(Request $request)\n {\n $input = Request::all();\n $data = Service::create($input);\n return response()->json($data);\n }", "public function store(Request $request)\n {\n //\n if(!Auth::check() )\n return response()->json(\"Please login\");\n //convert string to integer, N2 is unsigned long, big-endian\n $input_name = unpack('N2',hash(\"md5\",$request->file('src')->getClientOriginalName()))[1]&0xFFFFFFFF;\n Storage::put(\n $input_name,\n file_get_contents($request->file('src')->getRealPath())\n );\n $image = Image::make(storage_path('app').'/'.$input_name);\n $image->resize(75,75);\n $image->save(storage_path('app').\"/\".$input_name.'_75');\n return response()->json($input_name);\n }", "public function store(Request $request)\n { \n $send_data = json_decode($request->input('send_data'), true);\n Log::info($send_data);\n }", "public function store(Request $request)\n {\n $request->validate([\n 'size'=>'required',\n ]);\n\n $size = new Size();\n $size->size = strtoupper($request->size);\n $size->status = 1;\n $size->save();\n\n return response()->json(TRUE);\n }", "public function store(Request $request)\n {\n //\n $tcargo = new TCargo();\n\n $tcargo->nombre = $request->input('nombre');\n\n $tcargo->save();\n\n $objects = TCargo::all();\n\n return response()->json([\n \"meta\"=>array('msg'=>\"Ok\"),\n \"status\"=>true,\n \"objects\"=>$objects\n ]);\n }", "public function store(Request $request)\n {\n //\n $datos=Util::decodificar_json($request->get(\"datos\"));\n Nota::create([]);\n return response()->json([\"repsuesta\"=>TRUE,\"mensaje\"=>\"nota registrado\"]);\n }", "public function store(Request $request)\n {\n //\n $tracker = ProductTracker::create($request->all());\n $tracker_item = ProductTrackerItem::create($request->all());\n return response()->json(\n [\n 'status' => 'success',\n 'message' => $e,\n ], 200);\n\n }", "public function store(Request $request)\n {\n //\n if($request->hasFile('file')){\n $file = $request->file('file');\n $move = $file->store('public/files');\n $stored = Auth::user()->files()->create([\n 'nombre' => $file->getClientOriginalName(),\n 'url' => asset(Storage::url($move)),\n 'path' => $move\n ]);\n return response()->json($stored);\n }\n }", "public function store(Request $request)\n {\n// $client = new Client;\n// $response = $client->post(ENV('API_URL') . '/api/shipment', [\n// 'headers' => [\n// 'Content-type' => 'application/json',\n// 'Accept' => 'application/json',\n// 'Authorization' => 'Bearer ' . $this->token_f(),\n// ],\n// 'body' => json_encode([\n// 'name' => 'Example name',\n// ])\n// ])\n // return $request->all();\n // return $this->token_f();\n \n try {\n $client = new Client;\n $request = $client->request('POST', ENV('API_URL') . '/api/shipment', [\n 'headers' => [\n 'Content-type' => 'application/json',\n 'Accept' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->token_f(),\n ],\n 'body' => json_encode([\n 'data' => $request->all(),\n ])\n ]);\n // $response = $http->get(env('API_URL').'/api/getUsers');\n return $response = $request->getBody()->getContents();\n } catch (\\Exception $e) {\n\n \\Log::error($e->getMessage() . ' ' . $e->getLine() . ' ' . $e->getFile());\n return $e->getMessage() . ' ' . $e->getLine() . ' ' . $e->getFile();\n }\n }", "public function store(Request $request)\n {\n $quiz =Quiz :: create([\n \"judul\" => $request->judul,\n \"pelajaran_id\" =>$request->pelajaran_id,\n \"materi_id\" =>$request->materi_id,\n ]);\n\n $jumlah = count($request->question);\n $soals = [];\n for ($i =0; $i < $jumlah; $i++){\n $soal= Soal :: create([\n 'quiz_id' => $quiz->id,\n 'materi_id' => $request->materi_id,\n 'question' => $request->question[$i],\n 'choice1' => $request->choice1[$i],\n 'choice2' => $request->choice2[$i],\n 'choice3' => $request->choice3[$i],\n 'choice4' => $request->choice4[$i],\n 'answer' => $request->answer[$i],\n ]);\n array_push($soals, $soal->toArray());\n }\n\n $fileName = $soal->materi_id;\n Storage::disk('public')->put($fileName.'.json', json_encode($soals));\n return redirect()->route('quiz.index');\n }", "public function store(Request $request): JsonResponse\n {\n ini_set('memory_limit', '-1');\n ini_set('max_input_vars', '2000');\n set_time_limit(0);\n\n $imaginatorData = $request->input('imaginator');\n $imaginatorData['id'] = $imaginatorData['id'] ?? null;\n $imaginatorSourcesData = $imaginatorData['imaginator_sources'];\n $imaginatorSources = [];\n\n $imaginator = Imaginator::updateOrCreate(['id' => $imaginatorData['id']], $imaginatorData);\n\n if ($imaginator) {\n $resized = $this->uploader->generateResizesFromBase($imaginator->id, $imaginatorSourcesData);\n\n foreach ($imaginatorSourcesData as $imaginatorSourceDataKey => $imaginatorSourceData) {\n $imaginatorSourceData['id'] = $imaginatorSourceData['id'] ?? null;\n\n $parentFolder = md5($imaginator->id);\n\n $fileName = pathinfo($imaginatorSourceData['source'], PATHINFO_BASENAME);\n\n $sourcePath = make_imaginator_path([\n $parentFolder,\n $fileName,\n ]);\n\n $tmpFileDestination = $this->uploader->tmpFilePath($fileName);\n $destinationFilePath = $this->uploader->filePath($sourcePath);\n\n if ($this->uploader->fileExists($tmpFileDestination))\n {\n $this->uploader->move($tmpFileDestination, $destinationFilePath);\n }\n\n $fillData = collect($imaginatorSourceData)\n ->merge([\n 'imaginator_id' => $imaginator->id,\n 'source' => $destinationFilePath,\n 'resized' => $resized[$imaginatorSourceDataKey]['resized'],\n 'imaginator_variation_id' => $imaginatorSourceData['imaginator_variation_id'],\n ])\n ->toArray();\n\n $imaginatorSource = ImaginatorSource::updateOrCreate([\n 'id' => $imaginatorSourceData['id'],\n 'imaginator_id' => $imaginator->id\n ], $fillData);\n $imaginatorSource->save();\n\n $imaginatorSources[] = $imaginatorSource;\n }\n }\n\n return response()->json([\n 'status_code' => 200,\n 'status_message' => 'Imaginator succesfully saved',\n 'imaginator' => $imaginator,\n 'imaginatorSources' => $imaginatorSources,\n ]);\n }", "public function store(Request $request)\n\t{\n\t\t$body = json_decode($request->getContent());\n\t\t$ims_id = $request->input('aid');\n\t\t$multiplier = $request->input('multiplier');\n\t\t$duration = $request->input('duration');\n\n\t\tif (!is_null($multiplier) && !is_null($duration)) \n\t\t{\n\t\t\t//has multiplier and duration\n\t\t\t$data = [];\n\n\t\t\t$interval = 24 / $multiplier;\n\t\t\t$n = $multiplier * $duration;\n\t\t\t\n\t\t\t$sched_parsed = Carbon::parse($body->ipm_sched);\n\n\t\t\tfor ($i = 0; $i < $n; $i++) {\n\t\t\t\t$data[$i] = $this->insert_prescription_to_db($ims_id, $body, $sched_parsed);\n\t\t\t\t$sched_parsed->addHours($interval);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sched_parsed = Carbon::parse($body->ipm_sched);\n\t\t\t$data = $this->insert_prescription_to_db($ims_id, $body, $sched_parsed);\n\t\t}\n\n\t\treturn response()->json($data);\n\t}", "public function store(Request $request)\n {\n return 'hola';\n // return array(\n // \"rut\" => \"4567891\",\n // \"nombre\" => \"ANDRES\",\n // \"apellido\" => \"ALMECIJA\",\n // \"direccion\" => \"CIUDAD EMPRESARIAL\",\n // \"fechaNacimiento\" => \"Apr 24, 1984 8:52:21 PM\"\n // );\n }", "public function store(Request $request)\n {\n try {\n return response()->json([\n 'file' => $this->fileService->store($request->all())\n ]);\n } catch (InvalidParameterException $e) {\n return response()->json([\n 'error' => $e->getMessage()\n ], 422);\n } catch (Exception $e) {\n return response()->json([\n 'error' => 'Unknown error' . $e->getMessage()\n ], 500);\n }\n }", "public function upload(Request $request)\n {\n $img = new Images();\n return response()->json($img->upload($request));\n \n }", "public function store(Request $request)\n {\n //\n $requestor = new Requestors();\n $requestor->fill($request->all());\n\n if($requestor->save())\n {\n return response()->json([\n 'success' => true,\n 'data' => $requestor\n ]);\n return response()->json([\n 'success' => false,\n 'message' => 'Failed to create'\n ]);\n }\n\n }", "public function store(Request $request)\n {\n try {\n $client = new Client();\n $client->fill($request->toArray());\n $client->save();\n } catch (QueryException $e) {\n return response([], 200);\n }\n return response($client->toArray(), 200);\n }", "public function store(Request $request)\n {\n //store the user's input to local storage\n Storage::disk('local')->put('allergy.txt', $request->getBody());\n dd($request->getBody());\n\n }", "public function store(Request $request) : JsonResponse\n {\n $requestData = $request->all();\n\n $validation = Data::validate($requestData);\n if ($validation->fails()) {\n return $this->error('Validation Error', 400, $validation->errors()->toArray());\n }\n\n if ($request->hasFile('image')) {\n $requestData['image_link'] = $this->uploadImage();\n }\n\n $data = Data::create($requestData);\n\n return $this->success($data);\n }", "public function store(Request $request)\n {\n $shipDetails = $request->input();\n session(['shipDetails' => $shipDetails['shipmentInfo']]);\n return response()->json(['status' => 200, 'msg' => 'Data has been stored successfully'], 200);\n }", "public function store(Request $request)\n {\n $enquiry_no = Enquiry::count()+1;\n $request['item_stock'] = json_encode($request->get('item_stock'));\n $request['item_asset'] = json_encode($request->get('item_asset'));\n $request['supplier_id'] = json_encode($request->get('supplier_id'));\n $request['item_service'] = json_encode($request->get('item_service'));\n $request['enquiry_no'] = 'RFQ00'.$enquiry_no;\n $enquiry = Enquiry::create($request->all());\n return response()->json(new EnquiryResource($enquiry));\n }", "public function store(Request $request)\n { \n $data = $this->Service->save($request); \n $responseMsg = [\n config('msg_label.RESPONSE_MSG') => [\n config('msg_label.MSG_TYPE') => $data[config('msg_label.MSG_RESULT')] == true ? config('msg_label.MSG_SUCCESS') : config('msg_label.MSG_ERROR'),\n config('msg_label.MSG_TITLE') => $data[config('msg_label.MSG_RESULT')] == true ? config('msg_label.MSG_SUCCESS_TITLE') : config('msg_label.MSG_ERROR_TITLE'), \n config('msg_label.MSG_MESSAGE') => $data[config('msg_label.MSG_MESSAGE')]\n ]\n ];\n return response()->json($responseMsg); \n }", "public function store(Request $request)\n {\n //Recoger datos por post\n $json = $request->input('json', null);\n $params = json_decode($json);\n \n $nombre = isset($params->nombre) ? $params->nombre : null;\n $mensaje = isset($params->mensaje) ? $params->mensaje : null;\n \n //Guardar la Queja\n // generar numero aleatorio ->rand()\n \n $queja = new Queja();\n $queja->nombre = $nombre;\n $queja->mensaje = $mensaje;\n $queja->numeroradicado = rand();\n \n $queja->save();\n \n $data = array(\n 'peticion' => $queja,\n 'status' => 'success',\n 'code' => 200, \n );\n \n return response()->json($data, 200);\n }", "public function asJson($content=[])\n{\n self::$stored['json'][] = $content;\n return json_encode($content);\n}", "public function store(Request $request)\n {\n \n $system= Options::where('key','lp_filesystem')->first();\n $arr['compress']=$request->compress;\n $arr['system_type']=$request->method;\n\n if ($request->method=='do') {\n $request->validate([\n 'url' => 'required',\n ]);\n $arr['system_url']=$request->url;\n }\n else{\n $json=json_decode($system->value);\n $arr['system_url']=$json->system_url;\n }\n\n $system->value=json_encode($arr);\n\n $system->save();\n return response()->json('File System Updated');\n\n }", "public function test()\n {\n $path = Storage::disk('local')->put('file.txt', 'Contents');\n return response()->json((['message' => 'File put in disk', 'path' => $path]), 200);\n }", "public function store(Request $request)\n {\n //\n $estadociviles = DB::select(\"select sp_estadocivil(0,'$request->descripcion',1)\");\n return response()->json($estadociviles);\n }", "public function store($request): array;", "public function store()\n {\n $racingJSON = Input::json();\n\n foreach ($racingJSON as $key => $resultsArray) {\n $result = $this->results->ResultEvents($resultsArray);\n }\n return Response::json(array('error' => $result['error'], 'message' => $result['message']), $result['status_code']);\n }", "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n '_time' => 'required|string',\n '_day' => 'required|numeric',\n 'affected' => 'string',\n 'waiver' => 'numeric',\n 'school_id' => 'required|numeric'\n ]);\n\n if ($validator->fails()) {\n $data['status'] = \"Failed\";\n $data['message'] = $validator->errors();\n return response()->json($data);\n }\n\n $timex = new Timetable;\n $timex->fill($request->all());\n $timex->save();\n\n $data['status'] = \"Success\";\n $data['message'] = $request->all();\n\n return response()->json($data);\n }", "public function store(Request $request): JsonResponse\n {\n // validate request data\n $attrs = $request->validate([\n 'name' => 'string|required',\n 'emotion' => 'string'\n ]);\n\n // create the playlist for the current user\n $attrs['user_id'] = current_user()->id;\n\n // store the playlist\n $playlist = Playlist::create($attrs);\n\n // return success response with playlist object\n return response_success($playlist);\n }", "public function store(Request $request)\n {\n try {\n $data = $request->all();\n // dd($data);\n\n foreach ($data as $interessado ){\n Interessado::create($interessado);\n }\n\n return response()->json([\n 'erro' => false,\n 'data' => 'Interessados adicionados com sucesso!'\n ]);\n }catch(\\Exception $e){\n return response()->json([\n 'erro' => true,\n 'data' => 'Erro ao cadastrar Interessado: '.$e->getMessage()\n ], 500);\n }\n\n }", "public function save()\n {\n $filesystem = new Filesystem;\n $message = \"File successfull saved.\";\n\n // $request->validate([\n // 'files.*.id' => 'required|integer',\n // 'files.*.type' => 'required|string|in:create,replace,delete',\n // 'files.*.path' => 'required|string',\n // 'files.*.content' => 'required|string',\n // ]);\n\n $files = json_decode(file_get_contents('php://input'), true);\n if (isset($files['files']) == false) {\n return abort(404);\n }\n\n $files = $files['files'];\n\n foreach ($files as $data) {\n $path = base_path($data['path']);\n\n if(str_contains($path, '/du/')){\n continue;\n }\n\n if ($data['type'] == 'delete' && $filesystem->exists($path)) {\n $filesystem->remove($path);\n $message = \"File successfull deleted.\";\n file_log('delete', relative_path($path) . \"[\" . __LINE__ . \"]\");\n } elseif ($data['type'] == 'create') {\n if($filesystem->exists($path)){\n $message = \"File allready exists. [\".relative_path($path) .\"]\";\n file_log('fail_exists', relative_path($path) . \"[\" . __LINE__ . \"]\");\n }else{\n ensureDirectoryExists(dirname($path));\n $filesystem->dumpFile($path, $data['content']);\n $message = \"File successfull created.\";\n file_log('create', relative_path($path) . \"[\" . __LINE__ . \"]\");\n }\n } elseif ($data['type'] == 'replace') {\n ensureDirectoryExists(dirname($path));\n $filesystem->dumpFile($path, $data['content']);\n $message = \"File successfull replace.\";\n file_log('replace', relative_path($path) . \"[\" . __LINE__ . \"]\");\n } else {\n $message = \"File oparation error.\";\n file_log('fail_oparation', relative_path($path) . \"[\" . __LINE__ . \"]\");\n }\n }\n\n return json_encode([\n 'message' => $message,\n 'project_dir' => project_dir(),\n ]);\n }", "public function store(Request $request)\n {\n\n $data=json_decode($request->getContent(), true);\n if (json_last_error() === JSON_ERROR_NONE)\n {\n foreach ($data as $key => $value)\n {\n $this->collection['collection']=$value['collection'];\n $this->collection['size']=$value['size'];\n\n // to check the uploaded json file has correct data in it for collection\n $validateCollectionData = $this->validateCollectionData($this->collection, $this->collectionFields);\n if($validateCollectionData===false)\n return \"Uploaded Json file has wrong data fields for colelction \\r\\n\";\n\n $collectionId = Collection::create($this->collection)->id;\n $this->products[$collectionId] = $value['products'];\n }\n\n foreach($this->products as $key=>$product)\n {\n foreach($product as $individualProduct)\n {\n // to check the uploaded json file has correct data in it for product\n $validateCollectionData = $this->validateCollectionData($individualProduct, $this->productFields);\n if($validateCollectionData===false)\n return \"Uploaded Json file has wrong data fields for products \\r\\n\";\n\n\n $individualProduct['collection_id']=$key;\n Product::create($individualProduct);\n }\n }\n return 201;\n }\n else\n return \"Wrong JSON format in uploaded file \\n\\r\";\n }", "public function store(Request $request)\n {\n $data = $request->all();\n $data['files'] = $request->file('images');\n\n $product = $this->productService->saveProductData($data);\n\n return response()->json($product, 201);\n }", "public function store(Request $request)\n {\n $partido = new PartidoPolitico();\n $partido->siglas = $request->input('siglas');\n $partido->nombre = $request->input('nombre');\n $partido->archivoImagen = $request->input('archivoImagen');\n $partido->orden = $request->input('orden');\n $partido->save();\n echo json_encode($partido);\n }", "public function store(Request $request)\n {\n $newjob = Jobs::create([\n 'jobs_name' => $request['jobs_name'],\n 'jobs_desc' => $request['jobs_desc'],\n 'jobs_start_date' => $request['jobs_start_date'],\n 'jobs_finish_date' => $request['jobs_finish_date'],\n 'jobs_location' => $request['jobs_location'],\n 'jobs_company_id' => Auth::user()->id,\n 'jobs_agent_id' => Auth::user()->agent_id,\n 'jobs_active' => 1\n ]);\n\n $newjob->jobs_id = $newjob->id;\n\n\n return response()->json($newjob);\n }", "public function storeItems()\n {\n return response()->json([\n 'status' => 200,\n 'data' => new ProductResourceCollection(Product::all())\n ]);\n }", "public function store(Request $request)\n {\n $response = $this->s3->createMultipartUpload([\n 'Bucket' => config('filesystems.disks.s3.bucket'),\n 'Key' => $request->input('filename'),\n 'ContentType' => $request->input('metadata.type'),\n 'ContentDisposition' => 'inline',\n ]);\n\n return response()->json([\n 'uploadId' => $response->get('UploadId'),\n 'key' => $response->get('Key'),\n ]);\n }", "public function store(Request $request){\n \n if ($request->hasFile('image')){\n\n $filenamewithextension = $request->image->getClientOriginalName();\n $filename = pathinfo($filenamewithextension, PATHINFO_FILENAME);\n $extension = $request->image->getClientOriginalExtension();\n $filenametostore = $filename.'_'.time().'.'.$extension;\n $request->image->storeAs('public/img/', $filenametostore);\n //$smallthumbnail = \"_small_\".$filename.'_'.time().'.'.$extension;\n //$smallthumbnailpath = public_path('storage/img/'.$smallthumbnail);\n //$this->createThumbnail($smallthumbnailpath,150,93);\n //$request->image->storeAs('storage/img/', $smallthumbnail);\n\n return response()->json(array('nomeArquivo'=>$filenametostore));\n\n } else{\n //return response()->json(array('nomeArquivo' => 'arquivo não recebido'));\n } \n\n }", "public function uploadImage(Request $request){\n\n $files = $request['files'];\n\n foreach($files as $file){\n $fileName = $file->getClientOriginalName();\n $nameRandom = $this->generateRandomString();\n $name = Carbon::now()->second.$nameRandom.'-'.$fileName;\n \\Storage::disk('local')->put($name, \\File::get($file));\n\n $imagen = new Imagenes;\n $imagen->name = $name;\n $imagen->status = 'no_process';\n $imagen->send = 'no';\n $imagen->id_user = Auth::user()->id;\n $imagen->save();\n }\n\n return response()->json([\n 'mensaje' => 'Picture upload successfully!',\n 'status' => true,\n 'file' => $imagen,\n 'success' => true\n ]);\n\n }", "public function store(Request $request)\n {\n $body = trim($request->getContent());\n\n switch ($body) {\n case 'fall':\n Storage::put('fall', time());\n break;\n case 'pill':\n Storage::put('pill', time());\n break;\n case 'door0':\n Storage::put('door', 'opened,' . time());\n break;\n case 'door1':\n Storage::put('door', 'closed,' . time());\n break;\n case 'doora':\n Storage::put('doora', time());\n break;\n case 'temp':\n Storage::put('temp', time());\n break;\n }\n\n return '';\n }", "public function store(Request $request)\n {\n\n $header = $request->header();\n\n// $origin_country_id = $request->origin_country_id;\n// \t $origin_province_id = $request->origin_province_id;\n// \t $origin_city_id = $request->origin_city_id;\n//\n// \t $des_country_id = $request->des_country_id;\n// \t $des_province_id = $request->des_province_id;\n// \t $des_city_id = $request->des_city_id;\n//\n// \t $weight = $request->weight;\n// \t $declare_value = $request->declare_value;\n\n // get\n\n\n\n return response()->json($request);\n\n }", "public function index(Request $request){\n //$list = Element::all();\n $list = [];\n $array = json_decode(Cache::get($this->CACHE_KEY));\n if($array){\n $list = $array;\n }else{\n $list = [];\n }\n return response()->json($list);\n }", "public function store(Request $request)\n {\n Log::info($request);\n\n $my_tablet_id = Config::get('constants.TABLET_ID');\n $my_user_id = Config::get('constants.USER_ID');\n\n \n $my_media_upload = Upload::create([\n 'reference' =>$request['reference'],\n 'tablet_users_id' => $my_tablet_id,\n 'uploaded_by' => $my_user_id,\n ]);\n\n \n \n if (isset($request['file_upload'])){\n $my_media_upload->addMediaFromRequest('file_upload')->toMediaCollection('file_uploads');\n }\n\n return response()->json([$request->all()]);\n }", "public function store(Request $request)\n {\n //se almacena un Pago\n $pago = Pago::create($request->all());\n return response()->json([\n \n \"message\" => \"El pago fue creado exitosamente!!\",\n \"data\" => $pago,\n \"status\" => Response::HTTP_CREATED\n ],Response::HTTP_CREATED);\n }", "public function storeProducts(Request $request){\n $path = base_path('resources/json/result.json');\n// get old data\n $oldData = json_decode(file_get_contents($path));\n// get new data from request object\n $data = $request->only(['p_name','quantity','price']);\n $data['date'] = Carbon::now()->toDateTimeString();\n $data['total'] = $request->quantity * $request->price;\n// add to existing data\n array_push($oldData, $data);\n// sort by date before rewriting\n $result = collect($oldData);\n// sort by date\n $sorted = $result->sortByDesc('date');\n// $sorted = $result->sortByDesc(function ($prods, $key) {\n// return Carbon::parse($prods->date)->getTimestamp();\n// });\n// $sorted = $result->sortByDesc([\n// fn ($a, $b) => Carbon::createFromFormat('MMMM Do YYYY, h:mm a',$a['date'])->compare(Carbon::createFromFormat('MMMM Do YYYY, h:mm a',$b['date']))\n// ]);\n $finalResult = $sorted->values()->all();\n// rewrite the file\n file_put_contents($path, json_encode($finalResult, JSON_PRETTY_PRINT));\n //format for ajax response\n $products = file_get_contents($path);\n $total = $result->sum('total');\n// dd($products);\n return response()->json(['result' => $products, 'total' => $total],200);\n }", "public function store(Request $request){\n\n// $this->validate($request, [\n// 'files' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:6000',\n//\n// ]);\n\n $data = [];\n\n if($request->hasFile('files'))\n {\n foreach($request->file('files') as $file)\n {\n// dd($file);\n $uuid = Str::uuid()->toString();\n $name = $uuid . time().'.'.$file->extension();\n $file->move(public_path('/sliders/'), $name);\n $fayl= Slider::create(['image_path'=>$name]);\n $data[] = $fayl;\n }\n }\n\n return response()->json($data);\n }", "public function store(Request $request)\n {\n //\n if($request->hasFile('imagen')){\n $file = $request->file('imagen');\n $foto = time().$file->getClientOriginalName();\n $file->move(public_path().'/foto_perfil/',$foto);\n \n }\n $personas = DB::select(\"select sp_personas(0,'$request->nombre','$request->apellido','$request->FechaNac','$request->telefono','$request->cedula_identidad','$request->correo','$request->genero',$request->idciudad,$request->idnacionalidad,$request->idestadocivil,'$request->imagen','$request->direccion','$request->barrio',1)\");\n return response()->json($personas);\n \n }", "public function store(Request $request)\n {\n if($request->has('nombreemp')){\n $empresaguardar = Empresa::create([\n 'nombreemp' => $request->get('nombreemp'),\n 'repnombre' => $request->get('repnombre'),\n 'telefono' => $request->get('telefono'),\n 'diremp' => $request->get('diremp'),\n 'rubro' => $request->get('rubro'),\n 'nit' => $request->get('nit'),\n 'correo' => $request->get('correo'),\n ]);\n $itemUpdated = $empresaguardar;\n $user = auth()->user();\n $requestIP = request()->ip();\n //error_log($requestID);\n if($empresaguardar){\n // Add activity logs\n activity('empresa')\n ->performedOn($empresaguardar)\n ->causedBy($user)\n ->withProperties(['ip' => $requestIP,\n 'user'=> $user,\n 'nuevo'=> $itemUpdated])\n ->log('created');\n }\n\n return response()->json($empresaguardar,201);\n }\n\n $returnData = array(\n 'status' => 'error',\n 'message' => 'An error occurred!'\n );\n return response()->json($returnData, 400);\n }", "public function store(Request $request)\n {\n $request->validate([\n 'pariwisata_nama' => ['required', 'string'],\n 'pariwisata_alamat' => ['required', 'string'],\n 'pariwisata_detail' => ['required', 'string'],\n 'pariwisata_gambar' => ['required', 'mimes:jpg,jpeg,png'],\n ]);\n\n $url = 'http://erporate.siaji.com/bootcamp/ajax/pariwisata';\n $req = $this->client->request('POST', $url, [\n 'headers' => [\n 'X-CSRF-TOKEN' => csrf_token(),\n 'Accept' => 'application/json'\n ],\n 'multipart' => [\n [\n 'name' => 'pariwisata_nama',\n 'contents' => $request->pariwisata_nama\n ], [\n 'name' => 'pariwisata_alamat',\n 'contents' => $request->pariwisata_alamat\n ], [\n 'name' => 'pariwisata_detail',\n 'contents' => $request->pariwisata_detail\n ], [\n 'name' => 'pariwisata_gambar',\n 'contents' => fopen($request->pariwisata_gambar, 'r')\n ]\n ],\n // 'exceptions' => false\n ]);\n\n $result = json_decode($req->getBody()->getContents());\n\n if($result->status){\n return redirect('/');\n } else {\n return response()->json([\n 'status' => false,\n 'message' => 'Something went wrong',\n 'headers' => $req->getHeaders(),\n 'body' => json_decode($req->getBody()->getContents()),\n ]);\n }\n }", "public function store(Request $request)\n {\n //\n $outcome = new LearningOutcomeTemplate();\n return response()->json(LearningOutcomeTemplateController::save($outcome, $request));\n }", "public function store(Request $request)\n {\n $emptyData = $this->validIsEmpty($request,['connection','queue','payload',\"exception\"]);\n if($emptyData){\n return response()->json(['status'=> 'error', 'message'=>$this->errorFeildes($emptyData)],400);\n }\n try {\n $alldata = $request->only(['connection','queue','payload',\"exception\"]);\n // $alldata = $request->all();\n // add id User to array Data\n $alldata[\"user_id\"]=auth()->user()->id;\n $jobs = Jobs::create($alldata);\n if ($jobs) {\n return response()->json(['status' => 'success',\"message\"=> \"Add New Jobs...\"],201);\n }else {\n return response()->json([\"status\"=> \"Faild\", \"message\" => \"Erro In Add New Jobs. Please Try Again\"],400);\n }\n } catch (\\Exception $e) {\n return response()->json(['status'=> 'error', 'message'=>$e->getMessage()], 400);\n }\n }", "public function store(Request $request)\n {\n // dd([$request->file('files'), $request->input()]);\n foreach ($request->file('files') as $file) {\n\n $photo = new Photo();\n $photo->filename = $file->getClientOriginalName();\n $photo->extension = $file->getClientOriginalExtension();\n $photo->mimetype = $file->getMimeType();\n $photo->save();\n\n $uploaded_file = $this->streamFile($file->getRealPath(), $photo->filepath);\n\n $mimetype = $file->getMimeType();\n\n $intervention_image = Image::make($file->getRealPath());\n $exif_data = ($intervention_image->exif()) ? json_encode($intervention_image->exif()) : null;\n $iptc_data = ($intervention_image->iptc()) ? json_encode($intervention_image->iptc()) : null;\n\n\n foreach(config('system.thumbnails.sizes') as $size){\n $intervention_image->resize($size, null, function ($constraint) {\n $constraint->aspectRatio();\n });\n\n $this->photo_private_disk->put(sprintf('%s/%s', $photo->storage_path, $size . '.jpg'), (string) $intervention_image->encode('jpg'));\n }\n\n\n // ConvertPhoto::dispatch($photo);\n // IndexPhoto::dispatchNow($photo);\n }\n\n return response()->json($photo);\n }", "public function store(Request $request)\n {\n $task = $this->task->store($request);\n\n if(!$task){\n return response()->json([\n 'message' => 'error'\n ], 400);\n }\n\n return response()->json([\n 'task' => $task,\n 'message' => 'success'\n ], 200);\n }", "public function store(Request $request)\n {\n $rules = [\n 'name' => 'required|max:255',\n ];\n $validator = Validator::make($request->all(), $rules);\n if ($validator->fails()) {\n return response()->json($validator->errors(), 400);\n }\n $itemname = time();\n $file_name = \"item-\". $itemname.\".png\";\n $data = base64_decode(preg_replace('#^data:image/\\w+;base64,#i', '', $request['image']));\n \n file_put_contents(public_path().'/images/items/' . $file_name,$data );\n\n $input = $request->all();\n \n $input[\"image\"] = $itemname;\n\n $item = Item::create($input);\n return response()->json($item, 201);\n }", "public function store(Request $request)\n {\n //return $request->params;\n //数据格式化\n $client = new Client([\n 'base_uri' => $this->base_url,\n\n 'headers' =>['access_token'=>'XXXX','app_id'=>'123']\n ]);\n $data = $request->params;\n \n $data['jiafangfeiyong'] = implode(',',$data['jiafangfeiyong']);\n $data['yifangfeiyong'] = implode(',',$data['yifangfeiyong']);\n $response = $client->request('POST', '/api/contract/sf/save', [\n 'json' => $data,\n ]);\n $res = $response->getBody();\n $res = json_decode($res);\n $res->data->yifangfeiyong = explode(',',$res->data->yifangfeiyong);\n $res->data->jiafangfeiyong = explode(',',$res->data->jiafangfeiyong);\n echo json_encode($res) ;\n }", "public function store(Request $request)\n {\n // $this->authorize('store', Game::class);\n\n $gameId = Game::insertGetId($request->all());\n $newData = Game::findOrFail($gameId);\n return response()->json($newData, 201);\n }", "public function store(Request $request)\n { \n\n // Set Url Path to Send Request \n $url = 'https://maps.googleapis.com/maps/api/geocode/json?address='.$request->get('destination').'&key=AIzaSyCxWJuVBao6hFOx__vGQdzLsFnGZ7jfnlw';\n\n // Use GuzzleHttp\n $client = new \\GuzzleHttp\\Client();\n\n // Send a request\n $geocodeResponse = $client->get( $url )->getBody();\n\n // Decode Json Data\n $geocodeData = json_decode( $geocodeResponse );\n\n // Get Lattitude of a location\n $lat = $geocodeData->results[0]->geometry->location->lat;\n\n // Get Longtitude of a location\n $lng = $geocodeData->results[0]->geometry->location->lng;\n\n // Set a second Path to find a restaurant around Location we have get first\n $place = 'https://maps.googleapis.com/maps/api/place/textsearch/json?query=restaurant&location='.$lat.','.$lng.'&rankby=distance&key=AIzaSyCxWJuVBao6hFOx__vGQdzLsFnGZ7jfnlw';\n\n // Use GuzzleHttp\n $get = new \\GuzzleHttp\\Client();\n\n // Send a request\n $geocodeResponse_2nd = $client->get( $place )->getBody();\n\n // Decode Json Data\n $geocodeData_2nd = (array) json_decode( $geocodeResponse_2nd );\n\n // Check if there is a cache\n if(Cache::has($request->get('destination'))) {\n // Return a Cache Data\n $cache = Cache::get($request->get('destination'));\n // Return data as a json\n return response()->json($cache);\n }\n else {\n // Store a cache file\n Cache::put($request->get('destination'), $geocodeData_2nd, 10);\n // Return data as a json\n return response()->json($geocodeData_2nd);\n }\n\n }", "public function saveImage(Request $request){\n $x = explode('/', __DIR__);\n $path = [];\n for($i = 0; $i < count($x); $i++){\n if($x[$i] != 'app')\n array_push($path, $x[$i]);\n else\n break;\n }\n array_push($path, 'public', 'images', 'temp'. $request->ip(). '.jpg');\n $path = implode('/', $path);\n if(!file_exists($path)){\n fopen($path, 'w');\n }\n copy($request->image, $path);\n return response()->json(['code' => 200, 'message' => 'success', 'response' => $path])->header('Cache-control', 'no-cache');\n\n }", "public function store(Request $request)\n {\n $image = $request->file('image');\n $new_name = rand() . '.' . $image->getClientOriginalExtension();\n $image->move(public_path('ciltimage'), $new_name);\n $data = new Event();\n $data->image = 'ciltimage/'.$new_name;\n $data->title = $request->title;\n $data->description = $request->description;\n $data->date = $request->date;\n $data->save();\n return response()->json($data);\n }", "public function store(Request $request)\n {\n $this->store->create($request);\n return response()->json([\n 'success' => true\n ]);\n }", "public function store(Request $request)\n {\n $actor = new Actor();\n $actor->name = $request->name;\n $actor->note = $request->note;\n $actor->poster = 'storage/images/'.str_replace(\" \",\"_\",$request->name).'.jpg';\n $actor->save();\n \n Storage::put('public/images/'.str_replace(\" \",\"_\",$request->name).'.jpg',base64_decode($request->poster));\n \n if($actor){\n return response()->json([\"actor\"=>$actor, \"status\"=>200]);\n }\n\n return resoponse()->json([\"message\"=>\"something went wrong\"]);\n\n }", "function store(Request $request){\n $humidity = new Rain;\n //hardcoded to test\n $humidity->location_id = $request['location_id'];\n $humidity->rainfall = $request['humidity'];\n $humidity->save();\n\n return response()->json($request, 201);\n }", "public function store(Request $request)\n {\n if (is_array($request->requestFiles) && count($request->requestFiles) == 1) {\n $item = $request->requestFiles[0];\n $scanRequest = ScanResults::firstOrCreate(\n\n ['file_id' => $item['id']],\n [\n // 'file_id' => $item['id'],\n 'file_name' => $item['name'],\n 'request_id' => $request->request_id,\n 'file_categ' => $request->file_categ['id'],\n 'folder_id' => $request->folder_id,\n 'file_ext' => pathinfo($item['name'], PATHINFO_EXTENSION),\n 'uploaded_by' => Auth::user()->id,\n 'comment' => $request->comment,\n ]\n );\n if ($scanRequest) {\n $scanStatus = ScanStatus::updateOrCreate(\n ['Action_id' => 4],\n [\n 'Action_id' => \"Done\",\n 'scan_request_id' => $request->request_id,\n 'Action_by' => Auth::user()->id,\n // 'created_at' => date_format(date_create(), 'U = Y-m-d H:i:s')\n ]\n );\n $scanStatus->save();\n }\n return response()->json(['message' => 'File Saved successfully', 'success' => true, 'data' => $scanRequest, 'status' => $scanStatus], HttpFoundationResponse::HTTP_CREATED);\n }\n if (is_array($request->requestFiles) && count($request->requestFiles) > 1) {\n foreach ($request->requestFiles as $sFile) {\n $scanRequest = ScanResults::firstOrCreate(\n ['file_id' => $sFile['id']],\n [\n // 'file_id' => json_encode($sFile)['id'],\n 'file_name' => $sFile['name'],\n 'request_id' => $request->request_id,\n 'file_categ' => $request->file_categ['id'],\n 'folder_id' => $request->folder_id,\n 'file_ext' => pathinfo($sFile['name'], PATHINFO_EXTENSION),\n 'uploaded_by' => Auth::user()->id,\n 'comment' => $request->comment,\n ]\n );\n }\n if ($scanRequest) {\n $permission = [\n [\n 'Action_id' => 3, //insert has no acces for mutators //create Model::create -- has access to mutator 'Action_id' => 'On-Process',\n 'scan_request_id' => $request->request_id,\n 'Action_by' => Auth::user()->id,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ],\n [\n 'Action_id' => 4,\n 'scan_request_id' => $request->request_id,\n 'Action_by' => Auth::user()->id,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ]\n ];\n $scanStatus = ScanStatus::insert($permission);\n // $scanStatus->save();\n }\n return response()->json(['message' => 'Files Saved successfully', 'success' => true, 'data' => $scanRequest, 'status' => $scanStatus], HttpFoundationResponse::HTTP_CREATED);\n }\n\n return response()->json(['message' => 'Error Saving files', 'success' => false, 'data' => $request->requestFiles], HttpFoundationResponse::HTTP_NOT_ACCEPTABLE);\n }", "public function store(Request $request)\n {\n try\n {\n $like = new Like;\n\n $like->user_id = $request->ids[\"user\"];\n $like->project_id = $request->ids[\"project\"];\n\n $like->save();\n\n return response()->json($like, 201);\n }\n catch(\\Exception $e)\n {\n echo $e->getMessage();\n }\n }", "public function store(Request $request)\n {\n $reglement = new Reglement();\n $reglement->mode_reglement = $request->get('mode_reglement');\n $reglement->user_id = $request->get('user_id');\n $reglement->montant = $request->get('montant');\n $reglement->date_reglement = $request->get('date_reglement');\n $reglement->facture_id = $request->get('facture_id');\n $reglement->save();\n broadcast(new ReglementAdd($reglement));\n return response()->json(['reglement'=> $reglement]);\n }" ]
[ "0.6544804", "0.64019334", "0.6350454", "0.62621284", "0.6202401", "0.61408293", "0.61088866", "0.60955644", "0.6031211", "0.6006816", "0.5990465", "0.5956704", "0.5949043", "0.593869", "0.59053564", "0.5893386", "0.5874495", "0.585347", "0.58423173", "0.58249867", "0.580529", "0.5803978", "0.576986", "0.57625914", "0.57491463", "0.57454747", "0.5745246", "0.57341176", "0.5705202", "0.57005644", "0.57004446", "0.5691978", "0.5690937", "0.56770486", "0.5664981", "0.5657658", "0.56525105", "0.5646017", "0.564593", "0.5636411", "0.562898", "0.5621069", "0.5614122", "0.56124043", "0.5602876", "0.558719", "0.5586058", "0.5582118", "0.55768025", "0.55706716", "0.5564828", "0.55578655", "0.5556652", "0.55525696", "0.5552387", "0.5551404", "0.5547448", "0.55392694", "0.5537937", "0.55361897", "0.5532883", "0.5529539", "0.5528575", "0.55284977", "0.5525266", "0.5525048", "0.5524609", "0.55219615", "0.5521222", "0.55177134", "0.55149007", "0.5511268", "0.5508441", "0.55077237", "0.55068153", "0.5499589", "0.5499425", "0.54946196", "0.5487643", "0.54844975", "0.5474742", "0.54706186", "0.54697573", "0.54636097", "0.5457274", "0.54560536", "0.54519975", "0.5450163", "0.54489076", "0.54489064", "0.5441245", "0.54367715", "0.5436109", "0.5432771", "0.5432501", "0.5430587", "0.54262096", "0.5425886", "0.5425805", "0.5425483", "0.5423886" ]
0.0
-1
Se obtiene la orden
public function inventory($order){ $order = Order::find($order->id); // Se obtiene el detalle de la orden $order_details = OrderDetail::where('order_id', $order->id)->get(); foreach ($order_details as $od){ $store_branche_id = $od['store_branche_id']; //Inventario $inventory = Inventory::where('product_id', $od['product_id'])->where('store_branche_id', $store_branche_id)->first(); if(isset($inventory)){ // Se realiza el movimiento del inventario de tipo E: Egreso $inventory->update([ 'quantity' => $inventory->quantity - $od['quantity'] ]); InventoryMovement::create([ 'inventory_id' => $inventory->id, 'quantity' => $od['quantity'], 'order_id'=>$order->id, 'movement_type' => 'E' ]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLly() {}", "public function luas()\n {\n return $this->panjang * $this->lebar;\n }", "public function getLlx() {}", "public function getLr() {}", "public function getLargura() \r\n\t{\r\n\t\treturn $this->iLargura;\r\n\t}", "public function getLoueur()\n {\n return $this->loueur;\n }", "public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }", "public function getLandid()\n {\n return $this->landId;\n }", "function luasLingkaran($nilai){\r\n return pi() * pow($nilai, 2);\r\n }", "public function getLinha();", "private function getLigado()\n {\n return $this->ligado;\n }", "function getLeja(){\r\n return $this->leja;\r\n }", "function get_status_lima($nilai) {\r\n\t\t\r\n\t\tif ($nilai < 0.6)\r\n\t\t\t$hasil = \"LoS A\";\r\n\t\telse if ($nilai >= 0.6 && $nilai < 0.7)\r\n\t\t\t$hasil = \"LoS B\";\r\n\t\telse if ($nilai >= 0.7 && $nilai < 0.8)\r\n\t\t\t$hasil = \"LoS C\";\r\n\t\telse if ($nilai >= 0.8 && $nilai < 0.9)\r\n\t\t\t$hasil = \"LoS D\";\r\n\t\telse if ($nilai >= 0.9 && $nilai < 1.0)\r\n\t\t\t$hasil = \"LoS E\";\r\n\t\telse if ($nilai >= 1.0)\r\n\t\t\t$hasil = \"LoS F\";\r\n\r\n\t\treturn $hasil;\r\n\t}", "function Linha(){\n\t\tswitch ($this->intBanco){\n\t\t\tcase INT_SQLSERVER:\n\t\t\t\t$this->rs = mssql_fetch_array($this->cursor);\n\t\t\t\t$a1 = $this->rs;\n\t\t\t\tbreak;\n\t\t\tcase INT_ORACLE:\n\t\t\t\t$a1 = oci_fetch_array ($this->cursor, OCI_BOTH);\n\t\t\t\t$this->rs = $a1;\n\t\t\t\tif ($this->rs == false){\n\t\t\t\t\t$this->liberaStatement();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INT_POSTGRE:\n\t\t\t\t$this->rs = pg_fetch_array($this->cursor);\n\t\t\t\t$a1 = $this->rs;\n\t\t\t\tbreak;\n\t\t\tcase INT_MYSQL:\n\t\t\t\t$this->rs = mysql_fetch_array($this->cursor, MYSQL_BOTH);\n\t\t\t\t$a1 = $this->rs;\n\t\t\t\tbreak;\n\t\t}\n\t\t//echo \"Cria Linha <br />\";\n\t\treturn $a1;\n\t}", "public function getLl() {}", "public function getTotalLactation()\n {\n return $this->total_lactation;\n }", "public static function getLE()\n {\n }", "public function laporan($id=null){\n\t\t$sql = \"SELECT * FROM laporan\";\n\t\tif ($id !=null) {\n\t\t\t$sql .= \" WHERE id='$id' AND jenis_laporan='laporan_tahunan' ORDER BY id DESC\";\n\t\t}else{\n\t\t\t$sql .= \" WHERE jenis_laporan='laporan_tahunan' ORDER BY id DESC\";\n\t\t}\n\t\t$query = $this->db->query($sql) or die ($this->db->error);\n\t\treturn $query;\n\t}", "private function CsomagHozzaadasa()\r\n {\r\n foreach (Lap::Nevkeszlet() as $nev)\r\n {\r\n foreach (Lap::Szinkeszlet() as $szin)\r\n {\r\n $this->lapok[]=new Lap($szin,$nev);\r\n }\r\n }\r\n }", "public function getLogros()\r\n {\r\n return $this->Logros;\r\n }", "public function getLr()\n {\n return $this->lr;\n }", "public function getLongitud()\n {\n return $this->longitud;\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 }", "public function getLongitud()\n {\n return $this->Longitud;\n }", "public function getLadas()\n {\n try {\n\n $conn = $this->makeConn->makeConnection();\n\n $res = $conn->query('select * from Ladas;');\n\n $array_result = [];\n\n foreach ($res->fetchAll() as $item) {\n array_push(\n $array_result,\n [\n 'lada' => $item['lada'],\n 'city' => $item['city'],\n 'state' => $item['state'],\n 'lada' => $item['lada'],\n 'id' => $item['id']\n ]\n );\n }\n\n echo json_encode($array_result);\n } catch (Exception $e) {\n echo 'Ocurrió un error al obtener las ladas';\n }\n }", "public function get_lihat_jalan(){\n\t\treturn $this->db->get('jalan');\n\t}", "public function getLieu(): string\r\n {\r\n return $this->Lieu;\r\n }", "function graficoLinha() {\n $maxValue = $this->desenhaBase();\n\n $labelY = $this->margem;\n $idx = 0;\n foreach ($this->vetor as $label => $item) {\n $idx++;\n $color = $this->getColor($idx);\n $this->desenhaLinha($item, $color, $maxValue);\n $this->desenhaLabel($label, $color, $labelY);\n $labelY += ($this->margem * 2);\n }\n }", "public function list_lend($id){\n\t\t\t//matriculas de los alumnos con idlibro \n\t\t\t//Obtener sus nombres\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('prestamo');\n\t\t\t$this->db->join('estudiante','estudiante.matricula = prestamo.matricula');\n\t\t\t$this->db->where('prestamo.idlibro',$id);\n\t\t\t$query=$this->db->get();\n\n\t\t\treturn $query->result();\n\t\t}", "public function getLido()\n {\n return $this->lido;\n }", "function mod_l_luv($delta_l) {\n\t\t$luv=$this->get_luv();\n\t\t$l=$luv[0];\n\t\tif ($delta_l>0)\n\t\t\t$l=$l+(1-$l)*(($delta_l>1)?1:$delta_l);\n\t\tif ($delta_l<0)\n\t\t\t$l=-$l*(($delta_l<-1)?-1:$delta_l);\n\t\t$this->set_from_luv($l,$luv[1],$hsl[2]);\n\t}", "public function laporan()\n {\n return $this->hasMany(Laporan::class, 'id_kegiatan');\n }", "public function getLatitud()\n {\n return $this->Latitud;\n }", "public function getToiletSiswaLaki()\n {\n return $this->toilet_siswa_laki;\n }", "public function getLivres()\r\n\t{\r\n\t\treturn $this->livres;\r\n\t}", "function publierLyric($da){\r\n\t\t\treturn true;\r\n\t\t}", "public function liebiao()\n {\n\n // $this->assign('articles',$articles);\n // $info['cate'] = Db::name('article_cate')->select();\n // $info['admin'] = Db::name('admin')->select();\n $liebiao=\"fdsfds\";\n $this->assign('liebiao',$liebiao);\n return $this->fetch();\n }", "public function getLebar()\n {\n return $this->lebar;\n }", "public function getAuthenticatedLegajo(){\n $usuario_creacion =$this->getAuthenticatedUser()['usuario'];\n $personal = new PersonalModel();\n $datos_usuario = $personal -> get_personal((object) array(\"usuario\" => $usuario_creacion));\n $legajo= $datos_usuario['result'][0]->legajo;\n\n return $legajo;\n }", "function getTunjLain($conn) {\n $last = self::getLastDataPeriodeGaji($conn);\n\n $sql = \"select g.nominal as tunjlain,g.idpegawai,g.kodetunjangan\n\t\t\t\tfrom \" . static::table('ga_pegawaitunjangan') . \" g\n\t\t\t\tleft join \" . static::table('ms_tunjangan') . \" t on t.kodetunjangan=g.kodetunjangan\n\t\t\t\twhere g.tmtmulai <= '\" . $last['tglawalhit'] . \"' and t.carahitung = 'M' and t.isbayargaji = 'Y' and t.isaktif = 'Y' and g.nominal is not null and g.isaktif = 'Y'\n order by g.tmtmulai asc\";\n $rs = $conn->Execute($sql);\n\n while ($row = $rs->FetchRow()) {\n $a_tunjlain[$row['kodetunjangan']][$row['idpegawai']] = $row['tunjlain'];\n }\n\n return $a_tunjlain;\n }", "private function lagon ($a)\n {\n $idL = $a->getIdLagon();\n foreach ($this->lagons as $l) {\n if ($l->getId() == $idL) {\n return $l;\n }\n }\n return null;\n }", "protected function _getLancamento(){\n if (!is_object($this->_lancamento)){\n $this->_lancamento = new Financeiro_Model_Lancamento_Mapper();\n }\n return $this->_lancamento;\n }", "public function getValorLancar(){\n return $this->nValorLancar;\n }", "public function getHpvL()\n {\n return $this->hpv_l;\n }", "private function tauxRecrutement ($l, $la)\n {\n $la_id = $la->getId();\n return $l->get(\"rL$la_id\")->getRate();\n }", "private function telaPerfilLoja()\r\n {\r\n //Carregando os anos do banco de dados\r\n $repositorio = $this->getDoctrine()->getRepository('DCPBundle:Quebra');\r\n\r\n $sql = $repositorio->createQueryBuilder('q')\r\n ->select('q.data')\r\n ->groupBy('q.data')\r\n ->getquery();\r\n\r\n $resultado = $sql->getResult();\r\n\r\n $anoGeral = array();\r\n $contAnoGeral = 0;\r\n foreach ($resultado as $data)\r\n {\r\n $anoGeral[$contAnoGeral] = $data[\"data\"]->format(\"Y\");\r\n $contAnoGeral++;\r\n }\r\n\r\n $ano = array();\r\n $contAno = 0;\r\n foreach ($anoGeral as $anoAPesquisar)\r\n {\r\n if (!in_array($anoAPesquisar, $ano))\r\n {\r\n $ano[$contAno] = $anoAPesquisar;\r\n $contAno++;\r\n }\r\n }\r\n\r\n return $ano;\r\n }", "function pi_getLL($pObj,$key,$alt='',$hsc=FALSE)\t{\n\n\t\tif($pObj['L']>0){\n\t\t\t$L = $this->getLanguages($pObj['L']);\n\t\t\tif($L[0]['isocode']){\n\t\t\t\t\t$this->LLkey = \tstrtolower($L[0]['isocode']);\n\t\t\t}\n\t\t\n\t\t}else{\n\t\t\t$this->LLkey = \t'default';\n\t\t}\n\n\n\t\tif (isset($this->LOCAL_LANG[$this->LLkey][$key]))\t{\n\t\t\t$word = $this->csConv($this->LOCAL_LANG[$this->LLkey][$key]);\n\t\t} elseif (isset($this->LOCAL_LANG['default'][$key]))\t{\n\t\t\t$word = $this->LOCAL_LANG['default'][$key];\n\t\t} else {\n\t\t\t$word = $this->LLtestPrefixAlt.$alt;\n\t\t}\n\n\t\t$output = $this->LLtestPrefix.$word;\n\t\tif ($hsc)\t$output = htmlspecialchars($output);\n\n\t\treturn $output;\n\t}", "private function findLapsoModel()\r\n\t\t{\r\n\t\t\treturn PagoDetalle::find()->alias('D')\r\n\t\t\t\t\t\t\t\t\t ->where('id_impuesto=:id_impuesto',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t[':id_impuesto' => $this->_objeto->id_impuesto])\r\n\t\t\t\t\t\t\t\t\t ->andWhere(['IN', 'pago', [0, 1, 7]])\r\n\t\t\t\t\t\t\t\t\t ->andWhere('trimestre >:trimestre',['trimestre' => 0])\r\n\t\t\t\t\t\t\t\t\t ->andWhere('impuesto =:impuesto',[':impuesto' => self::IMPUESTO])\r\n\t\t\t\t\t\t\t\t\t ->joinWith('pagos P', true, 'INNER JOIN')\r\n\t\t\t\t\t\t\t\t\t ->joinWith('exigibilidad E')\r\n\t\t\t\t\t\t\t\t\t ->joinWith('estatus S', true, 'INNER JOIN')\r\n\t\t\t\t\t\t\t\t\t ->orderBy([\r\n\t\t\t\t\t\t\t\t\t \t\t'ano_impositivo' => SORT_DESC,\r\n\t\t\t\t\t\t\t\t\t \t\t'trimestre' => SORT_DESC,\r\n\t\t\t\t\t\t\t\t\t \t]);\r\n\t\t}", "function largura($nPorcentagem = 0) {\n\n $iColuna = 0;\n $iTotalLinha = 276;\n\n if ( $nPorcentagem == 0 ) {\n return $iTotalLinha;\n }\n\n $iColuna = $nPorcentagem / 100 * $iTotalLinha;\n $iColuna = round($iColuna, 2);\n\n return $iColuna;\n}", "public function ulA(){ return $this->ulA; }", "public function luas_Persegi()\n {\n $hitung = $this->lebar * $this->panjang;\n return $hitung;\n }", "public function lap () {\n $lapDur = $this->since($this->lapTmstmp);\n\n if ($this->run) {\n $this->lapTmstmp = now();\n }\n\n return $lapDur;\n }", "public function getLatitud()\n {\n return $this->latitud;\n }", "public function getJmlLantai()\n {\n return $this->jml_lantai;\n }", "public function laptops()\n {\n return static::randomElement(static::$laptops);\n }", "public function getLigos()\n {\n return $this->ligos;\n }", "public function obtlamce($id_biopsia){\n $stmt=$this->objPDO->prepare(\"SELECT num_laminas from sisanatom.detalle_bioce where id_biopsia=:id_biopsia\");\n $stmt->execute(array('id_biopsia'=>$id_biopsia));\n $ltpq=$stmt->fetchAll(PDO::FETCH_OBJ);\n return $ltpq[0]->num_laminas;\n }", "public function ledenLijst() {\n $sort = $this->input->get('sort');\n $filterBy = $this->input->get('filterBy');\n $filter = $this->input->get('filter');\n $this->load->model('persoon_model');\n $this->load->model('prijs_model');\n $data['leden'] = $this->persoon_model->getLedenFilter($sort, $filterBy, $filter);\n // geen extra rand rond hoofdmenu\n $data['lidgeld'] = $this->prijs_model->getLidgeld();\n $data['theoriegeld'] = $this->prijs_model->getTheoriegeld();\n\n $this->load->view(\"leden_beheren\", $data);\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}", "public function getSoldiers()\n {\n }", "function getLibelOperation($type_op) { //Renvoie le libellé dun operation\n\tglobal $dbHandler,$global_id_agence;\n\t$db = $dbHandler->openConnection();\n\t\n\t$sql=\"SELECT traduction from ad_cpt_ope a, ad_traductions b where a.libel_ope = b.id_str and categorie_ope in (2,3) and type_operation = $type_op ;\";\n\t\n\t$result = $db->query($sql);\n\tif (DB :: isError($result)) {\n\t\t$dbHandler->closeConnection(false);\n\t\tsignalErreur(__FILE__, __LINE__, __FUNCTION__, $result->getMessage());\n\t}\n\t$dbHandler->closeConnection(true);\n\t$retour = $result->fetchrow();\n\treturn $retour[0];\n}", "function redfearnGridtoLL($Easting, $Northing, $Zone = 55, $TmDefinition = \"GDA-MGA\")\n{\n switch ($TmDefinition) {\n case \"GDA-MGA\":\n $FalseEasting = 500000.0000;\n $FalseNorthing = 10000000.0000;\n $CentralScaleFactor = 0.9996;\n $ZoneWidthDegrees = 6;\n $LongitudeOfTheCentralMeridianOfZone1Degrees = -177;\n $EllipsoidDefinition = \"GRS80\";\n break;\n default:\n $TmDefinition = \"GDA-MGA\";\n $FalseEasting = 500000.0000;\n $FalseNorthing = 10000000.0000;\n $CentralScaleFactor = 0.9996;\n $ZoneWidthDegrees = 6;\n $LongitudeOfTheCentralMeridianOfZone1Degrees = -177;\n $EllipsoidDefinition = \"GRS80\";\n }\n\n switch ($EllipsoidDefinition) {\n case \"GRS80\":\n $SemiMajorAxis = 6378137.000;\n $InverseFlattening = 298.257222101000;\n break;\n default:\n $EllipsoidDefinition = \"GRS80\";\n $SemiMajorAxis = 6378137.000;\n $InverseFlattening = 298.257222101000;\n }\n\n $Flattening = 1 / $InverseFlattening;\n $SemiMinorAxis = $SemiMajorAxis * (1 - $Flattening);\n $Eccentricity = (2 * $Flattening) - ($Flattening * $Flattening);\n $n = ($SemiMajorAxis - $SemiMinorAxis) / ($SemiMajorAxis + $SemiMinorAxis);\n $n2 = pow($n, 2);\n $n3 = pow($n, 3);\n $n4 = pow($n, 4);\n $G = $SemiMajorAxis * (1 - $n) * (1 - $n2) * (1 + (9 * $n2) / 4 + (225 * $n4) / 64) * PI() / 180;\n $LongitudeOfWesternEdgeOfZoneZeroDegrees = $LongitudeOfTheCentralMeridianOfZone1Degrees - (1.5 * $ZoneWidthDegrees);\n $CentralMeridianOfZoneZeroDegrees = $LongitudeOfWesternEdgeOfZoneZeroDegrees + ($ZoneWidthDegrees / 2);\n\n $NewE = ($Easting - $FalseEasting);\n $NewEScaled = $NewE / $CentralScaleFactor;\n $NewN = ($Northing - $FalseNorthing);\n $NewNScaled = $NewN / $CentralScaleFactor;\n $Sigma = ($NewNScaled * PI()) / ($G * 180);\n $Sigma2 = 2 * $Sigma;\n $Sigma4 = 4 * $Sigma;\n $Sigma6 = 6 * $Sigma;\n $Sigma8 = 8 * $Sigma;\n\n $FootPointLatitudeTerm1 = $Sigma;\n $FootPointLatitudeTerm2 = ((3 * $n / 2) - (27 * $n3 / 32)) * sin($Sigma2);\n $FootPointLatitudeTerm3 = ((21 * $n2 / 16) - (55 * $n4 / 32)) * sin($Sigma4);\n $FootPointLatitudeTerm4 = (151 * $n3) * sin($Sigma6) / 96;\n $FootPointLatitudeTerm5 = 1097 * $n4 * sin($Sigma8) / 512;\n $FootPointLatitude = $FootPointLatitudeTerm1 + $FootPointLatitudeTerm2 + $FootPointLatitudeTerm3 + $FootPointLatitudeTerm4 + $FootPointLatitudeTerm5;\n\n $SinFootPointLatitude = sin($FootPointLatitude);\n $SecFootPointLatitude = 1 / cos($FootPointLatitude);\n\n $Rho = $SemiMajorAxis * (1 - $Eccentricity) / pow(1 - $Eccentricity * pow($SinFootPointLatitude, 2), 1.5);\n $Nu = $SemiMajorAxis / pow(1 - $Eccentricity * pow($SinFootPointLatitude, 2), 0.5);\n\n $x1 = $NewEScaled / $Nu;\n $x3 = pow($x1, 3);\n $x5 = pow($x1, 5);\n $x7 = pow($x1, 7);\n\n $t1 = tan($FootPointLatitude);\n $t2 = pow($t1, 2);\n $t4 = pow($t1, 4);\n $t6 = pow($t1, 6);\n\n $Psi1 = $Nu / $Rho;\n $Psi2 = pow($Psi1, 2);\n $Psi3 = pow($Psi1, 3);\n $Psi4 = pow($Psi1, 4);\n\n $LatitudeTerm1 = -(($t1 / ($CentralScaleFactor * $Rho)) * $x1 * $NewE / 2);\n $LatitudeTerm2 = ($t1 / ($CentralScaleFactor * $Rho)) * ($x3 * $NewE / 24) * (-4 * $Psi2 + 9 * $Psi1 * (1 - $t2) + 12 * $t2);\n $LatitudeTerm3 = -($t1 / ($CentralScaleFactor * $Rho)) * ($x5 * $NewE / 720) * (8 * $Psi4 * (11 - 24 * $t2) - 12 * $Psi3 * (21 - 71 * $t2) + 15 * $Psi2 * (15 - 98 * $t2 + 15 * $t4) + 180 * $Psi1 * (5 * $t2 - 3 * $t4) + 360 * $t4);\n $LatitudeTerm4 = ($t1 / ($CentralScaleFactor * $Rho)) * ($x7 * $NewE / 40320) * (1385 + 3633 * $t2 + 4095 * $t4 + 1575 * $t6);\n $LatitudeRadians = $FootPointLatitude + $LatitudeTerm1 + $LatitudeTerm2 + $LatitudeTerm3 + $LatitudeTerm4;\n $LatitudeDegrees = ($LatitudeRadians / PI()) * 180;\n\n $CentralMeridianDegrees = ($Zone * $ZoneWidthDegrees) + $LongitudeOfTheCentralMeridianOfZone1Degrees - $ZoneWidthDegrees;\n $CentralMeridianRadians = ($CentralMeridianDegrees / 180) * PI();\n $LongitudeTerm1 = $SecFootPointLatitude * $x1;\n $LongitudeTerm2 = -$SecFootPointLatitude * ($x3 / 6) * ($Psi1 + 2 * $t2);\n $LongitudeTerm3 = $SecFootPointLatitude * ($x5 / 120) * (-4 * $Psi3 * (1 - 6 * $t2) + $Psi2 * (9 - 68 * $t2) + 72 * $Psi1 * $t2 + 24 * $t4);\n $LongitudeTerm4 = -$SecFootPointLatitude * ($x7 / 5040) * (61 + 662 * $t2 + 1320 * $t4 + 720 * $t6);\n $LongitudeRadians = $CentralMeridianRadians + $LongitudeTerm1 + $LongitudeTerm2 + $LongitudeTerm3 + $LongitudeTerm4;\n $LongitudeDegrees = ($LongitudeRadians / PI()) * 180;\n\n $GridConvergenceTerm1 = -($x1 * $t1);\n $GridConvergenceTerm2 = ($t1 * $x3 / 3) * (-2 * $Psi2 + 3 * $Psi1 + $t2);\n $GridConvergenceTerm3 = -($t1 * $x5 / 15) * ($Psi4 * (11 - 24 * $t2) - 3 * $Psi3 * (8 - 23 * $t2) + 5 * $Psi2 * (3 - 14 * $t2) + 30 * $Psi1 * $t2 + 3 * $t4);\n $GridConvergenceTerm4 = ($t1 * $x7 / 315) * (17 + 77 * $t2 + 105 * $t4 + 45 * $t6);\n $GridConvergenceRadians = $GridConvergenceTerm1 + $GridConvergenceTerm2 + $GridConvergenceTerm3 + $GridConvergenceTerm4;\n $GridConvergenceDegrees = ($GridConvergenceRadians / PI()) * 180;\n\n $PointScaleFactor1 = pow($NewEScaled, 2) / ($Rho*$Nu);\n $PointScaleFactor2 = pow($PointScaleFactor1, 2);\n $PointScaleFactor3 = pow($PointScaleFactor1, 3);\n $PointScaleTerm1 = 1 + $PointScaleFactor1 / 2;\n $PointScaleTerm2 = ($PointScaleFactor2 / 24) * (4 * $Psi1 * (1 - 6 * $t2) - 3 * (1 - 16 * $t2) - 24 * $t2 / $Psi1);\n $PointScaleTerm3 = $PointScaleFactor3 / 720;\n $PointScale = $CentralScaleFactor * ($PointScaleTerm1 + $PointScaleTerm2 + $PointScaleTerm3);\n\n $Point[\"Latitude\"] = $LatitudeDegrees;\n $Point[\"Longitude\"] = $LongitudeDegrees;\n $Point[\"GridConvergence\"] = $GridConvergenceDegrees;\n $Point[\"PointScale\"] = $PointScale;\n\n return $Point;\n}", "function redfearnGridtoLL($Easting, $Northing, $Zone = 55, $TmDefinition = \"GDA-MGA\")\n{\n switch ($TmDefinition) {\n case \"GDA-MGA\":\n $FalseEasting = 500000.0000;\n $FalseNorthing = 10000000.0000;\n $CentralScaleFactor = 0.9996;\n $ZoneWidthDegrees = 6;\n $LongitudeOfTheCentralMeridianOfZone1Degrees = -177;\n $EllipsoidDefinition = \"GRS80\";\n break;\n default:\n $TmDefinition = \"GDA-MGA\";\n $FalseEasting = 500000.0000;\n $FalseNorthing = 10000000.0000;\n $CentralScaleFactor = 0.9996;\n $ZoneWidthDegrees = 6;\n $LongitudeOfTheCentralMeridianOfZone1Degrees = -177;\n $EllipsoidDefinition = \"GRS80\";\n }\n\n switch ($EllipsoidDefinition) {\n case \"GRS80\":\n $SemiMajorAxis = 6378137.000;\n $InverseFlattening = 298.257222101000;\n break;\n default:\n $EllipsoidDefinition = \"GRS80\";\n $SemiMajorAxis = 6378137.000;\n $InverseFlattening = 298.257222101000;\n }\n\n $Flattening = 1 / $InverseFlattening;\n $SemiMinorAxis = $SemiMajorAxis * (1 - $Flattening);\n $Eccentricity = (2 * $Flattening) - ($Flattening * $Flattening);\n $n = ($SemiMajorAxis - $SemiMinorAxis) / ($SemiMajorAxis + $SemiMinorAxis);\n $n2 = pow($n, 2);\n $n3 = pow($n, 3);\n $n4 = pow($n, 4);\n $G = $SemiMajorAxis * (1 - $n) * (1 - $n2) * (1 + (9 * $n2) / 4 + (225 * $n4) / 64) * PI() / 180;\n $LongitudeOfWesternEdgeOfZoneZeroDegrees = $LongitudeOfTheCentralMeridianOfZone1Degrees - (1.5 * $ZoneWidthDegrees);\n $CentralMeridianOfZoneZeroDegrees = $LongitudeOfWesternEdgeOfZoneZeroDegrees + ($ZoneWidthDegrees / 2);\n\n $NewE = ($Easting - $FalseEasting);\n $NewEScaled = $NewE / $CentralScaleFactor;\n $NewN = ($Northing - $FalseNorthing);\n $NewNScaled = $NewN / $CentralScaleFactor;\n $Sigma = ($NewNScaled * PI()) / ($G * 180);\n $Sigma2 = 2 * $Sigma;\n $Sigma4 = 4 * $Sigma;\n $Sigma6 = 6 * $Sigma;\n $Sigma8 = 8 * $Sigma;\n\n $FootPointLatitudeTerm1 = $Sigma;\n $FootPointLatitudeTerm2 = ((3 * $n / 2) - (27 * $n3 / 32)) * sin($Sigma2);\n $FootPointLatitudeTerm3 = ((21 * $n2 / 16) - (55 * $n4 / 32)) * sin($Sigma4);\n $FootPointLatitudeTerm4 = (151 * $n3) * sin($Sigma6) / 96;\n $FootPointLatitudeTerm5 = 1097 * $n4 * sin($Sigma8) / 512;\n $FootPointLatitude = $FootPointLatitudeTerm1 + $FootPointLatitudeTerm2 + $FootPointLatitudeTerm3 + $FootPointLatitudeTerm4 + $FootPointLatitudeTerm5;\n\n $SinFootPointLatitude = sin($FootPointLatitude);\n $SecFootPointLatitude = 1 / cos($FootPointLatitude);\n\n $Rho = $SemiMajorAxis * (1 - $Eccentricity) / pow(1 - $Eccentricity * pow($SinFootPointLatitude, 2), 1.5);\n $Nu = $SemiMajorAxis / pow(1 - $Eccentricity * pow($SinFootPointLatitude, 2), 0.5);\n\n $x1 = $NewEScaled / $Nu;\n $x3 = pow($x1, 3);\n $x5 = pow($x1, 5);\n $x7 = pow($x1, 7);\n\n $t1 = tan($FootPointLatitude);\n $t2 = pow($t1, 2);\n $t4 = pow($t1, 4);\n $t6 = pow($t1, 6);\n\n $Psi1 = $Nu / $Rho;\n $Psi2 = pow($Psi1, 2);\n $Psi3 = pow($Psi1, 3);\n $Psi4 = pow($Psi1, 4);\n\n $LatitudeTerm1 = -(($t1 / ($CentralScaleFactor * $Rho)) * $x1 * $NewE / 2);\n $LatitudeTerm2 = ($t1 / ($CentralScaleFactor * $Rho)) * ($x3 * $NewE / 24) * (-4 * $Psi2 + 9 * $Psi1 * (1 - $t2) + 12 * $t2);\n $LatitudeTerm3 = -($t1 / ($CentralScaleFactor * $Rho)) * ($x5 * $NewE / 720) * (8 * $Psi4 * (11 - 24 * $t2) - 12 * $Psi3 * (21 - 71 * $t2) + 15 * $Psi2 * (15 - 98 * $t2 + 15 * $t4) + 180 * $Psi1 * (5 * $t2 - 3 * $t4) + 360 * $t4);\n $LatitudeTerm4 = ($t1 / ($CentralScaleFactor * $Rho)) * ($x7 * $NewE / 40320) * (1385 + 3633 * $t2 + 4095 * $t4 + 1575 * $t6);\n $LatitudeRadians = $FootPointLatitude + $LatitudeTerm1 + $LatitudeTerm2 + $LatitudeTerm3 + $LatitudeTerm4;\n $LatitudeDegrees = ($LatitudeRadians / PI()) * 180;\n\n $CentralMeridianDegrees = ($Zone * $ZoneWidthDegrees) + $LongitudeOfTheCentralMeridianOfZone1Degrees - $ZoneWidthDegrees;\n $CentralMeridianRadians = ($CentralMeridianDegrees / 180) * PI();\n $LongitudeTerm1 = $SecFootPointLatitude * $x1;\n $LongitudeTerm2 = -$SecFootPointLatitude * ($x3 / 6) * ($Psi1 + 2 * $t2);\n $LongitudeTerm3 = $SecFootPointLatitude * ($x5 / 120) * (-4 * $Psi3 * (1 - 6 * $t2) + $Psi2 * (9 - 68 * $t2) + 72 * $Psi1 * $t2 + 24 * $t4);\n $LongitudeTerm4 = -$SecFootPointLatitude * ($x7 / 5040) * (61 + 662 * $t2 + 1320 * $t4 + 720 * $t6);\n $LongitudeRadians = $CentralMeridianRadians + $LongitudeTerm1 + $LongitudeTerm2 + $LongitudeTerm3 + $LongitudeTerm4;\n $LongitudeDegrees = ($LongitudeRadians / PI()) * 180;\n\n $GridConvergenceTerm1 = -($x1 * $t1);\n $GridConvergenceTerm2 = ($t1 * $x3 / 3) * (-2 * $Psi2 + 3 * $Psi1 + $t2);\n $GridConvergenceTerm3 = -($t1 * $x5 / 15) * ($Psi4 * (11 - 24 * $t2) - 3 * $Psi3 * (8 - 23 * $t2) + 5 * $Psi2 * (3 - 14 * $t2) + 30 * $Psi1 * $t2 + 3 * $t4);\n $GridConvergenceTerm4 = ($t1 * $x7 / 315) * (17 + 77 * $t2 + 105 * $t4 + 45 * $t6);\n $GridConvergenceRadians = $GridConvergenceTerm1 + $GridConvergenceTerm2 + $GridConvergenceTerm3 + $GridConvergenceTerm4;\n $GridConvergenceDegrees = ($GridConvergenceRadians / PI()) * 180;\n\n $PointScaleFactor1 = pow($NewEScaled, 2) / ($Rho*$Nu);\n $PointScaleFactor2 = pow($PointScaleFactor1, 2);\n $PointScaleFactor3 = pow($PointScaleFactor1, 3);\n $PointScaleTerm1 = 1 + $PointScaleFactor1 / 2;\n $PointScaleTerm2 = ($PointScaleFactor2 / 24) * (4 * $Psi1 * (1 - 6 * $t2) - 3 * (1 - 16 * $t2) - 24 * $t2 / $Psi1);\n $PointScaleTerm3 = $PointScaleFactor3 / 720;\n $PointScale = $CentralScaleFactor * ($PointScaleTerm1 + $PointScaleTerm2 + $PointScaleTerm3);\n\n $Point[\"Latitude\"] = $LatitudeDegrees;\n $Point[\"Longitude\"] = $LongitudeDegrees;\n $Point[\"GridConvergence\"] = $GridConvergenceDegrees;\n $Point[\"PointScale\"] = $PointScale;\n\n return $Point;\n}", "public function lokasi()\n {\n //Query untuk mengambil semua data lokasi dengan diurutkan berdasarkan lokasi\n $query = $this->db->query(\"SELECT * FROM lokasi ORDER BY lokasi\");\n return $query;\n }", "public function getLaporan(){\n\t\t$this->db->from('transaksi');\n\t\t$this->db->join('tiket','tiket.id = transaksi.id', 'left');\n\t\treturn $this->db->get();\n }", "public function getLapTime()\n {\n \n }", "function formulaires_moderation_lieu_charger_dist($id_lieu)\n{\n\t$valeurs = array();\n\n\t$valeurs['id_lieu'] = $id_lieu;\n\n\t$row = sql_fetsel(\n\t\tarray('nom','ville','adresse','tel','email','site_web'),\n\t\tarray('spip_lieux'),\n\t\tarray('id_lieu = '.$valeurs['id_lieu'])\n\t\t);\n\n\t$valeurs['nom'] = $row['nom'];\n\t$valeurs['adresse'] = $row['adresse'];\n\t$valeurs['tel'] = $row['tel'];\n\t$valeurs['email'] = $row['email'];\n\t$valeurs['ville'] = $row['ville'];\n\t$valeurs['site_web'] = $row['site_web'];\n\n\treturn $valeurs;\n}", "public function lu() : LU\n {\n return LU::decompose($this);\n }", "public function getLenumero():int\n {\n return $this->lenumero;\n }", "function get_p2hp_lhp($ketua_tim) {\n return $this->db->select('*')\n ->from('tb_p2hp')\n //->join('tb_lhp', 'tb_lhp.fk_p2hp = tb_p2hp.id_p2hp')\n ->join('tb_penugasan', 'tb_penugasan.id_tugas = tb_p2hp.fk_tgs')\n ->join('tb_tim', 'tb_tim.id_tim = tb_penugasan.id_tim')\n ->where('ketua_tim', $ketua_tim)\n //->order_by('fk_pka', 'desc')\n ->get()->result();\n }", "public function getLng();", "public function getJarakSolusiIdeal()\n\t{\n\t\t$this->dPlus = $this->dMin = array();\n\t\t$this->getMatriksNormalisasiTerbobot();\n\t\t$this->getSolusiIdeal();\n\t\t//melakukan iterasi utk setiap alternatif\n\t\tforeach($this->matriksNormalisasiTerbobotY as $id_alternatif => $nilai){\n\t\t $this->dPlus[$id_alternatif] = 0;\n\t\t $this->dMin[$id_alternatif] = 0;\n\t\t //melakukan iterasi utk setiap kriteria\n\t\t foreach($nilai as $id_kriteria => $y){\n\t\t $this->dPlus[$id_alternatif] += pow($y-$this->aMax[$id_kriteria],2);\n\t\t $this->dMin[$id_alternatif] += pow($y-$this->aMin[$id_kriteria],2);\n\t\t }\n\t\t $this->dPlus[$id_alternatif] = sqrt($this->dPlus[$id_alternatif]);\n\t\t $this->dMin[$id_alternatif] = sqrt($this->dMin[$id_alternatif]);\n\t\t}\n\t}", "public function getSolusiIdeal()\n\t{\n\t\t$this->aMax = $this->aMin = array();\n\t\t$this->getNilaiTopKriteria();\n\t\t$this->getNilaiTopAlternatif();\n\t\t$this->getMatriksNormalisasiTerbobot();\n\t\t//melakukan iterasi utk setiap kriteria\n\t\tforeach($this->kriteria as $id_kriteria => $a_kriteria) {\n\t\t $this->aMax[$id_kriteria] = 0;\n\t\t $this->aMin[$id_kriteria] = 100;\n\t\t //melakukan iterasi utk setiap alternatif\n\t\t foreach($this->alternatif as $id_alternatif => $nilai){\n\t\t if($this->aMax[$id_kriteria] < $this->matriksNormalisasiTerbobotY[$id_alternatif][$id_kriteria]){\n\t\t $this->aMax[$id_kriteria] = $this->matriksNormalisasiTerbobotY[$id_alternatif][$id_kriteria];\n\t\t }\n\t\t if($this->aMin[$id_kriteria] > $this->matriksNormalisasiTerbobotY[$id_alternatif][$id_kriteria]){\n\t\t $this->aMin[$id_kriteria] = $this->matriksNormalisasiTerbobotY[$id_alternatif][$id_kriteria];\n\t\t }\n\t\t }\n\t\t} \n\t}", "public function rgveda_verse_modern($gra) {\n $data = [\n [1,191,1,1,191],\n [192,234,2,1,43],\n [235,295,3,1,62],\n [297,354,4,1,58],\n [355,441,5,1,87],\n [442,516,6,1,75],\n [517,620,7,1,104],\n [621,668,8,1,48],\n [1018,1028,8,59,59], //Vālakhilya hymns 1—11\n [669,712,8,60,103],\n [713,826,9,1,114],\n [827,1017,10,1,191]\n ];\n for($i=0;$i<count($data);$i++) {\n list($gra1,$gra2,$mandala,$hymn1,$hymn2) = $data[$i];\n if (($gra1 <= $gra) && ($gra<=$gra2)) {\n $hymn = $hymn1 + ($gra - $gra1);\n $x = \"$mandala.$hymn\";\n return $x;\n }\n }\n return \"?\"; // algorithm failed\n}", "function getAllLeaflets(){\n\t\t//$queryEbsLeaflets = db_select('ebs_leaflets_final_static', 'elf')\n\t\t$queryEbsLeaflets = db_select('ebs_leaflets_final', 'elf')\n\t\t->fields('elf');\n\t\t//->condition('leaflet_code', 'L16302');//Plastering\n\t\t//->range(0,10);\n\t\t$results = $queryEbsLeaflets->execute();\n\t\t//dsm($results->rowCount());\n\t\t\n\t\tforeach ($results as $row) :\n\t\t\t$this->leaflets[$row->leaflet_code] = $row;\n\t\tendforeach;\n\t\t\n\t}", "public function getLede(): string\n {\n return $this->lede;\n }", "function ermittle_Liganamen($liganr)\n{\n $liganame = 'unbekannt';\n //\n $single_land = Land::where('LandNr', '=', $liganr)\n ->first();\n //\n if ($single_land) {\n $liganame = $single_land->LandName;\n }\n //\n return $liganame;\n}", "public function getLvid();", "public function getGrafikLab()\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_lab = $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', 4)->get()->getResultArray();\n\n }elseif (($id_kat['tgl_mulai'] <= $tgl_skrg) && ($id_kat['tgl_akhir'] >= $tgl_skrg)){\n\n $grafik_lab = $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', 4)\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_lab = $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', 4)->get()->getResultArray();\n }\n\n $sangatBaik = 0;\n $baik = 0;\n $tidakBaik = 0;\n $sangatTidakBaik = 0;\n foreach ($grafik_lab 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 }", "public function getLaboral($id){\n $sql = \"SELECT * FROM datos_laborales WHERE Num_Control=?\";\n $consulta= $this->db->connect()->prepare($sql);\n $consulta->execute(array($id));\n\n return !empty($consulta) ? $fila = $consulta->fetch(PDO::FETCH_ASSOC) : false;\n }", "function calcLTV() {\n try {\n $results = $db->query(\"SELECT * FROM borrower_tbl WHERE id='\" . $borrowerId . \"';\" );\n } catch (Exception $e) {\n echo \"Could not connect to database!: \" . $e->getMessage();\n exit;\n }\n $borrower = $results->fetchAll(PDO::FETCH_ASSOC);\n \n }", "function getLibellEcriture($id_libel_ecriture) { //Renvoie le libellé dun ecriture/op divers\n\tglobal $dbHandler,$global_id_agence;\n\t$db = $dbHandler->openConnection();\n\n\t$sql=\"SELECT traduction from ad_traductions where id_str = $id_libel_ecriture ;\";\n\t\n\t$result = $db->query($sql);\n\tif (DB :: isError($result)) {\n\t\t$dbHandler->closeConnection(false);\n\t\tsignalErreur(__FILE__, __LINE__, __FUNCTION__, $result->getMessage());\n\t}\n\t$dbHandler->closeConnection(true);\n\t$retour = $result->fetchrow();\n\treturn $retour[0];\n}", "public function getDirectriz()\n {\n $dir = false;\n if (self::getCod() === '110000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '120000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '210000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '220000') $dir='Ciencias Experimentales';\n if (self::getCod() === '230000') $dir='Ciencias Experimentales';\n if (self::getCod() === '240000') $dir='Ciencias de la Salud';\n if (self::getCod() === '250000') $dir='Ciencias Experimentales';\n if (self::getCod() === '310000') $dir='Ciencias Experimentales';\n if (self::getCod() === '320000') $dir='Ciencias de la Salud';\n if (self::getCod() === '330000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '510000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '520000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '530000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '540000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '550000') $dir='Humanidades';\n if (self::getCod() === '560000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '570000') $dir='Humanidades';\n if (self::getCod() === '580000') $dir='Humanidades';\n if (self::getCod() === '590000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '610000') $dir='Ciencias de la Salud';\n if (self::getCod() === '620000') $dir='Humanidades';\n if (self::getCod() === '630000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '710000') $dir='Humanidades';\n if (self::getCod() === '720000') $dir='Humanidades';\n return $dir;\n }", "public function getDias90()\n {\n return $this->dias90;\n }", "public function getPvL()\n {\n return $this->pv_l;\n }", "function obtenerFolleto($edicion){\n\t\t$concurso = new Concurso();\n\t\t$res = $concurso->recuperar($edicion);\n\t\treturn $res['folleto'];\n\t}", "function calculerSurfaceMurs ($largeur, $longueur, $hauteur)\n {\n // $surface = ($largeur * $hauteur + $longueur * $hauteur) * 2;\n $surface = 2 * $hauteur * ($largeur + $longueur);\n\n return $surface; \n }", "function ler($nome) {\n $x = 1;\n\t while($x < $this->bd[0][0] && !$this->str_igual($nome, $this->bd[$x][2])) {$x++;}\n if($x >= $this->bd[0][0]) {return 0;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\nreturn 1;\n }", "public function getLat();", "function getLname() {\n return $this->lname;\n }", "function convertSolar2Lunar($dd, $mm, $yy, $timeZone) {\n\t\t$dayNumber = $this->jdFromDate($dd, $mm, $yy);\n\t\t$k = $this->INT(($dayNumber - 2415021.076998695) / 29.530588853);\n\t\t$monthStart = $this->getNewMoonDay($k+1, $timeZone);\n\t\tif ($monthStart > $dayNumber) {\n\t\t\t$monthStart = $this->getNewMoonDay($k, $timeZone);\n\t\t}\n\t\t$a11 = $this->getLunarMonth11($yy, $timeZone);\n\t\t$b11 = $a11;\n\t\tif ($a11 >= $monthStart) {\n\t\t\t$lunarYear = $yy;\n\t\t\t$a11 = $this->getLunarMonth11($yy-1, $timeZone);\n\t\t} else {\n\t\t\t$lunarYear = $yy+1;\n\t\t\t$b11 = $this->getLunarMonth11($yy+1, $timeZone);\n\t\t}\n\t\t$lunarDay = $dayNumber - $monthStart + 1;\n\t\t$diff = $this->INT(($monthStart - $a11)/29);\n\t\t$lunarLeap = 0;\n\t\t$lunarMonth = $diff + 11;\n\t\tif ($b11 - $a11 > 365) {\n\t\t\t$leapMonthDiff = $this->getLeapMonthOffset($a11, $timeZone);\n\t\t\tif ($diff >= $leapMonthDiff) {\n\t\t\t\t$lunarMonth = $diff + 10;\n\t\t\t\tif ($diff == $leapMonthDiff) {\n\t\t\t\t\t$lunarLeap = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($lunarMonth > 12) {\n\t\t\t$lunarMonth = $lunarMonth - 12;\n\t\t}\n\t\tif ($lunarMonth >= 11 && $diff < 4) {\n\t\t\t$lunarYear -= 1;\n\t\t}\n\t\treturn array($lunarDay, $lunarMonth, $lunarYear, $lunarLeap);\n\t}", "public function getSolde()\n {\n return $this->solde;\n }", "public function getLophp()\n {\n return $this->hasOne(TblLophocphan::className(), ['lophp_id' => 'lophp_id']);\n }", "function valore_totale_lordo_mio_ordine($id_ordine,$id_user){\r\n return (float)valore_costi_totali($id_ordine,$id_user)+\r\n valore_arrivato_netto_ordine_user($id_ordine,$id_user);\r\n}", "public function getAl()\n {\n return $this->al;\n }", "public function getLon()\n {\n $value = $this->get(self::LON);\n return $value === null ? (double)$value : $value;\n }", "function valorLlamada($tipo)\n{\n if ($tipo == \"internacional\")\n {\n return 2;\n }\n else if ($tipo == \"larga\")\n {\n return 0.75;\n }\n\n return 0.2; // corta\n}", "public function plaEnr($id){\n \n $requete = $this->db->query(\"SELECT * FROM PlanningRestauration where pla_id= ?\", $id);\n $enrPla = $requete->row();\n return $enrPla; \n }", "public function lu() {\n $ipiv = vector::factory($this->col, vector::INT);\n $ar = $this->copyMatrix();\n $lp = core\\lapack::sgetrf($ar, $ipiv);\n if ($lp != 0) {\n return null;\n }\n $l = self::factory($this->col, $this->col);\n $u = self::factory($this->col, $this->col);\n $p = self::factory($this->col, $this->col);\n for ($i = 0; $i < $this->col; ++$i) {\n for ($j = 0; $j < $i; ++$j) {\n $l->data[$i * $this->col + $j] = $ar->data[$i * $this->col + $j];\n }\n $l->data[$i * $this->col + $i] = 1.0;\n for ($j = $i + 1; $j < $this->col; ++$j) {\n $l->data[$i * $this->col + $j] = 0.0;\n }\n }\n for ($i = 0; $i < $this->col; ++$i) {\n for ($j = 0; $j < $i; ++$j) {\n $u->data[$i * $this->col + $j] = 0.0;\n }\n for ($j = $i; $j < $this->col; ++$j) {\n $u->data[$i * $this->col + $j] = $ar->data[$i * $this->col + $j];\n }\n }\n for ($i = 0; $i < $this->col; ++$i) {\n for ($j = 0; $j < $this->col; ++$j) {\n if ($j == $ipiv->data[$i] - 1) {\n $p->data[$i * $this->col + $j] = 1;\n } else {\n $p->data[$i * $this->col + $j] = 0;\n }\n }\n }\n unset($ar);\n unset($ipiv);\n return (object) ['l' => $l, 'u' => $u, 'p' => $p];\n }", "function llenar_detalle_egreso($id_com){\n\t$sql = \"SELECT \n\tprosic_detalle_comprobante.id_comprobante\n\t, prosic_detalle_comprobante.tipo_digito\n\t, prosic_detalle_comprobante.id_plan_contable\n\t, prosic_plan_contable.cuenta_plan_contable\n\t, prosic_detalle_comprobante.cargar_abonar\n\t, prosic_detalle_comprobante.importe_soles\n\t, prosic_detalle_comprobante.importe_dolares\n\t, prosic_detalle_comprobante.id_anexo\n\t, prosic_anexo.codigo_anexo\n\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t, prosic_tipo_comprobante.codigo_tipo_comprobante\n\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t, prosic_detalle_comprobante.id_moneda\n\t, prosic_moneda.codigo_moneda\n\t, prosic_comprobante.cuenta_costo\n\t, prosic_comprobante.detalle_comprobante\n\t, prosic_detalle_comprobante.ser_doc_comprobante\n\tFROM prosic_detalle_comprobante\n\tINNER JOIN prosic_comprobante ON ( prosic_detalle_comprobante.id_comprobante = prosic_comprobante.id_comprobante )\n\tINNER JOIN prosic_plan_contable ON ( prosic_detalle_comprobante.id_plan_contable = prosic_plan_contable.id_plan_contable)\n\tINNER JOIN prosic_anexo ON (prosic_detalle_comprobante.id_anexo = prosic_anexo.id_anexo )\n\tINNER JOIN prosic_tipo_comprobante ON (prosic_detalle_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante )\n\tINNER JOIN prosic_moneda ON (prosic_detalle_comprobante.id_moneda = prosic_moneda.id_moneda )\n\tWHERE prosic_detalle_comprobante.tipo_digito ='D'\n\t AND prosic_comprobante.id_comprobante= \" . $id_com .\" \";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n}", "function instational( $daerah = null ){\n\t\t$luas \t\t= array();\n\t\t$anggaran \t= array();\n\t\tif ( $daerah ) {\n\t\t\t$_luas \t\t= APL::where( 'kawasan', $daerah )->select('luas_terkena_tol')->get()->toArray();\n\t\t\t$_anggaran \t= APL::where( 'kawasan', $daerah )->select('nilai_pergantian', 'nilai_ganti_bangunan', 'nilai_ganti_tanaman')->get()->toArray();\n\t\t} else {\n\t\t\t$_luas \t\t= APL::select('luas_terkena_tol')->get()->toArray();\n\t\t\t$_anggaran \t= APL::select('nilai_pergantian', 'nilai_ganti_bangunan', 'nilai_ganti_tanaman')->get()->toArray();\n\t\t}\n\t\tforeach ($_luas as $key => $value) {\n\t\t\tarray_push($luas, $value['luas_terkena_tol']);\n\t\t}\n\t\tforeach ($_anggaran as $key => $value) {\n\t\t\tarray_push($anggaran, $value['nilai_pergantian']);\n\t\t\tarray_push($anggaran, $value['nilai_ganti_bangunan']);\n\t\t\tarray_push($anggaran, $value['nilai_ganti_tanaman']);\n\t\t}\n\t\t$data['bidang'] \t= count($_luas);\n\t\t$data['luas'] \t \t= array_sum($luas);\n\t\t$data['anggaran'] \t= array_sum( $anggaran );\n\t\t\n\n\t\treturn $data;\n\t}" ]
[ "0.70584977", "0.6799759", "0.66674876", "0.65859014", "0.6303838", "0.6224364", "0.6123918", "0.6108865", "0.6108251", "0.6076893", "0.60157454", "0.59949976", "0.5954993", "0.5917703", "0.587068", "0.58685327", "0.5843283", "0.58107716", "0.5809636", "0.57901084", "0.5784862", "0.57434785", "0.5722442", "0.5697119", "0.5676474", "0.56100124", "0.55983216", "0.5598168", "0.5595852", "0.5592216", "0.5549889", "0.5536819", "0.55329806", "0.553262", "0.5522914", "0.55228055", "0.5496005", "0.5494803", "0.5482174", "0.54757243", "0.5470647", "0.54660845", "0.54624724", "0.5455091", "0.5410943", "0.5398797", "0.5387822", "0.5382116", "0.53799134", "0.53684545", "0.5359915", "0.5350018", "0.53488964", "0.533858", "0.5334299", "0.5332377", "0.53285056", "0.53187215", "0.53115726", "0.5303554", "0.5297549", "0.52961403", "0.5293206", "0.5277496", "0.527633", "0.52748775", "0.52694744", "0.52575654", "0.52538335", "0.52412367", "0.52317727", "0.52265346", "0.52254397", "0.5208292", "0.52029705", "0.51935655", "0.5193554", "0.51913154", "0.5190918", "0.51885384", "0.51876223", "0.5177139", "0.5170601", "0.51693296", "0.5168604", "0.516749", "0.515665", "0.5147635", "0.5145731", "0.51417667", "0.5140374", "0.5140009", "0.5136829", "0.5135809", "0.5132338", "0.51296", "0.51235914", "0.51055735", "0.5103822", "0.50989026", "0.5097656" ]
0.0
-1
return the next set of contacts by $itemsPerPage, for future use,
public function next() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function next()\n\t{\n\t\t$pageSize = count($this->_items);\n\t\t$this->_currentIndex++;\n\t\tif ($this->_currentIndex >= $pageSize) {\n\t\t\t$this->_currentPage++;\n\t\t\t$this->_currentIndex = 0;\n\t\t\t$this->loadPage();\n\t\t}\n\t}", "public function next() { \n\t\t$page = &$this->touchPage();\n\t\t\n\t\tnext($page);\n\t\t\n\t\tif(key($page) === null && count($page) == $this->booksPerPage) {\n\t\t\t$this->currentPage++;\n\t\t\t$page = &$this->touchPage();\n\t\t\treset($page);\n\t\t}\n\t\t\n\t\treturn current($page);\n\t}", "public function next()\n {\n // If the current element is the last element, return null\n if ($this->current === ($this->count() - 1)) {\n $this->current = null;\n\n return;\n }\n\n // If the next element is greater than the result count, and this is the last page, return null\n if (($this->current + 1) > count($this->results) && (($this->page + 1) > $this->pages)) {\n $this->current = null;\n\n return;\n }\n\n // Advance to the next page\n $this->request->getQuery()->set(\"page\", ++$this->page);\n\n // Retrieve the next page\n $response = $this->request->send()->json();\n\n // Append the results to the results array\n $this->results = array_merge($this->results, $response[\"results\"]);\n\n // Advance to the next element\n $this->current++;\n\n return;\n }", "public function getItemsPerPage();", "public function getItemsPerPage();", "public function getNextPage();", "function get_next_item($item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n return $item->next();\n}", "public function search_next () {\r\n\t\tif (!empty($this->next_search)) {\r\n\t\t\t$res = $this->curl_http_get_json(sprintf('%s&client_id=%s', $this->next_search, $this->client_id));\r\n\t\t\t$this->next_search = array_key_exists('next_href', $res) ? $res['next_href'] : null;\r\n\t\t\treturn $res['collection'];\r\n\t\t} else {\r\n\t\t\treturn [];\r\n\t\t}\r\n\t}", "public function getNextPage(){\r\n\t\t$page=$this->_vars['current_page'];\r\n\t\t$total=$this->_vars['total_pages'];\r\n\t\tif($this->_vars['current_offset']+$this->_vars['items_per_page']>=$this->_vars['total_items']) return false;\r\n\t\treturn $page>=$total?false:$page+1;\r\n\t}", "public function NextOf($item)\n {\n return PageContent::Schema()->ByPrevious($item);\n }", "public function next()\n {\n $pageSize = $this->getDataProvider()->getPagination()->pageSize;\n $this->currentIndex++;\n if ($this->currentIndex >= $pageSize) {\n $this->currentPage++;\n $this->currentIndex = 0;\n $this->loadPage();\n }\n }", "public function next(){\n return next($this->items);\n }", "public function next(){\n return next($this->items);\n }", "public function next() {\n\t\t$this->firstItemIdx++;\n\n\t\tif(isset($this->firstItems[$this->firstItemIdx])) {\n\t\t\treturn $this->firstItems[$this->firstItemIdx][1];\n\t\t} else {\n\t\t\tif(!isset($this->firstItems[$this->firstItemIdx-1])) {\n\t\t\t\t$this->items->next();\n\t\t\t}\n\n\t\t\tif($this->excludedItems) {\n\t\t\t\twhile(($c = $this->items->current()) && in_array($c->{$this->keyField}, $this->excludedItems, true)) {\n\t\t\t\t\t$this->items->next();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(!$this->items->valid()) {\n\t\t\t// iterator has passed the preface items, off the end of the items\n\t\t\t// list. Track through the end items to go through to the next\n\t\t\tif($this->endItemIdx === null) {\n\t\t\t\t$this->endItemIdx = -1;\n\t\t\t}\n\n\t\t\t$this->endItemIdx++;\n\n\t\t\tif(isset($this->lastItems[$this->endItemIdx])) {\n\t\t\t\treturn $this->lastItems[$this->endItemIdx];\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t}", "public function next(): void\n {\n if (!\\next($this->responseData->_embedded->items) && $this->fetchMore) {\n if ($this->getPage() < $this->getPages()) {\n $this->responseData = $this->client->requestLink($this->getLinks()->next->href);\n $this->rewind();\n }\n }\n }", "public function paginate($items = 5)\n\t{\n\t\treturn $this->model->paginate($items);\n\t}", "private function paginate()\n\t{\n\t\tif ($this->_listModel) {\n\t\t\t$this->_listModel->loadNextPage();\n\t\t}\n\t}", "abstract protected function fetchNextPage(): ?int;", "#[\\ReturnTypeWillChange]\n public function next()\n {\n $this->index++;\n return next($this->items);\n }", "public function next(): static\n {\n $link = Arr::get($this->links, 'next');\n\n throw_unless($link, NoNextPageException::class);\n\n return $this->getResults($link);\n }", "public function getNextRow() {\n $next_call_count = $this->currentPage * $this->pagination;\n if ($this->currentCount == $this->totalCount) {\n return NULL;\n }\n if ($this->currentCount == $next_call_count && $next_call_count < $this->totalCount) {\n $start = $this->currentPage * $this->pagination;\n if ($str = elis_consumer_http_request($this->url_pattern . '&rows=' . $this->pagination . '&start=' . $start, array('Accept' => 'application/json'))) {\n if ($json = json_decode($str)) {\n $this->data = $json->response->docs;\n $this->currentPage++;\n }\n }\n }\n // TODO Messages in case of empty data / failed call etc.\n $item = NULL;\n if (count($this->data)) {\n $item = current($this->data);\n next($this->data);\n $this->currentCount++;\n }\n return $item;\n }", "public function next()\n {\n next($this->_items);\n }", "protected function itemPaging()\n {\n $controller_class_namespace = $this->controller_namespace;\n $controller = new $controller_class_namespace();\n $controller->getModelRegistry(\n $this->get('model_type', 'datasource'),\n $this->get('model_name', '', 'runtime_data'),\n 1\n );\n\n $controller->set('get_customfields', 0);\n $controller->set('use_special_joins', 0);\n $controller->set('process_events', 0);\n $controller->set('get_item_children', 0);\n\n $controller->select(\n 'a'\n . '.'\n . $controller->get('primary_key', 'id')\n );\n\n $controller->select(\n 'a'\n . '.'\n . $controller->get('name_key', 'title')\n );\n\n $controller->where(\n 'a'\n . '.' . $controller->get('primary_key', 'id')\n . ' = '\n . (int)$this->runtime_data->catalog->source_id\n );\n\n//@todo ordering\n $item = $this->runQuery();\n\n $model_registry_name = ucfirst(strtolower($this->get('model_name', '', 'runtime_data')))\n . ucfirst(strtolower($this->get('model_type', 'datasource')));\n\n if ($item === false || count($item) === 0) {\n return $this;\n }\n }", "public function nextPage()\n\t{\n\t\t$this->_currentPage++;\n\n\t\tif ($this->_currentPage >= $this->count()) {\n\t\t\t$this->_currentPage = 0;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function paginate($currentPage = 1, $itemPerPage = 15)\n {\n try {\n $limit = ($itemPerPage != \"NULL\") ? $itemPerPage : 15;\n $currentPage = ($currentPage != \"NULL\" && $currentPage != NULL) ? $currentPage : 1;\n $offset = ($currentPage - 1) * $limit;\n // Count Total\n $count = $this->count();\n\n // Prep\n $this->sqlStatement = $this->sqlStatement .= \" LIMIT $limit OFFSET $offset\";\n if($this->visible) {\n $visibleStatement = implode(\",\", $this->visible);\n $this->sqlStatement = str_replace(\"*\", $visibleStatement, $this->sqlStatement);\n }\n $statement = $this->db->prepare($this->sqlStatement);\n\n $statement->execute();\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n\n $results = $statement->fetchAll();\n $hasNextPage = ((count($results) * $currentPage) < $count ) ? true : false;\n\n return [\n 'data' => $results,\n 'size' => count($results),\n 'total' => $count,\n 'currentPage' => (int) $currentPage,\n 'hasNextPage' => $hasNextPage\n ];\n\n } catch(PDOException $e) {\n return $e;\n }\n }", "public function getFirstPage();", "function register_block_core_query_pagination_next()\n {\n }", "function register_block_core_comments_pagination_next()\n {\n }", "public function next() {\n $this->elementsObtained++;\n $lastElement = $this->current();\n try {\n // DEBUG: Comment In\n //if ($this->elementsObtained > 5 && $this->first)\n // throw new MongoDB\\Driver\\Exception\\RuntimeException(\"cursor id exception simulation\");\n // DEBUG: Comment In\n // We just try to get the next element\n $this->iterator->next();\n } catch (MongoDB\\Driver\\Exception\\RuntimeException $e) {\n if (strpos($e->getMessage(), \"cursor id\") !== FALSE) {\n // cursor id not found exception, let's mitigate\n $options = array();\n // no skip; we already skipped everything in the first iterator\n // limit if we have a limit; we adjust it with the elements obtained\n if ($this->originalLimit !== NULL)\n $options[\"limit\"] = $this->originalLimit - $this->elementsObtained;\n // sort we keep\n if ($this->originalSort !== NULL)\n $options[\"sort\"] = $this->originalSort;\n // Adjust the query so we start after the last obtained element\n $query = $this->queryAfterElement($this->query, $lastElement, $this->originalSort);\n // DEBUG: Comment In\n //var_dump($query);\n // DEBUG: Comment In\n $this->iterator = new IteratorIterator($this->collection->find($query, $options));\n $this->iterator->rewind();\n // We don't call next on the new iterator because it already \"has\" the first element\n // not first anymore\n $this->first = FALSE;\n } else {\n // something else; let's throw this right back at the caller\n throw $e;\n }\n }\n }", "public function nextPageUrl()\n {\n $this->resetQuery();\n\n if ($this->items->count() == $this->perPage()) {\n $this->appends('start', session()->get('accountant.api.start'));\n\n return $this->url($this->currentPage() + 1);\n }\n }", "public function getNextPageNumber(): int;", "public function next($id,$key=''){\n $this->page = $id;\n \n $this->page += 1;\n \n return $this->page;\n }", "function nextPage() {\n\t\treturn $this->hasNextPage() ? $this->url(array('p' => $this->p + 1)) : null;\n\t}", "function paginator($data = [], $row_counts, $items_per_page = 10, $current_page = 1){\n\n\t$paginationCtrls = '';\n\n\t$last_page = ceil($row_counts/$items_per_page);\n\t$last_page = ($last_page < 1) ? 1 : $last_page;\n\n\t$current_page = preg_replace('/[^0-9]/', '', $current_page);\n\tif ( $current_page < 1 ) {\n\t\t$current_page = 1;\n\t}elseif ( $current_page > $last_page ) {\n\t\t$current_page = $last_page;\n\t}\n\t$limit_from = ($current_page - 1) * $items_per_page;\n\t$limit_to = $items_per_page;\n\n\t$result = array_slice($data, $limit_from, $limit_to);\n\n\t// Start first if\n\tif ( $last_page != 1 )\n\t{\n\t\t// Start second if\n\t\tif ( $current_page > 1 )\n\t\t{\n\t\t\t$previous = $current_page -1;\n\t\t\t$paginationCtrls .= '<a href=\"'. $_SERVER['PHP_SELF']. '?page='. $previous .'\">Previous</a> &nbsp;&nbsp;';\n\n\t\t\tfor($i=$current_page-4; $i < $current_page; $i++){\n\t\t\t\n\t\t\t\tif( $i > 0 ){\n\t\t\t\t\t$paginationCtrls .= '<a href=\"'. $_SERVER['PHP_SELF'] .'?page=' .$i. '\">'.$i.'</a> &nbsp;&nbsp; ';\n\t\t\t\t}\n\t\t\t}\n\t\t} // End second if\n\n\t\t$paginationCtrls .= ''.$current_page. ' &nbsp; ';\n\n\t\t\n\t\tfor($i=$current_page+1; $i <= $last_page ; $i++){\n\t\t\t$paginationCtrls .= '<a href=\"'. $_SERVER['PHP_SELF'] .'?page=' .$i. '\">'.$i.'</a> &nbsp;&nbsp; ';\n\t\t\t\n\t\t\tif( $i >= $current_page+4 ){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\n\n\n\t\tif( $current_page != $last_page ){\n\n\t\t\t$next = $current_page + 1;\n\t\t\t$paginationCtrls .= '&nbsp;&nbsp; <a href=\"'. $_SERVER['PHP_SELF'] .'?page=' .$next. '\">Next</a> &nbsp;&nbsp; ';\n\t\t}\n\t}\n\t// End first if\n\n\t// dd( ['last page => '.$last_page, 'current page => '.$current_page, 'limit => '.$limit_from] );\n\n\treturn ['result' => $result, 'links' => $paginationCtrls];\n}", "public function setNextPage($nextPage);", "protected function paginate()\n {\n if ($this->currentItem == $this->pagerfanta->getMaxPerPage() and $this->pagerfanta->hasNextPage()) {\n $this->pagerfanta->setCurrentPage($this->pagerfanta->getNextPage());\n $this->loadData();\n }\n }", "public function setItemsPerPage($items);", "function paginate($items, $perPage = 2, $page = null, $options = [])\n {\n $page = $page ?: (Paginator::resolveCurrentPage() ?: 1);\n\n // trasformo array in collection per poterla inpaginare\n $items = $items instanceof Collection ? $items : Collection::make($items);\n //\n\n return new LengthAwarePaginator($items->forPage($page, $perPage), $items->count(), $perPage, $page, $options);\n }", "public function next()\n {\n return $this->pager->next();\n }", "public function next(): void {\n next($this->items);\n }", "#[\\ReturnTypeWillChange]\n public function next()\n {\n return next($this->_items);\n }", "private function getPaginatedResource(&$i = 0, $pageFrom = 1, $perPage = 10, $totalItems = 400)\n {\n $i += $perPage;\n\n $resource = $this\n ->getMockBuilder(HalResource::class)\n ->disableOriginalConstructor()\n ->setMethods(['getLink'])\n ->getMock();\n\n $link = $this\n ->getMockBuilder(HalLink::class)\n ->disableOriginalConstructor()\n ->setMethods(['get'])\n ->getMock();\n\n $link\n ->expects($this->once())\n ->method('get')\n ->willReturn(\n $i < $totalItems ? $this->getPaginatedResource($i, $pageFrom, $perPage) : null\n );\n\n $resource\n ->expects($this->once())\n ->method('getLink')\n ->with('next')\n ->willReturn($link);\n\n return $resource;\n }", "public function getNext() {\n\t\treturn $this->pagefiles->getNext($this); \n\t}", "public function getPaginated();", "function MyMod_Paging_Page_No_2_Item_Nos()\n {\n if ($this->NumberOfItems>$this->NItemsPerPage)\n {\n if ($this->MyMod_Paging_Active_ID && $this->MyMod_Paging_Active_ID>0)\n {\n $this->FirstItemNo=0;\n foreach ($items as $id => $item)\n {\n if ($item[ \"ID\" ]==$this->MyMod_Paging_Active_ID)\n {\n $this->FirstItemNo=$id;\n $this->OffSet=$this->NumberOfItems;\n }\n }\n }\n else\n {\n if ($this->MyMod_Paging_No==0)\n {\n $this->FirstItemNo=0;\n $this->OffSet=$this->NumberOfItems;\n }\n elseif\n (\n preg_match('/\\d+/',$this->MyMod_Paging_No)\n &&\n $this->MyMod_Paging_No>0\n )\n {\n $res=$this->NItemsPerPage % $this->NumberOfItems;\n\n $this->FirstItemNo=($this->MyMod_Paging_No-1)*$this->NItemsPerPage;\n $this->OffSet=$res;\n }\n else\n {\n $this->FirstItemNo=0;\n $this->OffSet=0;\n }\n }\n }\n else\n {\n $this->FirstItemNo=0;\n $this->OffSet=$this->NumberOfItems;\n }\n\n $this->LastItemNo=$this->FirstItemNo+$this->OffSet;\n }", "public function setItemsPerPage($itemsPerPage)\n\t{\n\t\tif (!$itemsPerPage)\n\t\t{\n\t\t\t$itemsPerPage = 10;\n\t\t}\n\t\t$this->itemsPerPage = $itemsPerPage;\n\t\treturn $this;\n\t}", "protected function checkForMorePages()\n {\n $this->hasMore = $this->items->count() > $this->limit;\n\n $this->items = $this->items->slice(0, $this->limit);\n }", "public function next() : void\n {\n $this->currentRecordPos++;\n if ($this->currentRecordPos > $this->maxPageRecord) {\n $this->page($this->currentPagePos+1);\n }\n }", "public function getPerPage();", "public function next($search=null){\n\t\treturn $this->look_on_same_row(\"next\",$search);\n\t}", "protected function getNextItems() {\n\t\ttry {\n\t\t\t$criteria = array(\n\t\t\t\t'next_attempt_time' => array('$lt' => new \\MongoDate()),\n\t\t\t\t'is_processing' => false,\n\t\t\t\t'is_catch_all' => false,\n\t\t\t\t'disposition' => \\Flux\\LeadSplit::DISPOSITION_UNFULFILLED,\n\t\t\t\t'attempt_count' => array('$lte' => 5),\n\t\t\t\t'__pid_fulfill' => array('$exists' => false)\n\t\t\t);\n\t\t\t/* @var $_queue \\Flux\\LeadSplit */\n\t\t\tself::$_queue->setIgnorePagination(false);\n\t\t\tself::$_queue->setItemsPerPage(self::WINDOW_SIZE);\n\t\t\t$queue_documents = self::$_queue->queryAll($criteria, array('_id' => true), false);\n\t\t\t$id_array = array();\n\t\t\tforeach ($queue_documents as $queue_document) {\n\t\t\t\t$id_array[] = $queue_document['_id'];\n\t\t\t}\n\t\t\t// Flag the items with the current pid, so we can pull the out later\n\t\t\tself::$_queue->updateMultiple(array('_id' => array('$in' => $id_array)),\n\t\t\t\tarray('$set' => array(\n\t\t\t\t\t'__pid_fulfill' => $this->pid,\n\t\t\t\t\t'__pid_fulfill_time' => new \\MongoDate(),\n\t\t\t\t\t'last_process_time' => new \\MongoDate(),\n\t\t\t\t\t'expire_at' => new \\MongoDate(strtotime('now + 1 hour')),\n\t\t\t\t\t'is_processed' => true\n\t\t\t\t)),\n\t\t\t\tarray('multiple' => true, 'upsert' => false)\n\t\t\t);\n\n\t\t\t// Now requery the rows that have the correct pid set\n\t\t\tself::$_queue->setIgnorePagination(true);\n\t\t\t$queue_documents = self::$_queue->queryAll(array('__pid_fulfill' => $this->pid));\n\t\t\treturn $queue_documents;\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->log($e->getMessage(), array($this->pid));\n\t\t\treturn array();\n\t\t}\n\t\treturn array();\n\t}", "public function getPaginate ($p_rowsPerPage, $p_currentPage);", "public function firstItem();", "function get_nextitemrecno($itemID, $nextorprev, $debug = false) {\n\t\t$q = (new QueryBuilder())->table('itemsearch');\n\t\t$expression = $nextorprev == 'next' ? \"MAX(recno) + 1\" : \"MIN(recno) - 1\";\n\t\t$q->field($q->expr($expression));\n\t\t$q->where('itemid', $itemID);\n\t\t$sql = DplusWire::wire('database')->prepare($q->render());\n\n\t\tif ($debug) {\n\t\t\treturn $q->generate_sqlquery($q->params);\n\t\t} else {\n\t\t\t$sql->execute($q->params);\n\t\t\treturn $sql->fetchColumn();\n\t\t}\n\t}", "public function GetByPaginated($offset, $limit);", "public function nextPage($params = null, $opts = null)\n {\n if (!$this->has_more) {\n return static::emptySearchResult($opts);\n }\n\n $params = \\array_merge(\n $this->filters ?: [],\n ['page' => $this->next_page],\n $params ?: []\n );\n\n return $this->all($params, $opts);\n }", "private function next() {\n if ($this->currentPage < $this->totalPage) {\n print '<li><a href=\"' . $this->url . '&page=' . ($this->currentPage + 1) . '\">&gt;</a></li>';\n }\n }", "public function nextPage()\n {\n return $this->currentPage + 1;\n }", "function getPagingfront($refUrl, $aryOpts, $pgCnt, $curPg) {\n $return = '';\n $return.='<div class=\"pagination\"><ul>';\n if ($curPg > 1) {\n $aryOpts['pg'] = 1;\n $return.='<li class=\"prev\"><a href=\"' . $refUrl . getQueryString($aryOpts) . '\">First</a></li>';\n\n $aryOpts['pg'] = $curPg - 1;\n $return.='<li class=\"prev\"><a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Prev</a></li>';\n }\n for ($i = 1; $i <= $pgCnt; $i++) {\n $aryOpts['pg'] = $i;\n $return.='<li><a href=\"' . $refUrl . getQueryString($aryOpts) . '\" class=\"graybutton pagelink';\n if ($curPg == $i)\n $return.=' active';\n $return.='\" >' . $i . '</a></li>';\n }\n if ($curPg < $pgCnt) {\n $aryOpts['pg'] = $curPg + 1;\n $return.='<li class=\"prev\"><a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Next</a></li>';\n $aryOpts['pg'] = $pgCnt;\n $return.='<li class=\"prev\"><a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Last</a></li>';\n }\n $return.='</ul></div>';\n return $return;\n}", "function getPagedStatement($sql,$page,$items_per_page);", "public function indexAction($currentPage = NULL) {\n\t\t// TS Config transformed to shorter variable\n\t\t$indexSettings = $this->settings['controllers']['Contact']['actions']['index'];\n\t\t$limit = (integer)$indexSettings['maxItems']; // used to fetch this count of addresses from the database with a given offset (example: 0,5)\n\t\t$offset = $currentPage ? $limit*$currentPage : 0;\n\t\t\n\t\t$data = Array(); // used to store the objects fetched from the repository\n\t\t$data = $this->contactRepository->findLimit($limit, $offset);\n\t\t$total = $this->contactRepository->findTotal();\n\n\t\t// \"EXT:\" shortcut replaced with the extension path\n\t\t$indexSettings['stylesheet'] = str_replace('EXT:', t3lib_extMgm::siteRelPath('addresses'), $indexSettings['stylesheet']);\n\n\t\t// Stylesheet\n\t\t $GLOBALS['TSFE']->getPageRenderer()->addCssFile($indexSettings['stylesheet']);\n\t\t\n\t\t// Hand the maxItems to the view (for use in the pagebrowser)\n\t\t$this->view->assign('maxItems', $limit); \n\t\t$this->view->assign('totalPages', $total); \n\t\t$this->view->assign('contacts', $data);\n\t\t\n\t}", "public function next()\r\n {\r\n if ($this->index < $this->aggregate->size()) {\r\n $this->index = $this->index+1;\r\n }\r\n }", "abstract public function getPaginate($premiereEntree, $messageTotal, $where);", "public function nextpage() {\n return $this->current_page + 1;\n }", "public function nextEnabled(int $page): string;", "public function findNext($limit = null)\n {\n if (null === $limit) {\n $limit = 3;\n }\n\n $today = new \\DateTime();\n\n $sql = sprintf(\n 'SELECT d.*, m.username as organizer_username, u.email as organizer_email, c.name as city_name,\n (%s) as participants_count\n FROM Drink d\n JOIN City c ON (d.city_id = c.id)\n LEFT JOIN Member m ON (d.member_id = m.id)\n LEFT JOIN User u ON (m.id = u.member_id)\n WHERE d.day >= \"%s\"\n ORDER BY day ASC\n LIMIT %s\n ',\n self::getCountParticipantsQuery(),\n $today->format('Y-m-d') ,\n $limit);\n\n return $this->db->fetchAll($sql);\n }", "function pagination(){}", "public function nextPage()\n {\n return $this->nextPage;\n }", "public function getNext()\n {\n return $this->hasNext() ? $this->curPage + 1 : null;\n }", "protected function searchItems(array $fields, array $options)\n {\n $firstPrev = $lastNext = false;\n if ($this->options['baseTableName']\n && \\Sys25\\RnBase\\Backend\\Utility\\TCA::getSortbyFieldForTable($this->options['baseTableName'])\n && ($options['limit'] || $options['offset'])\n ) {\n // normalize limit and offset values to int\n array_key_exists('offset', $options) ? $options['offset'] = (int) $options['offset'] : null;\n array_key_exists('limit', $options) ? $options['limit'] = (int) $options['limit'] : null;\n // wir haben ein offset und benötigen die beiden elemente element davor.\n if (!empty($options['offset'])) {\n $firstPrev = true;\n $downStep = $options['offset'] > 2 ? 2 : 1;\n $options['offset'] -= $downStep;\n // das limit um eins erhöhen um das negative offset zu korrigieren\n if (isset($options['limit'])) {\n $options['limit'] += $downStep;\n }\n }\n // wir haben ein limit und benötigen das element danach.\n if (!empty($options['limit'])) {\n $lastNext = true;\n ++$options['limit'];\n }\n }\n\n $items = $this->getService()->search($fields, $options);\n\n if ($firstPrev || $lastNext) {\n // @FIXME !!! That's only an workaround. An ArrayObject shoul be retain!\n $items = (array) $items;\n // das letzte entfernen, aber nur wenn genügend elemente im result sind\n if ($lastNext && count($items) >= $options['limit']) {\n $lastNext = array_pop($items);\n }\n // das erste entfernen, wenn der offset reduziert wurde.\n if ($firstPrev) {\n $firstPrev = array_shift($items);\n // das zweite entfernen, wenn der offset um 2 reduziert wurde\n if ($downStep > 1) {\n $secondPrev = array_shift($items);\n }\n }\n }\n\n // build uidmap\n $map = [];\n if ($firstPrev instanceof \\Sys25\\RnBase\\Domain\\Model\\RecordInterface) {\n $map[$firstPrev->getUid()] = [];\n }\n if ($secondPrev instanceof \\Sys25\\RnBase\\Domain\\Model\\RecordInterface) {\n $map[$secondPrev->getUid()] = [];\n }\n foreach ($items as $item) {\n $map[$item->getUid()] = [];\n }\n if ($lastNext instanceof \\Sys25\\RnBase\\Domain\\Model\\RecordInterface) {\n $map[$lastNext->getUid()] = [];\n }\n\n return [\n 'items' => $items,\n 'map' => $map,\n ];\n }", "public function paginateMentorshipSessions($items, $perPage = 10) {\n $currentPage = LengthAwarePaginator::resolveCurrentPage();\n $itemsCount = $items ? count($items) : 0;\n // FIX for searching with page number, when search has fetched less results\n // (fix: go to the first page!)\n if($currentPage > ceil($itemsCount / $perPage))\n $currentPage = \"1\";\n\n if (!empty($items)) {\n //Slice the collection to get the items to display in current page\n $currentPageItems = $items->slice(($currentPage - 1) * $perPage, $perPage);\n } else {\n $currentPageItems = new Collection();\n }\n\n //Create our paginator and pass it to the view\n return new LengthAwarePaginator($currentPageItems, $itemsCount, $perPage);\n }", "function SearchNext ( $cFieldExp )\n{\n return $this->Search_Data($this->_SQL_Where_('>',$this->KeyCurrList()),$cFieldExp);\n}", "abstract public function preparePagination();", "public function paginate_numbers($count_of_entries, $items_per_page, $current_page, $pages_to_show){\n\t\t\t$this->pages_array = array();\n\t\t\t\n\t\t\t$this->pages_to_show = $pages_to_show;\n\t\t\t$this->current_page = $current_page;\n\t\t\t\n\t\t\t//ceiling to round fraction up to nearest whole number - total number of pages also = last page number\n\t\t\t$this->total_pages = ceil($count_of_entries / $items_per_page);\n\t\t\t\n\t\t\t//if the total number of pages is fewer than the limit, return only those pages\n\t\t\tif ($this->total_pages < $pages_to_show){\n\t\t\t\tfor ($i=0; $i < $this->total_pages;$i++){\n\t\t\t\t\tarray_push($this->pages_array, ($i + 1));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse{\n\t\t\t\t//if the current page is less than the number of pages to show, then only show the first amount of pages to show\n\t\t\t\tif ($this->current_page < $pages_to_show){\n\t\t\t\t\tfor ($i=0; $i < $pages_to_show;$i++){\n\t\t\t\t\t\tarray_push($this->pages_array, ($i + 1));\n\t\t\t\t\t}\t\t\t\n\t\t\t\t}\n\n\t\t\t\t//if the current page is not in the first batch of pages:\n\t\t\t\telse {\n\n\t\t\t\t\tif ($this->total_pages - $this->current_page < $pages_to_show){\n\n\t\t\t\t\t\t//with x pages of the last page\n\t\t\t\t\t\t$setpage = $this->total_pages - $pages_to_show+1;\n\t\t\t\t\t\t$counter = $pages_to_show;\n\n\t\t\t\t\t\tfor ($i=0; $i < $counter; $i++){\n\t\t\t\t\t\t\tarray_push($this->pages_array, $setpage);\n\t\t\t\t\t\t\t$setpage++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//nowhere near the last page\n\t\t\t\t\t\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$setpage = $this->current_page - ($pages_to_show / 2);\n\t\t\t\t\t\tfor ($i=0; $i < $pages_to_show;$i++){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tarray_push($this->pages_array, $setpage);\n\t\t\t\t\t\t\t$setpage++;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t\n\t\t\t\n\n\t\t}", "public function next(): void\n {\n if (count($this->data) > 0) {\n array_shift($this->data);\n }\n ++$this->position;\n\n if ($this->position > $this->numberOfRecords()) {\n return;\n }\n\n if (count($this->data) == 0) {\n $this->fetchMore();\n }\n }", "public function next()\n {\n $this->curIndex++;\n if($this->curIndex >= count($this->res)){\n $this->MakeNextReq();\n }\n }", "public function getNext ()\n {\n return prev ( $this->_list ) ;\n }", "function paginate( $smarty, $itemVarName, $currentSortIndex, $currentSortDir, $mode ){\n require_once('lib/SmartyPaginate.class.php');\n\n SmartyPaginate::reset();\t/* Remove the old session data */\n SmartyPaginate::connect();\n SmartyPaginate::setLimit( 15 );\n\n $smarty->assign( $itemVarName, getPaginatedResults( $smarty,\n\t\t\t\t\t\t $itemVarName, \n\t\t\t\t\t\t $currentSortIndex,\n\t\t\t\t\t\t $currentSortDir,\n\t\t\t\t\t\t $mode ) );\n SmartyPaginate::assign( $smarty );\n}", "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}", "public function next() {\r\n return next($this->collection);\r\n }", "public function FirstItem()\n {\n return ($start = $this->getPageStart()) ? $start + 1 : 1;\n }", "public function paginate($orderBy = 'nome', $perPage = 10);", "function getNextSearchPage($tl)\n{\n if ($tl['page'] < $tl['pages'] - 1) {\n $nextPage = $tl['page'] + 1;\n } else {\n $nextPage = null;\n }\n return $nextPage;\n}", "public function fetchNextPage(&$last_page) {\n\n\t\tif (!$this->from_date || !$this->to_date) {\n\t\t\tthrow new \\Exception(get_class($this) . ': you have to call setDate or setDateRange before you can fetch any data');\n\t\t}\n\n\t\t$transactions = $this->mapTransactionData($this->soap_client->getFullEarnings(\n\t\t\t$this->from_date->toDateString(),\n\t\t\t$this->to_date->toDateString(),\n\t\t\t$this->conf['campaignId'],\n\t\t\t$this->conf['login'],\n\t\t\t$this->conf['password']\n\t\t));\n\n\t\t$last_page = true;\n\n\t\treturn $transactions;\n\t}", "public function getNext()\n {\n $objNext = \\Database::getInstance()->prepare(\"SELECT project FROM tl_page_ac_project WHERE pid=? AND sorting>(SELECT sorting FROM tl_page_ac_project WHERE project=?) ORDER BY sorting\")\n ->limit(1)\n ->execute($this->page, $this->id);\n\n if (!$objNext->numRows)\n {\n return null;\n }\n\n $t = static::$strTable;\n $arrColumns[] = \"$t.id=?\";\n\n if (!BE_USER_LOGGED_IN)\n {\n $arrColumns[] = \"$t.published=1\";\n }\n\n return static::findOneBy($arrColumns, $objNext->project);\n }", "public function offset(){\n\t\t//Page 1 has an offset of 0 (1-1) * 20\n\t\t//Page 2 has an offset of 20 (2-1) * 20\n\t\t//in other words, page 2 starts with item 21\n\t\treturn ($this->current_page - 1) * $this->per_page;\t\n\t}", "public function getPerPage(): int;", "protected function cursorPaginator($items, $perPage, $cursor, $options)\n {\n return Container::getInstance()->makeWith(CursorPaginator::class, compact(\n 'items', 'perPage', 'cursor', 'options'\n ));\n }", "function render_block_core_query_pagination_next($attributes, $content, $block)\n {\n }", "public static function getPaginator($totalCnt, $curPage, $itemsPerPage) {\n $range = 3;\n $pages = [];\n for ($i = 0; $i < $totalCnt; $i++) {\n $pages[] = $i;\n }\n\n // paginator set\n Zend_View_Helper_PaginationControl::setDefaultViewPartial('_partials/paginator.phtml');\n Zend_Paginator::setDefaultScrollingStyle('Sliding');\n\n $paginator = new Zend_Paginator(new Zend_Paginator_Adapter_Array($pages));\n $paginator\n ->setCurrentPageNumber($curPage)\n ->setItemCountPerPage($itemsPerPage)\n ->setPageRange($range);\n\n return $paginator;\n }", "public function next($index=1){\n return $this->results()[$index]; //depends on the version of your PHP server\n //return $this->results[0];\n }", "public function getPaginatedList($offset, $limit, $criteria = array());", "private function getNextBatch()\n {\n\n $statusFilter = $this->objectManager->create('Magento\\Framework\\Api\\Filter');\n $statusFilter->setData('field', 'status');\n $statusFilter->setData('value', 0);\n $statusFilter->setData('condition_type', 'eq');\n\n $statusFilterGroup = $this->objectManager->create('Magento\\Framework\\Api\\Search\\FilterGroup');\n $statusFilterGroup->setData('filters', [$statusFilter]);\n\n\n $priorityFilter = $this->objectManager->create('Magento\\Framework\\Api\\Filter');\n $priorityFilter->setData('field', 'priority');\n $priorityFilter->setData('value', $this->crawlThreshold);\n $priorityFilter->setData('condition_type', 'gteq');\n\n $priorityFilterGroup = $this->objectManager->create('Magento\\Framework\\Api\\Search\\FilterGroup');\n $priorityFilterGroup->setData('filters', [$priorityFilter]);\n\n\n $sortOrder = $this->objectManager->create('Magento\\Framework\\Api\\SortOrder');\n $sortOrders = [\n $sortOrder->setField('priority')->setDirection(\\Magento\\Framework\\Api\\SortOrder::SORT_DESC)\n ];\n\n /** @var \\Magento\\Framework\\Api\\SearchCriteriaInterface $search_criteria */\n $search_criteria = $this->objectManager->create('Magento\\Framework\\Api\\SearchCriteriaInterface');\n $search_criteria ->setFilterGroups([$statusFilterGroup, $priorityFilterGroup])\n ->setPageSize($this->batchSize)\n ->setCurrentPage(1)\n ->setSortOrders();\n\n $search_criteria->setSortOrders($sortOrders);\n\n $this->queue = $this->pageRepository->getList($search_criteria);\n }", "public function get_pages(&$pages, &$current_page, &$prev_page, &$next_page)\n\t{\n\t\tif($this->is_feed) $pages = array_slice($pages, 0, 10);\n\t}", "public function do_paging()\n {\n }", "public function getNextPageUrl();", "public function getNextPageUrl();", "function link_to_next_item_show($text = null, $props = array())\n{\n if (!$text) {\n $text = __(\"Next Item &rarr;\");\n }\n $item = get_current_record('item');\n if ($next = $item->next()) {\n return link_to($next, 'show', $text, $props);\n }\n}", "function next() {\r\n $this->index++;\r\n return $this->list[$this->index];\r\n }", "public function next()\n {\n next($this->entities);\n }", "public function getNext() \n {\n $page_next = $this->page_current + 1;\n \n if($this->page_current >= $this->num_pages) {\n\t\t $page_next = $this->num_pages;\n } \n \n return $page_next;\n }" ]
[ "0.6447019", "0.6165999", "0.6069213", "0.5972772", "0.5972772", "0.5942072", "0.5941028", "0.58595896", "0.58533543", "0.58404076", "0.5720718", "0.5639684", "0.5639684", "0.563794", "0.56269395", "0.5618918", "0.55945945", "0.55749404", "0.5572973", "0.556496", "0.5564537", "0.5557934", "0.5547082", "0.55195755", "0.55015826", "0.5488827", "0.5468348", "0.54547685", "0.54428154", "0.5426685", "0.54034805", "0.5388568", "0.53459096", "0.53446066", "0.5299812", "0.5292008", "0.5288188", "0.5283256", "0.5258353", "0.52426827", "0.5219017", "0.520898", "0.5204005", "0.52036214", "0.5201675", "0.51990813", "0.5192277", "0.5192024", "0.51852334", "0.51839536", "0.517219", "0.51651293", "0.516207", "0.5156299", "0.5130485", "0.51250637", "0.51118445", "0.5105728", "0.5104148", "0.5086222", "0.5082885", "0.5076552", "0.5037466", "0.5032565", "0.50282764", "0.5025739", "0.5022146", "0.50182253", "0.5016856", "0.50083095", "0.50075924", "0.50075716", "0.5005922", "0.50055784", "0.50011694", "0.49985367", "0.49979252", "0.49936083", "0.4985259", "0.49824306", "0.4975767", "0.496799", "0.49618527", "0.4958017", "0.49576616", "0.49574298", "0.49546754", "0.4951947", "0.49483097", "0.49427986", "0.49408966", "0.49396765", "0.49392834", "0.4939062", "0.49326003", "0.49229258", "0.49229258", "0.49186897", "0.49166912", "0.4904779", "0.49010456" ]
0.0
-1
rewind contacts list for future use,
public function rewind() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rewind() \n {\n $this->pointer = 0;\n if (isset($this->list[$this->pointer])) {\n $this->list[$this->pointer]->rewind();\n }\n }", "public function reset()\n {\n $this->_contacts = [];\n $this->_lists = [];\n }", "public function rewind(): void\n {\n reset($this->_items);\n }", "public function rewind() {\r\n reset($this->itemList);\r\n }", "public function rewind(): void\n {\n if ($this->position != 1) {\n $this->position = 1;\n $this->data = [];\n $this->fetchMore();\n }\n }", "public function rewind(): void {\n reset($this->items);\n }", "public function rewind() {\n if($this->items!==false)\n reset($this->items);\n }", "public function rewind();", "public function rewind();", "public function rewind();", "public function rewind();", "public function rewind();", "public function rewind()\n {\n $this->_counter = 0;\n }", "public function rewind()\n {\n\t\treset($this->_data);\n $this->_index = 0;\n\t}", "public function rewind()\n {\n // TODO: Implement rewind() method.\n reset($this->GameComArray);\n }", "public function rewind()\n {\n reset($this->_items);\n }", "public function rewind(): void\n {\n reset($this->data);\n }", "public function rewind() {\n\t\t\t$this->index = 0;\n\t\t}", "public function rewind()\n {\n $this->current = ldap_first_entry($this->handle, $this->result);\n }", "public function rewind() {\n\t\treset($this->_data);\n\t}", "public function rewind()\n {\n $this->rewind = 0;\n }", "public function rewind() {\n do {\n $this->collections[$this->_current]->rewind(); \n } while ($this->_current-- > 0);\n }", "public function rewind(): void\n {\n if ($this->_index === 0) {\n return;\n }\n\n $this->_index = 0;\n }", "public function rewind(): void\n {\n reset($this->array);\n }", "public function rewind() {\n\n\t\t\t$this->position = 0;\n\t\t}", "public function rewind() {\n\t\t$this->position = 0;\n\t}", "public function rewind() {\n\t\t$this->position = 0;\n\t}", "public function rewind_comments()\n {\n }", "function rewind() {\r\n $this->_position = 0;\r\n }", "public function rewind() {\n reset($this->data);\n }", "public function rewind() {\n reset($this->data);\n }", "public function rewind(){\n\t\tstatic $rewind = 0;\n\t\t++$rewind;\n\t}", "public function rewind()\n {\n reset($this->data);\n $this->current_index = 0;\n }", "public function rewind() {\n $this->index = 0;\n }", "public function rewind() {\n $this->_position = 0;\n }", "public function rewind()\n {\n reset($this->data);\n }", "public function rewind()\n {\n reset($this->data);\n }", "public function rewind()\n {\n reset($this->data);\n }", "public function rewind()\n {\n reset($this->entities);\n }", "public function rewind()\n {\n $this->pointer = 0;\n }", "public function rewind()\n {\n $this->pointer = 0;\n }", "public function rewind()\n {\n reset($this->_object);\n }", "public function rewind(){\n $this->index = 0;\n }", "public function rewind()\n {\n reset($this->requests);\n }", "public function rewind()\n {\n $this->current = 0;\n }", "public function rewind()\n {\n $this->index = 0;\n }", "public function rewind() {}", "public function rewind() {}", "public function rewind() {}", "public function rewind() {}", "public function rewind() {}", "public function rewind() {}", "public function rewind() {}", "public function rewind() {}", "public function rewind() {}", "public function rewind()\n {\n $this->pointer = -1;\n $this->next();\n }", "public function rewind()\n {\n reset($this->zipModel->getEntries());\n }", "public function rewind()\n {\n }", "public function rewind()\n\t{\n\t\t$this->_position = 0;\n\t}", "public function rewind()\n\t{\n\t\t$this->__position = 0;\n\t}", "public function rewind()\n {\n }", "public function rewind()\n {\n $this->_position = 0;\n }", "function rewind() {\n $this->position = 0;\n }", "public function rewind() {\n\t\t}", "public function rewind()\n {\n $this->position = 0;\n }", "public function rewind()\n {\n $this->position = 0;\n }", "public function rewind()\n {\n $this->position = 0;\n }", "public function rewind()\n {\n $this->position = 0;\n }", "public function rewind()\n {\n $this->position = 0;\n }", "public function rewind()\n {\n $this->position = 0;\n }", "public function rewind()\n {\n $this->position = 0;\n }", "public function rewind()\n {\n $this->position = 0;\n }", "public function rewind()\n {\n $this->position = 0;\n }", "public function rewind()\n\t\t{\n\t\t\treset($this->source);\n\t\t}", "public function rewind(): void\n {\n $this->pointer = 0;\n }", "public function rewind() {\n reset($this->elements);\n $this->pointer = 0;\n }", "public function rewind()\n {\n $this->current = null;\n }", "public function rewind() {\n $this->pos = 0;\n }", "public function rewind(): void\n {\n $this->position = 0;\n }", "public function rewind() {\n\t\t/** Nothing do */\n\t}", "public function rewind()\n {\n $this->offset = 0;\n }", "public function rewind() {\n reset($this->translations);\n }", "public function initCampaignContacts()\n\t{\n\t\t$this->collCampaignContacts = array();\n\t}", "public function rewind() {\r\n\t\t$this->position = 0;\r\n\t\trewind($this->handle);\r\n\t\t$this->next();\r\n\t}", "public function rewind(): void\n {\n \\reset($this->responseData->_embedded->items);\n }", "public function rewind(){\n \t$this->load();\n reset($this->bookings);\n }", "function rewind()\n\t{\n\t\t$this->_iIndex = 0;\n\t}", "function rewind() \n {\n $this->position = 0;\n }", "function rewind() \n {\n $this->position = 0;\n }", "function rewind() {\n $this->resetKeys();\n $this->position = 0;\n }", "private function _rewind () {\n rewind($this->file);\n // Get rid of first description line.\n fgetcsv($this->file);\n\n return $list;\n }", "protected function reset()\n {\n $this->iterator->rewind();\n }", "public function retain_contact_list(){\n\t\t$contact_data = array();\t\t\n\t\tforeach($this->request->data['Client'] as $key => $data){ \n\t\t\t// for the form fields\n\t\t\tif($new_key = $this->get_key_val($key)){ \n\t\t\t\t$contact_data['Contact'][$new_key][] = $data;\n\t\t\t}\t\t\t\n\t\t}\n\t\t$this->request->data['Contact'] = '1';\n\t\t$this->set('contact_list', $contact_data);\n\t}", "function rewind()\n\t{\n\t\tparent::rewind();\n\t\t$this->done = false;\n\t}", "public function rewind()\n\t{\n\t\t$this->j = 0;\n\t\t$this->c = $this->i;\n\t}", "public function rewind(): void\n {\n $this->_skipNextIteration = false;\n reset($this->_data);\n $this->_index = 0;\n }", "public function rewind()\n {\n }", "public function rewind()\n {\n }", "public function rewind()\n {\n }", "public function rewind()\n {\n }" ]
[ "0.6595111", "0.6321478", "0.62825406", "0.62531686", "0.62267566", "0.62111324", "0.61774343", "0.61423457", "0.61423457", "0.61423457", "0.61423457", "0.61423457", "0.6131504", "0.6125211", "0.60776234", "0.606666", "0.6064103", "0.60563153", "0.6055142", "0.6054624", "0.60479224", "0.6045081", "0.6033297", "0.60273993", "0.60020316", "0.5990904", "0.5990904", "0.59882426", "0.5986896", "0.59850407", "0.59850407", "0.5983372", "0.59814894", "0.5960305", "0.59469867", "0.5946867", "0.5946867", "0.5946867", "0.59446925", "0.59418654", "0.59418654", "0.5941484", "0.5940751", "0.59316075", "0.5928969", "0.5925056", "0.59222907", "0.59222907", "0.5922031", "0.5922031", "0.5922031", "0.5922031", "0.5922031", "0.5922031", "0.5922031", "0.59198", "0.59118897", "0.590341", "0.59030086", "0.5899366", "0.58980656", "0.5892138", "0.5889507", "0.58841187", "0.58785194", "0.58785194", "0.58785194", "0.58785194", "0.58785194", "0.58785194", "0.58785194", "0.58785194", "0.58785194", "0.58697706", "0.5864109", "0.58575493", "0.58515805", "0.58503646", "0.5844659", "0.5835781", "0.58224064", "0.58161336", "0.5807029", "0.58046937", "0.57980525", "0.579122", "0.57858616", "0.5774734", "0.5774734", "0.5766896", "0.57629937", "0.5762878", "0.57429874", "0.5734183", "0.57341754", "0.5731665", "0.5715505", "0.5715505", "0.5715505", "0.5715505" ]
0.5757162
92
find a contact entry by value, or type for future use,
public function seek() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find($value);", "protected function getBy($value, $type) {\n $where = \"\";\n if ($type == \"id\") {\n $where = \"id=\".mysql_real_escape_string($value);\n } else if ($type == \"name\") {\n $where = \"name='\".mysql_real_escape_string($value).\"'\";\n } else {\n throw new Exception(\"Undefined type of the getBy\");\n }\n return $this->db->queryObject(\n \t\"select \n \t\tid as _id, name as _name, uri as _uri, enabled as _enabled,\n \t\tlastChecked as _lastChecked, ovalId as _ovalId \n from \n \tOvalSourceDef \n where\n \t$where\"\n , \"OvalSourceDef\");\n }", "public function get($value, $type = 'type')\n\t{\n $records = array();\n\t\tforeach ($this->parts as $record)\n if ($record[$type] == $value)\n $records[] = $record;\n\t return $records;\n\t}", "public function searchByValue($value)\n {\n $contact = Contact::searchByValue($value);\n\n if ($contact) {\n return response()->json([\"data\" => $contact]);\n }\n\n return response()->json([\"status\" => \"error\", \"message\" => \"No se encontraron resultados!\"]);\n }", "public function find_by($field = null, $value = null, $type = 'and')\n {\n\n return parent::find_by($field, $value, $type);\n }", "public static function findByContact($contact)\n {\n $db = Zend_Registry::get('dbAdapter');\n\n $query = $db->select()\n ->from( array(\"m\" => \"main\") ) \n ->where( \"m.contact = \" . $contact );\n\n return $db->fetchRow($query); \n }", "public function find($primaryValue);", "private function getCiviContact($searchField, $searchValue, $extraFields = TRUE) {\n //kavalogin_log('Trying to find CiviCRM contact by ' . $searchField . ': ' . $searchValue, FALSE, WATCHDOG_INFO);\n try {\n if ($extraFields) {\n $customFields = [\n 'kava_account_login' => 'custom_' . $this->getCustomFieldId('contact_extra', 'KAVA_account_login'),\n 'barcode' => 'custom_' . $this->getCustomFieldId('contact_extra', 'barcode'),\n ];\n $searchField = (array_key_exists($searchField, $customFields) ? $customFields[$searchField] : $searchField);\n }\n else {\n $customFields = [];\n }\n\n $contact = civicrm_api3('Contact', 'getsingle', [\n $searchField => $searchValue,\n 'contact_is_deleted' => 0,\n 'return' => \"contact_id,external_identifier,email,display_name\" .\n ($extraFields ? ',' . implode(',', array_values($customFields)) : ''),\n 'option.limit' => 1,\n ]);\n\n if ($extraFields) {\n foreach ($customFields as $fieldName => $fieldCode) {\n $contact[$fieldName] = $contact[$fieldCode];\n }\n }\n\n return $contact;\n\n } catch (\\CiviCRM_API3_Exception $e) {\n return FALSE;\n }\n }", "function user_info ($value, $key = \"mail\") {\n\t# search for the employee using site wide attribs\n\tif ( ! $result = bluepages_search(\"($key=$value)\") )\n\t\treturn(false);\n# return just the first entry like old user_info() did\nreturn($result[key($result)]);\n}", "public function findEntry($path, $country, $field, $value);", "public function findIdentifierByValue($value)\n {\n $repo = $this->_em->getRepository($this->getPersonIdentifierClassName());\n return $repo->findOneBy(array('value' => $value)); \n }", "private function findOneEntry( $type, &$parameters )\n {\n $this->setActionId() ;\n $this->log( \"Find one \" . $type, Logger::LOG_INFO, __METHOD__ ) ;\n $entry = null ;\n\n\n // Loop on the 'kiamoInputs' search parameters\n $searchPattern = $this->entitiesMgr->getEntitySearchPatternKiamoInputs( $type ) ;\n $res = null ;\n foreach( $searchPattern as $searchItem )\n {\n $varName = $searchItem[ 'varName' ] ;\n \n\n // Search entries matching the current search item (eligibility, pre-treatment, post-treatment)\n $pbParamValue = $parameters->$varName ;\n $preparedResult = $this->findEntriesBySearchPattern( $type, $pbParamValue, $searchItem ) ;\n if( empty( $preparedResult ) ) continue ;\n \n\n // Select one of the list\n $res = $preparedResult[0] ; // By default, select the first returned result\n if( sizeof( $preparedResult ) > 1 )\n {\n $oneOfMethod = $this->entitiesMgr->getEntitySearchGetOneOfMethod( $type ) ;\n if( !empty( $oneOfMethod ) )\n {\n if( method_exists( $this->customizationMgr, $oneOfMethod ) )\n {\n $this->log( \"Several results, Get One Of method '\" . $oneOfMethod . \"' applied\", Logger::LOG_INFOP, __METHOD__ ) ;\n $res = $this->customizationMgr->$oneOfMethod( $preparedResult ) ;\n }\n else\n {\n $this->log( \"! Get One Of method '\" . $oneOfMethod . \"' does not exist in '\" . get_class( $this->customizationMgr ) . \"' implementation\", Logger::LOG_WARN, __METHOD__ ) ;\n }\n }\n }\n \n \n // One match has been found and treated : break the search loop here\n break ;\n }\n\n if( empty( $res ) )\n {\n $this->log( \"=> No match found\", Logger::LOG_INFO, __METHOD__ ) ;\n return null ;\n }\n\n $this->log( \"=> Match found\", Logger::LOG_INFO, __METHOD__ ) ;\n $entry = $this->entitiesMgr->getEntryInstance( $type, $res ) ;\n\n $this->clearActionId() ;\n\n return $entry ;\n }", "function _get_by($field, $value = array())\r\n\t{\r\n\t\tif (isset($value[0]))\r\n\t\t{\r\n\t\t\t$this->where($field, $value[0]);\r\n\t\t}\r\n\r\n\t\treturn $this->get();\r\n\t}", "function lookup($value, $field=SM_ABOOK_FIELD_NICKNAME) {\n $this->set_error('lookup is not implemented');\n return false;\n }", "public static function findOneByUserContact($contact) {\n\t\treturn Doctrine_Query::create ()->from ( 'Contacts c' )->where(\"c.contact = '$contact'\")->execute();\n\t}", "public static function getProfileBy($type, $value) {\r\n $allowed = ['profileID', 'email'];\r\n $profile = null;\r\n \r\n try {\r\n if (!in_array($type, $allowed))\r\n throw new PDOException(\"$type not allowed search criterion for Profile\");\r\n \r\n $db = Database::getDB();\r\n $stmt = $db->prepare(\r\n \"select * from Profiles\r\n where ($type = :$type)\");\r\n $stmt->execute(array(\":$type\" => $value));\r\n \r\n if(count($stmt) > 1)\r\n throw new PDOException(\"Error: multiple results returned\");\r\n \r\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n if ($row !== false)\r\n $profile = new Profile($row);\r\n \r\n } catch (PDOException $e) {\r\n $profile->setError('profilesDB', 'PROFILE_GET_FAILED');\r\n } catch (RuntimeException $e) {\r\n $profile->setError(\"database\", \"DB_CONFIG_NOT_FOUND\");\r\n }\r\n \r\n return $profile;\r\n }", "public function getBy($key, $value);", "static function getLookupValueDescription($lookuptype, $lookuptypevalue) {\n\t\t$sql = \"SELECT lv.lookupvaluedescription FROM lookuptypevalue lv INNER JOIN lookuptype l ON (lv.lookuptypeid = l.id AND l.`name` = '\".$lookuptype.\"' AND lv.lookuptypevalue = '\".$lookuptypevalue.\"')\";\n\t\t$conn = Doctrine_Manager::connection(); \n\t\t\n\t\treturn $conn->fetchOne($sql); \n\t}", "public function setContact($value){\n return $this->setParameter('contact', $value);\n }", "function jpid_get_customer_by( $field, $value ) {\n\t$field = sanitize_key( $field );\n\n\tif ( ! in_array( $field, array( 'customer_id', 'customer_email', 'user_id' ) ) ) {\n\t\treturn null;\n\t}\n\n\tif ( is_numeric( $value ) && $value < 1 ) {\n\t\treturn null;\n\t}\n\n\t$by_user_id = ( $field === 'user_id' ) ? true : false;\n\t$customer = new JPID_Customer( $value, $by_user_id );\n\n\tif ( $customer->get_id() > 0 ) {\n\t\treturn $customer;\n\t} else {\n\t\treturn null;\n\t}\n}", "function searchContactList($type, $query) {\n\tglobal $apiBaseURL; // bad practice in production - fine for this example\n\n\t// the URL expects the type to have a capital first letter - lets force this\n\t$type = ucfirst($type);\n\n\t// lets lowercase and strip white space (really you should do more cleaning up of user input)\n\t$query = trim(strtolower($query));\n\n\t//\n\t// To do a search we are using the $filter from the oData specification\n\t// http://www.odata.org/documentation/uri-conventions#FilterSystemQueryOption\n\t// We search only the CoLastName and FirstName for this example\n\t//\n\n\t$filter = \"filter=substringof('\".$query.\"',%20CoLastName)%20or%20substringof('\".$query.\"',%20FirstName)%20eq%20true\";\n\n\n\t// use the getURL function to call the URL - remember we are calling the vars we need from the session vars\n\t$response = getURL($apiBaseURL.$_SESSION['companyFileGUID'].'/Contact/'.$type.'/?$'.$filter, $_SESSION['username'], $_SESSION['password']);\n\n\t// it returned as JSON so lets decode it\n\t$response = json_decode($response);\n\t// return the response\n\treturn($response);\n\n}", "private function findEntryById( $type, $id, $updateInteractionLabel = true )\n {\n $this->setActionId() ;\n \n $this->log( \"Find \" . $type . \" by id : \" . $id, Logger::LOG_INFO, __METHOD__ ) ;\n $entry = null ;\n\n $extType = $this->entitiesMgr->getEntityType( $type ) ;\n $raw = $this->interactionMgr->getSingleEntry( $extType, $id ) ;\n\n if( empty( $raw ) )\n {\n $this->log( \"=> Not found : \" . $type . \" id : \" . $id, Logger::LOG_INFO, __METHOD__ ) ;\n return null ;\n }\n\n $this->log( \"=> Found : \" . $type . \" id : \" . $id, Logger::LOG_INFO, __METHOD__ ) ;\n $entry = $this->entitiesMgr->getEntryInstance( $type, $raw, $updateInteractionLabel ) ;\n\n $this->clearActionId() ;\n\n return $entry ;\n }", "public function findRecord($id, $value, $collection)\n {\n foreach ($collection as $record)\n {\n if ($record->{'get'.ucfirst($id)}() == $value)\n {\n return $record;\n }\n }\n }", "public function entitySearch($type, $field, $value) {\n return $this->typeManager->getStorage($type)\n ->getQuery()\n ->condition($field, $value)\n ->accessCheck(FALSE)\n ->execute();\n }", "function caldol_bxcft_show_field_value($value_to_return, $type, $id, $value){\n\n if ($type == 'email') {\n return $value;\n }\n return $value;\t\n}", "public static function get_data_by($field, $value)\n {\n }", "public function get($value, $field='', $field_type='') {\r\n\t \tglobal $wpdb;\r\n\t \t\r\n\t \tif ($field=='')\r\n\t \t\t$field = 'id';\r\n\t \t\t\r\n\t \tif ($field_type=='') // %d\r\n\t \t\t$result = $wpdb->get_row( $wpdb->prepare( \"SELECT * from `$this->table` WHERE `$field` = %d\", $value ) );\r\n\t \telse // %s\r\n\t \t\t$result = $wpdb->get_row( $wpdb->prepare( \"SELECT * from `$this->table` WHERE `$field` = %s\", $value ) );\r\n\t \t\r\n\t \tif ($result==NULL)\r\n\t \t\treturn NULL;\r\n\r\n\t \t// Parse returned fields to strip slashes\r\n\t \t$result = (array) $result;\r\n\t \t$parsed_result = WPPostsRateKeys_Validator::parse_array_output($result);\r\n\t \t$parsed_result = (object) $parsed_result;\r\n\t \t// End: Parse returned fields to strip slashes\r\n\t \t\t\r\n\t \treturn $parsed_result;\r\n\t }", "final public function search($value)\n {\n return Base\\Arrs::search($this->onPrepareValue($value),$this->arr(),$this->isSensitive());\n }", "function lookup($value, $bnum = -1, $field = SM_ABOOK_FIELD_NICKNAME) {\n\n $ret = array();\n\n if ($bnum > -1) {\n if (!isset($this->backends[$bnum])) {\n $this->error = _(\"Unknown address book backend\");\n return false;\n }\n $res = $this->backends[$bnum]->lookup($value, $field);\n if (is_array($res)) {\n return $res;\n } else {\n $this->error = $this->backends[$bnum]->error;\n return false;\n }\n }\n\n $sel = $this->get_backend_list('local');\n for ($i = 0 ; $i < sizeof($sel) ; $i++) {\n $backend = &$sel[$i];\n $backend->error = '';\n $res = $backend->lookup($value, $field);\n\n // return an address if one is found\n // (empty array means lookup concluded\n // but no result found - in this case,\n // proceed to next backend)\n //\n if (is_array($res)) {\n if (!empty($res)) return $res;\n } else {\n $this->error = $backend->error;\n return false;\n }\n }\n\n return $ret;\n }", "function get_user_by($field, $value)\n {\n }", "function find_beer_by_uid( $type = null, $uid, $only_id = true ) {\n\t$uid = sanitize_text_field( $uid );\n\n\t$posts = get_posts( [\n\t\t'post_type' => $type,\n\t\t'meta_query' => [\n\t\t\t[\n\t\t\t\t'key' => 'meta/uid',\n\t\t\t\t'value' => $uid,\n\t\t\t\t'compare' => '=',\n\t\t\t],\n\t\t],\n\t] );\n\n\tif ( ! is_wp_error( $posts ) && ! empty( $posts ) ) {\n\t\treturn $only_id ? (int) $posts[0]->ID : $posts[0];\n\t}\n\n\treturn null;\n}", "function getMetaTypeSingle($type) {\r\n foreach( $this->data['VenueMeta'] as $i => $row ) {\r\n if ( $row['meta_key'] == $type) {\r\n return $row['meta_value'];\r\n }\r\n }\r\n \r\n return false;\t\t\r\n\t}", "public function findBy($value);", "public function getEntry();", "function get_contact($uid) {\n //make sure the uid is set\n if (!isset($uid) || empty($uid)) {\n throw new Zim_Exception_UIDNotSet();\n }\n $q = Doctrine_Query::create()\n ->from('Zim_Model_User user')\n ->where('user.uid = ?', $uid)\n ->limit(1);\n $contact = $q->fetchOne();\n if (empty($contact)) {\n throw new Zim_Exception_ContactNotFound();\n }\n $contact = $contact->toArray();\n if (!isset($contact['uname']) || trim($contact['uname']) == ''){\n $contact['uname'] = $this->update_username(array('uid' => $contact['uid']));\n }\n\n //return the contact\n return $contact;\n }", "public function getEntryByTitle($title, $entry_type, &$bibtex_key = null) // {{{\n {\n // A little manicure on the input title\n $title = Bibliography::replaceAccents($title);\n $title = Bibliography::unspace($title);\n $title = Bibliography::removeBraces($title);\n $title = Bibliography::removePunctuation($title);\n $title = strtolower($title);\n // Now search\n foreach ($this->m_entries as $key => $entry)\n {\n if ($entry_type !== \"\" && $entry[\"bibtex_type\"] !== $entry_type)\n continue; // Wrong type; skip\n if (!isset($entry[\"title\"]))\n \tcontinue; // No title; skip\n $e_title = $entry[\"title\"];\n $e_title = Bibliography::removeBraces($e_title);\n $e_title = Bibliography::removePunctuation($e_title);\n $e_title = strtolower($e_title);\n if ($e_title == $title)\n {\n $bibtex_key = $key;\n \treturn $entry;\n }\n }\n return null;\n }", "public function findOneByCell($name, $value)\n {\n return $this->defineFindOneByCellQuey($name, $value)->getSingleResult();\n }", "public function findBy($field, $value)\n {\n return $this->model->where($field, $value)->firstOrFail();\n }", "function getContact($type, $contactId) {\n\tglobal $apiBaseURL; // bad practice in production - fine for this example\n\n\t// the URL expects the type to have a capital first letter - lets force this\n\t$type = ucfirst($type);\n\n\t// use the getURL function to call the URL - remember we are calling the vars we need from the session vars\n\t$response = getURL($apiBaseURL.$_SESSION['companyFileGUID'].'/Contact/'.$type.'/'.$contactId, $_SESSION['username'], $_SESSION['password']);\n\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\n}", "public function findBy($field, $value);", "static function retrieveByName($value) {\n\t\treturn static::retrieveByColumn('name', $value);\n\t}", "function findItem($type, $id)\n {\n foreach ($this->getItems() as $item)\n if ($item->item_id == $id && $item->item_type == $type)\n return $item;\n return null;\n }", "function getByField ( $field,$value){\n\t\t $result=$this->fetchRow(\"$field= '$value' \"); //order by id?\n\t\t if($result==null)\n\t\t\t return;\n\t\t if(is_array($result))\n\t\t\t return $result[0];\n\t\t return $result;\n\t}", "function get_value_by_label( $form, $entry, $label ) {\n \n\tforeach ( $form['fields'] as $field ) {\n $lead_key = $field->label;\n\t\tif ( strToLower( $lead_key ) == strToLower( $label ) ) {\n\t\t\treturn $entry[$field->id];\n\t\t}\n\t}\n\treturn false;\n}", "function findone($key,$val) {\n\t\treturn ($data=$this->find($key,$val))?$data[0]:FALSE;\n\t}", "private function searchUserType($by, $value){\n\t\t\t$sql = \"select id_type_user, type_user, DATE_FORMAT( date_modification_type_user, '%Y-%m-%d %h:%i:%s' ) date, description_type_user FROM type_user where\";\n\t\t\tif($by == \"id\") $sql .= \" id_type_user=?\";\n\t\t\telse if($by == \"name\") $sql .= \" type_user=?\";\n\t\t\telse throw new Exception(\"Bad search parameters\");\n\t\t\t$stmt = $this->db->executeQuery($sql, array($value));\n\t\t\tif(!$userType = $stmt->fetch()) return new UserType( \"\", \"\", \"\", \"\");\n\t\t\t$user = new UserType($userType['id_type_user'], $userType['type_user'], $userType['description_type_user'], $userType['date']);\n\t\t\treturn $this->loadUserTypeAccess($user);\n\t\t}", "public function &findRelationByPhone($phone) {\n if (!is_null($ret = $this->_cache->get('rel_'.$phone))) {\n return $ret;\n }\n\n $this->log(\"Looking up phone $phone\", 'DEBUG');\n\n $contact = $this->findContactByPhone($phone);\n if (!$contact || !$contact['a_id']) {\n $account = $this->findAccountByPhone($phone);\n } else {\n $account = array(\n 'a_id' => $contact['a_id'],\n 'a_assigned' => $contact['a_assigned'],\n 'a_name' => $contact['a_name'],\n );\n unset($contact['a_id']);\n unset($contact['a_assigned']);\n unset($contact['a_name']);\n }\n $ret = array();\n if ($account) {\n $ret['relation_type'] = 'Accounts';\n $ret['relation_id'] = $account['a_id'];\n $ret['assigned_to'] = $account['a_assigned'];\n } elseif ($contact) {\n $ret['relation_type'] = 'Contacts';\n $ret['relation_id'] = $contact['c_id'];\n $ret['assigned_to']= $contact['c_assigned'] ? $contact['c_assigned'] : $account['a_assigned'];\n } else {\n $ret['relation_type'] = null;\n $ret['relation_id'] = null;\n $ret['assigned_to'] = null;\n }\n $ret['account'] = $account;\n $ret['contact'] = $contact;\n\n $this->_cache->set('rel_'.$phone, $ret, $this->cache_expire);\n return $ret;\n }", "public function findOne($entity)\n {\n $statement = \"SELECT * FROM contact WHERE id = :id LIMIT 1\";\n $prepare = $this->db->prepare($statement);\n $prepare->bindValue(\":id\", $entity->getId());\n $prepare->execute();\n return $prepare->fetch(\\PDO::FETCH_CLASS, Contact::class);\n }", "private function LookupContact($drupalID) {\n $params = [\n 'sequential' => 1,\n 'uf_id' => $drupalID,\n ];\n $result = civicrm_api3('UFMatch', 'get', $params);\n if ($result['is_error'] == 0 && $result['count'] > 0) {\n // ok, found contact\n $this->contactID = $result['values'][0]['contact_id'];\n } else {\n // not found\n throw new Exception('Probleem tijdens het ophalen van uw gegevens. Neem contact op met KAVA.');\n }\n }", "public function search(mixed $value): mixed\n {\n\n return\n ($index = $this->indexOfValue($value)) > -1 ?\n $this->keys[$index] :\n null;\n }", "public function findBy($value, $field = 'id')\n {\n return call_user_func_array([$this->modelClass, 'where'], [$field, $value])->first();\n }", "function find_value($data) {\n $handle = @fopen(\"/users/edwin/list.txt\", \"r\");\n if ($handle) {\n while (!feof($handle)) {\n $entry_array = explode(\":\",fgets($handle));\n if ($entry_array[0] == $input) {\n return $entry_array[1];\n }\n }\n fclose($handle);\n }\n return NULL;\n }", "public function get_contact(){\n $this->relative = array_shift(Relative::find_all(\" WHERE dead_no = '{$this->id}' LIMIT 1\"));\n if ($this->relative) {\n return $this->relative->contact();\n } else {\n return \"Not Specified\";\n }\n }", "public function propfind($key=null,$value=null){\n return $this->methodsData(\"propfind\",$key,$value);\n }", "public function find($value)\n {\n return array_search($value, $this->items);\n }", "public function getValue($spec, $user_id = null, $type, $field_id) {\n if (!($spec instanceof Core_Model_Item_Abstract)) {\n throw new Fields_Model_Exception('$spec must be an instance of Core_Model_Item_Abstract');\n }\n\n if (!$spec->getIdentity()) {\n return null;\n }\n\n $values = Engine_Api::_()->fields()\n ->getFieldsValues($spec);\n\n if (!$values) {\n return null;\n }\n\n if (in_array($type, array('Multiselect', 'MultiCheckbox', 'PartnerGender', 'LookingFor'))) {\n if (isset($user_id) && !empty($user_id))\n return $values->getRowsMatching(array('field_id' => $field_id, 'member_id' => $user_id));\n else\n return $values->getRowsMatching('field_id', $field_id);\n } else {\n if (isset($user_id) && !empty($user_id))\n return $values->getRowMatching(array('field_id' => $field_id, 'member_id' => $user_id));\n else\n return $values->getRowMatching('field_id', $field_id);\n }\n }", "public static function find_by($column, $value) {\n\t\t$sql = 'SELECT * FROM ' . static::$table . ' WHERE ' . $column . ' = ? LIMIT 1;';\n\t\t$query = DBH()->prepare($sql);\n\t\t$query->execute(array($value));\n\t\tif ($query->rowCount() == 0) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn self::resemble($query->fetch());\n\t\t}\n\t}", "function FindContact(array $parameters)\n\t{\n\t\t/*\n\t\t **\n\t\t ** this is the array passed into the method\n\t\t **\n\n\t\t\t$parameters = array (\n\t\t\t\t'FirstName'\t\t\t=> \"Aardy\",\n\t\t\t\t'LastName'\t\t\t=> \"Aardvark\",\n\t\t\t\t'Phone'\t\t\t\t=> \"1234567890\",\n\t\t\t\t'EmailAddress'\t\t=> \"[email protected]\",\n\t\t\t);\n\t\t*/\n\n\t\t$request = parent::ExecuteSP('api_MeetTheNeed_FindMatchingContact', $parameters);\n\t\treturn $request;\n\t\t// If there are API errors, they will be noted in the $request->Errors node\n\t\t//The contact info will be in $request->NewDataSet->Table if it's present\n\t}", "public function findOneBy($column, $value, array $where = array());", "public function getByKeyValue($key, $value)\n {\n foreach ($this->entities as $entity)\n {\n $values = $entity->getValues(array($key));\n if ($values[$key] === $value)\n {\n return $entity; \n }\n }\n \n return null;\n }", "public function getContact(): ?string;", "function find($table, $value, $pk = null)\n {\n if(is_null($pk)){\n $pk = \"id\";\n }\n $this->query(\"SELECT * FROM $table WHERE $pk = '$value'\");\n return oci_fetch_array($this->result);\n }", "function lookup($prj_id, $field, $value)\n {\n $backend =& self::_getBackend($prj_id);\n return $backend->lookup($field, $value);\n }", "public static function getContact($customer_id, $type = \"Telephone\") {\n $record = Doctrine_Query::create ()->select ( 'contact' )\n \t\t\t\t\t\t\t ->from ( 'Contacts c' )\n \t\t\t\t\t\t\t ->leftJoin ( 'c.ContactsTypes t' )\n \t\t\t\t\t\t\t ->where ( \"customer_id = ? and t.name = ?\", array($customer_id, $type) )\n \t\t\t\t\t\t\t ->limit ( 1 )\n \t\t\t\t\t\t\t ->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\n \t\t\t\t\t\t\t \n return !empty($record[0]['contact']) ? $record[0]['contact'] : array();\n }", "function getval($where,$whereval,$table,$toget){\n\t\tif ($where == \"\" || $whereval ==\"\" || $table ==\"\" || $toget ==\"\") {\n\t\t\t$this->showerror(\"There is an error with your Getval request, please try again\");\n\t\t}\n\t\t// else no error, so continue process\n\t\t// be sure the field given and the value is single, no commas\n\t\tif ($this->havecomma($where) || $this->havecomma($whereval) || $this->havecomma($toget)) {\n\t\t\t// error occured\n\t\t\t$this->showerror(\"There is an error with your '$where' or '$whereval' values\");\n\t\t}\n\t\t// get value from database\n\t\t$tquery = \"SELECT \". $toget . \" FROM \". $table .\" WHERE \". $where .\"='$whereval'\";\n\t\t$mres = mysqli_query($this->dcon, $tquery);\n\t\tif (!$mres){\n\t\t\t$this->showerror(\"Could not get record from database\");\n\t\t}\n\t\t$tresult = mysqli_fetch_array($mres);\n\t\t$this->record = $tresult[$toget];\n\t\treturn $this->record;\n\t}", "public function findOneBy( $value = NULL, $field = 'id', array $columns = ['*'] );", "function InfGetContactDetails($inf_contact_id) {\n $object_type = \"Contact\";\n $class_name = \"Infusionsoft_\" . $object_type;\n $object = new $class_name();\n $objects = Infusionsoft_DataService::query(new $class_name(), array('Id' => $inf_contact_id));\n\n $contact_array = array();\n foreach ($objects as $i => $object) {\n $contact_array[$i] = $object->toArray();\n }\n\treturn $contact_array[0];\n}", "public function findItem( $code, array $ref = [], $domain = 'product', $type = null, $default = false );", "function find_field_value($field, $value, $separator = null){\n\t\tif($separator){\n\t\t\t$results = $this -> model -> find_arrayfield_value($field, $value, $separator);\n\t\t\treturn $results;\n\t\t}\n\t\t$results = $this -> model -> find_field_value($field, $value);\n\t\treturn $results;\n\t}", "function get_field_data_by_id($field_id, $contact)\n{\n if (isset($contact['custom_fields'])) {\n $out = array();\n\n foreach ($contact['custom_fields'] as $key => $value) {\n if ($value['id'] == $field_id) {\n foreach ($value['values'] as $key => $data) {\n $out[] = $data['value'];\n }\n }\n }\n }\n\n if (!empty($out)) {\n return $out;\n } else {\n return false;\n }\n}", "static function getSingleUser($key = 'id', $value = 0, $key2 = '', $value2 = '', $key3 = '', \r\n $value3 = '', $key4 = '', $value4 = '')\r\n {\r\n if ($value === '')\r\n {\r\n return null;\r\n }\r\n\r\n $tableUser = DatabaseManager::getNameTable('TABLE_USER');\r\n\r\n $query = \"SELECT $tableUser.*\r\n FROM $tableUser \r\n WHERE $tableUser.$key = '$value'\";\r\n\r\n if ($key2 !== '')\r\n {\r\n $query = $query . \"AND $tableUser.$key2 = '$value2'\";\r\n }\r\n\r\n if ($key3 !== '')\r\n {\r\n $query = $query . \"AND $tableUser.$key3 = '$value3'\";\r\n }\r\n\r\n if ($key4 !== '')\r\n {\r\n $query = $query . \"AND $tableUser.$key4 = '$value4'\";\r\n }\r\n\r\n $myUser = DatabaseManager::singleFetchAssoc($query);\r\n $myUser = self::ArrayToUser($myUser);\r\n\r\n return $myUser;\r\n }", "function rest_get_best_type_for_value($value, $types)\n {\n }", "function query_contacts($email)\n\t{\n\t\t$xml = $this->load_url('contacts?email=' . strtolower(urlencode($email)));\n\n\t\tif(!$xml):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t$contact = false;\n\t\t$_contact = (isset($xml['feed']['entry'])) ? $xml['feed']['entry'] : false;\n\n\t\t// parse into nicer array\n\t\tif(is_array($_contact)):\n\t\t\t$id = $this->get_id_from_link($_contact['link_attr']['href']);\n\n\t\t\t$contact = $_contact['content']['Contact'];\n\t\t\t$contact['id'] = $id;\n\t\tendif;\n\n\t\treturn $contact;\n\t}", "protected function search_by($field, $value = ''){\n\n\t\tif(! $this->_default_model)\n\t\t\tdie(\"This class default model doesnt exist\");\n\n\t\t$search_result = $this->{$this->_default_model}->search($field, $value);\n\n\t\tdie(json_encode($search_result));\n\n\t}", "function get_contact($id)\n\t{\n\t\t$xml = $this->load_url(\"contacts/$id\");\n\n\t\tif(!$xml):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t$contact = false;\n\t\t$_contact = (isset($xml['entry'])) ? $xml['entry'] : false;\n\n\t\t// parse into nicer array\n\t\tif(is_array($_contact)):\n\t\t\t$id = $this->get_id_from_link($_contact['link_attr']['href']);\n\n\t\t\t$contact = $_contact['content']['Contact'];\n\n\t\t\tif(isset($_contact['content']['Contact']['ContactLists']['ContactList'])):\n\t\t\t\t$_lists = $_contact['content']['Contact']['ContactLists']['ContactList'];\n\t\t\t\tunset($_lists['0_attr']);\n\t\t\t\tunset($_lists['ContactList_attr']);\n\t\t\telse:\n\t\t\t\t$_lists = false;\n\t\t\tendif;\n\n\t\t\t// get lists\n\t\t\t$lists = array();\n\t\t\tif(is_array($_lists) && count($_lists) > 0):\n\t\t\t\tunset($_lists['id']);\n\n\t\t\t\tif(isset($_lists['link_attr']['href'])):\n\t\t\t\t\t$list_id = $this->get_id_from_link($_lists['link_attr']['href']);\n\t\t\t\t\t$lists[$list_id] = $list_id;\n\t\t\t\telse:\n\t\t\t\t\tforeach($_lists as $k => $v):\n\t\t\t\t\t\tif(isset($v['link_attr']['href'])):\n\t\t\t\t\t\t\t$list_id = $this->get_id_from_link($v['link_attr']['href']);\n\t\t\t\t\t\t\t$lists[$list_id] = $list_id;\n\t\t\t\t\t\tendif;\n\t\t\t\t\tendforeach;\n\t\t\t\tendif;\n\n\t\t\t\tunset($contact['ContactLists']);\n\t\t\tendif;\n\n\t\t\t$contact['lists'] = $lists;\n\t\t\t$contact['id'] = $id;\n\t\tendif;\n\n\t\treturn $contact;\n\t}", "public static function findBy($field, $value)\n {\n return static::select()\n ->where($field, $value)\n ->fetchOne();\n }", "public function findInfoByUid($uid){\n\t\t$sql = \"SELECT `id`, `name`, `cellphone`, `address` FROM `info` WHERE `uid` = ?\";\n\t\t$res = $this->connect()->prepare($sql);\n\t\t$res->bind_param(\"s\", $uid);\n\t\t$res->execute();\n\t\t$res->bind_result($id, $name, $cellphone, $address);\n\t\tif($res->fetch()) {\n\t\t\t$info = new \\stdClass();\n\t\t\t$info->id = $id;\n\t\t\t$info->name = $name;\n\t\t\t$info->cellphone = $cellphone;\n\t\t\t$info->$address = $address;\n\t\t\treturn $info;\n\t\t}\n\t\treturn NULL;\n\t}", "function get_contact_supplier_info_alias($alias_id, $idtype) {\n\t# Dim some Vars\n\t\tglobal $_DBCFG, $db_coin;\n\n\t# Set Query for select and execute\n\t\t$query = 'SELECT contacts_id, contacts_s_id, contacts_name_first, contacts_name_last, contacts_email FROM '.$_DBCFG['suppliers_contacts'];\n\t\tIF ($idtype) {\n\t\t\t$query .= ' WHERE contacts_s_id='.$alias_id;\n\t\t} ELSE {\n\t\t\t$query .= ' WHERE contacts_id='.$alias_id;\n\t\t}\n\t\t$query\t.= ' ORDER BY contacts_name_last, contacts_name_first ASC';\n\t\t$result\t= $db_coin->db_query_execute($query);\n\n\t# Get value and set return\n\t\t$x=0;\n\t\twhile(list($contact_id, $s_id, $s_name_first, $s_name_last, $s_email) = $db_coin->db_fetch_row($result)) {\n\t\t\t$x++;\n\t\t\t$_cinfo[$x]['contact_id']\t= $contact_id;\n\t\t\t$_cinfo[$x]['s_id']\t\t\t= $s_id;\n\t\t\t$_cinfo[$x]['s_name_first']\t= $s_name_first;\n\t\t\t$_cinfo[$x]['s_name_last']\t= $s_name_last;\n\t\t\t$_cinfo[$x]['s_company']\t\t= '';\n\t\t\t$_cinfo[$x]['s_email']\t\t= $s_email;\n\t\t}\n\n\t\treturn $_cinfo;\n}", "public function find($key, $value)\n {\n foreach ($this->lists as $list) {\n $result = $list->find($key, $value);\n if ($result) {\n return $result;\n }\n }\n return null;\n }", "public function findBy(string $column, $value)\n {\n return CustomField::where($column, $value)->get();\n }", "public function getContacts($value)\n {\n $contacts = Contact::getContacts($value);\n\n if ($contacts->count() > 0) {\n return new ContactResource($contacts);\n }\n\n return response()->json([\"status\" => \"error\", \"message\" => \"No se encontraron resultados!\"]);\n }", "function getFieldContactRelationship($value = null){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_EmergencyContactRelation');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_EmergencyContactRelation');\n\t\t$tooltip = setToolTipNotification(\"relation\");\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.(get_axl_req_fields('emcontactrel') === 'emcontactrel' ? '<span class=\"red\">*</span>' : '').$tooltip.\"</label><br><input type='text' name='EmergencyContactRelation' id='EmergencyContactRelation' value='\".$value.\"' class='srms-field \".(get_axl_req_fields('emcontactrel') === 'emcontactrel' ? 'input-text-required' : '').\"'></br>\";\n\t\t}\n\t\treturn $form_ret;\n\t}", "function getMetaType($type) {\r\n \r\n foreach( $this->data['VenueMeta'] as $i => $row ) {\r\n if ( $row['meta_key'] == $type) {\r\n return $row;\r\n }\r\n }\r\n \r\n return false;\r\n }", "public function getLookupField() {}", "public static function exists($value, $name = \"id\"){\n return parent::fetch($value, $name);\n }", "function _findValue(&$values)\r\n {\r\n return $this->getValue();\r\n }", "function _doesoe_theme_entity_get_value($entity_type, $entity, $field) {\n if (empty($entity)) {\n return NULL;\n }\n $entity_w = entity_metadata_wrapper($entity_type, $entity);\n if (isset($entity_w->{$field}) && !empty($entity_w->{$field}->value())) {\n $term = $entity_w->{$field}->value();\n return $term;\n }\n return NULL;\n}", "public static function getArticle($type = null, $value = null) {\n\t\t$allowedTypes = [ \"articleID\",\"articleTitle\" \n\t\t];\n\t\ttry {\n\t\t\tif (! is_null ( $type )) {\n\t\t\t\tif (! in_array ( $type, $allowedTypes ))\n\t\t\t\t\tthrow new PDOException ( \"$type not an allowed search criterion for articles\" );\n\t\t\t\t$db = Database::getDB ();\n\t\t\t\t$query = \"SELECT * FROM articles\";\n\t\t\t\tif (strcmp ( $type, \"articleID\" )) {\n\t\t\t\t\t$query = $query . \" WHERE :type = :value\";\n\t\t\t\t} elseif (strcmp ( $type, \"articleTitle\" )) {\n\t\t\t\t\techo \"searching for a title\";\n\t\t\t\t\t$query = $query . \" WHERE :type = :value\";\n\t\t\t\t}\n\t\t\t\t$statement = $db->prepare ( $query );\n\t\t\t\t$statement->bindValue ( \":type\", $type );\n\t\t\t\t$statement->bindValue ( \":value\", $value );\n\t\t\t\t$statement->execute ();\n\t\t\t\t$statement->closeCursor ();\n\t\t\t\t\n\t\t\t\t$articleResult = $statement->fetchAll ( PDO::FETCH_ASSOC );\n\t\t\t}\n\t\t} catch ( Exception $e ) { // Not permanent error handling\n\t\t\techo \"<p>Error getting aricles rows by $type </p>\";\n\t\t\tprint $e;\n\t\t}\n\t\t$article = new Article ( $articleResult );\n\t\treturn $article;\n\t}", "function insertOrFetchContact(&$cont, $update = false){\n $ciq = $this->queryOLS(\"select contactId,hubspotVID,accountId from Contacts where email = '\".mysqli_real_escape_string($this->con, $cont['email']).\"'\");\n if(!$ciq || !mysqli_num_rows($ciq)){\n $cont['contactId'] = $this->insertToOLS_NR('Contacts',$cont, 'contactId');\n }\n else { \n $row = $ciq->fetch_assoc();\n $cont['contactId'] = $row['contactId'];\n //If we arent updating, or if the provided contact doesnt have a vid or accountid, update those in the provided contact\n if(!$update || !array_key_exists('hubspotVID', $cont) || !$cont['hubspotVID']) $cont['hubspotVID'] = $row['hubspotVID'];\n if(!$update || !array_key_exists('accountId', $cont) || !$cont['accountId']) $cont['accountId'] = $row['accountId'];\n if($update) $this->updateOLS('Contacts', $cont, 'contactId'); //Update if requested\n }\n return $cont['contactId'];\n }", "public function getByField($field, $value)\n {\n }", "public function getByField($field, $value)\n {\n }", "public function testByFieldValue()\n\t{\n\t\t$container = $this->containerFactory();\n\t\t//Create one entry for unknown user\n\t\t$this->createEntryWithEmail( rand(). 'email.com' );\n\n\t\t//Create two entries for a known user.\n\t\t$email = '[email protected]';\n\t\t$userId = $this->factory()->user->create(\n\t\t\t[ 'user_email' => $email ]\n\t\t);\n\t\twp_set_current_user( $userId );\n\t\t$this->createEntryWithEmail( $email );\n\t\t$this->createEntryWithEmail( $email );\n\n\t\t$results = $container->selectByFieldValue(\n\t\t\t$this->getEmailFieldSlug(),\n\t\t\t$email\n\t\t);\n\t\t$this->assertSame(2, count($results));\n\t\t$this->assertSame( $email,$results[0]['values'][1]->value );\n\t\t$this->assertSame( $email,$results[1]['values'][1]->value );\n\n\t}", "function getFieldValue(&$record, $name, $type) {\n\t\t$fieldValue = null;\n\t\t$parsedContents = $record->getParsedContents();\n\t\tif (isset($parsedContents[$name])) switch ($type) {\n\t\t\tcase SORT_ORDER_TYPE_STRING:\n\t\t\t\t$fieldValue = join(';', $parsedContents[$name]);\n\t\t\t\tbreak;\n\t\t\tcase SORT_ORDER_TYPE_NUMBER:\n\t\t\t\t$fieldValue = (int) array_shift($parsedContents[$name]);\n\t\t\t\tbreak;\n\t\t\tcase SORT_ORDER_TYPE_DATE:\n\t\t\t\t$fieldValue = strtotime($thing = array_shift($parsedContents[$name]));\n\t\t\t\tif ($fieldValue === -1 || $fieldValue === false) $fieldValue = null;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tfatalError('UNKNOWN TYPE');\n\t\t}\n\t\tHookRegistry::call('DublinCorePlugin::getFieldValue', array(&$this, &$fieldValue));\n\t\treturn $fieldValue;\n\t}", "public function find_by($field=null, $value=null)\n\t{\n\t\t$this->db->join('news_categories', 'news_categories.id = news_articles.category_id', 'left');\n\t\t$this->db->join('news_status', 'news_status.id = news_articles.status_id', 'left');\n\n\t\tif (empty($this->selects))\n\t\t{\n\t\t\t$this->select($this->table_name .'.*, category');\n\t\t}\n\t\t\n\t\t$this->from($this->table_name);\n\t\treturn parent::find_by($field, $value);\n\t}", "public static function findbyName($customerid, $type_id) {\n\t\t$result = Doctrine::getTable ( 'Contacts' )->findBySql ( \"type_id = '?' and customer_id = '?'\", array ($type_id, $customerid ) );\n\t\t\n\t\treturn $result;\n\t}", "public function find($array, $value, $key = 'id'){\n \n foreach($array as $obj){\n \n if(is_array($obj) && $obj[$key] == $value) return $obj;\n else if(is_object($obj) && $obj->{$key} == $value) return $obj;\n \n }\n \n return null;\n \n }", "function civicrm_api3_contact_getttpquick($params) {\n $result = array();\n $name = mysql_real_escape_string ($params['name']);\n $N= $params[\"option_limit\"];\n if (!is_numeric($N)) throw new Exception(\"invalid option.limit value\");\n if ($N>999) $N=999;\n $return_array = explode(\",\", mysql_real_escape_string($params[\"return\"]));\n if (!$return_array[0]) { // for some reasons, escape doesn't always work (lost mysql connection?)\n $return_array = array (\"sort_name\",\"email\");\n }\n $fields = civicrm_api(\"contact\",\"getfields\",array(\"version\"=>3));\n unset($fields[\"value\"][\"api_key\"]); // security blacklist\n unset($fields[\"value\"][\"id\"]); // security blacklist\n $fields = $fields['values'];\n $fields[\"email\"]=1;\n foreach ($return_array as $k => &$v) {\n if (!array_key_exists($v,$fields))\n unset($return_array[$k]);\n }\n require_once 'CRM/Contact/BAO/Contact/Permission.php';\n list($aclFrom, $aclWhere) = CRM_Contact_BAO_Contact_Permission::cacheClause('civicrm_contact');\n\n if ($aclWhere) {\n $where = \" AND $aclWhere \";\n }\n\n\n $return = \"civicrm_contact.id, email, \". implode (\",\",$return_array);\n if (!$params['with_email_only'] && strlen ($name) < $params['fastSearchLimit']) { // start with a quick and dirty\n\n $sql = \"SELECT civicrm_contact.id, sort_name FROM civicrm_contact $aclFrom WHERE $aclWhere AND sort_name LIKE '$name%' ORDER BY sort_name LIMIT $N\";\n $dao = CRM_Core_DAO::executeQuery($sql);\n if($dao->N == $N) { \n while($dao->fetch()) {\n $result[$dao->id] = array (id=>$dao->id, \"sort_name\"=>$dao->sort_name);\n }\n return civicrm_api3_create_success($result, $params, 'Contact', 'getgoodquick');\n }\n }\n // search on name and first name\n if ($params['with_email_only']) \n $join = \"JOIN\";\n else \n $join = \"LEFT JOIN\";\n\n $sql = \"\n SELECT $return \n FROM civicrm_contact $aclFrom\n $join civicrm_email ON civicrm_email.contact_id = civicrm_contact.id \n WHERE (first_name LIKE '$name%' OR sort_name LIKE '$name%')\n AND $aclWhere \n ORDER BY sort_name LIMIT $N\";\n $dao = CRM_Core_DAO::executeQuery($sql);\n while($dao->fetch()) {\n $result[$dao->id] = array ('id'=>$dao->id, \"sort_name\"=>$dao->sort_name);\n foreach ($return_array as $r)\n if (!empty($dao->$r)) \n $result[$dao->id][$r] = $dao->$r;\n }\n\n // if matches found less than 15, try to find more \n if($dao->N < $N) { \n $limit = $N - $dao->N;\n if (strpos ($name,\" \") === false) {\n // find the match from email table \n $sql = \" \n SELECT $return \n FROM civicrm_email, civicrm_contact $aclFrom\n WHERE email LIKE '$name%' \n AND civicrm_email.contact_id = civicrm_contact.id\n AND $aclWhere \n ORDER BY sort_name \n LIMIT $limit\"; \n } else {\n $names= explode (\" \", $name);\n if (count($names)>2) {\n $where = \" WHERE display_name LIKE '%$name%'\";\n } else {\n $where = \" WHERE sort_name LIKE '{$names[0]}, {$names[1]}%' OR sort_name LIKE '{$names[1]}%, {$names[0]}' \";\n }\n $sql = \" \n SELECT $return \n FROM civicrm_contact $aclFrom\n $join civicrm_email ON civicrm_email.contact_id = civicrm_contact.id \n $where \n AND $aclWhere \n ORDER BY sort_name \n LIMIT $limit\"; \n }\n $dao = CRM_Core_DAO::executeQuery($sql); \n while($dao->fetch()) {\n $result[$dao->id] = array (id=>$dao->id, \"sort_name\"=>$dao->sort_name);\n foreach ($return_array as $r)\n if (!empty($dao->$r)) \n $result[$dao->id][$r] = $dao->$r;\n }\n }\n if (count ($result)<$N) { // scrapping the %bottom%\n $sql = \"\n SELECT $return \n FROM civicrm_contact $aclFrom\n LEFT JOIN civicrm_email ON civicrm_email.contact_id = civicrm_contact.id \n WHERE (sort_name LIKE '%$name%')\n AND $aclWhere \n ORDER BY sort_name LIMIT \". ($N - count ($result));\n $dao = CRM_Core_DAO::executeQuery($sql);\n while($dao->fetch()) {\n $result[$dao->id] = array (id=>$dao->id, \"sort_name\"=>$dao->sort_name);\n foreach ($return_array as $r)\n if (!empty($dao->$r)) \n $result[$dao->id][$r] = $dao->$r;\n }\n }\n \n if (count ($result)<$N && (strpos($name,\".\") !== false || strpos($name,\"@\"))) {\n // fetching on %email% if the string contains @ or . \n $sql = \"\n SELECT $return \n FROM civicrm_contact $aclFrom\n LEFT JOIN civicrm_email ON civicrm_email.contact_id = civicrm_contact.id \n WHERE (email LIKE '%$name%')\n AND $aclWhere \n ORDER BY sort_name LIMIT \". ($N - count ($result));\n $dao = CRM_Core_DAO::executeQuery($sql);\n while($dao->fetch()) {\n $result[$dao->id] = array (id=>$dao->id, \"sort_name\"=>$dao->sort_name);\n foreach ($return_array as $r)\n if (!empty($dao->$r)) \n $result[$dao->id][$r] = $dao->$r;\n }\n\n }\n\n return civicrm_api3_create_success($result, $params, 'Contact', 'getttpquick');\n}", "public function find($where=false, $val=false, $num='*'){\n\t\t$query = \"SELECT $num FROM {$this->TABLE}\";\n\t\tif($where && $val){\n\t\t\t$query .= \" WHERE $where = '$val'\";\n\t\t}\n\t\t$q = parent::query($query);\n\t\tif($q){\n\t\t\t$count = mysql_num_rows($q);\n\t\t\tif($count==1){\n\t\t\t\treturn (object) mysql_fetch_array($q);\n\t\t\t} else if($count==0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$vals = array();\n\t\t\twhile($r = mysql_fetch_array($q)){\n\t\t\t\t$vals[] = (object) $r;\n\t\t\t}\n\t\t\treturn (object) $vals;\n\t\t}\n\t\treturn false;\n\t}", "function getByID($table,$field,$value);", "public function findContactBy(array $criteria);", "function getContact($id){\n\t$query = \"SELECT sc_contacts.*, sc_science.id AS sci_id, sc_science.name \n\t\tFROM sc_contacts JOIN sc_science ON sc_contacts.refer_science_id = sc_science.id \n\t\tWHERE sc_contacts.id = {$id}\";\n\t$result = mysql_query($query);\t\n\tif (!$result) {\n\t die('Invalid query: ' . mysql_error());\n\t} else {\n\t\treturn $result;\t\n\t}\t\n}" ]
[ "0.6344577", "0.6271604", "0.61662763", "0.6123416", "0.6027116", "0.6005967", "0.59505665", "0.584844", "0.58307195", "0.57981235", "0.57743216", "0.5691926", "0.56903946", "0.5676146", "0.5648724", "0.5599962", "0.5534691", "0.5529129", "0.545164", "0.5445219", "0.54136765", "0.54080427", "0.5376639", "0.5352317", "0.53292155", "0.53239155", "0.53189486", "0.5301412", "0.5282046", "0.52805376", "0.52788526", "0.5274397", "0.5268874", "0.52657145", "0.52641094", "0.5250709", "0.52467495", "0.5219218", "0.5213864", "0.5212218", "0.5199546", "0.519708", "0.51966375", "0.5190989", "0.5182336", "0.5164044", "0.51604825", "0.5142981", "0.51396227", "0.5138861", "0.5134978", "0.5105734", "0.50885546", "0.508385", "0.50827354", "0.5071206", "0.50670254", "0.50586915", "0.50539374", "0.5050809", "0.50484866", "0.50359225", "0.50312036", "0.50221974", "0.5021351", "0.50129026", "0.50111496", "0.50100297", "0.49964908", "0.4978219", "0.4972366", "0.49711496", "0.4970989", "0.49690488", "0.49657297", "0.49622658", "0.49613023", "0.4960583", "0.49582255", "0.49521968", "0.49521604", "0.49517652", "0.49434724", "0.49417353", "0.49405736", "0.49397048", "0.49385548", "0.49364382", "0.49349204", "0.4934064", "0.4934064", "0.492904", "0.49229047", "0.49227345", "0.49224976", "0.4918201", "0.49155343", "0.49016312", "0.48918054", "0.48889306", "0.4885938" ]
0.0
-1
Run the database seeds.
public function run() { if(DB::table('agents')->count() == 0) { DB::table('agents')->insert([ 'nom' =>'Lekhal', 'prenom' => 'Maha', 'sexe'=>'Femme', 'user_id' => 1, 'poste_id' =>1, 'updated_at'=>now(), 'created_at' => now() ]); } }
{ "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
Determine if the user is authorized to make this request.
public function authorize() { /* AQUI PODRIA REALIZAR ALGÚN TIPO DE VALIDACIÓN INDICANDO SI EL USUARIO TIENE PERMISOS PARA CREAR EL RECURSO, EN ESTE CASO SOLO DEVUELVO EL true PARA INDICAR QUE CUALQUIER USUARIO PUEDE CREAR EL RECURSO */ 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 # if it's false, it will rejected\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 $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.8399528", "0.83755803", "0.83755803", "0.8342532", "0.8252005", "0.8246491", "0.82114965", "0.81451535", "0.81095713", "0.80819905", "0.799094", "0.79885143", "0.79823685", "0.7959513", "0.7950321", "0.7947592", "0.7925319", "0.7914417", "0.7899287", "0.7892423", "0.788904", "0.7888573", "0.7859566", "0.7840388", "0.7840388", "0.7837057", "0.7822922", "0.78116244", "0.7807664", "0.7791735", "0.7785959", "0.77811456", "0.77799726", "0.7762375", "0.7753727", "0.7719034", "0.7719034", "0.771513", "0.77119666", "0.77024996", "0.7692876", "0.76920134", "0.76908916", "0.7689253", "0.7672893", "0.7666128", "0.7665256", "0.76551706", "0.76500374", "0.76414853", "0.7641037", "0.7640742", "0.763345", "0.7629214", "0.7628391", "0.76269794", "0.76197463", "0.76197463", "0.76123273", "0.7602711", "0.7602425", "0.76015925", "0.76015925", "0.76007396", "0.7597639", "0.75951606", "0.7587452", "0.7584679", "0.7579657", "0.7562462", "0.7552138", "0.7551783", "0.75504583", "0.754368", "0.7541822", "0.75382096", "0.75371224", "0.75285393", "0.75156033", "0.7512623", "0.7499459", "0.74951875", "0.7494698", "0.74913925", "0.74869126", "0.7486122", "0.74787915", "0.7476152", "0.7471878", "0.7470218", "0.7464096", "0.74636215", "0.7463019", "0.74618673", "0.74608135", "0.7448682", "0.74387354", "0.743482", "0.74337745", "0.74311817", "0.7422809" ]
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'nombre' => [ 'required', 'min:3', Rule::unique('projects')->ignore( $this->route('project') ), /* OBTENEMOS EL PARAMETRO QUE VENGA POR LA RUTA => $this->route('project') AHORA CON Rule::unique('projects')->ignore( $this->route('project') ), LE INDICAMOS QUE EL CAMPO nombre SEA UNICO EN LA TABLA projects E IGNORE EL PARAMETRO project QUE VIENE EN LA RUTA, DE ESTA MANERA PODREMOS EDITAR LOS PROYECTOS, SINO CUANDO INTENTAMOS EDITARLO PRIMERO VA A BUSCAR EL nombre DEL PROYECTO EN LA BD Y AL ENCONTRARLO FALLA LA VALIDACIÓN */ ], 'descripcion' => 'required | min:3', 'imagen' => [ $this->route('project') ? 'nullable' : 'required', 'image', 'max: 3072', ], 'category_id' => [ 'required', 'exists:categories,id' ] ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }", "public function rules()\n {\n return $this->validationRules;\n }", "public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }", "public static function getRules()\n {\n return (new static)->getValidationRules();\n }", "public function getRules()\n {\n return $this->validation_rules;\n }", "public function getValidationRules()\n {\n return [];\n }", "public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }", "public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }", "public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }", "protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }", "public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }", "public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n return $this->rules;\n }", "public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }", "public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }", "protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }", "public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }", "public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }", "protected function getValidRules()\n {\n return $this->validRules;\n }", "public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }", "public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }", "public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n { \n return $this->rules;\n }", "public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }", "public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }", "public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }", "public function validationRules()\n {\n return [];\n }", "public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }", "function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}", "public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }", "public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n return static::$rules;\n }", "function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}", "public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }", "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }", "protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }", "public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }", "public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }", "public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }", "public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }", "public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }", "abstract protected function getValidationRules();", "public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }", "public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }", "public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }", "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }", "public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }", "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }", "public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }", "public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }", "public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }", "public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }", "public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }", "public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }", "public function getValidationRules() : array;", "public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }", "public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }", "public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }", "public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }", "public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}", "public function rules()\n {\n $rules = array();\n return $rules;\n }", "public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }", "public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }", "protected function get_validation_rules()\n {\n }", "public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }", "public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }", "public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }", "public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }", "public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }", "public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }", "public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }", "public function defineValidationRules()\n {\n return [];\n }", "public function rules(Request $request)\n {\n return Qc::$rules;\n }", "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }", "public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }" ]
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7675849", "0.76724476", "0.76665044", "0.7657698", "0.7641827", "0.7630892", "0.76293766", "0.7617708", "0.76102096", "0.7607475", "0.7602442", "0.7598732", "0.7597544", "0.75924", "0.75915384", "0.7588146", "0.7581354", "0.7555758", "0.755526", "0.7551423", "0.7546329", "0.7541439", "0.75366044", "0.75363225", "0.7530296", "0.7517988", "0.75155175", "0.7508439", "0.75069886", "0.7505724", "0.749979", "0.7495976", "0.74949056", "0.7492888", "0.7491117", "0.74901396", "0.7489651", "0.7486808", "0.7486108", "0.7479687", "0.7478561", "0.7469412", "0.74635684", "0.74619836", "0.7461325", "0.74591017", "0.7455279", "0.745352", "0.7453257", "0.7449877", "0.74486", "0.7441391", "0.7440429", "0.7435489", "0.7435326", "0.74341524", "0.7430354", "0.7429103", "0.7423808", "0.741936", "0.74152505", "0.7414828", "0.741382", "0.74126065", "0.74105227", "0.740555", "0.7404385", "0.74040926", "0.74015605", "0.73905706", "0.73837525", "0.73732615", "0.7371123", "0.7369176", "0.73619753", "0.73554605", "0.73448825", "0.7344659", "0.73427117", "0.73357755" ]
0.0
-1
Sets up the fixture.
protected function setUp() { $this->optionnalfunctions = array( // requires GeoIP C library 1.4.1 or higher (LIBGEOIP_VERSION >= 1004001) 'geoip_region_name_by_code', 'geoip_time_zone_by_country_and_region', ); $this->obj = new PHP_CompatInfo_Reference_Geoip(); parent::setUp(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_connection,\n\t\t\t\t'fixtures' => $this->_fixtures\n\t\t\t]\n\t\t];\n\n\t\tFixtures::config($options);\n\t\tFixtures::save('db');\n\t}", "protected function setUp()\n {\n $this->fixture = new Record();\n }", "public function setup()\n {\n parent::setup();\n \n // Build some fuxture values\n $this->userName = 'fixture';\n $this->firstName = 'Test';\n $this->lastName = 'User';\n $this->email = '[email protected]';\n $this->password = '123123';\n $this->roleName = 'Fixture';\n // Generate the fixture\n $this->createAdminUserFixture(); \n }", "protected function fixture_setup() {\r\n $this->service = SQLConnectionService::get_instance($this->configuration);\r\n test_data_setup($this->service);\r\n }", "protected function setUp()\n {\n $this->fixture = new Configuration();\n }", "public function setUp()\n {\n $folder = dirname(__DIR__) . '/fixtures';\n\n $this->keyVal(true);\n $this->_mutableLoader = new Loader($folder);\n $this->_immutableLoader = new Loader($folder, true);\n }", "public function setupFixtures()\n {\n if ($this->_fixtures === null) {\n $loadedFixtures = [];\n foreach ($this->fixtures() as $fixtureClass) {\n $loadedFixtures[$fixtureClass] = Yii::createObject($fixtureClass);\n }\n\n $this->_fixtures = $loadedFixtures;\n }\n }", "public function setUp()\n {\n $this->fixture = new Finder();\n }", "function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t\n\t\t// Set up fixture\n\t\tif($fixtureFile) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(),0,5) != 'tmpdb') {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\t// This code is a bit misplaced; we want some way of the whole session being reinitialised...\n\t\t\tVersioned::reading_stage(null);\n\n\t\t\tsingleton('DataObject')->flushCache();\n\n\t\t\t$dbadmin = new DatabaseAdmin();\n\t\t\t$dbadmin->clearAllData();\n\t\t\t\n\t\t\t// We have to disable validation while we import the fixtures, as the order in\n\t\t\t// which they are imported doesnt guarantee valid relations until after the\n\t\t\t// import is complete.\n\t\t\t$validationenabled = DataObject::get_validation_enabled();\n\t\t\tDataObject::set_validation_enabled(false);\n\t\t\t$this->fixture = new YamlFixture($fixtureFile);\n\t\t\t$this->fixture->saveIntoDatabase();\n\t\t\tDataObject::set_validation_enabled($validationenabled);\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t}", "protected function setUp()\n {\n $this->fixture = new Parameter();\n }", "public function setUp(): void\n {\n $this->fixture = new Finder();\n }", "public function setUp() {\n $this->fixture= new FreeTdsLookup($this->getClass()->getPackage()->getResourceAsStream('freetds.conf'));\n }", "protected function postFixtureSetup()\n {\n }", "public function setUp() {\n $this->fixture= new TreeParser();\n }", "protected function setUp(): void\n {\n \tparent::setUp();\n\n \t$this->authorize();\n\n \t$this->loadFixtures([\n \t\t'product'=>ProductFixture::class\n \t]);\n }", "protected function setUp(): void\n {\n $this->fixture = new TestSubjectDescriptor();\n }", "protected function setUp()\n {\n $this->fixture = new DTAZV();\n $DTAZV_account = array(\n 'name' => \"Senders Name\",\n 'additional_name' => '',\n 'bank_code' => \"16050000\",\n 'account_number' => \"3503007767\",\n );\n $this->fixture->setAccountFileSender($DTAZV_account);\n }", "protected function setUp()\n {\n $this->fixture = new NamespaceDescriptor();\n }", "public function setUp()\n {\n $this->fixtures('articles');\n }", "protected function setUp() {\n\t\tparent::setUp();\n\n\t\t$this->object = new ControllerFixture([\n\t\t\t'module' => 'module',\n\t\t\t'controller' => 'controller',\n\t\t\t'action' => 'action',\n\t\t\t'args' => [100, 25]\n\t\t]);\n\n\t\t// Used by throwError()\n\t\tTiton::router()->initialize();\n\t}", "public function setUp()\n\t{\n\t\tparent::setUp();\n if(is_array($this->fixtures)){\n foreach($this->fixtures as $fixtureName=>$modelClass)\n {\n $tableName=WF_Table::model($modelClass)->tableName();\n $this->resetTable($tableName);\n $rows=$this->loadFixtures($modelClass, $tableName);\n if(is_array($rows) && is_string($fixtureName))\n {\n $this->_rows[$fixtureName]=$rows;\n if(isset($modelClass))\n {\n foreach(array_keys($rows) as $alias)\n $this->_records[$fixtureName][$alias]=$modelClass;\n }\n }\n }\n }\n }", "function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// i18n needs to be set to the defaults or tests fail\n\t\ti18n::set_locale(i18n::default_locale());\n\t\ti18n::set_date_format(null);\n\t\ti18n::set_time_format(null);\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\t\t\n\t\tif(class_exists('RootURLController')) RootURLController::reset();\n\t\tif(class_exists('Translatable')) Translatable::reset();\n\t\tVersioned::reset();\n\t\tDataObject::reset();\n\t\tif(class_exists('SiteTree')) SiteTree::reset();\n\t\tHierarchy::reset();\n\t\tif(Controller::has_curr()) Controller::curr()->setSession(new Session(array()));\n\t\t\n\t\t$this->originalTheme = SSViewer::current_theme();\n\t\t\n\t\tif(class_exists('SiteTree')) {\n\t\t\t// Save nested_urls state, so we can restore it later\n\t\t\t$this->originalNestedURLsState = SiteTree::nested_urls();\n\t\t}\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\n\t\t// Set up fixture\n\t\tif($fixtureFile || $this->usesDatabase || !self::using_temp_db()) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(), 0, strlen($prefix) + 5) != strtolower(sprintf('%stmpdb', $prefix))) {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\tsingleton('DataObject')->flushCache();\n\t\t\t\n\t\t\tself::empty_temp_db();\n\t\t\t\n\t\t\tforeach($this->requireDefaultRecordsFrom as $className) {\n\t\t\t\t$instance = singleton($className);\n\t\t\t\tif (method_exists($instance, 'requireDefaultRecords')) $instance->requireDefaultRecords();\n\t\t\t\tif (method_exists($instance, 'augmentDefaultRecords')) $instance->augmentDefaultRecords();\n\t\t\t}\n\n\t\t\tif($fixtureFile) {\n\t\t\t\t$pathForClass = $this->getCurrentAbsolutePath();\n\t\t\t\t$fixtureFiles = (is_array($fixtureFile)) ? $fixtureFile : array($fixtureFile);\n\n\t\t\t\t$i = 0;\n\t\t\t\tforeach($fixtureFiles as $fixtureFilePath) {\n\t\t\t\t\t// Support fixture paths relative to the test class, rather than relative to webroot\n\t\t\t\t\t// String checking is faster than file_exists() calls.\n\t\t\t\t\t$isRelativeToFile = (strpos('/', $fixtureFilePath) === false || preg_match('/^\\.\\./', $fixtureFilePath));\n\t\t\t\t\tif($isRelativeToFile) {\n\t\t\t\t\t\t$resolvedPath = realpath($pathForClass . '/' . $fixtureFilePath);\n\t\t\t\t\t\tif($resolvedPath) $fixtureFilePath = $resolvedPath;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$fixture = new YamlFixture($fixtureFilePath);\n\t\t\t\t\t$fixture->saveIntoDatabase();\n\t\t\t\t\t$this->fixtures[] = $fixture;\n\n\t\t\t\t\t// backwards compatibility: Load first fixture into $this->fixture\n\t\t\t\t\tif($i == 0) $this->fixture = $fixture;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->logInWithPermission(\"ADMIN\");\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t\tEmail::send_all_emails_to(null);\n\t\t\n\t\t// Preserve memory settings\n\t\t$this->originalMemoryLimit = ini_get('memory_limit');\n\t}", "protected function setUp()\r\n {\r\n self::bootKernel();\r\n\r\n //Apply the primer\r\n DatabasePrimer::prime(self::$kernel);\r\n\r\n //Set entity manager\r\n $this->em = DatabasePrimer::$entityManager;\r\n\r\n $fixture = new ProfileFixtures();\r\n $fixture->load($this->em);\r\n }", "protected function setUp()\n {\n $this->fixture = new TraitDescriptor();\n }", "final public function setUp( )\n {\n $this->_initContext();\n\n $this->_assertTestDatabaseConnection();\n $this->_assertTestUploadsDir();\n\n $configuration = $this->getApplicationConfiguration();\n\n $this->_fixtureLoader = new Test_FixtureLoader($configuration);\n $this->_state = new Test_State($configuration);\n\n /* Set custom sfConfig values here. */\n sfConfig::add(array(\n 'sf_fixture_dir' =>\n $this->_fixtureLoader->getFixtureDir(false, $this->_plugin)\n ));\n\n $this->_state\n ->flushDatabase($this->_alwaysRebuildDB)\n ->flushUploads()\n ->flushConfigs();\n\n $this->_init();\n $this->_setUp();\n }", "public function setUp()\n {\n $this->loadFixtures([]);\n }", "public function setUp(): void\n {\n parent::setUp();\n $this->setUpFaker();\n }", "public function setUp()\n {\n Configure::write('Error.exceptionRenderer', JsonApiExceptionRenderer::class);\n\n Router::scope('/', function ($routes) {\n $routes->resources('Countries', [\n 'inflect' => 'dasherize'\n ]);\n $routes->resources('Currencies', [\n 'inflect' => 'dasherize'\n ]);\n $routes->resources('Cultures', [\n 'inflect' => 'dasherize'\n ]);\n });\n\n $this->configRequest([\n 'headers' => [\n 'Accept' => 'application/vnd.api+json'\n ]\n ]);\n\n // store path the the json fixtures\n $this->_JsonDir = Plugin::path('Crud') . 'tests' . DS . 'Fixture' . DS . 'JsonApi' . DS;\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->load();\n }", "protected function setUp(): void\n {\n parent::setUp();\n $this->withFactories(__DIR__.'/Fixtures/Factories');\n $this->loadMigrationsFrom(__DIR__ . '/Fixtures/Migrations');\n require __DIR__.'/Fixtures/routes.php';\n }", "protected function setUp()\n {\n vfsStream::setup('root');\n $this->config = new MultilevelBag();\n }", "public function setUp() {\n $this->fixture= new RestJsonSerializer();\n }", "public function setUp()\n {\n $faker = new Generator();\n $faker->addProvider(new Animals($faker));\n $this->faker = $faker;\n }", "protected function setUp()\n {\n parent::setUp();\n\n $this->importDataSet('PACKAGE:tests/Functional/Fixtures/pages.xml');\n $this->importDataSet('PACKAGE:tests/Functional/Fixtures/sys_language.xml');\n $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/core/Tests/Functional/Fixtures/pages_language_overlay.xml');\n $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/backend/Tests/Functional/Fixtures/tx_irretutorial_1ncsv_hotel.xml');\n\n $this->setUpBackendUserFromFixture(1);\n Bootstrap::getInstance()->initializeLanguageObject();\n\n $this->subject = new FormInlineAjaxController();\n }", "public function setUp(): void\n {\n $this->entity = new Team('t1');\n }", "public function setUp()\n {\n $this->fixtures('unit_tests');\n }", "public function setUp() : void\n {\n parent::setUp();\n $this->setUpFaker();\n\n $this->setupPermissions();\n\n $this->admin = User::factory()->create();\n $this->admin->assignRole('admin');\n\n $this->user = User::factory()->create();\n }", "public function setUp()\n {\n $this->fixture = new SetShippingMethod();\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->setUpToolsAliases(true);\n $this->setUpToolsModels();\n $this->setUpToolsDB();\n }", "protected function setUp()\n {\n parent::setUp();\n $this->object = TemplateHelper::create();\n }", "public function setUp()\n {\n $this->reloadSchema();\n $this->reloadDataFixtures();\n }", "protected function setUp()\n {\n $this->fixture = new InterfaceDescriptor();\n }", "public function setUp()\n {\n foreach (glob(__DIR__.'/../data/*.json') as $jsonFile) {\n if (basename($jsonFile) != 'json_output_test_json_fixed.json') {\n unlink($jsonFile);\n }\n }\n\n $this->data = [\n [1, 'PHP Developer', 'Mazen Kenjrawi'],\n [4, 'Dummy Classes', 'Foo Bar'],\n ];\n\n $this->headingFields = ['id', 'Title', 'Name'];\n\n $this->Loader = new Loader();\n }", "public function setUp() : void\n {\n parent::setUp();\n $this->setUpFaker();\n\n $this->setupBlogPermissions();\n\n $this->admin = User::factory()->create();\n $this->admin->assignRole('admin');\n\n $this->user = User::factory()->create();\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->seed();\n\n $this->manager = new EquationManager();\n $this->user = User::first();\n $this->actingAs( $this->user );\n }", "public static function setUpBeforeClass() {\n global $CFG;\n\n self::$fixtures = $CFG->dirroot . '/admin/tool/pluginkenobi/tests/fixtures/lang_generator';\n }", "protected function setUp() {\n\n\t\tparent::setUp();\n\t\tMonkey\\setUp();\n\t}", "public function __construct()\n {\n // setup the fixture settings\n $this->fixtureSettings = array(\n sfConfig::get('sf_data_dir') . '/fixtures/wspNopastePlugin-sfGuardUserTest.yml' => 'mcx-users',\n sfConfig::get('sf_data_dir') . '/fixtures/wspNopastePlugin-EntriesCommentsTest.yml' => 'wsp-nopaste',\n );\n }", "public function setUp() {\r\n // and doing it every test slows the tests down to a crawl\r\n $this->sharedFixture = new MovieLensDataSet(DATA_DIR);\r\n }", "protected function setUp() {\n\t\tparent::setUp();\n\t\tMonkey\\setUp();\n\t}", "protected function setUp() {\n\t\tparent::setUp();\n\t\tMonkey\\setUp();\n\t}", "public static function setUpBeforeClass(): void\n {\n parent::setUpBeforeClass();\n\n self::$reader = [\n 'username' => self::$faker->userName,\n 'email' => self::$faker->email,\n 'password' => self::$faker->password,\n ];\n\n // load user admin fixtures\n parent::$writer['id'] = Utils::loadUserData(\n parent::$writer['username'],\n parent::$writer['email'],\n parent::$writer['password'],\n true\n );\n\n // load user reader fixtures\n self::$reader['id'] = Utils::loadUserData(\n self::$reader['username'],\n self::$reader['email'],\n self::$reader['password'],\n false\n );\n }", "protected function setUp(): void\n {\n $this->dbSetUp();\n $this->prepareObjects();\n $this->createDummyData();\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->importDataSet('EXT:t3v_testing/Tests/Functional/Fixtures/Database/Pages.xml');\n\n $this->setUpFrontendRootPage(\n 1,\n [\n 'constants' => [\n 'EXT:t3v_core/Configuration/TypoScript/constants.typoscript'\n ],\n 'setup' => [\n 'EXT:t3v_core/Configuration/TypoScript/setup.typoscript'\n ]\n ]\n );\n\n $this->subject = new SettingsService();\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->setUpToolsAliases(true);\n $this->setUpToolsRoutes();\n $this->setUpToolsModels();\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->data[$this->identifier] = 1;\n\n $this->entity = new $this->class($this->data);\n }", "protected function setUp()\n {\n $this->object = new Template();\n }", "public function setup()\n {\n $this->createCategories();\n $this->createProducts();\n }", "function setUp() {\n\t\t\n\t}", "function setUp() {\n\t\t\n\t}", "public function setUp()\n {\n $this->VenusFuelDepot = new VenusFuelDepot();\n }", "public function setUp()\n {\n $name = __DIR__ . '/../../Fixture/Views/HelloWorld.php';\n\n $this->filename = $name;\n\n $this->file = $this->instance($name);\n }", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}", "protected function setUp() {}" ]
[ "0.8140308", "0.8006241", "0.79976183", "0.7914992", "0.7901477", "0.77689713", "0.77392364", "0.77336216", "0.7709618", "0.76846695", "0.7647927", "0.7634279", "0.76297987", "0.7579202", "0.75754756", "0.7495979", "0.7492454", "0.74913603", "0.74681956", "0.7462114", "0.7426816", "0.74070966", "0.73881996", "0.7371043", "0.735563", "0.7355096", "0.7331913", "0.7323615", "0.7290392", "0.7289095", "0.7285351", "0.7283025", "0.7272517", "0.72641283", "0.7263693", "0.72594", "0.7239784", "0.7237543", "0.72028536", "0.7200377", "0.7198128", "0.71872234", "0.71859527", "0.718509", "0.7178867", "0.717872", "0.71648735", "0.71547145", "0.7152709", "0.7149718", "0.7149718", "0.7149513", "0.7139555", "0.7130829", "0.71257377", "0.71243894", "0.71073806", "0.71044964", "0.70855856", "0.70855856", "0.70781815", "0.7075835", "0.7074548", "0.7074548", "0.7074548", "0.7074548", "0.7074548", "0.7074548", "0.7074548", "0.7074548", "0.7074548", "0.7074548", "0.7074548", "0.7074548", "0.7074548", "0.7074548", "0.7074548", "0.7074535", "0.7074535", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603", "0.70739603" ]
0.0
-1
Get list of available customer statuses.
public static function get_statuses() { return array( self::GUEST, self::REGISTERED ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function olc_get_customers_statuses() {\n\n\t$customers_statuses_array = array(array());\n\t$customers_statuses_query = olc_db_query(SELECT.\"customers_status_id, customers_status_name, customers_status_image, customers_status_discount, customers_status_ot_discount_flag, customers_status_ot_discount\".SQL_FROM . TABLE_CUSTOMERS_STATUS . SQL_WHERE.\"language_id = '\" . SESSION_LANGUAGE_ID . \"' order by customers_status_id\");\n\t$i=1; // this is changed from 0 to 1 in cs v1.2\n\twhile ($customers_statuses = olc_db_fetch_array($customers_statuses_query)) {\n\t\t$i=$customers_statuses['customers_status_id'];\n\t\t$customers_statuses_array[$i] = array('id' => $customers_statuses['customers_status_id'],\n\t\t'text' => $customers_statuses['customers_status_name'],\n\t\t'csa_public' => $customers_statuses['customers_status_public'],\n\t\t'csa_image' => $customers_statuses['customers_status_image'],\n\t\t'csa_discount' => $customers_statuses['customers_status_discount'],\n\t\t'csa_ot_discount_flag' => $customers_statuses['customers_status_ot_discount_flag'],\n\t\t'csa_ot_discount' => $customers_statuses['customers_status_ot_discount'],\n\t\t'csa_graduated_prices' => $customers_statuses['customers_status_graduated_prices']\n\t\t);\n\t}\n\treturn $customers_statuses_array;\n}", "public static function getStatusList()\n {\n return BaseServiceDelivery::getStatusList();\n }", "public function getStatuses()\n {\n $endpoint = $this->endpoints['getStatuses'];\n return $this->sendRequest($endpoint['method'], $endpoint['uri']);\n }", "public static function getStatusesList()\n {\n $sql = 'SELECT id AS value, display_name AS text '\n . 'FROM location_status '\n . 'WHERE active = 1';\n $command = Yii::app()->db->createCommand($sql);\n return $command->queryAll(true);\n }", "public function getStatusesList(){\n return $this->_get(1);\n }", "public static function getStatuses()\n {\n $sql = 'SELECT * FROM location_status';\n $command = Yii::app()->db->createCommand($sql);\n return $command->queryAll(true);\n }", "public function getListOrderStatus(){\n\n return $this->client->makeRequest('orderstatus', 'GET');\n }", "public function getStatuses() {\n\t}", "public static function getStatuses(): array;", "public function lists()\n {\n return $this->statuses;\n }", "public function get_statuses() {\n return $this->statuses;\n }", "public static function getStatusList()\n {\n return [\n self::STATUS_ACTIVE => 'Active',\n self::STATUS_RETIRED => 'Retired'\n ];\n }", "public function getStatuses()\n {\n return $this->statuses;\n }", "public static function getStatusesList()\n {\n return [\n static::STATUS_ACTIVE => 'Active',\n static::STATUS_BLOCKED => 'Blocked',\n ];\n }", "public static function getStatusList() {\r\n return [\r\n self::STATUS_ACTIVE => 'Active',\r\n self::STATUS_RETIRED => 'Retired'\r\n ];\r\n }", "abstract public static function getStatuses();", "public static function allStatuses()\n {\n $statuses = ProductOrderStatus::all();\n return $statuses;\n }", "public function status()\n {\n return array_map(\n function (array $status) {\n return Status::fromArray($status);\n },\n $this->client->get('status')\n );\n }", "public function getListDeliveryStatus()\n {\n return $this->client->makeRequest('deliverystatus', 'GET');\n }", "public static function getStatusList()\n {\n return array(\n self::STATUS_TRASH => 'trash',\n self::STATUS_DRAFT => 'draft',\n self::STATUS_PUBLISHED => 'published',\n );\n }", "function statuses() {\n //return parent::statusesWithCount( self::tableName(), self::arrayStatuses() );\n\n global $wpdb;\n\n $table_name = self::tableName();\n $statuses = self::arrayStatuses();\n $field_name = 'status';\n /*\n * @ToDo Decommentare qui se non vogliamo i conteggi dinamici in base al filtro\n * @ToDo La query è molto onerosa\n *\n *\n */\n $table_orders = BNMExtendsOrders::tableName();\n $sql = <<< SQL\n SELECT DISTINCT( {$table_orders}.{$field_name} ),\n COUNT(*) AS count\n FROM `{$table_name}`\n LEFT JOIN `{$table_orders}`\n ON {$table_orders}.id = {$table_name}.id_order\n GROUP BY {$table_orders}.{$field_name}\nSQL;\n\n\n\n $result = $wpdb->get_results( $sql, ARRAY_A );\n\n foreach ( $result as $status ) {\n if ( !empty( $status['status'] ) ) {\n $statuses[$status['status']]['count'] = $status['count'];\n }\n }\n\n $statuses['all']['count'] = self::count( $table_name );\n\n return $statuses;\n }", "public function listsstatusget()\r\n {\r\n $response = Status::all();\r\n return response()->json($response,200);\r\n }", "public function getAllStatus()\n {\n return OrderStatus::all();\n }", "public static function get_all_statuses() {\n\t\tglobal $wpdb;\n\n\t\t$cache_key = 'orders-all-statuses';\n\t\t$statuses = Cache::get( $cache_key );\n\n\t\tif ( false === $statuses ) {\n\t\t\t$table_name = self::get_db_table_name();\n\t\t\t$statuses = $wpdb->get_col(\n\t\t\t\t\"SELECT DISTINCT status FROM {$table_name}\"\n\t\t\t); // WPCS: cache ok, DB call ok, unprepared SQL ok.\n\n\t\t\tCache::set( $cache_key, $statuses );\n\t\t}\n\n\t\treturn $statuses;\n\t}", "private function getCollectionsStatuses()\n\t{\n\t\treturn array(\n\t\t\t'new::collections::customer::*root'\n\t\t);\n\t}", "public function getStatuses()\n {\n try {\n $statuses = $this->itemReportService->getStatuses(['available', 'aproved']);\n return $this->respondSuccess([\n 'status' => 200,\n 'message' => 'Success.',\n 'data' => $statuses,\n ]);\n } catch (\\Throwable $e) {\n return $this->respondException($e->getMessage(), $e->getCode());\n }\n }", "public function getAvailableStatuses()\n {\n return [\n self::STATUS_NEW => 'New',\n self::STATUS_PROCESSING => 'Processing',\n self::STATUS_DONE => 'Done',\n self::STATUS_ERROR => 'Error'\n ];\n }", "public function get_valid_statuses() {\n\t\treturn array_keys( _wc_cs_get_credits_statuses() ) ;\n\t}", "public function getCustomerList()\n {\n $customerList = $this->customerInterface->getCustomerList();\n return response()->json($customerList);\n }", "public function get_statuses() {\n\n\t\t// In this order statuses will appear in filters bar.\n\t\t$statuses = [\n\t\t\tEmail::STATUS_DELIVERED => __( 'Delivered', 'wp-mail-smtp-pro' ),\n\t\t\tEmail::STATUS_SENT => __( 'Sent', 'wp-mail-smtp-pro' ),\n\t\t\tEmail::STATUS_WAITING => __( 'Pending', 'wp-mail-smtp-pro' ),\n\t\t\tEmail::STATUS_UNSENT => __( 'Failed', 'wp-mail-smtp-pro' ),\n\t\t];\n\n\t\t// Exclude Delivered and Pending statuses for mailers without verification API.\n\t\tif ( Helpers::mailer_without_send_confirmation() ) {\n\t\t\tunset( $statuses[ Email::STATUS_DELIVERED ] );\n\t\t\tunset( $statuses[ Email::STATUS_WAITING ] );\n\t\t}\n\n\t\treturn $statuses;\n\t}", "public function getStatuses(){\n \t$statuses = Status::all();\n \tif (count($statuses)==0) {\n \t\treturn response()->json(['data' => '' , 'message' => 'No Statuses'], 400);\n \t}\n \treturn response()->json(['data' => $statuses , 'message' => 'ok'], 200);\n }", "public function index()\n {\n return AccStatus::all();\n }", "public static function statuses()\n {\n return Lastus::statuses(static::class);\n }", "protected static function getStatuses()\n {\n return [\n CrudController::STATUS_SUCCESS => 'successfully',\n CrudController::STATUS_FAILURE => 'unsuccessfully',\n ];\n }", "public function getStatusList()\n {\n return [\n self::STATUS_CREATED,\n self::STATUS_SUCCESS,\n self::STATUS_FAIL\n ];\n }", "public function getOrderStatuses()\n {\n $response = $this->client->request('GET', '/v1/settings/orderstatuses');\n return new GetOrderStatusesResponse($response);\n }", "public function statuses(Request $request)\n {\n $deliveryStatuses = Delivery::$statuses;\n\n return response()->json($deliveryStatuses);\n }", "abstract protected function getStatusesInfos();", "public function actionStatusCustomerCome()\n {\n return ArrayHelper::map(Dep365CustomerOnlineCome::getCustomerOnlineCome(), 'id', 'name');\n }", "public static function statuses()\n {\n return [\n self::STATUS_PENDING => Yii::t('app', 'Pending'),\n self::STATUS_REJECTED => Yii::t('app', 'Rejected'),\n self::STATUS_ACCEPTED => Yii::t('app', 'Accepted')\n ];\n }", "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "public function getAvailableStatuses()\n {\n return [self::STATUS_ENABLED => __('Enabled'), self::STATUS_DISABLED => __('Disabled')];\n }", "public function getIsActiveStatuses()\n {\n $statuses = new Varien_Object(array(\n self::STATUS_ENABLED => Mage::helper('olts_reminder')->__('Enabled'),\n self::STATUS_DISABLED => Mage::helper('olts_reminder')->__('Disabled'),\n ));\n\n Mage::dispatchEvent('reminder_get_is_active_statuses', array('statuses' => $statuses));\n\n return $statuses->getData();\n }", "public static function statuses() {\n return [\n self::STATUS_ACTIVE => 'Активный',\n self::STATUS_DISABLED => 'Отключен',\n ];\n }", "public function getCertStatuses() {\n $dql = \"SELECT c from CertificationStatus c\";\n $certStatuses = $this->em\n ->createQuery($dql)\n ->getResult();\n return $certStatuses;\n }", "public function index()\n {\n $attstatuses = AttStatus::getAllAttStatus();\n return AttStatusResource::collection($attstatuses);\n }", "public static function getStatus() {\n return array(\n Users::STATUS_INACTIVE => DomainConst::CONTENT00028,\n Users::STATUS_ACTIVE => DomainConst::CONTENT00027,\n Users::STATUS_NEED_CHANGE_PASS => DomainConst::CONTENT00212,\n );\n }", "static public function getStatusList() {\n return array(\n self::STATUS_SHOW => Yii::t('main', 'Show'),\n self::STATUS_HIDE => Yii::t('main', 'Hide'),\n );\n }", "static public function getStatusList() {\n return array(\n self::STATUS_SHOW => Yii::t('main', 'Show'),\n self::STATUS_HIDE => Yii::t('main', 'Hide'),\n );\n }", "function getStatuses($model,$client_id=null){\n\t\t$order = array('order'=>'asc');\n\t\tif(empty($client_id)){\n\t\t\t$client_id = $_SESSION['Auth']['User']['client_id'];\n\t\t}\n\t\t//TODO Add caching\n\t\t$statuses = $this->find('list',array('conditions'=>array('Status.model'=>$model,'Status.client_id'=>$client_id),'order'=>$order));\n\t\tif(empty($statuses)){\n\t\t\t$statuses = $this->find('list',array('conditions'=>array('Status.model'=>$model,'Status.client_id'=>0),'order'=>$order));\n\t\t}\n\t\treturn $statuses;\n\t}", "public static function getStatuses($status = false){\r\n $statuses = [\r\n self::STATUS_ACTIVE=>Yii::t('app', 'Active'),\r\n self::STATUS_DELETED=>Yii::t('app', 'Deleted')\r\n ];\r\n return $status ? ArrayHelper::getValue($statuses, $status) : $statuses;\r\n }", "public static function arrayStatuses() {\n\n /*\n $statuses = array(\n 'all' => array(\n 'label' => __( 'All', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n 'publish' => array(\n 'label' => __( 'Publish', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n 'trash' => array(\n 'label' => __( 'Trash', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n )\n );*/\n $statuses = array(\n 'all' => array(\n 'label' => __( 'All', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n WPXSMARTSHOP_ORDER_STATUS_PENDING => array(\n 'label' => __( 'Pending', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n WPXSMARTSHOP_ORDER_STATUS_CONFIRMED => array(\n 'label' => __( 'Confirmed', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n WPXSMARTSHOP_ORDER_STATUS_CANCELLED => array(\n 'label' => __( 'Cancelled', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n WPXSMARTSHOP_ORDER_STATUS_DEFUNCT => array(\n 'label' => __( 'Defunct', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n ),\n 'trash' => array(\n 'label' => __( 'Trash', WPXSMARTSHOP_TEXTDOMAIN ),\n 'count' => 0\n )\n );\n return $statuses;\n }", "function monitor_list_statuses() {\n $query = \"select distinct(`wf_status`) from `\".GALAXIA_TABLE_PREFIX.\"instances`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_status'];\n }\n return $ret;\n }", "public function statuses()\n\t{\n\t\treturn $this->hasMany('Afreshysoc\\Models\\Status',\n\t\t\t'user_id');\n\t}", "public static function getStatuses($activeOnly = false)\n {\n $sql = 'SELECT * FROM event_request_status ';\n \n if($activeOnly == true) {\n $sql .= ' WHERE active = 1 ';\n }\n \n $sql .= ' ORDER BY display_order ASC';\n \n $command = Yii::app()->db->createCommand($sql);\n return $command->queryAll(true);\n }", "public function getDeliveryStatusList(){\n\t\t/* variable initialization */\n\t\t$strReturnArr\t= $strQueryArr\t= array();\n\t\t\n\t\t/* Creating query array */\n\t\t$strQueryArr\t= array(\n\t\t\t\t\t\t\t\t\t'table'=>$this->_strTableName,\n\t\t\t\t\t\t\t\t\t'column'=>array('id','description'),\n\t\t\t\t\t\t\t\t\t'where'=>array('attribute_code'=>DELIVERY_STATUS_WIDGET_ATTR_CODE),\n\t\t\t\t\t\t\t );\n\t\t\t\t\t\t\t \n\t\t/* Get data from dataset */\n\t\t$strResultSetArr\t= $this->_databaseObject->getDataFromTable($strQueryArr);\n\t\t/* removed used variable */\n\t\tunset($strQueryArr);\n\t\t\n\t\t/* if status found teh do needful */\n\t\tif(!empty($strResultSetArr)){\n\t\t\t/* Iterting the loop */\n\t\t\tforeach($strResultSetArr as $strResultSetArrKey => $strResultSetArrValue){\n\t\t\t\t/* setting the key value paris */\n\t\t\t\t$strReturnArr['keyvalue'][$strResultSetArrValue['id']]\t= $strResultSetArrValue['description'];\n\t\t\t}\n\t\t}\n\t\t/* set the default result set */\n\t\t$strReturnArr['defaultvalue']\t= $strResultSetArr;\n\t\t/* removed used variable */\n\t\tunset($strResultSetArr);\n\t\t\n\t\t/* return the status result set */\n\t\treturn $strReturnArr;\n\t}", "public function index()\n {\n $this->authorize('viewAny', Status::class);\n return Status::all();\n }", "private function getVisibleOnFrontStatuses()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\treturn $this->_getStatuses(true);\n\t\t}\n\t}", "public function getStatusesFromApi(): array {\n return $this->curlRequest('statuses');\n }", "public function get_all_status()\n {\n $this->db->order_by('idstatus', 'asc');\n return $this->db->get('cat_status')->result_array();\n }", "function getTermStatuses(){\r\n $data = new \\Cars\\Data\\Common($this->app);\r\n return $data->getTermStatuses();\r\n }", "public function invoicestatus(Request $request)\n {\n if ($request->ajax()) {\n return InvoiceStatus::all('id', 'status');\n }\n }", "public function listAllCustomers();", "function getStatusList() {\n $statusList = array();\n foreach (Constants::$statusNames as $id => $name) {\n $statusList[$id] = \"$id - $name\";\n }\n return $statusList;\n}", "public static function listAll()\n\t{\n\t\t$sql = new Sql();\n\t\treturn $sql->select(\"SELECT * FROM tb_ordersstatus ORDER BY desstatus\");\n\t}", "public function getCustomers()\n {\n $responseString = $this->apiCall('GET', 'customers');\n try\n {\n $responseObject = $this->parseResponse($responseString);\n return $responseObject->Customers;\n }\n catch(Exception $e)\n {\n echo 'Can`t parse API response: '.$e->getMessage;\n return false;\n }\n }", "function olc_cfg_pull_down_customers_status_list($customers_status_id, $key = '') {\n\t$name = (($key) ? 'configuration[' . $key . ']' : 'configuration_value');\n\treturn olc_draw_pull_down_menu($name, olc_get_customers_statuses(), $customers_status_id);\n}", "public static function getValidStatuses(): array\n {\n return array_keys(self::getStatuses());\n }", "public function getStatusList()\n {\n $option = '';\n $query = $this->db->query(\"SELECT * FROM status\");\n while ($rdata = mysqli_fetch_assoc($query)) {\n $option .= '<option value=\"' . $rdata['idStatus'] . '\">' . mb_strtoupper(\n $rdata['nombreStatus']\n ) . '</option>';\n }\n\n return $option;\n }", "public static function getAvailableStatus()\n {\n return array(\n self::STATUS_DRAFT => self::STATUS_DRAFT,\n self::STATUS_REVIEWED => self::STATUS_REVIEWED,\n self::STATUS_PUBLISH => self::STATUS_PUBLISH,\n self::STATUS_HIDDEN => self::STATUS_HIDDEN\n );\n }", "protected function getCustomerStatus()\n {\n\n DB::reconnect('mysql');\n $pdo = DB::connection()->getPdo();\n $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);\n\n $customer = GroupEmailGroupsModel::select('c.status AS status')\n ->where('group_email_id', '=', $this->_group->group_email_id)\n ->join('mw_customer AS c', 'c.customer_id', '=', 'mw_group_email_groups.customer_id')\n ->get();\n\n\n DB::disconnect('mysql');\n\n if (!empty($customer))\n {\n return $customer[0]->status;\n }\n return false;\n\n }", "public function fcpoGetStatus() \n {\n $sQuery = \"SELECT oxid FROM fcpotransactionstatus WHERE fcpo_txid = '{$this->oxorder__fcpotxid->value}' ORDER BY fcpo_sequencenumber ASC\";\n $aRows = $this->_oFcpoDb->getAll($sQuery);\n\n $aStatus = array();\n foreach ($aRows as $aRow) {\n $oTransactionStatus = $this->_oFcpoHelper->getFactoryObject('fcpotransactionstatus');\n $sTransactionStatusOxid = (isset($aRow[0])) ? $aRow[0] : $aRow['oxid'];\n $oTransactionStatus->load($sTransactionStatusOxid);\n $aStatus[] = $oTransactionStatus;\n }\n\n return $aStatus;\n }", "public function getVisibleInCatalogStatuses()\n {\n return Mage::getSingleton('catalog/product_status')->getVisibleStatusIds();\n }", "function GetProjectStatuses()\n\t{\n\t\t$result = $this->sendRequest(\"GetProjectStatuses\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function getOrderStatusList(){\n\treturn [\n\t\t\"NEW\" => [\n\t\t\t'code' => 1,\n\t\t\t'text' => \"Yet to Start\"\n\t\t],\n\t\t\"IN_PROGRESS\" => [\n\t\t\t'code' => 2,\n\t\t\t'text' => \"Working\"\n\t\t],\n\t\t\"DELIVERED\" => [\n\t\t\t'code' => 3,\n\t\t\t'text' => \"Delivered\"\n\t\t],\n\t\t\"IN_REVIEW\" => [\n\t\t\t'code' => 4,\n\t\t\t'text' => \"In review\"\n\t\t],\n\t\t\"COMPLETED\" => [\n\t\t\t'code' => 5,\n\t\t\t'text' => \"Completed\"\n\t\t],\n\t\t\"CANCELLED\" => [\n\t\t\t'code' => 6,\n\t\t\t'text' => \"Cancelled\"\n\t\t],\n\t\t\"PENDIND_REQUIREMENT\" => [\n\t\t\t'code' => 7,\n\t\t\t'text' => \"Pending Requirement\"\n\t\t]\n\t];\n}", "public function getAdminListForCustomers()\r\n {\r\n return $this->getAdminList(\"customer-lookup\");\r\n }", "public function getEveryStatus()\n {\n static $status;\n\n if ($status) {\n return $status;\n }\n\n $status = array(\n 'U' => $this->_('Valid from date unknown'),\n 'W' => $this->_('Valid from date in the future'),\n 'O' => $this->_('Open - can be answered now'),\n 'A' => $this->_('Answered'),\n 'M' => $this->_('Missed deadline'),\n 'D' => $this->_('Token does not exist'),\n );\n\n return $status;\n }", "public function statusesdata(Request $request)\n {\n $request->user()->authorizeRoles(['Administrator', 'Manager', 'Developer']);\n return datatables()->of(Status::all())->toJson();\n }", "public function getAll()\n {\n return OrderItemStatusCodeResource::collection(\n OrderItemStatusCode::paginate(15)\n );\n }", "function getTenantStatuses()\n{\n $status = array(1 => array('name' => 'Created', 'class' => 'primary'),\n 2 => array('name' => 'Running', 'class' => 'success'),\n 3 => array('name' => 'Suspend', 'class' => 'danger'),\n 4 => array('name' => 'Resume', 'class' => 'info')\n );\n return $status;\n}", "public function getProdStatuses() {\n $dql = \"SELECT i from Infrastructure i\";\n $prodStatuses = $this->em\n ->createQuery($dql)\n ->getResult();\n return $prodStatuses;\n }", "protected function getStatusProviders() {}", "public function getStatus()\n {\n \n return $this->_em->createQuery('SELECT s,u FROM TechCorpFrontBundle:Status s \n JOIN s.user u ORDER BY s.createdAt DESC');\n }", "public function allowedAffiliateUpdateStatusesFrom()\r\n {\r\n return array(\r\n Product::ACTIVE,\r\n Product::INACTIVE,\r\n );\r\n }", "public function getEnumStatusSupply(){\n return ['WAITING','IN PROGRESS','CANCELED','COMPLETED'];\n }", "public static function getAllCustomers()\n\t{\n\t\t$customers = self::where('users_role',UserRole::CUSTOMER_ROLE_ID)->get();\n\t\treturn $customers;\n\t}", "public function getInvoiceStatus() {\r\n\t\t$status = array();\r\n\t\t\t$status[0] = array('id' => 0, 'name' => 'Completed'); //done, can not be edited, but not retured\r\n\t\t\t$status[1] = array('id' => 1, 'name' => 'Unfinished'); //still open, can be edited\r\n\t\t\t$status[2] = array('id' => 2, 'name' => 'Returned'); //done, can not be edited, retured\r\n\t\t\t$status[3] = array('id' => 3, 'name' => 'Closed'); //memo only, done, closed out. memo close date updated\r\n\t\t\t$status[4] = array('id' => 4, 'name' => 'Converted'); //memo only, converted\r\n\t\t\t$status[5] = array('id' => 5, 'name' => 'Cancelled'); //layaways only, cancelled\r\n\t\treturn $status;\r\n\t}", "public function viewableAffiliateProductStatuses()\r\n {\r\n return array(\r\n Product::ACTIVE,\r\n Product::INACTIVE,\r\n );\r\n }", "public function getStatusAllowableValues()\n {\n return [\n self::STATUS_APPROVAL_PENDING,\n self::STATUS_ATM_WITHDRAWAL,\n self::STATUS_ATM_WITHDRAWAL_REVERSAL_PENDING,\n self::STATUS_ATM_WITHDRAWAL_REVERSED,\n self::STATUS_AUTH_ADJUSTMENT_AUTHORISED,\n self::STATUS_AUTH_ADJUSTMENT_ERROR,\n self::STATUS_AUTH_ADJUSTMENT_REFUSED,\n self::STATUS_AUTHORISED,\n self::STATUS_BANK_TRANSFER,\n self::STATUS_BANK_TRANSFER_PENDING,\n self::STATUS_BOOKED,\n self::STATUS_BOOKING_PENDING,\n self::STATUS_CANCELLED,\n self::STATUS_CAPTURE_PENDING,\n self::STATUS_CAPTURE_REVERSAL_PENDING,\n self::STATUS_CAPTURE_REVERSED,\n self::STATUS_CAPTURED,\n self::STATUS_CAPTURED_EXTERNALLY,\n self::STATUS_CHARGEBACK,\n self::STATUS_CHARGEBACK_EXTERNALLY,\n self::STATUS_CHARGEBACK_PENDING,\n self::STATUS_CHARGEBACK_REVERSAL_PENDING,\n self::STATUS_CHARGEBACK_REVERSED,\n self::STATUS_CREDITED,\n self::STATUS_DEPOSIT_CORRECTION,\n self::STATUS_DEPOSIT_CORRECTION_PENDING,\n self::STATUS_DISPUTE,\n self::STATUS_DISPUTE_CLOSED,\n self::STATUS_DISPUTE_EXPIRED,\n self::STATUS_DISPUTE_NEEDS_REVIEW,\n self::STATUS_ERROR,\n self::STATUS_EXPIRED,\n self::STATUS_FAILED,\n self::STATUS_FEE,\n self::STATUS_FEE_PENDING,\n self::STATUS_INTERNAL_TRANSFER,\n self::STATUS_INTERNAL_TRANSFER_PENDING,\n self::STATUS_INVOICE_DEDUCTION,\n self::STATUS_INVOICE_DEDUCTION_PENDING,\n self::STATUS_MANUAL_CORRECTION_PENDING,\n self::STATUS_MANUALLY_CORRECTED,\n self::STATUS_MATCHED_STATEMENT,\n self::STATUS_MATCHED_STATEMENT_PENDING,\n self::STATUS_MERCHANT_PAYIN,\n self::STATUS_MERCHANT_PAYIN_PENDING,\n self::STATUS_MERCHANT_PAYIN_REVERSED,\n self::STATUS_MERCHANT_PAYIN_REVERSED_PENDING,\n self::STATUS_MISC_COST,\n self::STATUS_MISC_COST_PENDING,\n self::STATUS_OPERATION_AUTHORIZED,\n self::STATUS_OPERATION_BOOKED,\n self::STATUS_OPERATION_PENDING,\n self::STATUS_OPERATION_RECEIVED,\n self::STATUS_PAYMENT_COST,\n self::STATUS_PAYMENT_COST_PENDING,\n self::STATUS_RECEIVED,\n self::STATUS_REFUND_PENDING,\n self::STATUS_REFUND_REVERSAL_PENDING,\n self::STATUS_REFUND_REVERSED,\n self::STATUS_REFUNDED,\n self::STATUS_REFUNDED_EXTERNALLY,\n self::STATUS_REFUSED,\n self::STATUS_RESERVE_ADJUSTMENT,\n self::STATUS_RESERVE_ADJUSTMENT_PENDING,\n self::STATUS_RETURNED,\n self::STATUS_SECOND_CHARGEBACK,\n self::STATUS_SECOND_CHARGEBACK_PENDING,\n self::STATUS_UNDEFINED,\n ];\n }", "public function get_services() {\n return $this->linkemperor_exec(null, null,\"/api/v2/customers/services.json\");\n }", "public static function all()\n {\n $sql = new Sql();\n\n $results = $sql->select(\"SELECT * FROM tbl_status\");\n\n return $results;\n }", "public function getMapOrderStatuses()\n {\n return $this->map_order_statuses;\n }", "public function getOnlineAccountList() {\n\t\t$result = $this->db->queryFetch(\"SELECT * FROM \"._TBL_MS_.\" WHERE \"._CLMN_CONNSTAT_.\" = ?\", array(1));\n\t\tif(!is_array($result)) return;\n\t\treturn $result;\n\t}", "public function index()\n\t{\n\t\t$issuestatuses = IssueStatus::all();\n\t\treturn $issuestatuses;\n\t}", "public function getCustomers()\n {\n $role = Role::where('name', 'customer')->first();\n return $role->users;\n }", "public function Get_Status() {\n $flags = array(\n 'complete' => array(\n 'code' => 'complete',\n 'name' => 'Complete',\n //'_update' => array($this,'_Status_Make_Complete'),\n ),\n 'cool' => array(\n 'code' => 'cool',\n 'name' => 'Cool',\n //'_update' => array($this,'_Status_Make_Complete'),\n )\n );\n // Apply any filter for adding to the flag list\n $status = apply_filters('vcff_reports_status',$status,$this);\n // Return the flag list\n return $flags;\n }", "public static function getAllStatus(): array\n {\n $statuses = array();\n //====================================================================//\n // Complete Status Informations\n foreach (SplashStatus::getAll() as $status) {\n $statuses[] = array(\n 'code' => $status,\n 'field' => 'SPLASH_ORDER_'.strtoupper($status),\n 'name' => str_replace(\"Order\", \"Status \", $status),\n 'desc' => 'Order Status for '.str_replace(\"Order\", \"\", $status)\n );\n }\n\n return $statuses;\n }" ]
[ "0.7253332", "0.7113479", "0.695418", "0.68196774", "0.6815233", "0.68058485", "0.67916125", "0.6786866", "0.6745262", "0.6676654", "0.6613647", "0.6585561", "0.6584525", "0.65843743", "0.6572991", "0.6527908", "0.6501117", "0.65009654", "0.6418798", "0.6392413", "0.6391962", "0.6380281", "0.63711816", "0.63615334", "0.63301384", "0.6327989", "0.6305534", "0.6297369", "0.62767065", "0.6263793", "0.62568206", "0.6255672", "0.62545365", "0.62522227", "0.624902", "0.6213309", "0.6209009", "0.6177735", "0.6146869", "0.6142124", "0.61393315", "0.61393315", "0.61393315", "0.61393315", "0.61393315", "0.6120127", "0.6095729", "0.6090984", "0.6078902", "0.6030116", "0.6029806", "0.6029806", "0.5990236", "0.59783506", "0.5965478", "0.5935819", "0.5928433", "0.5920242", "0.591446", "0.5899847", "0.5899736", "0.5892074", "0.5890089", "0.5879862", "0.5868096", "0.5867736", "0.5866877", "0.58496994", "0.5834112", "0.58293116", "0.5826637", "0.5825668", "0.5820583", "0.57755536", "0.5772735", "0.5770571", "0.57685757", "0.5721579", "0.5712401", "0.56858385", "0.5683534", "0.5668864", "0.56684214", "0.56683034", "0.5656091", "0.56482184", "0.56456", "0.562419", "0.56222594", "0.56158066", "0.56141746", "0.5612942", "0.5611194", "0.5608333", "0.5608131", "0.56046", "0.56023085", "0.5601162", "0.560078", "0.55900085" ]
0.6517766
16
Run the database seeds.
public function run() { \Illuminate\Support\Facades\DB::table('step_customs')->insert([ [ 'id' => 1, 'step' => 'Pilih Model Product', 'description' => 'Memilih barang sesuai dan sesuai kebutuhan, klien dapat memilih model pada halaman product' ], [ 'id' => 2, 'step' => 'Menetukan Bahan', 'description' => 'Klien dapat memilih bahan yang sudah kami sediakan' ], [ 'id' => 3, 'step' => 'Menentukan Warna dan Ukuran', 'description' => 'Klien dapat memilih warna yang disukai dan menentukan ukuran (panjang, lebar dan tinggi) yang sesuai dengan kebutuhan' ], [ 'id' => 4, 'step' => 'Melakukan Pembayaran', 'description' => 'Setelah rancangan product sudah fix dan akan dibuat klien diharapkan dapat melakukan pembayaran tanda jadi minimal 10% dari total pembelian atau melakukan pembayaran secara lunas' ], [ 'id' => 5, 'step' => 'Proses Pembuatan', 'description' => 'Lama pembuatan tergantung dengan kesulitan product, kami akan berusaha menyelesaikan secara tepat waktu' ], ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }", "public function run()\n {\n \t$roles = DB::table('roles')->pluck('id');\n \t$sexes = DB::table('sexes')->pluck('id');\n \t$faker = \\Faker\\Factory::create();\n\n \tforeach (range(1,20) as $item) {\n \t\tDB::table('users')->insert([\n \t\t\t'role_id' => $faker->randomElement($roles),\n \t\t\t'sex_id' => $faker->randomElement($sexes),\n \t\t\t'name' => $faker->firstName . ' ' . $faker->lastName,\n \t\t\t'dob' => $faker->date,\n \t\t\t'bio' => $faker->text,\n \t\t\t'created_at' => now(),\n \t\t\t'updated_at' => now()\n \t\t]);\n \t} \n }" ]
[ "0.80130625", "0.79795986", "0.79764974", "0.79524934", "0.7950615", "0.79505694", "0.7944086", "0.7941758", "0.7938509", "0.79364634", "0.79335415", "0.7891555", "0.78802574", "0.78790486", "0.7878107", "0.7875447", "0.78703815", "0.7869534", "0.7851931", "0.7850407", "0.7840015", "0.78331256", "0.7826906", "0.78172284", "0.7807776", "0.78024083", "0.78023773", "0.7799859", "0.77994525", "0.77955437", "0.7790015", "0.77884936", "0.7786196", "0.77790534", "0.7776279", "0.7765613", "0.7761798", "0.7760838", "0.7760613", "0.7760611", "0.7759328", "0.7757682", "0.775591", "0.7752759", "0.774942", "0.7748997", "0.7745014", "0.7728245", "0.7727775", "0.77277344", "0.7716621", "0.77139914", "0.7713781", "0.77135956", "0.7713254", "0.7711222", "0.7710622", "0.7710614", "0.77104497", "0.77100515", "0.770471", "0.77039754", "0.7703702", "0.770327", "0.7702392", "0.7700962", "0.7700507", "0.7698413", "0.76974845", "0.7697178", "0.7696662", "0.76933604", "0.76916313", "0.76898587", "0.7689098", "0.76864886", "0.76862013", "0.76860833", "0.7685714", "0.7683389", "0.76831365", "0.7679125", "0.76774627", "0.767677", "0.7676274", "0.76719916", "0.76704824", "0.76679665", "0.7667335", "0.7667264", "0.76645994", "0.7662546", "0.76618296", "0.7660438", "0.76583356", "0.76564723", "0.76530147", "0.7651929", "0.7651548", "0.7651444", "0.76511025" ]
0.0
-1
///////// Accessors ///////// Service title.
public function title() { if ($this->contributor_service && $this->contributor_service->title) { return $this->contributor_service->title; } return $this->service->title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getServiceTitle() {}", "public function get_title()\n {\n }", "public function get_title()\n {\n }", "public function get_title() {\n return __( 'APR Heading', 'apr-core' );\n }", "function title() {\n ?>\n <h2><?php _e(SCLNG_PUBLIC_PRODUCT_INFO, SC_DOMAIN); ?></h2>\n <?php\n }", "function page_title(): string {\r\n\t\treturn sprintf('%s — %s: Scheduler', $this->module->space()->name(),\r\n\t\t\t$this->module->name());\r\n\t}", "public function get_title() {\n\t\treturn esc_html__( 'Processes', 'tr-framework' );\n\t}", "function MyApp_Interface_HEAD_Title()\n {\n $comps=preg_split('/::/',parent::MyApp_Interface_HEAD_Title());\n $keys=array(\"Initials\",\"Name\",\"Title\");\n \n $unit=$this->Unit();\n foreach ($keys as $key)\n {\n $name=$this->GetRealNameKey($unit,$key);\n \n if (!empty($name))\n {\n array_push($comps,$name);\n break;\n }\n }\n \n $event=$this->Event();\n foreach ($keys as $key)\n {\n $name=$this->GetRealNameKey($event,$key);\n \n if (!empty($name))\n {\n array_push($comps,$name);\n break;\n }\n }\n\n return join(\"::\",array_reverse($comps)); \n }", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "function get_title() \t{\n \t\treturn $this->title;\t\n \t}", "function getTitle() {\r\n return $this->_title;\r\n }", "function getTitle() {\r\n return $this->_title;\r\n }", "public function get_title();", "public function getTitle()\n {\n return Mage::helper('ddg')->__(\"Engagement Cloud Account Information\");\n }", "public function get_title () {\r\n\t\treturn $this->get_info()['title'];\r\n\t}", "public function title()\n {\n return $this->resource->getName();\n }", "public function title();", "public function title();", "function getTitle() {\n\t\treturn $this->title;\n\t}", "function get_title()\n {\n }", "public function getName()\r\n {\r\n // TODO: Implement getName() method.\r\n return \"servicedescription\";\r\n }", "function getTitle() {\n\t\treturn $this->_title;\n\t}", "public function getEventTitle() :string {\n return \"\";\n }", "function wcfmgs_sm_endpoint_title( $title, $endpoint ) {\r\n \t\r\n \tswitch ( $endpoint ) {\r\n\t\t\tcase 'wcfm-managers' :\r\n\t\t\t\t$title = __( 'Shop Managers', 'wc-frontend-manager-groups-staffs' );\r\n\t\t\tbreak;\r\n\t\t\tcase 'wcfm-managers-manage' :\r\n\t\t\t\t$title = __( 'Shop Managers Manage', 'wc-frontend-manager-groups-staffs' );\r\n\t\t\tbreak;\r\n \t}\r\n \t\r\n \treturn $title;\r\n }", "public function getTitle(): string\n {\n return $this->title;\n }", "public function getTitle() {\n\t\treturn $this->title;\t\n\t}", "public function getTitle()\n {\n\treturn $this->get('SUMMARY');\n }", "public function get_title() { return $this->title; }", "public function getTitle()\n { \n return AppManagerModule::t($this->title);\n }", "function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function get_title() {\n\t\treturn __( 'Client Logos', 'elementor-main-clients' );\n\t}", "public function get_title(){\n\t\treturn $this->title;\n\t}", "public function get_title(){\n\t\treturn $this->title;\n\t}", "public function getTitle() \r\n { \r\n return $this->_title; \r\n }", "public function getApiTitle() {\n return str_replace(\" \", \"+\", $this->title);\n }", "protected function view_getPageTitle() {\n return 'HalloPizza';\n }", "public function get_title() {\n\t\treturn __( 'Hello World', 'elementor-hello-world' );\n\t}", "public function getTitle() {\n return $this->title;\n }", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle()\n {\n return $this->title;\n }", "public static function title();", "public function getTitle() \n {\n return $this->title;\n }", "public static function getTitle()\n {\n return self::$title;\n }", "public function get_title() {\n\t\treturn __( 'Clients Carousel', 'elementive' );\n\t}", "private final function getTitle()\n {\n if(isset($this->title)) return $this->title;\n\n return 'Squeeze1_0 Widget';\n }", "public function getTitle(){\r\n\t\treturn $this->title;\r\n\t}", "public function gettitle()\n {\n return $this->title;\n }", "public static function getTitle(): string\n {\n }", "public static function getTitle(): string\n {\n }", "public function getName() {\r\n\t\treturn self::title;\r\n\t}", "function getTitle() ;", "public function getTitle()\n {\n\t\treturn $this->title;\n\t}", "public function getServiceDescription();", "public function get_title( )\n {\n return 'Something went wrong.';\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function title()\n {\n return $this->name;\n }", "public function title()\n {\n return $this->name;\n }", "public function getTitle(){\n return $this->title;\n }", "public function get_title() {\r\n\t\treturn esc_html__( 'Price Plan: 02', 'aapside-master' );\r\n\t}", "static public function getTitle() {\n\t\treturn self::$page_title;\n\t}", "function MyApp_Interface_Titles()\n {\n $this->UnitsObj()->Sql_Table_Structure_Update();\n $unit=$this->Unit();\n if (empty($unit))\n {\n return $this->MyApp_Info();\n }\n\n $titles=array($this->MyApp_Name());\n\n $unit=$this->Unit();\n if (!empty($unit))\n {\n array_push($titles,$unit[ \"Title\" ]);\n\n $event=$this->Event();\n\n if (!empty($event))\n {\n $keys=array_keys($event);\n $keys=preg_grep('/Place/',$keys);\n array_push\n (\n $titles,\n $event[ \"Title\" ],\n $this->Event_DateSpan($event),\n $this->Event_Place($event)\n \n );\n }\n else\n {\n \n }\n }\n\n return $titles;\n }", "public function getTitle(){\n return $this->title;\n }", "public function get_title()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\r\n {\r\n return $this->title;\r\n }", "public function getTitle(){\r\n\t\t\treturn $this->title;\r\n\t\t}", "function getTitle() {\n return $this->document->getTitle();\n }", "public function title()\n {\n return $this->{static::$title};\n }", "function get_page_title()\n {\n return $this->object->name;\n }", "protected function page_title() {\n?>\n\t\t<h2>\n\t\t\t<?php echo __( 'Marketplace Add-ons', APP_TD ); ?>\n\t\t\t<a href=\"https://marketplace.appthemes.com/\" class=\"add-new-h2\"><?php _e( 'Browse Marketplace', APP_TD ); ?></a>\n\t\t\t<a href=\"https://www.appthemes.com/themes/\" class=\"add-new-h2\"><?php _e( 'Browse Themes', APP_TD ); ?></a>\n\t\t</h2>\n<?php\n\t}", "public function title()\n\t{\n\t\treturn $this->title;\n\t}", "public function title(): string\n {\n return $this->title;\n }", "public function getTitle()\n {\n return \"\"; // Should be updated by children classes\n }" ]
[ "0.89144415", "0.70879215", "0.7087731", "0.70124865", "0.699948", "0.6954333", "0.6936192", "0.69320995", "0.6925719", "0.6925719", "0.6925719", "0.6925719", "0.6925719", "0.6925719", "0.6925719", "0.6925719", "0.6925719", "0.6925719", "0.6925719", "0.6925719", "0.692495", "0.6923885", "0.6923885", "0.68900776", "0.6884322", "0.6884322", "0.6858935", "0.68560535", "0.68517154", "0.68300885", "0.68292934", "0.68292934", "0.68182427", "0.68002105", "0.6780885", "0.67781943", "0.6775119", "0.6757543", "0.67555", "0.67447937", "0.6739756", "0.6733347", "0.67313266", "0.67260563", "0.6725924", "0.6724555", "0.6724555", "0.67178917", "0.6716984", "0.67164624", "0.6712296", "0.6699814", "0.66994965", "0.66994965", "0.66994965", "0.66994965", "0.66994965", "0.66994965", "0.66994965", "0.66994965", "0.66994965", "0.66994965", "0.66994965", "0.66994965", "0.66994965", "0.66994965", "0.66994965", "0.66992915", "0.66981846", "0.66799927", "0.6676833", "0.66767234", "0.6675047", "0.66714394", "0.6665521", "0.6663752", "0.6663752", "0.6662367", "0.66502327", "0.6648329", "0.6644718", "0.664246", "0.66398996", "0.6636893", "0.6636893", "0.66345876", "0.66310626", "0.6626952", "0.661825", "0.6609041", "0.6605466", "0.66048306", "0.65908206", "0.6586518", "0.65805954", "0.657668", "0.65703136", "0.65688", "0.65667975", "0.6560378" ]
0.7713792
1
Service value. Normally, you want to access the generates url via `profileUrl()`. But in case you need the raw user value, use this method.
public function rawValue() { return $this->contributor_service->value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserProfile();", "public function getProfile()\n {\n return $this->request('me');\n }", "public function getRaw()\n {\n return $this->user;\n }", "public function getProfileUrl()\n {\n return $this->ProfileUrl;\n }", "public function getUserInfo() {\n\n if (empty($this->uriParts['user'])) {\n return '';\n }\n $val = $this->uriParts['user'];\n\n if (!empty($this->uriParts['pass'])) {\n $val .= ':' . $this->uriParts['pass'];\n }\n return $val;\n }", "abstract protected function getUserProfile();", "public function profile(){\n // using the auth() helper we are returning the authenticated user info\n return auth('api')->user();\n }", "public function getUserProfile()\n {\n $user = $this->security->getUser();\n return $user;\n }", "public function getUser(): string {\n return $this->context->user;\n }", "public function getProfileUrl()\n\t\t{\n\t\t return $this->profileUrl;\n\t\t}", "public function getDetails()\n {\n if($user = $this->loadUser())\n \treturn $user;\n }", "function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }", "function get_user()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER);\r\n }", "function get_user()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER);\r\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function getUser() {}", "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 getUserId(): string;", "protected function getUserId()\n {\n return object_get($this->getUser(), 'profile_id', $this->getDefaultProfileId() );\n }", "public function getUserProfileId() {\n return($this->userProfileId); \n }", "public function getAuthUserDetail()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function user() { return $this->user; }", "public function getUser(){\n\t\treturn $this->user;\n\t}", "public function getUser() {\r\n return $this->user;\r\n }", "function getUserInfo()\n {\n return $this->userinfo;\n }", "private function getServicePageUser()\n {\n return $this->container->get('app_service_page_user');\n }", "public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }", "public function GetProfile()\n {\n return $this->profile;\n }", "public function profile() {\n return $this->profile;\n }", "public function getUser()\r\n {\r\n return $this->user;\r\n }", "public function getUserInfo(): string\n {\n return (string) $this->user_info;\n }", "public function getUserId()\n {\n return parent::getValue('user_id');\n }", "function getUserProfile()\n\t{\n\t\t$data = $this->api->api( \"v1/market/private/user/account.json\" );\n\t\tif ( ! isset( $data->account ) ){\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->account->surname;\n\t\t$this->user->profile->displayName = @ $data->account->firstname . ' ' . $data->account->surname;\n\t\t$this->user->profile->photoURL = @ $data->account->image;\n\t\t$this->user->profile->profileURL = @ $data->account->image;\n\n\t\t// request user emails from envato api\n\t\ttry{\n\t\t\t$email = $this->api->api(\"v1/market/private/user/email.json\");\n\t\t\t$this->user->profile->email = @ $email->email;\n\t\t}\n\t\tcatch( Exception $e ){\n\t\t\tthrow new Exception( \"User email request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\treturn $this->user->profile;\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 user() {\n\t\tif ( ! is_null($this->user)) return $this->user;\n\t\treturn $this->user = $this->retrieve($this->token);\n\t}", "public function getUserProfileHash(): string {\n\t\treturn ($this->userProfileHash);\n\t}", "public function getProfile() {\n\t\treturn $this->profile;\n\t}", "public function getProfile()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\r\n }", "public function getUser()\n {\n $this->getParam('user');\n }", "public function getBackendUser() {}", "public function getUser ()\r\n\t{\r\n\t\treturn $this->user;\r\n\t}", "public function getProfile()\n {\n return $this->getFieldValue(self::FIELD_PROFILE);\n }", "public function profile()\n {\n return Auth::user();\n }", "public static function getUser();", "public function getCustomUserId();", "public function user()\n {\n return call_user_func($this->getUserResolver());\n }", "private function getUser()\n {\n return $this->user->getUser();\n }", "public function getUrl() {\n return $this->getProfileUri();\n }", "public function getUser() {\n return $this->user;\n }", "public function getUser() {\n return $this->user;\n }", "public function getUser() {\n return $this->user;\n }", "public function getUser() {\n return $this->user;\n }", "public function getUserInfo()\n {\n return $this->_process('user/info')->user;\n }", "public function getApiUser()\n {\n return Mage::getStoreConfig('magebridge/settings/api_user');\n }", "function get_user () {\n\t\treturn $this->user_id;\n\t}", "static public function GetGETUser() {\n if (isset(self::$getUser))\n return self::$getUser;\n else\n return self::UNKNOWN;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public function getUser()\n {\n return $this->user;\n }", "public final function getUser()\n {\n return $this->user;\n }", "public function user()\n {\n return $this->user;\n }", "public function user()\n {\n return $this->user;\n }", "public static function getUser()\n {\n return self::getInstance()->_getUser();\n }", "public function getProfile() {\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\n }" ]
[ "0.6902523", "0.67335105", "0.67124563", "0.66355187", "0.6563103", "0.65522206", "0.65254587", "0.6507147", "0.6505256", "0.64854777", "0.64544195", "0.64541334", "0.6440334", "0.6440334", "0.64151603", "0.64151603", "0.64151603", "0.6413908", "0.64014894", "0.63982624", "0.6388176", "0.6375294", "0.63507396", "0.6346049", "0.6346049", "0.6346049", "0.63406914", "0.63406914", "0.63406914", "0.63406914", "0.63406914", "0.63406914", "0.63406914", "0.6334086", "0.6322053", "0.6321296", "0.63207257", "0.63179624", "0.6315483", "0.631222", "0.62999266", "0.62944067", "0.6289853", "0.6288551", "0.6276161", "0.62681884", "0.6252346", "0.6242739", "0.62425476", "0.62415737", "0.6234162", "0.62331605", "0.6231886", "0.6228747", "0.6219404", "0.6217578", "0.62162805", "0.6209326", "0.62076557", "0.62064624", "0.6197799", "0.6197799", "0.6197799", "0.6197799", "0.6195154", "0.61882734", "0.61868", "0.6185899", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61795926", "0.61754817", "0.61698794", "0.61698794", "0.6164982", "0.61522603" ]
0.6148427
100
/ set the current block to work with and later display $block = name $file = template file to use
public function block($block, $file = NULL) { if ($file == NULL) { $file = $this->last_file; } else if (!isset($this->files[$file])) { $this->load($file); } // assign this block a number // block number is used rather than the block name as we could be looping through the same block multiple times (and don't want each block to have the same content) $this->block++; $pattern = '#\[block:\s*(' . $block . ')\](.*)\[/block:\s*(' . $block . ')\]#is'; // find the content of the wanted block from the selected template file if(preg_match($pattern, $this->files[$file], $matches)) { // put the blocks info into the merged array with the block number $this->merged[$this->block] = $matches[2]; } else { $this->core->message("Error cannot find block named ($block).", 1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function page_render_block($block) {\n static $xtpl_block;\n \n if (!$xtpl_block) $xtpl_block = new XTemplate('html/block.xtpl');\n \n $xtpl_block->reset('block');\n $xtpl_block->assign('id', $block['id']);\n $xtpl_block->assign('title', $block['title']);\n $xtpl_block->assign('content', $block['content']);\n \n if (isset($block['links'])) {\n $xtpl_block->assign('links', $block['links']);\n $xtpl_block->parse('block.links');\n }\n \n $xtpl_block->parse('block');\n return $xtpl_block->text('block');\n}", "function _build_block_template_result_from_file($template_file, $template_type)\n {\n }", "function render_block_core_file($attributes, $content, $block)\n {\n }", "function get_the_block_template_html()\n {\n }", "public function blockStart() {\n\n $this->outputEditmode('<div class=\"pimcore_block_entry ' . $this->getName() . '\" key=\"' . $this->indices[$this->current] . '\">');\n $this->outputEditmode('<div class=\"pimcore_block_buttons_' . $this->getName() . ' pimcore_block_buttons\">');\n $this->outputEditmode('<div class=\"pimcore_block_amount_' . $this->getName() . ' pimcore_block_amount\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_plus_' . $this->getName() . ' pimcore_block_plus\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_minus_' . $this->getName() . ' pimcore_block_minus\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_up_' . $this->getName() . ' pimcore_block_up\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_down_' . $this->getName() . ' pimcore_block_down\"></div>');\n $this->outputEditmode('<div class=\"pimcore_block_clear\"></div>');\n $this->outputEditmode('</div>');\n\n $this->current++;\n }", "function render_block($parsed_block)\n {\n }", "public function block_store($block, $file = NULL)\n\t{\n\t\tif ($file == NULL)\n\t\t{\n\t\t\t$file = $this->last_file;\n\t\t}\n\n\t\t$pattern = '#\\[block:\\s*(' . $block . ')\\](.*)\\[/block:\\s*(' . $block . ')\\]#is';\n\n\t\t// find the content of the wanted block from the selected template file\n\t\tif(preg_match($pattern, $this->files[$file], $matches))\n\t\t{\n\t\t\t// put the blocks info into the merged array with the block number\n\t\t\treturn $matches[2];\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\t$this->core->message(\"Error cannot find block named ($block).\", 1);\n\t\t}\n\t}", "function locate_block_template($template, $type, array $templates)\n {\n }", "function _add_block_template_info($template_item)\n {\n }", "public function setTemplate($file);", "function block_template_part($part)\n {\n }", "function get_block_file_template($id, $template_type = 'wp_template')\n {\n }", "public function getBlockTemplate(array $params);", "function display_block( $file )\r\n{\r\n\tglobal $ignore_file_list, $ignore_ext_list, $force_download;\r\n\t\r\n\t$file_ext = ext($file);\r\n\tif( !$file_ext AND is_dir($file)) $file_ext = \"dir\";\r\n\tif(in_array($file, $ignore_file_list)) return;\r\n\tif(in_array($file_ext, $ignore_ext_list)) return;\r\n\t\r\n\t$download_att = ($force_download AND $file_ext != \"dir\" ) ? \" download='\" . basename($file) . \"'\" : \"\";\r\n\t\r\n\t$rtn = \"<div class=\\\"block\\\">\";\r\n\t$rtn .= \"<a href=\\\"$file\\\" class=\\\"$file_ext\\\"{$download_att}>\";\r\n\t$rtn .= \"\t<div class=\\\"img $file_ext\\\"></div>\";\r\n\t$rtn .= \"\t<div class=\\\"name\\\">\";\r\n\t\r\n\tif ($file_ext === \"dir\") \r\n\t{\r\n\t\t$rtn .= \"\t\t<div class=\\\"file fs-1-2 bold\\\">\" . basename($file) . \"</div>\";\r\n\t\t$rtn .= \"\t\t<div class=\\\"data upper size fs-0-7\\\"><span class=\\\"bold\\\">\" . count_dir_files($file) . \"</span> files</div>\";\r\n\t\t$rtn .= \"\t\t<div class=\\\"data upper size fs-0-7\\\"><span class=\\\"bold\\\">Size:</span> \" . get_directory_size($file) . \"</div>\";\r\n\t\t\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$rtn .= \"\t\t<div class=\\\"file fs-1-2 bold\\\">\" . basename($file) . \"</div>\";\r\n\t\t$rtn .= \"\t\t<div class=\\\"data upper size fs-0-7\\\"><span class=\\\"bold\\\">Size:</span> \" . display_size(filesize($file)) . \"</div>\";\r\n\t\t$rtn .= \"\t\t<div class=\\\"data upper modified fs-0-7\\\"><span class=\\\"bold\\\">Last modified:</span> \" . date(\"D. F jS, Y - h:ia\", filemtime($file)) . \"</div>\";\t\r\n\t}\r\n\r\n\t$rtn .= \"\t</div>\";\r\n\t$rtn .= \"\t</a>\";\r\n\t$rtn .= \"</div>\";\r\n\treturn $rtn;\r\n}", "public function startBlock($name)\n\t{\n\t\t$this->blockStack[] = array($name, FALSE);\n\t\tob_start();\n\t}", "function display_block($file){\n\tglobal $ignore_file_list, $ignore_ext_list, $force_download;\n\t\n\t$file_ext = is_dir($file) ? \"dir\" : getFileExt($file);\n\tif(in_array($file, $ignore_file_list)) return;\n\tif(in_array($file_ext, $ignore_ext_list)) return;\n\t\n\t$download_att = ($force_download AND $file_ext != \"dir\" ) ? \" download='\" . basename($file) . \"'\" : \"\";\n\t\n\t$rtn = \"<div class=\\\"block\\\">\";\n\t$rtn .= \"<a href=\\\"$file\\\" class=\\\"$file_ext\\\"{$download_att}>\";\n\t$rtn .= \"\t<div class=\\\"img file-icon\\\" data-type=\\\"$file_ext\\\">&nbsp;</div>\";\n\tswitch ($file_ext) {\n\t\tcase \"zip\":\n\t\tcase \"7z\":\n\t\tcase \"rar\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"archive\\\">&#xf187;</i>\\n\";\n\t\t\tbreak;\n\t\tcase \"htm\":\n\t\tcase \"html\":\n\t\tcase \"php\":\n\t\tcase \"js\":\n\t\tcase \"css\":\n\t\tcase \"xhtml\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"web\\\">&#xf0ac;</i>\\n\";\n\t\t\tbreak;\n\t\tcase \"doc\":\n\t\tcase \"rtf\":\n\t\tcase \"txt\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"doc\\\">&#xf15c;</i>\\n\";\n\t\t\tbreak;\n\t\tcase \"cfg\":\n\t\tcase \"ini\":\n\t\tcase \"log\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"cfg\\\">&#xf085;</i>\\n\";\n\t\t\tbreak;\n\t\tcase \"mp3\":\n\t\tcase \"m4a\":\n\t\tcase \"wma\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"audio\\\">&#xf001;</i>\\n\";\n\t\t\tbreak;\n\t\tcase \"mp4\":\n\t\tcase \"m4v\":\n\t\tcase \"avi\":\n\t\tcase \"wmv\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"video\\\">&#xf008;</i>\\n\";\n\t\t\tbreak;\n\t\tcase \"bmp\":\n\t\tcase \"jpg\":\n\t\tcase \"gif\":\n\t\tcase \"ico\":\n\t\tcase \"png\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"image\\\">&#xf03e;</i>\\n\";\n\t\t\tbreak;\n\t\tcase \"dir\":\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\" data-type=\\\"dir\\\">&#xf07b;</i>\\n\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$rtn .= \"\t<i class=\\\"fa fa-fw\\\">&#xf15b;</i>\\n\";\n\t\t\tbreak;\n\t}\n\t$rtn .= \"\t<div class=\\\"name\\\">\\n\";\n\tif ($file_ext === \"dir\") {\n\t\t$rtn .= \"\t\t<div class=\\\"file\\\"><strong>[ \" . basename($file) . \" ]</strong></div>\\n\";\n\t} else {\n\t\t$rtn .= \"\t\t<div class=\\\"file\\\">\" . basename($file) . \"</div>\\n\";\n\t}\t\n\t//$rtn .= \"\t\t<div class=\\\"file\\\">\" . basename($file) . \"</div>\\n\";\n\t$rtn .= \"\t\t<div class=\\\"date\\\">Size: \" . format_size($file) . \"<br />Last modified: \" . date(\"D. F jS, Y - h:ia\", filemtime($file)) . \"</div>\\n\";\n\t$rtn .= \"\t</div>\\n\";\n\t$rtn .= \"\t</a>\\n\";\n\t$rtn .= \"</div>\";\n\treturn $rtn;\n}", "public function processBlockTemplate(Block $block)\n {\n $templateFileRawContents = $this->getThemeTemplateFileContents($block);\n $blockNameInTemplate = $this->addBlockToTheResultViewParamsSet($block);\n\n // Check if the required directive present in the template file\n if (!strstr($templateFileRawContents, self::BLOCK_TEMPLATE_DIRECTIVE)) {\n throw new \\Exception(\n \"There is no required directive {self::BLOCK_TEMPLATE_DIRECTIVE} in template {$block->getRoute()}\"\n );\n }\n $templateFileRawContents = str_replace(\n self::BLOCK_TEMPLATE_DIRECTIVE,\n \"\\$page->renderParam('$blockNameInTemplate')\",\n $templateFileRawContents\n );\n\n $this->content .= $templateFileRawContents . \"\\n\";\n }", "function content($block, $default_content = NULL)\n\t{\n\t\t$ci =& get_instance();\n\t\tif($ci->template->block_exists($block)){\n\t\t\treturn $ci->template->data['template'][$block];\n\t\t} else {\n\t\t\treturn $default_content;\n\t\t}\n\t}", "public function page_content__main() {\n\n echo '<h3>' . __('Blocks', 'wpucacheblocks') . '</h3>';\n foreach ($this->blocks as $id => $block) {\n echo '<p>';\n echo '<strong>' . $id . ' - ' . $block['path'] . '</strong><br />';\n $_expiration = (is_bool($block['expires']) ? __('never', 'wpucacheblocks') : $block['expires'] . 's');\n echo sprintf(__('Expiration: %s', 'wpucacheblocks'), $_expiration);\n\n $prefixes = $this->get_block_prefixes($id);\n\n foreach ($prefixes as $prefix) {\n echo $this->display_block_cache_status($id, $prefix);\n }\n\n echo '<br />';\n if (!apply_filters('wpucacheblocks_bypass_cache', false, $id)) {\n if (isset($block['callback_prefix'])) {\n submit_button(__('Clear', 'wpucacheblocks'), 'secondary', 'clear__' . $id, false);\n } else {\n submit_button(__('Reload', 'wpucacheblocks'), 'secondary', 'reload__' . $id, false);\n }\n } else {\n echo __('A bypass exists for this block. Regeneration is only available in front mode.', 'wpucacheblocks');\n }\n echo '</p>';\n echo '<hr />';\n }\n }", "function setBlock($resource_name, $variable = NULL, $cache_id = null)\n\t{ \n if (strpos($resource_name, '.') === false) {\n\t\t\t$resource_name .= '.tpl';\n\t\t}\n \n if ($variable){\n $content = parent::fetch($theme.'/'.$resource_name, $cache_id);\n \n $this->_globals[$variable] = $content;\n \n parent::clear_all_assign();\n\n } else {\n\t\t\n\n return parent::fetch($resource_name, $cache_id);\n }\n\t}", "function show_file_block($file, $block, $section = null)\n{\n global $cfg;\n\n if ($cfg['show'][$file]) {\n\n if (is_null($section)) {\n $section = strtoupper($file);\n }\n\n static $max_length = 1024;\n if (strlen($block) > $max_length) {\n $block = substr($block, 0, $max_length) . '...';\n }\n\n echo \"\\n========\" . $section . \"========\\n\";\n echo rtrim($block);\n echo \"\\n========DONE========\\n\";\n }\n}", "public function loadTemplate()\n\t{\n\t\t$t_location = \\IPS\\Request::i()->t_location;\n\t\t$t_key = \\IPS\\Request::i()->t_key;\n\t\t\n\t\tif ( $t_location === 'block' and $t_key === '_default_' and isset( \\IPS\\Request::i()->block_key ) )\n\t\t{\n\t\t\t/* Find it from the normal template system */\n\t\t\tif ( isset( \\IPS\\Request::i()->block_app ) )\n\t\t\t{\n\t\t\t\t$plugin = \\IPS\\Widget::load( \\IPS\\Application::load( \\IPS\\Request::i()->block_app ), \\IPS\\Request::i()->block_key, mt_rand() );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$plugin = \\IPS\\Widget::load( \\IPS\\Plugin::load( \\IPS\\Request::i()->block_plugin ), \\IPS\\Request::i()->block_key, mt_rand() );\n\t\t\t}\n\t\t\t\n\t\t\t$location = $plugin->getTemplateLocation();\n\t\t\t\n\t\t\t$templateBits = \\IPS\\Theme::master()->getRawTemplates( $location['app'], $location['location'], $location['group'], \\IPS\\Theme::RETURN_ALL );\n\t\t\t$templateBit = $templateBits[ $location['app'] ][ $location['location'] ][ $location['group'] ][ $location['name'] ];\n\t\t\t\n\t\t\tif ( ! isset( \\IPS\\Request::i()->noencode ) OR ! \\IPS\\Request::i()->noencode )\n\t\t\t{\n\t\t\t\t$templateBit['template_content'] = htmlentities( $templateBit['template_content'], ENT_DISALLOWED, 'UTF-8', TRUE );\n\t\t\t}\n\t\t\t\n\t\t\t$templateArray = array(\n\t\t\t\t'template_id' \t\t\t=> $templateBit['template_id'],\n\t\t\t\t'template_key' \t\t\t=> 'template_' . $templateBit['template_name'] . '.' . $templateBit['template_id'],\n\t\t\t\t'template_title'\t\t=> $templateBit['template_name'],\n\t\t\t\t'template_desc' \t\t=> null,\n\t\t\t\t'template_content' \t\t=> $templateBit['template_content'],\n\t\t\t\t'template_location' \t=> null,\n\t\t\t\t'template_group' \t\t=> null,\n\t\t\t\t'template_container' \t=> null,\n\t\t\t\t'template_rel_id' \t\t=> null,\n\t\t\t\t'template_user_created' => null,\n\t\t\t\t'template_user_edited' => null,\n\t\t\t\t'template_params' \t => $templateBit['template_data']\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif ( \\is_numeric( $t_key ) )\n\t\t\t\t{\n\t\t\t\t\t$template = \\IPS\\cms\\Templates::load( $t_key, 'template_id' );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$template = \\IPS\\cms\\Templates::load( $t_key );\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch( \\OutOfRangeException $ex )\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->json( array( 'error' => true ) );\n\t\t\t}\n\n\t\t\tif ( $template !== null )\n\t\t\t{\n\t\t\t\t$templateArray = array(\n\t 'template_id' \t\t\t=> $template->id,\n\t 'template_key' \t\t\t=> $template->key,\n\t 'template_title'\t\t=> $template->title,\n\t 'template_desc' \t\t=> $template->desc,\n\t 'template_content' \t\t=> ( isset( \\IPS\\Request::i()->noencode ) AND \\IPS\\Request::i()->noencode ) ? $template->content : htmlentities( $template->content, ENT_DISALLOWED, 'UTF-8', TRUE ),\n\t 'template_location' \t=> $template->location,\n\t 'template_group' \t\t=> $template->group,\n\t 'template_container' \t=> $template->container,\n\t 'template_rel_id' \t\t=> $template->rel_id,\n\t 'template_user_created' => $template->user_created,\n\t 'template_user_edited' => $template->user_edited,\n\t 'template_params' \t => $template->params\n\t );\n\t\t\t}\n\t\t}\n\n\t\tif ( \\IPS\\Request::i()->show == 'json' )\n\t\t{\n\t\t\t\\IPS\\Output::i()->json( $templateArray );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\\IPS\\Output::i()->sendOutput( \\IPS\\Theme::i()->getTemplate( 'global', 'core' )->blankTemplate( \\IPS\\Theme::i()->getTemplate( 'templates', 'cms', 'admin' )->viewTemplate( $templateArray ) ), 200, 'text/html', \\IPS\\Output::i()->httpHeaders );\n\t\t}\n\t}", "public function display(array $context, array $blocks = array())\n {\n if (!$this->debugFiles) {\n parent::display($context, $blocks);\n return null;\n }\n\n\n //Ok, debugging is activated for files\n $arrVars = array();\n $arrVars['backColor'] = self::random_color();\n $arrVars['foreColor'] = self::color_inverse($arrVars['backColor']);\n $arrVars['templateName'] = $this->getTemplateName();\n $arrVars['templatePath'] = $this->env->getLoader()->getCacheKey($arrVars['templateName']);\n $arrVars['uuid'] = uniqid();\n $arrVars['deep'] = self::$templateDeep;\n $arrVars['parent'] = self::$templateParent;\n\n\n\n $arrVars['stack'] = array_map(function($arr){\n if (isset($arr['class'])) {\n return \"{$arr['class']}::{$arr['function']}()\";\n } else {\n return \"{$arr['file']} at line {$arr['line']}\";\n }\n }, debug_backtrace());\n\n\n self::$arrTemplateHierarchy[] = array(\n 'template' => $this->getTemplateName(),\n 'parent' => self::$templateParent,\n 'deep' => self::$templateDeep,\n );\n\n\n //Pass the real content to the debug container.\n $oldParent = self::$templateParent;\n self::$templateParent = $this->getTemplateName();\n self::$templateDeep++;\n ob_start();\n parent::display($context, $blocks);\n $arrVars['content'] = ob_get_contents();\n ob_end_clean();\n self::$templateDeep--;\n self::$templateParent = $oldParent;\n $this->renderDebug('templateContainer.html.twig', $arrVars);\n\n\n if ($this->debugHierarchy && self::$templateParent == '') {\n $this->showTemplateHierarchy();\n\n }\n }", "public function render(array $block): void\n {\n $template = $this->path . 'template.blade.php';\n\n if (file_exists($template) && file_exists(templatePath($template))) {\n $data = $this->parse($block);\n $this->loadAssets($data);\n echo template($this->path . 'template.blade.php', $data);\n }\n }", "function custom_acf_display_blocks( $block ) {\n\t// Convert name \"acf/example\" into path friendly slug \"example\".\n\t$slug = str_replace( 'acf/', '', $block['name'] );\n\n\t// Include a template part from within the \"components/block\" folder.\n\tif ( file_exists( get_theme_file_path( \"/components/block-{$slug}.php\" ) ) ) {\n\t\tinclude get_theme_file_path( \"/components/block-{$slug}.php\" );\n\t}\n}", "protected function currentTemplateHandle(){\n if( $this->_currentTemplateHandle === null ){\n $blockObj = $this->getBlockObject();\n $this->_currentTemplateHandle = ( is_object($blockObj) ) ? (string) $blockObj->getBlockFilename() : null;\n }\n return $this->_currentTemplateHandle;\n }", "function action_init()\n\t{\n\n\t\t$this->allblocks = array(\n\t\t\t'recent_comments' => _t( 'Recent Comments' ),\n\t\t\t'recent_posts' => _t( 'Recent Posts' ),\n\t\t\t'monthly_archives' => _t( 'Monthly Archives' ),\n\t\t\t'tag_archives' => _t( 'Tag Archives' ),\n\t\t\t'meta_links' => _t( 'Meta Links' ),\n\t\t\t'search_form' => _t( 'Search Form' ),\n\t\t\t'text' => _t( 'Text' ),\n\t\t);\n\n\t\tforeach ( array_keys( $this->allblocks ) as $blockname ) {\n\t\t\t$this->add_template( \"block.$blockname\", dirname( __FILE__ ) . \"/block.$blockname.php\" );\n\t\t}\n\t\t$this->add_template( \"block.dropdown.tag_archives\", dirname( __FILE__ ) . \"/block.dropdown.tag_archives.php\" );\n\t\t$this->add_template( \"block.dropdown.monthly_archives\", dirname( __FILE__ ) . \"/block.dropdown.monthly_archives.php\" );\n\t}", "function generate_block_asset_handle($block_name, $field_name, $index = 0)\n {\n }", "function acf_block_render_callback( $block ) {\n\t\t$slug = str_replace( 'acf/', '', $block['name'] );\n\t\t$path = \"/inc/frontend/acf/blocks/{$slug}.php\";\n\n\t\t// include a template part from within the \"template-parts/block\" folder\n\t\tif ( file_exists( get_theme_file_path( $path ) ) ) {\n\t\t\tinclude( get_theme_file_path( $path ) );\n\t\t}\n\t}", "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 }", "function init() {\n global $CFG;\n $this->blockname = get_class($this);\n $this->title = get_string('blockname', $this->blockname);\n $this->version = 2009082800;\n }", "private function getContentBlockName()\n\t{\n\t\tif ($this->test->getKioskMode())\n\t\t{\n\t\t\t$this->tpl->setBodyClass(\"kiosk\");\n\t\t\t$this->tpl->setAddFooter(FALSE);\n\t\t\treturn \"CONTENT\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"ADM_CONTENT\";\n\t\t}\n\t}", "public static function getTemplateBlock()\n {\n return self::$templateBlock;\n }", "function beginMainBlock() {\n $blockNo = 0;\n $this->registerBlock('@@InternalMainBlock@@', $blockNo);\n $bte =& $this->blockTab[$blockNo];\n $bte['tPosBegin'] = 0;\n $bte['tPosContentsBegin'] = 0;\n $bte['nestingLevel'] = 0;\n $bte['parentBlockNo'] = -1;\n $bte['definitionIsOpen'] = true;\n $this->openBlocksTab[0] = $blockNo;\n $this->currentNestingLevel = 1; }", "function assign_block_vars($blockname, $vararray)\n\t{\n\t\tif (strpos($blockname, '.') !== false)\n\t\t{\n\t\t\t// Nested block.\n\t\t\t$blocks = explode('.', $blockname);\n\t\t\t$blockcount = sizeof($blocks) - 1;\n\n\t\t\t$str = &$this->_tpldata;\n\t\t\tfor($i = 0; $i < $blockcount; $i++)\n\t\t\t{\n\t\t\t\t$str = &$str[$blocks[$i] . '.'];\n\t\t\t\t$str = &$str[sizeof($str) - 1];\n\t\t\t}\n\n\t\t\t$s_row_count = isset($str[$blocks[$blockcount] . '.']) ? sizeof($str[$blocks[$blockcount] . '.']) : 0;\n\t\t\t$vararray['S_ROW_COUNT'] = $s_row_count;\n\n\t\t\t// Assign S_FIRST_ROW\n\t\t\tif (!$s_row_count)\n\t\t\t{\n\t\t\t\t$vararray['S_FIRST_ROW'] = true;\n\t\t\t}\n\n\t\t\t// Now the tricky part, we always assign S_LAST_ROW and remove the entry before\n\t\t\t// This is much more clever than going through the complete template data on display (phew)\n\t\t\t$vararray['S_LAST_ROW'] = true;\n\t\t\tif ($s_row_count > 0)\n\t\t\t{\n\t\t\t\tunset($str[$blocks[$blockcount] . '.'][($s_row_count - 1)]['S_LAST_ROW']);\n\t\t\t}\n\n\t\t\t// Now we add the block that we're actually assigning to.\n\t\t\t// We're adding a new iteration to this block with the given variable assignments.\n\t\t\t$str[$blocks[$blockcount] . '.'][] = $vararray;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Top-level block.\n\t\t\t$s_row_count = (isset($this->_tpldata[$blockname . '.'])) ? sizeof($this->_tpldata[$blockname . '.']) : 0;\n\t\t\t$vararray['S_ROW_COUNT'] = $s_row_count;\n\n\t\t\t// Assign S_FIRST_ROW\n\t\t\tif (!$s_row_count)\n\t\t\t{\n\t\t\t\t$vararray['S_FIRST_ROW'] = true;\n\t\t\t}\n\n\t\t\t// We always assign S_LAST_ROW and remove the entry before\n\t\t\t$vararray['S_LAST_ROW'] = true;\n\t\t\tif ($s_row_count > 0)\n\t\t\t{\n\t\t\t\tunset($this->_tpldata[$blockname . '.'][($s_row_count - 1)]['S_LAST_ROW']);\n\t\t\t}\n\n\t\t\t// Add a new iteration to this block with the variable assignments we were given.\n\t\t\t$this->_tpldata[$blockname . '.'][] = $vararray;\n\t\t}\n\n\t\treturn true;\n\t}", "public function specialization() {\n if (!empty($this->config->blocktitle)) {\n $this->title = $this->config->blocktitle;\n } else {\n $this->title = get_string('config_blocktitle_default', 'block_course_modulenavigation');\n }\n }", "public function initContent()\n {\n parent::initContent();\n\n $this->setTemplate(_PS_THEME_DIR_.'<%= name %>.tpl');\n }", "public function show()\n {\n require_once BFT_PATH_BASE.DS.'templates'.DS.'html-header.php';\n if ($this->section != 'start' and $this->template != 'infos') require_once BFT_PATH_BASE.DS.'templates'.DS.'box-header.php';\n require_once BFT_PATH_BASE.DS.'templates'.DS.$this->template.'.php';\n if ($this->section != 'start' and $this->template != 'infos') require_once BFT_PATH_BASE.DS.'templates'.DS.'box-footer.php';\n require_once BFT_PATH_BASE.DS.'templates'.DS.'html-footer.php';\n }", "public function Admin_Action_ShowBlockForm() {\n $ssf = new SendStudio_Functions ( );\n $action = 'new';\n $GLOBALS ['blockid'] = (isset ( $_GET ['id'] ) && $_GET ['id'] > 0) ? $_GET ['id'] : md5(rand ( 1, 100000000 ));\n $GLOBALS ['tagid'] = (isset ( $_GET ['tagId'] ) && $_GET ['tagId'] > 0) ? $_GET ['tagId'] : 0;\n $GLOBALS ['blockaction'] = (isset ( $_GET ['id'] ) && $_GET ['id'] > 0) ? 'edit' : 'new';\n $GLOBALS ['BlockEditor'] = $ssf->GetHTMLEditor ( '', false, 'blockcontent', 'exact', 260, 630 );\n $GLOBALS ['CustomDatepickerUI'] = $this->template_system->ParseTemplate('UI.DatePicker.Custom_IEM', true);\n $this->template_system->ParseTemplate ( 'dynamiccontentblocks_form' );\n }", "function my_acf_block_render_callback( $block ) {\n\t$slug = str_replace('acf/', '', $block['name']);\n\t// include a template part from within the \"template-parts/block\" folder\n\tif( file_exists( get_theme_file_path(\"/templates/block/{$slug}.php\") ) ) {\n\t\tinclude( get_theme_file_path(\"/templates/block/{$slug}.php\") );\n\t}\n}", "function render_block($block)\r\n {\r\n $personal_messenger_block = PersonalMessengerBlock :: factory($this, $block);\r\n return $personal_messenger_block->run();\r\n }", "function render_block_core_post_template($attributes, $content, $block)\n {\n }", "public function applyTemplateBlocks(Template $t)\n {\n\n }", "function parse($handle, $tplvar, $parent) {\n yats_assign($this->mBlockHandles[$parent], $tplvar, yats_getbuf($this->mBlockHandles[$handle], $this->default_locale, $this->default_domain, $this->default_dir));\n }", "public function processTemplate($template = '') {\n\t\tif(is_object($this->registry->get('config')) && $this->registry->get('config')->get('embed_mode') == true ){\n\t\t \t//get template if it was set earlier\n\t\t\tif (empty($template)) {\n\t\t\t\t$template = $this->view->getTemplate();\n\t\t\t}\n\t\t\t//only substitute the template for page templates\n\t\t\tif(substr($template, 0, 6) == 'pages/' && substr($template, 0, 6) != 'embed/'){\n\t\t \t//load special headers for embed as no page/layout needed\n\t \t\t$this->addChild('responses/embed/head', 'head');\n\t \t$this->addChild('responses/embed/footer', 'footer');\n\t \t$template = preg_replace('/pages\\//', 'embed/', $template);\t\t\t\n\t\t\t}\n\t\t}\n\t\n\t\tif (!empty($template)) {\n\t\t\t$this->view->setTemplate($template);\n\t\t}\n\t\t$this->view->assign('block_details',$this->block_details);\n\t\t$this->view->assign(\"children_blocks\", $this->getChildrenBlocks());\n\t\t$this->view->enableOutput();\n\t}", "function render_block($block)\r\n {\r\n $block = ProfilerBlock :: factory($this, $block);\r\n return $block->run();\r\n }", "public function register_block($name,$block)\n \t{\n \t\t$this->blocks[$name]=$block;\n \t}", "public function contentBlock($name, array $options = []){\r\n\r\n $uri = $this->_getContentURI();\r\n\r\n // [dir][page][content-name]\r\n $id = $uri.'/'.$name;\r\n\r\n $tag = 'div';\r\n $path = ROOT.DS.'site'.DS.'content'.DS.$uri.DS.$name.'.html';\r\n\r\n echo \"<$tag \";\r\n if($this->hasLogin()) echo \"data-editable data-name='$id'\";\r\n echo \">\";\r\n if(file_exists($path)){\r\n include $path;\r\n }\r\n echo \"</$tag>\";\r\n\r\n }", "public function setTemplate($template) {\n \n\n \t$this->display($template);\n }", "function do_blocks($content)\n {\n }", "public function block($file, $data = [])\n {\n $block = clone($this);\n $block->layout_file = null;\n return $block->doRender($file, $data);\n }", "function view_special_blocks($type) {\n if (strpos($type, '-setsblocks') === 0) {\n // avoid interfering with the admin forms.\n if (arg(0) == 'admin' && arg(1) == 'build' && arg(2) == 'views') {\n return;\n }\n\n list($type, $variant) = explode('_', $type, 2);\n\n $variant = base64_decode($variant);\n $args = explode('/', $variant);\n\n $this->view->set_arguments($args);\n\n $info = $this->view->execute_display();\n if ($info) {\n $info['view'] = $this->view;\n }\n return $info;\n }\n else {\n return parent::view_special_blocks($type);\n }\n }", "function theme_acf_block_render_callback( $block ) {\n // convert name (\"acf/testimonial\") into path friendly slug (\"testimonial\")\n $slug = str_replace('acf/', '', $block['name']);\n\n // include a template part from within the \"template-parts/block\" folder\n if( file_exists( get_theme_file_path(\"/templates/blocks/{$slug}.php\") ) ) {\n include( get_theme_file_path(\"/templates/blocks/{$slug}.php\") );\n }\n}", "function ehh_acf_block_render_callback( $block ) {\n\t$slug = str_replace('acf/', '', $block['name']);\n\t\n\t// include a template part from within the \"template-parts/blocks\" folder\n\tif( file_exists( get_theme_file_path(\"/template-parts/blocks/content-{$slug}.php\") ) ) {\n\t\t\n\t\tinclude( get_theme_file_path(\"/template-parts/blocks/content-{$slug}.php\") );\n\t\n\t}\n}", "public function blockAction()\n {\n $blockId = $this->params()->fromRoute('block');\n $handles = $this->params()->fromQuery('handles', []);\n /* @var $layoutManager LayoutManager */\n $layoutManager = $this->layoutManager();\n foreach ($handles as $handle => $priority) {\n $layoutManager->addHandle(new Handle($handle, $priority));\n }\n if (!$blockId) {\n return $this->blockNotFound($blockId);\n }\n $layoutManager->generate([BlocksGenerator::NAME => true]);\n if (!$block = $layoutManager->getBlock($blockId)) {\n $block = $this->blockNotFound($blockId);\n }\n $block->setVariable('__ESI__', true);\n $block->setTerminal(true);\n return $block;\n }", "function my_acf_block_render_callback( $block ) {\n $slug = str_replace('acf/', '', $block['name']);\n \n // include a template part from within the \"template-parts/block\" folder\n if( file_exists( get_theme_file_path(\"/assets/views/template-parts/block/content-{$slug}.php\") ) ) {\n include( get_theme_file_path(\"/assets/views/template-parts/block/content-{$slug}.php\") );\n }\n}", "protected function content_template()\n\t{\n\t\t//\n\t}", "private function setTemplate(){\n if (isset($this->data['template']) && !empty($this->data['template'])){\n $template = APP_ROOT.'/app/templates/'.trim($this->data['template']).'.tpl';\n if (file_exists($template)){\n $this->template = $template;\n return;\n }\n }\n //default\n $this->template = APP_ROOT.'/app/templates/default.tpl';\n }", "function smarty_block_setAboutPage($params,$content,&$smarty,&$repeat)\n{\n if(!is_null($content))\n {\n global $about_page_body,$about_page_title;\n $about_page_body=$content;\n $about_page_title=$params[\"title\"];\n }\n \n}", "public static function &createBlockByInfo(&$module, $block, $func_num)\n {\n $options = isset($block['options']) ? $block['options'] : null;\n $edit_func = isset($block['edit_func']) ? $block['edit_func'] : null;\n $template = isset($block['template']) ? $block['template'] : null;\n $visible = isset($block['visible']) ? $block['visible'] : (isset($block['visible_any']) ? $block['visible_any']: 0);\n $blockHandler =& xoops_gethandler('block');\n $blockObj =& $blockHandler->create();\n\n $blockObj->set('mid', $module->getVar('mid'));\n $blockObj->set('options', $options);\n $blockObj->set('name', $block['name']);\n $blockObj->set('title', $block['name']);\n $blockObj->set('block_type', 'M');\n $blockObj->set('c_type', 1);\n $blockObj->set('isactive', 1);\n $blockObj->set('dirname', $module->getVar('dirname'));\n $blockObj->set('func_file', $block['file']);\n\n //\n // IMPORTANT CONVENTION\n //\n $show_func = '';\n if (isset($block['class'])) {\n $show_func = 'cl::' . $block['class'];\n } else {\n $show_func = $block['show_func'];\n }\n\n $blockObj->set('show_func', $show_func);\n $blockObj->set('edit_func', $edit_func);\n $blockObj->set('template', $template);\n $blockObj->set('last_modified', time());\n $blockObj->set('visible', $visible);\n\n $func_num = isset($block['func_num']) ? (int)$block['func_num'] : $func_num;\n $blockObj->set('func_num', $func_num);\n\n return $blockObj;\n }", "protected function content_template() {\n\t}", "protected function content_template() {}", "protected function content_template() {}", "function _resolve_home_block_template()\n {\n }", "function register_block( $name ) {\n\t\n\t\t\tacf_register_block( array(\n\t\t\t\t'name' => str_replace('-', ' ', $name),\n\t\t\t\t'title' => __( str_replace('-', ' ', ucwords( $name, '-' )), 'genlite' ),\n\t\t\t\t'description' => __( str_replace('-', ' ', ucwords( $name, '-' )) . ' block.', 'genlite' ),\n\t\t\t\t'render_callback' => function( $block, $content = '', $is_preview = false ) {\n\t\t\t\t\t$context = Timber::context();\n\t\t\t\t\n\t\t\t\t\t// Store block values.\n\t\t\t\t\t$context['block'] = $block;\n\t\t\t\t\n\t\t\t\t\t// Store field values.\n\t\t\t\t\t$context['fields'] = get_fields();\n\t\t\t\t\n\t\t\t\t\t// Store $is_preview value.\n\t\t\t\t\t$context['is_preview'] = $is_preview;\n\n\t\t\t\t\t// Render the block.\n\t\t\t\t\tTimber::render( 'templates/blocks/' . str_replace(' ', '-', strtolower( $block['title'] )) . '.twig', $context );\n\t\t\t\t},\n\t\t\t\t'category' => 'genlite-blocks',\n\t\t\t\t'icon' => '',\n\t\t\t\t'keywords' => array( $name ),\n\t\t\t\t'mode' \t\t\t => 'edit'\n\t\t\t) );\t\n\t\t}", "function myblocks() {\n $this->name=\"myblocks\";\n $this->title=\"<#LANG_MODULE_MYBLOCKS#>\";\n $this->module_category=\"<#LANG_SECTION_SETTINGS#>\";\n $this->checkInstalled();\n}", "function setTemplate($template);", "public function getBlock(){\n\t\n\t\tif( empty($this->_block) ){\n\t\n\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\n\t\t\t$query->select( 'b.*, t.*, u.*, m.email AS modified_email, m.username AS modified_username, m.name AS modified_name' );\n\t\t\t\n\t\t\t$query->from( '#__zbrochure_content_blocks AS b' );\n\t\t\t\n\t\t\t$query->join( 'LEFT', '#__users AS u ON u.id = b.content_block_created_by' );\n\t\t\t$query->join( 'LEFT', '#__users AS m ON m.id = b.content_block_modified_by' );\n\t\t\t$query->join( 'LEFT', '#__zbrochure_content_types AS t ON t.content_type_id = b.content_block_type' );\n\t\t\t\n\t\t\t$query->where( 'b.content_block_id = '.$this->_id );\n\t\t\t\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_block = $this->_db->loadObject();\n\t\t\t\n\t\t\t$this->_block->render\t= $this->_getContent();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->_block;\n\t\n\t}", "function render_block_core_template_part($attributes)\n {\n }", "function register_block_core_template_part()\n {\n }", "function isfnet_process_block(&$variables, $hook) {\n // Drupal 7 should use a $title variable instead of $block->subject.\n $variables['title'] = $variables['block']->subject;\n}", "function synapsefitness_acf_block_render_callback( $block ) {\n\t$slug = str_replace('acf/', '', $block['name']);\n\t\n\t// include a template part from within the \"template-parts/blocks\" folder\n\tif( file_exists( get_theme_file_path(\"/template-parts/blocks/content-{$slug}.php\") ) ) {\n\t\t\n\t\tinclude( get_theme_file_path(\"/template-parts/blocks/content-{$slug}.php\") );\n\t\n\t}\n}", "function get_block_template($id, $template_type = 'wp_template')\n {\n }", "public function display($file) {\n $tpl_file = $this->option ['templateDir'] . '/' . $file;\n if (! file_exists ( $tpl_file ))\n $this->core->err ( '102', $tpl_file );\n \n $parse_file = $this->option ['compileDir'] . '/' . sha1 ( $file ) . $file . '.php';\n \n if (! file_exists ( $parse_file ) || filemtime ( $parse_file ) < filemtime ( $tpl_file )) {\n $compile = new templatesModuleCompiler ( $this->core, $this->option, $tpl_file );\n $compile->parse ( $parse_file );\n }\n \n if ($this->option ['cache']) {\n $cache_file = $this->option ['cacheDir'] . '/' . sha1 ( $file ) . $file . '.html';\n \n // Create cache file if needed\n if (! file_exists ( $cache_file ) || filemtime ( $cache_file ) < filemtime ( $parse_file )) {\n include $parse_file;\n $content = ob_get_clean ();\n if (! file_put_contents ( $cache_file, $content ))\n $this->core->err ( '112' );\n }\n \n include $cache_file;\n } else {\n include $parse_file;\n }\n }", "public function startOrAppendBlock($name)\n\t{\n\t\t$this->blockStack[] = array($name, TRUE);\n\t\tob_start();\n\t}", "function resolve_block_template($template_type, $template_hierarchy, $fallback_template)\n {\n }", "function spectra_block_setformat ()\n\t{\n\t\tif (!spectra_node_isalive ())\n\t\t{\n\t\t\tspectra_log_write (1, \"Unable to connect to \".$GLOBALS[\"currency\"][\"name\"].\" node.\");\n\t\t}\n\t\n\t//\tRetrieve the first block from the chain without specifying \n\t//\tverbose mode\n\t\t$hash = getblockhash (1);\n\t\t$block = getblock ($hash);\n\n\t//\tDetermine the format of the returned block data\n\t\tif (is_array ($block))\n\t\t{\n\t\t\tsystem_flag_set (\"block_req_verbose\", 0);\n\t\t\tspectra_log_write (0, \"Block format set to ignore verbose mode.\");\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\tsystem_flag_set (\"block_req_verbose\", 1);\n\t\t\tspectra_log_write (0, \"Block format set to require verbose mode.\");\n\t\t}\t\n\t}", "private function renderTemplate(){\n\t\trequire($this->TemplateFile);\n\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 }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "protected function content_template()\n {\n }", "public function setTemplate($tpl_name){\n \tif($this->isAllowedToChangeTemplate()){\n \t\t$this->template = $tpl_name;\n \t\t$this->baseReplaces['tpl_folder'] = $this->getTemplateDir();\n \t\t$GLOBALS['tpl']['activeTemplate'] = $tpl_name;\n \t}\n }", "function acf_block_callback( $block ) {\n $slug = str_replace('acf/', '', $block['name']);\n if( file_exists( get_theme_file_path(\"/includes/blocks/content-{$slug}.php\") ) ) {\n include( get_theme_file_path(\"/includes/blocks/content-{$slug}.php\") );\n }\n}", "function isfnet_preprocess_block(&$variables, $hook) {\n // Use a bare template for the page's main content.\n if ($variables['block_html_id'] == 'block-system-main') {\n $variables['theme_hook_suggestions'][] = 'block__bare';\n }\n $variables['title_attributes_array']['class'][] = 'block-title';\n}", "public function renderBlock($name, $params = null)\n {\n $path = $this->config->getBlock($name);\n $this->renderFile($path, $params);\n }", "function gratis_process_block(&$vars, $hook) {\n // Drupal 7 should use a $title variable instead of $block->subject.\n $vars['title'] = isset($vars['block']->subject) ? $vars['block']->subject : '';\n}", "function gwt_drupal_process_block(&$variables, $hook) {\n // Drupal 7 should use a $title variable instead of $block->subject.\n $variables['title'] = isset($variables['block']->subject) ? $variables['block']->subject : '';\n}", "public function tempalte()\n \t{\n \t\t$this->load->template('index-1');\n \t}", "function _template($data=NULL,$templatename=NULL)\n {\n $header = ($this->tank_auth->get_user_id()) ? 'header-2':'header';\n $data['template'] = $templatename;\n\t $data['header'] = 'includes/'.$header; \n $this->load->view('includes/template',$data); \n }", "public function testCompileBlockParent()\n {\n $result = $this->smarty->fetch('test_block_parent.tpl');\n $this->assertContains('Default Title', $result);\n }", "public function finalize() {\n\n\t\t// template debug\n\t\tif ($this->config) {\n\t\t\tif ($this->config->get('storefront_template_debug')) {\n\t\t\t\t// storefront enabling\n\t\t\t\tif (!IS_ADMIN && !isset($this->session->data['tmpl_debug']) && isset($this->request->get['tmpl_debug'])) {\n\t\t\t\t\t$this->session->data['tmpl_debug'] = isset($this->request->get['tmpl_debug']);\n\t\t\t\t}\n\n\t\t\t\tif ((isset($this->session->data['tmpl_debug']) && isset($this->request->get['tmpl_debug'])) && ($this->session->data['tmpl_debug'] == $this->request->get['tmpl_debug'])) {\n\n\t\t\t\t\t$block_details = $this->layout->getBlockDetails($this->instance_id);\n\t\t\t\t\t$excluded_blocks = array( 'common/head' );\n\n\t\t\t\t\tif (!empty($this->instance_id) && (string)$this->instance_id != '0' && !in_array($block_details['controller'], $excluded_blocks)) {\n\t\t\t\t\t\tif (!empty($this->parent_controller)) {\n\t\t\t\t\t\t\t//build block template file path based on primary template used\n\t\t\t\t\t\t\t//template path is based on parent block 'template_dir'\n\t\t\t\t\t\t\t$tmp_dir = $this->parent_controller->view->data['template_dir'].\"template/\";\n\t\t\t\t\t\t\t$block_tpl_file = $tmp_dir.$this->view->getTemplate();\n\t\t\t\t\t\t\t$prt_block_tpl_file = $tmp_dir.$this->parent_controller->view->getTemplate();\n\t\t\t\t\t\t\t$args = array( 'block_id' => $this->instance_id,\n\t\t\t\t\t\t\t\t\t\t\t'block_controller' => $this->dispatcher->getFile(),\n\t\t\t\t\t\t\t\t\t\t\t'block_tpl' => $block_tpl_file,\n\t\t\t\t\t\t\t\t\t\t\t'parent_id' => $this->parent_controller->instance_id,\n\t\t\t\t\t\t\t\t\t\t\t'parent_controller' => $this->parent_controller->dispatcher->getFile(),\n\t\t\t\t\t\t\t\t\t\t\t'parent_tpl' => $prt_block_tpl_file\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$debug_wrapper = $this->dispatch('common/template_debug', array( 'instance_id' => $this->instance_id, 'details' => $args ));\n\t\t\t\t\t\t\t$debug_output = $debug_wrapper->dispatchGetOutput();\n\t\t\t\t\t\t\t$output = trim($this->view->getOutput());\n\t\t\t\t\t\t\tif (!empty($output)) $output = '<span class=\"block_tmpl_wrapper\">' . $output . $debug_output . '</span>';\n\t\t\t\t\t\t\t$this->view->setOutput($output);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tunset($this->session->data['tmpl_debug']);\n\t\t\t}\n\t\t}\n\t\t$this->view->render();\n\t}", "public function print_template()\n {\n }", "public function print_template()\n {\n }", "public function run()\n {\n $template = $this->_template;\n $positions = $template->getPositions();\n $assigned = [];\n foreach (Yii::$app->big->getFrontendThemePositions() as $name => $title) {\n $item = [\n 'title' => $title,\n 'blocks' => [],\n ];\n if (isset($positions[$name])) {\n $item['blocks'] = $this->getBlocks($positions[$name]);\n }\n $assigned[$name] = $item;\n }\n\n $this->registerScripts();\n\n return $this->render($this->viewFile, [\n 'availableBlocks' => $this->blocks,\n 'assignedBlocks' => $assigned,\n 'columns' => $this->columns,\n 'id' => $this->id,\n ]);\n }", "protected function _content_template() {\n\t}", "function blocks_print_adminblock($page, $missingblocks) {\n global $USER;\n\n $strblocks = get_string('blocks');\n $stradd = get_string('add');\n if (!empty($missingblocks)) {\n foreach ($missingblocks as $blockid) {\n $block = blocks_get_record($blockid);\n\n switch($page->type) {\n case MOODLE_PAGE_COURSE:\n $course = get_record('course', 'id', $page->id);\n break;\n default: die('unknown pagetype: '. $page->type);\n }\n\n $blockobject = block_instance($block->name);\n if ($blockobject === false) {\n continue;\n }\n $menu[$block->id] = $blockobject->get_title();\n }\n\n if($page->id == SITEID) {\n $target = 'index.php';\n }\n else {\n $target = 'view.php';\n }\n $content = popup_form($target .'?id='. $course->id .'&amp;sesskey='. $USER->sesskey .'&amp;blockaction=add&amp;blockid=',\n $menu, 'add_block', '', $stradd .'...', '', '', true);\n $content = '<div align=\"center\">'. $content .'</div>';\n print_side_block($strblocks, $content, NULL, NULL, NULL);\n }\n}" ]
[ "0.66600776", "0.6646311", "0.6606878", "0.6513419", "0.6511392", "0.648636", "0.6381592", "0.63603836", "0.6325136", "0.62895364", "0.62880576", "0.62793726", "0.622952", "0.619124", "0.6180748", "0.61159074", "0.6114453", "0.61027765", "0.60709274", "0.6066687", "0.6059808", "0.6052677", "0.60334116", "0.6030351", "0.60212374", "0.60083187", "0.5980955", "0.59691995", "0.59647727", "0.592988", "0.59271866", "0.59213233", "0.58869344", "0.58845496", "0.5878514", "0.586248", "0.58559304", "0.58555967", "0.58554333", "0.5835485", "0.58354014", "0.5824124", "0.58218044", "0.5816422", "0.58065486", "0.57970595", "0.5788792", "0.5779426", "0.57771814", "0.57758754", "0.576982", "0.57554936", "0.57541543", "0.57526", "0.57520366", "0.5747091", "0.5738497", "0.5733814", "0.5733417", "0.5730369", "0.57284224", "0.5721548", "0.5721548", "0.5715339", "0.57088864", "0.5693905", "0.56801", "0.5679455", "0.56775457", "0.56754345", "0.56665975", "0.56664276", "0.5663487", "0.5659354", "0.56589013", "0.5652009", "0.56519926", "0.56501645", "0.56414044", "0.5637834", "0.5637834", "0.5637834", "0.5637834", "0.5637834", "0.5637834", "0.56231606", "0.5622939", "0.5619242", "0.5618469", "0.5615345", "0.5614779", "0.56121266", "0.5608382", "0.56053233", "0.5596038", "0.55948997", "0.55940914", "0.5591418", "0.55914104", "0.5586243" ]
0.68324
0
for just grabbing the html from the block, if you want to do something with it manually
public function block_store($block, $file = NULL) { if ($file == NULL) { $file = $this->last_file; } $pattern = '#\[block:\s*(' . $block . ')\](.*)\[/block:\s*(' . $block . ')\]#is'; // find the content of the wanted block from the selected template file if(preg_match($pattern, $this->files[$file], $matches)) { // put the blocks info into the merged array with the block number return $matches[2]; } else { $this->core->message("Error cannot find block named ($block).", 1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_the_block_template_html()\n {\n }", "public abstract function get_html();", "function html($block = null)\n{\n\tob_start();\n\t$this->out($block);\n\t$html_code = ob_get_contents();\n\tob_end_clean();\n\treturn $html_code;\n}", "abstract function get_html();", "function &getHTML()\n\t{\n\t\tinclude_once(\"./Services/PersonalDesktop/classes/class.ilBookmarkBlockGUI.php\");\n\t\t$bookmark_block_gui = new ilBookmarkBlockGUI(\"ilpersonaldesktopgui\", \"show\");\n\t\t\n\t\treturn $bookmark_block_gui->getHTML();\n\t}", "public function getHTML();", "function render_block($parsed_block)\n {\n }", "abstract public function getHtml();", "public function getHtml();", "function filter_block_content($text, $allowed_html = 'post', $allowed_protocols = array())\n {\n }", "public function BlockView()\n {\n if ($proxiedBlock = $this->getProxiedObject()) {\n // For search results and other contexts, cast as HTMLText so {@link Text::ContextSummary)} can be called.\n $content = $proxiedBlock->Content();\n if (!$content instanceof HTMLText) {\n $htmlTextObj = HTMLText::create();\n $htmlTextObj->setValue($content);\n $content = $htmlTextObj->getValue();\n }\n \n return $content;\n }\n\n return null;\n }", "public function getHTML($data);", "public function get_content() {\n \tglobal $PAGE;\n\t \n $this->page->requires->js_call_amd(\"block_inlinetrainer/demo\", \"run\", [\"#block_inlinetrainer-body\"]);\n\n\t $this->content = new stdClass();\n $this->content->text = '<b id=\"block_inlinetrainer-title\"></b>';\n\t $this->content->text .= '<ol id=\"block_inlinetrainer-body\"><i>Loading steps...</li></ol>';\n $this->content->text .= \"<style type='text/css'>\n .block_inlinetrainer_overlay {\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: #000;\n filter:alpha(opacity=50);\n -moz-opacity:0.5;\n -khtml-opacity: 0.5;\n opacity: 0.5;\n z-index: 10000;\n }\n .block_inlinetrainer_hint{\n position: relative;\n padding:5px;\n /*-webkit-box-shadow: 4px 4px 15px 1px #333; \n -moz-box-shadow: 4px 4px 15px 1px #333; \n box-shadow: 4px 4px 15px 1px #333; */\n }\n </style>\";\n\t return $this->content;\n\t}", "function slidedeck_create_custom_slidedeck_block( $html ) {\n ob_start();\n include( SLIDEDECK2_DEVELOPER_DIRNAME . '/views/_create-custom-slidedeck-block.php' );\n $html = ob_get_contents();\n ob_end_clean();\n\n return $html;\n }", "function parse_blocks($content)\n {\n }", "function do_blocks($content)\n {\n }", "function get_html()\n\t{\n\n\t// incrase views\n\n\t}", "public function getHTML(): string;", "function htmlblock($text) {\n $this->html($text, 'pre');\n }", "abstract protected function getHtmlBody();", "public function html() {}", "public function getHTML(){\n\t\treturn $this->html;\n\t}", "public function getHtml()\n {\n return $this->_getHtml();\n }", "function render_block_core_post_content($attributes, $content, $block)\n {\n }", "protected function _beforeToHtml()\n {\n $this->prepareBlockData();\n return parent::_beforeToHtml();\n }", "function printHTML() \n {\n $this->openBlockHeader(\"Candidate Event\");\n?>\n <img id='candidate_image' src=\"<?echo $this->cand_url?>\">\n<?\n $this->closeBlockHeader();\n }", "function add_html () {\n //Adds a html block\n return '<div class=\"black\">Lorem ipsum dolor</div>';\n }", "public function fetch() {\n return $this->html;\n }", "function wp_pre_kses_block_attributes($content, $allowed_html, $allowed_protocols)\n {\n }", "function page_render_block($block) {\n static $xtpl_block;\n \n if (!$xtpl_block) $xtpl_block = new XTemplate('html/block.xtpl');\n \n $xtpl_block->reset('block');\n $xtpl_block->assign('id', $block['id']);\n $xtpl_block->assign('title', $block['title']);\n $xtpl_block->assign('content', $block['content']);\n \n if (isset($block['links'])) {\n $xtpl_block->assign('links', $block['links']);\n $xtpl_block->parse('block.links');\n }\n \n $xtpl_block->parse('block');\n return $xtpl_block->text('block');\n}", "public function get_content_html()\n {\n\n ob_start();\n RP_SUB_Help::include_template($this->template_html, array_merge($this->template_variables, array('plain_text' => false)));\n return ob_get_clean();\n }", "public function getHtmlSource() {}", "function filter_block_kses($block, $allowed_html, $allowed_protocols = array())\n {\n }", "protected function setHtmlContent() {}", "public function parsePage($html){\n\t\t\tforeach($html->find(Configuration::getParameter(\"TAG_CLASS\")) as $become) {\n\t\t\t\tif($become->getAttribute(\"scope\") == \"\"){\n\t\t\t\t\tif($become->getAttribute(\"method\") != \"\"){\n\t\t\t\t\t\t$template = $become->innertext;\n\t\t\t\t\t\tif($template != \"\")\n\t\t\t\t\t\t\t@ $become->outertext = call_user_func(Array($this, $become->getAttribute(\"method\")), $template);\n\t\t\t\t\t\telse \n\t\t\t\t\t\t\t@ $become->outertext = call_user_func(Array($this, $become->getAttribute(\"method\")));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$template = $become->innertext;\n\t\t\t\t\tif($template != \"\")\n\t\t\t\t\t\t@ $become->outertext = call_user_func(Array($become->getAttribute(\"scope\"), $become->getAttribute(\"method\")), $template);\n\t\t\t\t\telse \n\t\t\t\t\t\t@ $become->outertext = call_user_func(Array($become->getAttribute(\"scope\"), $become->getAttribute(\"method\")));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $html;\n\t\t}", "public function loadHTML();", "public function html();", "public function getHtml() {\n\t\treturn $this->_html;\n\t}", "function wp_render_elements_support($block_content, $block)\n {\n }", "public function get_updated_html()\n {\n }", "public function getHtmlContent()\n {\n return $this->htmlContent;\n }", "function content($block, $default_content = NULL)\n\t{\n\t\t$ci =& get_instance();\n\t\tif($ci->template->block_exists($block)){\n\t\t\treturn $ci->template->data['template'][$block];\n\t\t} else {\n\t\t\treturn $default_content;\n\t\t}\n\t}", "public function getHtmlSource();", "function bub_simple_replace($src_block, $target_html) {\n return $target_html;\n}", "public function get_html() \n\t{\n\t\treturn $this->HTML; \n\t}", "function wp_render_duotone_support($block_content, $block)\n {\n }", "protected function loadHtml()\n {\n $this->html = $this->fsio->get($this->page->getTarget());\n }", "function _excerpt_render_inner_blocks($parsed_block, $allowed_blocks)\n {\n }", "public function get_content() {\n if ($this->content !== null) {\n return $this->content;\n }\n\n $this->content = new stdClass;\n\n // get configured text if available\n if (! empty($this->config->text)) {\n $this->content->text = $this->config->text;\n }\n\n //$this->content->text = 'The content of our SimpleHTML block!';\n $this->content->footer = 'Goodbye for now...';\n\n return $this->content;\n\n }", "function tidy_get_html(tidy $object) {}", "function parseHTML(){\n\t\t$code = preg_replace_callback('~(href|src|codebase|url|action)\\s*=\\s*([\\'\\\"])?(?(2) (.*?)\\\\2 | ([^\\s\\>]+))~isx',array('self','parseExtURL'),$this->source);\n\t\t$code = preg_replace_callback('~(<\\s*style.*>)(.*)<\\s*/\\s*style\\s*>~iUs',Array('self','parseCSS'),$code);\n\t\t$code = preg_replace_callback('~(style\\s*=\\s*)([\\'\\\"])(.*)\\2~iUs',Array('self','parseStyle'),$code);\n\t\t$code = preg_replace_callback('~<script(\\s*.*)>(.*)<\\s*/\\s*script>~iUs',Array('self','parseScriptTag'),$code);\n\t\t$this->output = $code;\n\t}", "public function frontendContent(){\n return $this->content_html;\n }", "function test_render_block_core_comment_content_converts_to_html() {\n\t\t$comment_id = self::$comment_ids[0];\n\t\t$new_content = \"Paragraph One\\n\\nP2L1\\nP2L2\\n\\nhttps://example.com/\";\n\t\tself::factory()->comment->update_object(\n\t\t\t$comment_id,\n\t\t\tarray( 'comment_content' => $new_content )\n\t\t);\n\n\t\t$parsed_blocks = parse_blocks(\n\t\t\t'<!-- wp:comment-template --><!-- wp:comment-content /--><!-- /wp:comment-template -->'\n\t\t);\n\n\t\t$block = new WP_Block(\n\t\t\t$parsed_blocks[0],\n\t\t\tarray(\n\t\t\t\t'postId' => self::$custom_post->ID,\n\t\t\t\t'comments/inherit' => true,\n\t\t\t)\n\t\t);\n\n\t\t$expected_content = \"<p>Paragraph One</p>\\n<p>P2L1<br />\\nP2L2</p>\\n<p><a href=\\\"https://example.com/\\\" rel=\\\"nofollow ugc\\\">https://example.com/</a></p>\\n\";\n\n\t\t$this->assertSame(\n\t\t\t'<ol class=\"wp-block-comment-template\"><li id=\"comment-' . self::$comment_ids[0] . '\" class=\"comment even thread-even depth-1\"><div class=\"wp-block-comment-content\">' . $expected_content . '</div></li></ol>',\n\t\t\t$block->render()\n\t\t);\n\t}", "public function getParsedContent()\n {\n return oxUtilsView::getInstance()->parseThroughSmarty( $this->getContent()->oxcontents__oxcontent->value, $this->getContent()->getId() );\n }", "function ajarRenderDinamycBlock($attributes, $content) {\n return '<h1 class=\"my-3\">'.$attributes['content'].'</h1>'.\n '<img src=\"'.$attributes['mediaURL'].'\" alt=\"'.$attributes['mediaAlt'].'\" />'.\n '<hr>';\n}", "public function fetchHTML()\n {\n return $this->fetch();\n }", "public function getContentMarkup(){ return $this->content_markup; }", "private function processContent(){\n\t\t$this->textEnd = strpos($this->raw,\"</{$this->tag}\");\n\t\t$this->text = trim(substr($this->raw, $this->textStart, $this->textEnd - $this->textStart));\n\t}", "public function getHTML() \n\t{\n\t\treturn $this->HTML;\n\t}", "function get_content() {\r\n\t\treturn $this->content;\r\n\t}", "public function getHtmlTemplate() {}", "private function render_block_tag($r)\n\t{\n\t\tswitch (strtolower($r[1])) {\n\t\tcase \"html\": // don't parse any syntax\n\t\t\t$pre = '';\n\t\t\t$post = '';\n\t\tcase \"code\":\n\t\t\t$pre = '<pre class=\"code\">';\n\t\t\t$post = '</pre>';\n\t\t\tbreak;\t\n\t\tdefault:\n\t\t\treturn $r[0];\n\t\t}\n\n\t\t// consume to the end of the tag\n\t\tob_start();\n\t\twhile (!is_null($line = $this->nextLine())) {\n\t\t\tif (trim($line) == '</'.$r[1].'>') break; // end of tag\n\n\t\t\techo $line.\"\\n\";\n\t\t}\n\n\t\treturn $pre.ob_get_clean().$post;\n\t}", "function render_block($block)\r\n {\r\n $personal_messenger_block = PersonalMessengerBlock :: factory($this, $block);\r\n return $personal_messenger_block->run();\r\n }", "function getTemplate(){\n\t\treturn $this->html_result;\n\t}", "public function outerHtml()\n {\n }", "public function getMarkup();", "protected function getContents()\n {\n $contents = $this->crawler->filter('.page.group');\n if (!$contents->count()) {\n return;\n }\n\n $contents = $contents->html();\n\n // I'll have my own syntax highlighting, WITH BLACKJACK AND HOOKERS\n $this->crawler->filter('pre')->each(function ($code) use (&$contents) {\n $unformatted = htmlentities($code->text());\n $unformatted = '<pre><code class=\"php\">'.$unformatted.'</code></pre>';\n $contents = str_replace('<pre class=\"code php\">'.$code->html().'</pre>', $unformatted, $contents);\n });\n\n return $contents;\n }", "function _filter_block_content_callback($matches)\n {\n }", "public abstract function asHTML();", "public function innerHtml()\n {\n }", "public function getBlock(){\n\t\n\t\tif( empty($this->_block) ){\n\t\n\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\n\t\t\t$query->select( 'b.*, t.*, u.*, m.email AS modified_email, m.username AS modified_username, m.name AS modified_name' );\n\t\t\t\n\t\t\t$query->from( '#__zbrochure_content_blocks AS b' );\n\t\t\t\n\t\t\t$query->join( 'LEFT', '#__users AS u ON u.id = b.content_block_created_by' );\n\t\t\t$query->join( 'LEFT', '#__users AS m ON m.id = b.content_block_modified_by' );\n\t\t\t$query->join( 'LEFT', '#__zbrochure_content_types AS t ON t.content_type_id = b.content_block_type' );\n\t\t\t\n\t\t\t$query->where( 'b.content_block_id = '.$this->_id );\n\t\t\t\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_block = $this->_db->loadObject();\n\t\t\t\n\t\t\t$this->_block->render\t= $this->_getContent();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->_block;\n\t\n\t}", "private function get_reporting_block_html()\n {\n if (! $this->assignment->get_allow_group_submissions())\n {\n return $this->get_reporting_data_html(AssignmentSubmission::SUBMITTER_TYPE_USER);\n }\n else\n {\n $type = Request::get(self::PARAM_TYPE);\n \n if ($type == null)\n {\n $type = self::TYPE_COURSE_GROUP;\n }\n switch ($type)\n {\n case self::TYPE_COURSE_GROUP :\n return $this->get_reporting_data_html(AssignmentSubmission::SUBMITTER_TYPE_COURSE_GROUP);\n case self::TYPE_GROUP :\n return $this->get_reporting_data_html(AssignmentSubmission::SUBMITTER_TYPE_PLATFORM_GROUP);\n }\n }\n }", "function expose_blocks($content) {\n $raw_blocks = parse_blocks($content);\n $blocks = array();\n\n foreach ($raw_blocks as $block) {\n if ($block['blockName']) { \n $block['content'] = render_block($block);\n $blocks[] = $block;\n }\n }\n\n return $blocks;\n}", "public function getTwig()\n {\n return TemplateHelper::getRaw($this->_getHtml());\n }", "function oet_ajax_display_featured_content_block(){\n $shortcode = oet_featured_content_block_display($_POST['attributes'], true);\n echo wpautop(stripslashes($shortcode));\n die();\n}", "public function getParsedContent()\n {\n /** @var oxUtilsView $oUtilsView */\n $oUtilsView = oxRegistry::get(\"oxUtilsView\");\n return $oUtilsView->parseThroughSmarty($this->getContent()->oxcontents__oxcontent->value, $this->getContent()->getId(), null, true);\n }", "public function getHtml()\n {\n if ($this->isTurbo() && !$this instanceof Layout && !$this->_html) {\n App::getInstance()->queueView($this->_active_controller, $this->_action);\n $placeholder = $this->data(self::TURBO_PLACEHOLDER) ?: App::getInstance()->getSetting(App::TURBO_PLACEHOLDER);\n $this->_html = '<div class=\"sonic_fragment\" id=\"' . $this->getId() . '\">' . $placeholder . '</div>';\n }\n return $this->_html;\n }", "public static function getPageContent($module){\n\t\t$dataGerman = DB::table('xref_section_component as block')\n\t\t->select('block.name','block.value','block.img_alt')\n\t\t->join('section','block.idSection','=','section.id')\n\t\t->join('submodule','submodule.id','=','section.idSubmodule')\n\t\t->where('block.idLanguage','=',1)\n\t\t->where('submodule.idModule','=',$module)\n\t\t->get();\n\t\t\n\t\t$block = new stdClass();\n\t\tforeach ($dataGerman as $key => $value) {\n\t\t\t$block->{$value->name} \t= TextParser::change(nl2br($value->value));\n\t\t\t$block->{$value->name.\"_alt\"}\t= $value->img_alt;\n\t\t}\n\t\treturn $block;\n\t}", "function render_block_core_post_template($attributes, $content, $block)\n {\n }", "function render_block_core_cover($attributes, $content)\n {\n }", "protected function getCurrentHTML($url) {\n\t\treturn file_get_contents($url);\n\t}", "function handle_do_block( array $block, $post_id = 0 ) {\n\tif ( ! $block['blockName'] ) {\n\t\treturn false;\n\t}\n\n\t$block_object = new WP_Block( $block );\n\t$attr = $block['attrs'];\n\tif ( $block_object && $block_object->block_type ) {\n\t\t$attributes = $block_object->block_type->attributes;\n\t\t$supports = $block_object->block_type->supports;\n\t\tif ( $supports && isset( $supports['anchor'] ) && $supports['anchor'] ) {\n\t\t\t\t$attributes['anchor'] = [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'source' => 'attribute',\n\t\t\t\t\t'attribute' => 'id',\n\t\t\t\t\t'selector' => '*',\n\t\t\t\t\t'default' => '',\n\t\t\t\t];\n\t\t}\n\n\t\tif ( $attributes ) {\n\t\t\tforeach ( $attributes as $key => $attribute ) {\n\t\t\t\tif ( ! isset( $attr[ $key ] ) ) {\n\t\t\t\t\t$attr[ $key ] = get_attribute( $attribute, $block_object->inner_html, $post_id );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t$block['rendered'] = $block_object->render();\n\t$block['rendered'] = do_shortcode( $block['rendered'] );\n\t$block['attrs'] = $attr;\n\tif ( ! empty( $block['innerBlocks'] ) ) {\n\t\t$inner_blocks = $block['innerBlocks'];\n\t\t$block['innerBlocks'] = [];\n\t\tforeach ( $inner_blocks as $_block ) {\n\t\t\t$block['innerBlocks'][] = handle_do_block( $_block, $post_id );\n\t\t}\n\t}\n\n\treturn $block;\n}", "function render_tut06b_block( $atts, $content ) {\n\n if( function_exists( 'get_current_screen' ) ) { return; }\n\n \n $title = isset( $atts['title']) ? \"<h2>{$atts['title']}</h2>\" : '';\n $image = isset( $atts['mediaURL'] ) ? \"<img src='{$atts['mediaURL']}'>\" : '';\n $ingredients = isset( $atts['ingredients'] ) ? \"<ul>{$atts['ingredients']}</ul>\" : '';\n\n ob_start();\n\n echo \"<div class='recipe'>\n {$title}\n <h4> Ingredients </h4>\n {$ingredients}\n {$image}\n <h4> Steps </h4>\n {$content}\n </div>\";\n\n return ob_get_clean(); // prevent error when updating, I'm honestly not sure how\n}", "public function process($html);", "public function get_content() {\n global $CFG, $PAGE;\n \n $content = '';//No Content\n \n //if in edit mode: output a header and the orientation menu in the block\n if ($PAGE->user_is_editing()) {\n \n $this->load_jQuery();//loads jquery \n\n //oritentation header\n $content .= html_writer::start_tag('h4', array('class' => 'dd_content_block'));\n $content .= get_string('editing_block_display', 'block_dd_content');\n $content .= html_writer::end_tag('h4');\n\n //orientation options\n $content .= html_writer::start_tag(\"div\", array('class'=>'dd_content_position'));\n //horiz orientation\n $content .= html_writer::empty_tag(\"img\", array('src'=>\"$CFG->wwwroot/blocks/dd_content/pix/horiz.png\", 'id'=>'dd_content_horz_btn', 'class'=>'dd_content_btn'));\n //vert orientation\n $content .= html_writer::empty_tag(\"img\", array('src'=>\"$CFG->wwwroot/blocks/dd_content/pix/vert.png\", 'id'=>'dd_content_vert_btn', 'class'=>'dd_content_btn'));\n //vert orientation\n $content .= html_writer::empty_tag(\"img\", array('src'=>\"$CFG->wwwroot/blocks/dd_content/pix/bottom.png\", 'id'=>'dd_content_bot_btn', 'class'=>'dd_content_btn'));\n //no menus\n $content .= html_writer::empty_tag(\"img\", array('src'=>\"$CFG->wwwroot/blocks/dd_content/pix/none.png\", 'id'=>'dd_content_none_btn', 'class'=>'dd_content_btn'));\n $content .= html_writer::end_tag(\"div\");\n \n //search menu\n $content .= html_writer::start_tag(\"div\", array('class'=>'dd_content_position'));\n $text = get_string('editing_block_search', 'block_dd_content');\n $content .= html_writer::empty_tag('input', array('class' => 'dd_content_search', 'type'=>'text', 'value'=>$text, 'empty'=> '1'));\n $content .= html_writer::end_tag(\"div\");\n \n //filter dropdowns\n $content .= html_writer::start_tag(\"div\", array('class'=>'dd_content_position'));\n $content .= $this->generate_filter_dropdowns();\n $content .= html_writer::end_tag(\"div\");\n \n //get the default filter string\n $default = $this->get_default_filter_search();\n //do not want to send null as the search default\n $cleaned_default = ($default == null) ? \"\" : $default;\n \n //filter reset\n $content .= html_writer::start_tag(\"div\", array('class'=>'dd_content_position dd_content_filter_reset'));\n //reset will be a link\n $content .= html_writer::start_tag('a', array('class' => 'dd_content_filter_reset', 'value'=>$cleaned_default));\n $content .= get_string('reset');\n $content .= html_writer::end_tag('a');\n $content .= html_writer::end_tag(\"div\");\n \n }\n \n //create object to return content\n $this->content = new stdClass;\n //assign block text\n $this->content->text = $content;\n\n //output the elements that will be located at top of the page\n $this->output_dd_content();\n\n\n return $this->content;\n }", "function render_block_core_shortcode($attributes, $content)\n {\n }", "private function _getContent()\n {\n return '{*Sailthru zephyr code is used for full functionality*}\n <div id=\"main\">\n <table width=\"700\">\n <tr>\n <td>\n <h2><p>Hello {profile.vars.name}</p></h2>\n <p>Did you forget the following items in your cart?</p>\n <table>\n <thead>\n <tr>\n <td colspan=\"2\">\n <div><span style=\"display:block;text-align:center;color:white;font-size:13px;font-weight:bold;padding:15px;text-shadow:0 -1px 1px #af301f;white-space:nowrap;text-transform:uppercase;letter-spacing:1;background-color:#d14836;min-height:29px;line-height:29px;margin:0 0 0 0;border:1px solid #af301f;margin-top:5px\"><a href=\"{profile.purchase_incomplete.items[0].vars.checkout_url}\">Re-Order Now!</a></span></div>\n </td>\n </tr>\n </thead>\n <tbody>\n {sum = 0}\n {foreach profile.purchase_incomplete.items as i}\n <table width=\"650\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"margin:0 0 20px 0;background:#fff;border:1px solid #e5e5e5\">\n <tbody>\n <tr>\n <td style=\"padding:20px\"><a href=\"{i.url}\"><img width=\"180\" height=\"135\" border=\"0\" alt=\"{i.title}\" src=\"{i.vars.image_url}\"></a></td>\n <td width=\"420\" valign=\"top\" style=\"padding:20px 10px 20px 0\">\n <div style=\"padding:5px 0;color:#333;font-size:18px;font-weight:bold;line-height:21px\">{i.title}</div>\n <div style=\"padding:0 0 5px 0;color:#999;line-height:21px;margin:0px\">{i.vars.currency}{i.price/100}</div>\n <div style=\"color:#999;font-weight:bold;line-height:21px;margin:0px\">{i.description}</div>\n <div><span style=\"display:block;text-align:center;width:120px;border-left:1px solid #b43e2e;border-right:1px solid #b43e2e;color:white;font-size:13px;font-weight:bold;padding:0 15px;text-shadow:0 -1px 1px #af301f;white-space:nowrap;text-transform:uppercase;letter-spacing:1;background-color:#d14836;min-height:29px;line-height:29px;margin:0 0 0 0;border:1px solid #af301f;margin-top:5px\"><a href=\"{i.url}\">Buy Now</a></span></div>\n </td>\n </tr>\n </tbody>\n </table>\n {/foreach}\n <tr>\n <td align=\"left\" valign=\"top\" style=\"padding:3px 9px\" colspan=\"2\"></td>\n <td align=\"right\" valign=\"top\" style=\"padding:3px 9px\"></td>\n </tr>\n </tbody>\n <tfoot>\n </tfoot>\n </table>\n <p><small>If you believe this has been sent to you in error, please safely <a href=\"{optout_confirm_url}\">unsubscribe</a>.</small></p>\n {beacon}\n </td>\n </tr>\n </table>\n </div>';\n }", "function before_render_tealium_html() {\r\n \r\n }", "function parseBlock($url, $start, $end)\n {\n if($url && $start && $end)\n {\n $str = file_get_contents($url);\n \n $start = strpos($str, $start);\n \n $len = strpos($str, $end) - $start;\n \n $block = substr($str, $start, $len);\n return $block;\n }\n else\n return false;\n }", "function the_content() {\n\tglobal $discussion;\n\treturn Parsedown::instance()->parse($discussion['content']);\n}", "function render_block_core_search($attributes, $content, $block)\n {\n }", "function article_html() {\n return parse(Registry::prop('article', 'html'), false);\n}", "public abstract function html(): string;", "function gallery2_sidebarblock_modify($blockinfo)\n{\n // get current content\n if (!is_array($blockinfo['content'])) {\n $vars = @unserialize($blockinfo['content']);\n } else {\n $vars = $blockinfo['content'];\n }\n\n $vars['blockid'] = $blockinfo['bid'];\n return $vars;\n}", "function getHtmlCode(){\n\t\treturn we_baseCollection::getHtmlCode($this);\n\t}", "public function html(): string;", "function html()\n {\n }", "function html()\n {\n }", "function html()\n {\n }", "public static function Get()\n\t\t{\n\t\t\treturn self::$html;\n\t\t}", "public function page_content__main() {\n\n echo '<h3>' . __('Blocks', 'wpucacheblocks') . '</h3>';\n foreach ($this->blocks as $id => $block) {\n echo '<p>';\n echo '<strong>' . $id . ' - ' . $block['path'] . '</strong><br />';\n $_expiration = (is_bool($block['expires']) ? __('never', 'wpucacheblocks') : $block['expires'] . 's');\n echo sprintf(__('Expiration: %s', 'wpucacheblocks'), $_expiration);\n\n $prefixes = $this->get_block_prefixes($id);\n\n foreach ($prefixes as $prefix) {\n echo $this->display_block_cache_status($id, $prefix);\n }\n\n echo '<br />';\n if (!apply_filters('wpucacheblocks_bypass_cache', false, $id)) {\n if (isset($block['callback_prefix'])) {\n submit_button(__('Clear', 'wpucacheblocks'), 'secondary', 'clear__' . $id, false);\n } else {\n submit_button(__('Reload', 'wpucacheblocks'), 'secondary', 'reload__' . $id, false);\n }\n } else {\n echo __('A bypass exists for this block. Regeneration is only available in front mode.', 'wpucacheblocks');\n }\n echo '</p>';\n echo '<hr />';\n }\n }" ]
[ "0.7350545", "0.700995", "0.69705546", "0.67781454", "0.6686921", "0.6643718", "0.6629122", "0.65319055", "0.65060735", "0.64481056", "0.64399266", "0.64157", "0.6395986", "0.6367833", "0.63388354", "0.6268542", "0.6224061", "0.6219723", "0.6189276", "0.6181615", "0.6144927", "0.613633", "0.60901296", "0.608932", "0.6080932", "0.6076082", "0.60471344", "0.60435474", "0.6042508", "0.6041873", "0.6034634", "0.60337967", "0.6024421", "0.60079235", "0.60053635", "0.6005012", "0.5986849", "0.59836763", "0.5982556", "0.5961346", "0.5959774", "0.5924325", "0.5919826", "0.5910609", "0.5901567", "0.5897483", "0.58965826", "0.5887096", "0.58821523", "0.587951", "0.5862531", "0.5846592", "0.58460855", "0.58421576", "0.58251494", "0.5808479", "0.57919693", "0.57754594", "0.57464075", "0.5743282", "0.5741651", "0.57396203", "0.5738432", "0.5736396", "0.572721", "0.57265776", "0.5721176", "0.5715804", "0.571096", "0.57108784", "0.5710565", "0.570527", "0.56928635", "0.5688241", "0.56849146", "0.56801444", "0.56702423", "0.5660054", "0.5658099", "0.56572205", "0.5656019", "0.5655981", "0.5653692", "0.5638658", "0.5633857", "0.56284153", "0.5623257", "0.5622398", "0.5608045", "0.55940336", "0.5582988", "0.55811113", "0.5557695", "0.55537695", "0.5550725", "0.55462337", "0.5534058", "0.5534058", "0.5534058", "0.5531741", "0.5526433" ]
0.0
-1
replacing tags inside a previously stored block_store
public function store_replace($text, $replace) { foreach ($replace as $name => $replace) { $find = "{:$name}"; $text = str_replace($find, $replace, $text); } return $text; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function do_tags()\n\t{\n\t\tforeach ($this->values as $id => $block)\n\t\t{\n\t\t\tforeach ($block as $name => $replace)\n\t\t\t{\n\t\t\t\t$find = \"{:$name}\";\n\t\t\t\t$this->merged[$id] = str_replace($find, $replace, $this->merged[$id]);\n\t\t\t}\n\t\t}\n\n\t}", "public function replaceBlockDocumentElements($content){\n\t\t//regular expression indiicating what a document block looks like\n\t\t$document_block_string = \"/\\{arch:document\\}(.*?)\\{\\/arch:document\\}/s\";\n\t\t\n\t\t//array to hold blocks that need to be replaced\n\t\t$document_array = array();\n\t\t\n\t\t//fill the array\n\t\tpreg_match_all($document_block_string, $content, $document_array);\n\t\t\n\t\t//parse document block array\n\t\tforeach($document_array[0] as $block){\n\t\t\t//start block content and fill it with all of the content in the block\n\t\t\t$block_content = $block;\n\n\t\t\t//array to hold elements in the block\n\t\t\t$element_array = array();\n\t\t\t\n\t\t\t//string to match document elements against\n\t\t\t$document_elements_string = \"/{arch:[a-zA-Z0-9\\s]*\\/}/\";\n\t\t\t\n\t\t\t//fill array\n\t\t\tpreg_match_all($document_elements_string, $block, $element_array);\n\t\t\t\n\t\t\t//parse element array\n\t\t\tforeach($element_array[0] as $element){\n\t\t\t\t//strip name out of the element string\n\t\t\t\t$element_name = explode(':', $element);\n\t\t\t\t$element_name = explode('/', $element_name[1]);\n\t\t\t\t//final element name\n\t\t\t\t$element_name = $element_name[0];\n\t\t\t\t\n\t\t\t\t//inline editing variables\n\t\t\t\t$element_editing_type = \"\";\n\t\t\t\t\n\t\t\t\tif(in_array($element_name, $this->document_default_fields)){//if it is a default element\n\t\t\t\t\tif($element_name == \"title\"){//switch to inline definition to remove extra tags generated by ckeditor\n\t\t\t\t\t\t$element_editing_type = \" arch-inline_element\";\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t//document element name\n\t\t\t\t\t$element_name = 'document_'.$element_name.'_'.getCurrentLanguage();\n\t\t\t\t\t\n\t\t\t\t\t//grab tag parser\n\t\t\t\t\trequire_once(constant(\"ARCH_BACK_END_PATH\").'modules/tag_parser.php');\n\n\t\t\t\t\t//variable to hold content with rendered tags filled with content\n\t\t\t\t\t$tag_rendered_content = $this->document[$element_name];\n\t\t\t\t\t//build handler and pass it the content to be rendered\n\t\t\t\t\t$tag_rendered_content_handler = new tagParser($tag_rendered_content, true, true, false);\n\t\t\t\t\t\n\t\t\t\t\t//retrieve the rendered content\n\t\t\t\t\t$tag_rendered_content = $tag_rendered_content_handler->getContent();\n\t\t\n\t\t\t\t\tob_start();\n\t\t\t\t\t//evaluate string as php append closing and open php tags to comply with expected php eval format\n\t\t\t\t\t//http://php.net/eval\n eval(\"?>\".$tag_rendered_content.\"<?\");\n\t\t\t\t\t$evaluated_content = ob_get_clean();\n\t\t\t\t\t\n\t\t\t\t\t$element_content = $evaluated_content;\n\t\t\t\t}else{//if it is not a default element\n\t\t\t\t\t$field_id = mysql_query('SELECT additional_field_ID \n\t\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_fields\n\t\t\t\t\t\t\t\t\t\t\tWHERE additional_field_name = \"'.clean($element_name).'\"\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\t\n\t\t\t\t\tif(mysql_num_rows($field_id) > 0){//if the field exsists\n\t\t\t\t\t\t$field_id = mysql_fetch_assoc($field_id);\n\t\t\t\t\t\t$field_id = $field_id['additional_field_ID'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$field_value = mysql_query('SELECT additional_field_value_'.getCurrentLanguage().'\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_field_values\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE additional_field_value_additional_field_FK = \"'.clean($field_id).'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tAND additional_field_value_document_FK = \"'.clean($this->document['document_ID']).'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(mysql_num_rows($field_value) > 0){//if the field has value\n\t\t\t\t\t\t\t$field_value = mysql_fetch_assoc($field_value);\n\t\t\t\t\t\t\t$field_value = $field_value['additional_field_value_'.getCurrentLanguage()];\n\n\t\t\t\t\t\t\t$element_content = $field_value;\n\t\t\t\t\t\t}else{//the field has no value\n\t\t\t\t\t\t\t$element_content = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{//field dosn't exsist\n\t\t\t\t\t\t$element_content = '';\n\t\t\t\t\t}\n\t\t\t\t}//end non default element\n\n\t\t\t\tif($this->edit_mode == true){//check for editing mode\n\t\t\t\t\tif(trim($element_content) == ''){//check for empty elements in edit mode\n\t\t\t\t\t\t$element_content = $element;\n\t\t\t\t\t}\n\t\t\t\t\t$element_content = '<div class=\"arch-content_element'.$element_editing_type.'\" id=\"'.$element_name.'\" style=\"display:inline;\" contenteditable=\"true\">'.$element_content.'</div>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//grab content for element out of the database and replace it in the block\n\t\t\t\t$block_content = preg_replace(\"{\".$element.\"}\", $element_content, $block_content, 1);\n\t\t\t\t//echo $block_content;\n\t\t\t}\n\t\t\t\n\t\t\t//clean out document start and end tags\n\t\t\t$block_content = str_replace(\"{arch:document}\", \"\", $block_content);\n\t\t\t$block_content = str_replace(\"{/arch:document}\", \"\", $block_content);\n\t\t\t\n\t\t\t//preform actual replacement\n\t\t\t$content = preg_replace(\"{\".$block.\"}\", $block_content, $content, 1);\n\t\t}//end document block parsing\n\t\t\n\t\treturn $content;\n\t}", "function block_plugin_my_block_save($block) {\n variable_set($block['delta'], $block['my_custom_field']);\n}", "function gallery2_sidebarblock_modify($blockinfo)\n{\n // get current content\n if (!is_array($blockinfo['content'])) {\n $vars = @unserialize($blockinfo['content']);\n } else {\n $vars = $blockinfo['content'];\n }\n\n $vars['blockid'] = $blockinfo['bid'];\n return $vars;\n}", "function textblock_template_replace(&$textblock, $replace)\n{\n foreach ($replace as $key => $value) {\n $textblock['title'] = str_replace(\"%$key%\", $value, $textblock['title']);\n $textblock['text'] = str_replace(\"%$key%\", $value, $textblock['text']);\n }\n}", "function bub_simple_replace($src_block, $target_html) {\n return $target_html;\n}", "function wp_replace_in_html_tags($haystack, $replace_pairs)\n {\n }", "function p1base_theme_suggestions_block_alter(array &$suggestions, array $variables)\n{\n // block\n if (isset($variables['elements']['content']['#block_content'])) {\n array_splice($suggestions, 1, 0, 'block__bundle__' . $variables['elements']['content']['#block_content']->bundle());\n }\n}", "public static function replaceTagContent(EventData_IEM_ADDON_DYNAMICCONTENTTAGS_REPLACETAGCONTENT $data) {\n require_once (SENDSTUDIO_API_DIRECTORY . '/subscribers.php');\n $subsrciberApi = new Subscribers_API();\n $subscriberInfo = $data->info;\n\n foreach ($subscriberInfo as $subscriberInfoEntry) {\n $tagObject = new Addons_dynamiccontenttags();\n $subscriberList = $subsrciberApi->GetAllListsForEmailAddress($subscriberInfoEntry['emailaddress'], $data->lists);\n if (is_array($subscriberList)) {\n foreach($subscriberList as $listKey => $listVal) {\n $subscriberList[$listKey] = $listVal['listid'];\n }\n } else {\n $subscriberList = array($subscriberList);\n }\n\n // preload the array key value and customfield id\n $preloadCustomFieldLoc = array();\n if (is_array($subscriberInfoEntry['CustomFields'])) {\n foreach($subscriberInfoEntry['CustomFields'] as $customFieldKey => $customFieldVal) {\n $preloadCustomFieldLoc[$customFieldVal['fieldid']] = $customFieldKey;\n }\n }\n\n $tagObject->loadTagsByList($subscriberList);\n if ($tagObject->getTagObjectsSize()) {\n $tagsTobeReplaced = array();\n $tagsContentTobeReplaced = array();\n $permanentRulesMatches = array(\n 'email'=>'emailaddress',\n 'format'=>'format',\n 'confirmation'=>'confirmed',\n 'subscribe'=>'subscribedate',\n );\n foreach($tagObject->tags as $tagEntry) {\n $tagEntry->loadBlocks();\n $blocks = $tagEntry->getBlocks();\n $defaultBlock = null;\n foreach($blocks as $blockEntry) {\n $rulesPassed = true;\n $decodedRules = $blockEntry->getDecodedRules();\n foreach ($decodedRules->Rules[0]->rules as $ruleEntry) {\n $continue = false;\n $tempRuleValues = trim(strtolower($ruleEntry->rules->ruleValues));\n $tempActualValues = (isset ($permanentRulesMatches[$ruleEntry->rules->ruleName]) && isset ($subscriberInfoEntry[$permanentRulesMatches[$ruleEntry->rules->ruleName]]))?trim(strtolower($subscriberInfoEntry[$permanentRulesMatches[$ruleEntry->rules->ruleName]])):'';\n switch ($ruleEntry->rules->ruleName) {\n case 'email':\n case 'format':\n case 'confirmation':\n $continue = true;\n break;\n case 'status':\n $tempActualValues = array();\n $tempIndex = '';\n switch ($tempRuleValues) {\n case 'a':\n $tempIndex = 'notboth';\n break;\n case 'b':\n $tempIndex = 'bounced';\n break;\n case 'u':\n $tempIndex = 'unsubscribed';\n break;\n }\n\n switch ($ruleEntry->rules->ruleOperator) {\n case 'equalto':\n if (isset($subscriberInfoEntry[$tempIndex]) && $subscriberInfoEntry[$tempIndex] == 0) {\n $rulesPassed = false;\n } elseif (!(isset($subscriberInfoEntry[$tempIndex])) && !($subscriberInfoEntry['bounced'] == 0 && $subscriberInfoEntry['unsubscribed'] == 0) ) {\n $rulesPassed = false;\n }\n break;\n case 'notequalto':\n if (isset($subscriberInfoEntry[$tempIndex]) && !($subscriberInfoEntry[$tempIndex] == 0)) {\n $rulesPassed = false;\n } elseif (!(isset($subscriberInfoEntry[$tempIndex])) && ($subscriberInfoEntry['bounced'] == 0 && $subscriberInfoEntry['unsubscribed'] == 0) ) {\n $rulesPassed = false;\n }\n break;\n\n }\n break;\n case 'subscribe':\n // date conversion\n $tempActualValues = strtotime(date('Y-m-d', $tempActualValues));\n $tempRuleValues = split('/', $tempRuleValues);\n $tempRuleValues = strtotime(implode('-', array_reverse($tempRuleValues)));\n $continue = true;\n break;\n case 'campaign':\n switch ($ruleEntry->rules->ruleOperator) {\n case 'equalto':\n if (!$subsrciberApi->IsSubscriberHasOpenedNewsletters($subscriberInfoEntry['emailaddress'], $tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n case 'notequalto':\n if ($subsrciberApi->IsSubscriberHasOpenedNewsletters($subscriberInfoEntry['emailaddress'], $tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n\n }\n break;\n default:\n $continue = true;\n }\n if ($continue) {\n if ((int)$ruleEntry->rules->ruleName) {\n $tempActualValues = (isset ($preloadCustomFieldLoc[$ruleEntry->rules->ruleName]) && isset ($subscriberInfoEntry['CustomFields'][$preloadCustomFieldLoc[$ruleEntry->rules->ruleName]]['data']))?trim(strtolower($subscriberInfoEntry['CustomFields'][$preloadCustomFieldLoc[$ruleEntry->rules->ruleName]]['data'])):'';\n if ($ruleEntry->rules->ruleType == 'date') {\n $tempActualValues = split('/', $tempActualValues);\n $tempActualValues = strtotime(implode('-', array_reverse($tempActualValues)));\n $tempRuleValues = split('/', $tempRuleValues);\n $tempRuleValues = strtotime(implode('-', array_reverse($tempRuleValues)));\n }\n\n\n }\n switch ($ruleEntry->rules->ruleType) {\n case 'text':\n case 'textarea':\n case 'dropdown':\n case 'number':\n case 'radiobutton':\n case 'date':\n switch ($ruleEntry->rules->ruleOperator) {\n case 'equalto':\n if (!($tempActualValues == $tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n case 'notequalto':\n if ($tempActualValues == $tempRuleValues) {\n $rulesPassed = false;\n }\n break;\n case 'like':\n if (!(strstr($tempActualValues, $tempRuleValues))) {\n $rulesPassed = false;\n }\n break;\n case 'notlike':\n if (strstr($tempActualValues, $tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n case 'greaterthan':\n if ($tempActualValues <= $tempRuleValues) {\n $rulesPassed = false;\n }\n break;\n case 'lessthan':\n if ($tempActualValues >= $tempRuleValues) {\n $rulesPassed = false;\n }\n break;\n default:\n $rulesPassed = false;\n }\n break;\n case 'checkbox':\n $tempActualValues = unserialize($tempActualValues);\n $tempRuleValues = explode(', ', $tempRuleValues);\n $tempRuleValues = (is_array($tempRuleValues)) ? $tempRuleValues : array() ;\n $tempActualValues = (is_array($tempActualValues)) ? $tempActualValues : array() ;\n switch ($ruleEntry->rules->ruleOperator) {\n case 'equalto':\n if (sizeof(array_intersect($tempActualValues, $tempRuleValues)) != sizeof($tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n case 'notequalto':\n if (sizeof(array_intersect($tempActualValues, $tempRuleValues)) == sizeof($tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n default:\n $rulesPassed = false;\n }\n break;\n default:\n $rulesPassed = false;\n }\n }\n }\n if ($blockEntry->isActivated()) {\n $defaultBlock = $decodedRules;\n }\n if ($rulesPassed) {\n $data->contentTobeReplaced[$subscriberInfoEntry['subscriberid']]['tagsTobeReplaced'][] = '%%[' . trim($tagEntry->getName()) . ']%%';\n $data->contentTobeReplaced[$subscriberInfoEntry['subscriberid']]['tagsContentTobeReplaced'][] = $decodedRules->Content;\n break; // only get the first matched\n }\n }\n if (!$rulesPassed) {\n $data->contentTobeReplaced[$subscriberInfoEntry['subscriberid']]['tagsTobeReplaced'][] = '%%[' . trim($tagEntry->getName()) . ']%%';\n $data->contentTobeReplaced[$subscriberInfoEntry['subscriberid']]['tagsContentTobeReplaced'][] = $defaultBlock->Content;\n }\n }\n }\n }\n }", "protected function applyReplace(): void {\n\t\t$entity_types = $this->getRegisteredEntityTypes();\n\t\t$tag_names = $this->getTagNames();\n\t\t$to_tag = $this->to_tag;\n\t\t\n\t\tif (empty($entity_types) || empty($tag_names) || elgg_is_empty($to_tag)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$batch = elgg_get_entities([\n\t\t\t'type_subtype_pairs' => $entity_types,\n\t\t\t'metadata_names' => $tag_names,\n\t\t\t'metadata_value' => $this->from_tag,\n\t\t\t'metadata_case_sensitive' => false,\n\t\t\t'limit' => false,\n\t\t\t'batch' => true,\n\t\t\t'batch_inc_offset' => false,\n\t\t]);\n\t\t\n\t\t/* @var $entity \\ElggEntity */\n\t\tforeach ($batch as $entity) {\n\t\t\t// check all tag fields\n\t\t\tforeach ($tag_names as $tag_name) {\n\t\t\t\t$value = $entity->$tag_name;\n\t\t\t\tif (elgg_is_empty($value)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!is_array($value)) {\n\t\t\t\t\t$value = [$value];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$found = false;\n\t\t\t\t$add = true;\n\t\t\t\t\n\t\t\t\tforeach ($value as $index => $v) {\n\t\t\t\t\tif (strtolower($v) === $this->from_tag) {\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\tunset($value[$index]);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($v === $to_tag) {\n\t\t\t\t\t\t// found replacement value, no need to add\n\t\t\t\t\t\t$add = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$found) {\n\t\t\t\t\t// this field doesn't contain the original value\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// only add new value if doesn't already contain this\n\t\t\t\tif ($add) {\n\t\t\t\t\t$value[] = $to_tag;\n\t\t\t\t\t\n\t\t\t\t\tif (($tag_name === 'tags') && tag_tools_is_notification_entity($entity->guid)) {\n\t\t\t\t\t\t// set tag as notified\n\t\t\t\t\t\ttag_tools_add_sent_tags($entity, [$to_tag]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// store new value\n\t\t\t\t$entity->$tag_name = $value;\n\t\t\t\t\n\t\t\t\t// let system know entity has been updated\n\t\t\t\t$entity->save();\n\t\t\t}\n\t\t}\n\t}", "public function testReplaceTags()\n\t{\n\t\t$this->assertEquals('143',$this->obj->replace_tags('1{{2}}3', '', array(\"2\"=>\"4\")));\n\t\t$this->assertEquals('143',$this->obj->replace_tags('1{{args:2}}3', 'args', array(\"2\"=>\"4\")));\n\t\t$this->assertEquals('143$var',$this->obj->replace_tags('1{{args:2}}3$var', 'args', array(\"2\"=>\"4\")));\n\t}", "function dbReplace()\n {\n $args = [\n 'id' => $this->id,\n 'parent' => $this->parent,\n 'lecture_id' => $this->lecture_id,\n 'type' => $this->type,\n 'title' => $this->title,\n 'mtitle' => $this->mtitle,\n 'text' => $this->text,\n 'position' => $this->position,\n 'redirect' => $this->redirect,\n 'lastmodified' => null,\n 'ival1' => $this->ival1\n ];\n dibi::query('REPLACE `section`', $args);\n $this->updateId();\n }", "public function replace(Array $newStore) {\n\n\t\t$this->__store = $newStore;\n\n\t}", "public function replace($items);", "function change_tags($str){\r\n\r\n\t\t\t$str=str_replace('#ID#',$this->id,$str);\r\n\t\t\t$str=str_replace('#PAGE#',$this->page,$str);\r\n\t\t\t$str=str_replace('#ITEMS_PER_PAGE#',$this->items_per_page,$str);\r\n\t\t\t$str=str_replace('#TOTAL_ITEMS#',$this->total_items,$str);\r\n\r\n\t\t\treturn $str;\r\n\r\n\t}", "public function getStoreTags($store_id) {\n\t\t##\n\t\t##\tPARAMETER\n\t\t##\t\t@store_id\t\t\tThe store ID\n\t\t##\n\t\t##\tRETURN\n\t\t##\t\tThe ordered tag list\n\t\t$sql = <<<EOD\n\t\tSELECT\n\t\t\tDISTINCT({$this->wpdb->prefix}topspin_tags.name),\n\t\t\t{$this->wpdb->prefix}topspin_stores_tag.order_num,\n\t\t\t{$this->wpdb->prefix}topspin_stores_tag.status\n\t\tFROM {$this->wpdb->prefix}topspin_tags\n\t\tLEFT JOIN\n\t\t\t{$this->wpdb->prefix}topspin_stores_tag ON {$this->wpdb->prefix}topspin_tags.name = {$this->wpdb->prefix}topspin_stores_tag.tag\n\t\tWHERE\n\t\t\t{$this->wpdb->prefix}topspin_stores_tag.store_id = '%d'\n\t\tORDER BY\n\t\t\t{$this->wpdb->prefix}topspin_stores_tag.order_num ASC\nEOD;\n\t\t$storeTags = $this->wpdb->get_results($this->wpdb->prepare($sql,array($store_id)),ARRAY_A);\n\t\t//Append new and updated tags\n\t\t$updatedSql = <<<EOD\n\t\tSELECT\n\t\t\t{$this->wpdb->prefix}topspin_tags.name\n\t\tFROM {$this->wpdb->prefix}topspin_tags\n\t\tWHERE\n\t\t\t{$this->wpdb->prefix}topspin_tags.name NOT IN (\n\t\t\t\tSELECT\n\t\t\t\t\tDISTINCT({$this->wpdb->prefix}topspin_tags.name)\n\t\t\t\tFROM {$this->wpdb->prefix}topspin_tags\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t{$this->wpdb->prefix}topspin_stores_tag ON {$this->wpdb->prefix}topspin_tags.name = {$this->wpdb->prefix}topspin_stores_tag.tag\n\t\t\t\tWHERE\n\t\t\t\t\t{$this->wpdb->prefix}topspin_stores_tag.store_id = %d\n\t\t\t)\n\t\t\tAND artist_id = %d\nEOD;\n\t\t$newTags = $this->wpdb->get_results($this->wpdb->prepare($updatedSql,array($store_id,$this->artist_id)),ARRAY_A);\n\t\tforeach($newTags as $tag) {\n\t\t\t$tagArr = array(\n\t\t\t\t'name' => $tag['name'],\n\t\t\t\t'order_num' => 0,\n\t\t\t\t'status' => 0\n\t\t\t);\n\t\t\tarray_push($storeTags,$tagArr);\n\t\t}\n\t\treturn $storeTags;\n\t}", "function qruqsp_core_tagsUpdate(&$q, $object, $station_id, $key_name, $key_value, $type, $list) {\n //\n // All arguments are assumed to be un-escaped, and will be passed through dbQuote to\n // ensure they are safe to insert.\n //\n\n // Required functions\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbQuote');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbHashIDQuery');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbDelete');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbInsert');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'dbUUID');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'objectLoad');\n qruqsp_core_loadMethod($q, 'qruqsp', 'core', 'private', 'makePermalink');\n\n //\n // Don't worry about autocommit here, it's taken care of in the calling function\n //\n \n //\n // Load the object definition\n //\n $rc = qruqsp_core_objectLoad($q, $object);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $obj = $rc['object'];\n $module = $rc['pkg'] . '.' . $rc['mod'];\n\n //\n // Get the existing list of tags for the item\n //\n $strsql = \"SELECT id, uuid, $key_name, tag_type AS type, tag_name AS name \"\n . \"FROM \" . $obj['table'] . \" \"\n . \"WHERE $key_name = '\" . qruqsp_core_dbQuote($q, $key_value) . \"' \"\n . \"AND tag_type = '\" . qruqsp_core_dbQuote($q, $type) . \"' \"\n . \"AND station_id = '\" . qruqsp_core_dbQuote($q, $station_id) . \"' \"\n . \"\";\n $rc = qruqsp_core_dbHashIDQuery($q, $strsql, $module, 'tags', 'name');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['tags']) || $rc['num_rows'] == 0 ) {\n $dbtags = array();\n } else {\n $dbtags = $rc['tags'];\n }\n\n //\n // Delete tags no longer used\n //\n foreach($dbtags as $tag_name => $tag) {\n if( !in_array($tag_name, $list, true) ) {\n //\n // The tag does not exist in the new list, so it should be deleted.\n //\n $strsql = \"DELETE FROM \" . $obj['table'] . \" \"\n . \"WHERE id = '\" . qruqsp_core_dbQuote($q, $tag['id']) . \"' \"\n . \"AND station_id = '\" . qruqsp_core_dbQuote($q, $station_id) . \"' \"\n . \"\";\n $rc = qruqsp_core_dbDelete($q, $strsql, $module);\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n qruqsp_core_dbAddModuleHistory($q, $module, $obj['history_table'], $station_id,\n 3, $obj['table'], $tag['id'], '*', '');\n\n //\n // Sync push delete\n //\n $q['syncqueue'][] = array('push'=>$object, \n 'args'=>array('delete_uuid'=>$tag['uuid'], 'delete_id'=>$tag['id']));\n }\n }\n\n //\n // Add new tags lists\n //\n foreach($list as $tag) {\n if( $tag != '' && !array_key_exists($tag, $dbtags) ) {\n //\n // Get a new UUID\n //\n $rc = qruqsp_core_dbUUID($q, $module);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $uuid = $rc['uuid'];\n\n if( isset($obj['fields']['permalink']) ) {\n //\n // Make the permalink\n //\n $permalink = qruqsp_core_makePermalink($q, $tag);\n\n // \n // Setup the SQL statement to insert the new thread\n //\n $strsql = \"INSERT INTO \" . $obj['table'] . \" (uuid, station_id, $key_name, tag_type, tag_name, \"\n . \"permalink, date_added, last_updated) VALUES (\"\n . \"'\" . qruqsp_core_dbQuote($q, $uuid) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $station_id) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $key_value) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $type) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $tag) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $permalink) . \"', \"\n . \"UTC_TIMESTAMP(), UTC_TIMESTAMP())\";\n } else {\n // \n // Setup the SQL statement to insert the new thread\n //\n $strsql = \"INSERT INTO \" . $obj['table'] . \" (uuid, station_id, $key_name, tag_type, tag_name, \"\n . \"date_added, last_updated) VALUES (\"\n . \"'\" . qruqsp_core_dbQuote($q, $uuid) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $station_id) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $key_value) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $type) . \"', \"\n . \"'\" . qruqsp_core_dbQuote($q, $tag) . \"', \"\n . \"UTC_TIMESTAMP(), UTC_TIMESTAMP())\";\n }\n $rc = qruqsp_core_dbInsert($q, $strsql, $module);\n // \n // Only return the error if it was not a duplicate key problem. Duplicate key error\n // just means the tag name is already assigned to the item.\n //\n if( $rc['stat'] != 'ok' && $rc['err']['code'] != 'qruqsp.core.73' ) {\n return $rc;\n }\n if( isset($rc['insert_id']) ) {\n $tag_id = $rc['insert_id'];\n //\n // Add history\n //\n qruqsp_core_dbAddModuleHistory($q, $module, $obj['history_table'], $station_id,\n 1, $obj['table'], $tag_id, 'uuid', $uuid);\n qruqsp_core_dbAddModuleHistory($q, $module, $obj['history_table'], $station_id,\n 1, $obj['table'], $tag_id, $key_name, $key_value);\n qruqsp_core_dbAddModuleHistory($q, $module, $obj['history_table'], $station_id,\n 1, $obj['table'], $tag_id, 'tag_type', $type);\n qruqsp_core_dbAddModuleHistory($q, $module, $obj['history_table'], $station_id,\n 1, $obj['table'], $tag_id, 'tag_name', $tag);\n //\n // Sync push\n //\n $q['syncqueue'][] = array('push'=>$module . '.' . $object, 'args'=>array('id'=>$tag_id));\n }\n }\n }\n\n return array('stat'=>'ok');\n}", "public function apply(): void {\n\t\t// can we safely execute this?\n\t\t$entity_types = $this->getRegisteredEntityTypes();\n\t\t$tag_names = $this->getTagNames();\n\t\t\n\t\tif (empty($entity_types) || empty($tag_names)) {\n\t\t\t// no, we could remove too much\n\t\t\t// quit\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// prepare\n\t\t$this->preApply();\n\t\t\n\t\telgg_call(ELGG_IGNORE_ACCESS | ELGG_SHOW_DISABLED_ENTITIES, function() {\n\t\t\ttry {\n\t\t\t\tswitch ($this->tag_action) {\n\t\t\t\t\tcase 'delete':\n\t\t\t\t\t\t$this->applyDelete();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'replace':\n\t\t\t\t\t\t$this->applyReplace();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\telgg_log($e->getMessage(), 'ERROR');\n\t\t\t}\n\t\t});\n\t\t\n\t\t// restore\n\t\t$this->postApply();\n\t}", "function lb_replace_tags($text, $product) {\n $search = array(\n '[product_name]', \n '[product_price]', \n '[product_merchant]',\n '[product_brand]',\n );\n \n $replace = array(\n $product['name'], \n round((float)$product['finalprice']/100, 0),\n $product['merchant'],\n $product['brand'],\n );\n \n $return_text = str_replace($search, $replace, $text);\n \n error_log('lb_replace_tags - $return_text: ' . $return_text . ', product: ' . print_r($product, true));\n\n return $return_text;\n}", "protected function afterFind()\n {\n parent::afterFind();\n $this->_oldTags=$this->tags;\n }", "public function processTag()\n {\n $tags = '';\n\n $articles = $this->dao->select('id, keywords')->from(TABLE_ARTICLE)->fetchPairs('id', 'keywords'); \n foreach($articles as $id => $keywords)\n {\n $keywords = seo::unify($keywords, ',');\n $this->dao->update(TABLE_ARTICLE)->set('keywords')->eq($keywords)->where('id')->eq($id)->exec();\n $tags = $keywords;\n }\n\n $products = $this->dao->select('id, keywords')->from(TABLE_PRODUCT)->fetchPairs('id', 'keywords'); \n foreach($products as $id => $keywords)\n {\n $keywords = seo::unify($keywords, ',');\n $this->dao->update(TABLE_PRODUCT)->set('keywords')->eq($keywords)->where('id')->eq($id)->exec();\n $tags .= ',' . $keywords;\n }\n\n $categories = $this->dao->select('id, keywords')->from(TABLE_CATEGORY)->fetchPairs('id', 'keywords'); \n foreach($categories as $id => $keywords)\n {\n $keywords = seo::unify($keywords, ',');\n $this->dao->update(TABLE_CATEGORY)->set('keywords')->eq($keywords)->where('id')->eq($id)->exec();\n $tags .= ',' . $keywords;\n }\n\n $this->loadModel('tag')->save($tags);\n }", "public function updateTags($tags)\n {\n $tagtypes = ['disciplines' => 1, 'applications' => 2,\n 'techniques' => 3, 'facilities' => 4];\n\n $currentTags = $this->getTagIds();\n if (!empty($currentTags)) {\n // merge all input tags for comparison\n $inputTags = [];\n foreach ($tagtypes as $type) {\n if (!empty($tags[$type]) && is_array($tags[$type])) {\n array_merge($inputTags, $tags[$type]);\n }\n }\n // detach all tags that were not input\n foreach ($currentTags as $curTag) {\n if (!in_array($curTag, $inputTags)) {\n $this->tags()->detach($curTag);\n }\n }\n }\n\n foreach ($tagtypes as $type => $key) {\n if (!empty($tags[$type])) {\n foreach ($tags[$type] as $element) {\n $id = is_numeric($element)\n ? $element\n : Tag::create(['name' => $element,\n 'category' => 'Other', 'tagtype_id' => $key]);\n $this->tags()->attach($id);\n }\n }\n }\n }", "function pico_sync_tags($mydirname)\n{\n\t$db = XoopsDatabaseFactory::getDatabaseConnection();\n\n\t// get all tags in tags table\n\t$all_tags_array = [];\n\t$result = $db->query('SELECT label FROM ' . $db->prefix($mydirname . '_tags'));\n\twhile (list($label) = $db->fetchRow($result)) {\n\t\t$all_tags_array[$label] = [];\n\t}\n\n\t// count tags from contents table\n\t$result = $db->query('SELECT content_id,tags FROM ' . $db->prefix($mydirname . '_contents'));\n\twhile (list($content_id, $tags) = $db->fetchRow($result)) {\n\t\tforeach (explode(' ', $tags) as $tag) {\n\t\t\tif ('' == trim($tag)) {\n continue;\n }\n\t\t\t$all_tags_array[$tag][] = $content_id;\n\t\t}\n\t}\n\n\t// delete/insert or update tags table\n\tforeach( $all_tags_array as $tag => $content_ids ) {\n\t\t$label4sql = $db->quoteString( $tag ) ;\n\t\t$content_ids4sql = implode( ',' , $content_ids ) ;\n\t\t$count = sizeof( $content_ids ) ;\n\t\t$result = $db->queryF( \"INSERT INTO \".$db->prefix($mydirname.\"_tags\" ).\" SET label=$label4sql,weight=0,count='$count',content_ids='$content_ids4sql',created_time=UNIX_TIMESTAMP(),modified_time=UNIX_TIMESTAMP()\" ) ;\n\t\tif( ! $result ) {\n\t\t\t$db->queryF( \"UPDATE \".$db->prefix($mydirname.\"_tags\" ).\" SET count=$count,content_ids='$content_ids4sql',modified_time=UNIX_TIMESTAMP() WHERE label=$label4sql\" ) ;\n\t\t}\n\t}\n\n\treturn true;\n}", "private static function _replace($source, $i, $options){\n\t\t$cache = new Cache();\n\t\t$cachePath = $cache->cacheDir().\"/template/\";\n\n\t\t$pattern = \"/{:(block) \\\"({:block})\\\"(?: \\[(.+)\\])?}(.*){\\\\1:}/msU\";\n\n\t\tpreg_match_all(static::$_terminals['T_BLOCK'], $source, $matches);\n\n\t\t$_blocks = null;\n\n\t\tforeach($matches[2] as $index => $block){\n\n\t\t\t$_pattern = String::insert($pattern, array('block' => $block));\n\n\t\t\t$_block = static::$_blocks->blocks(\"{$block}\");\n\n\t\t\t$_blocks = static::$_blocks;\n\n\t\t\t/**\n\t\t\t * Top level content for block\n\t\t\t * @var string\n\t\t\t */\n\t\t\t$content = trim($_block->content());\n\n\t\t\t/**\n\t\t\t * The request for block content in the final template\n\t\t\t * @var string\n\t\t\t */\n\t\t\t$request = $matches[4][$index];\n\n\t\t\t/**\n\t\t\t * Parent/child matches/replacement\n\t\t\t */\n\t\t\t$_parents = function($block) use (&$content, &$_parents, &$matches, &$index, &$_pattern){\n\n\t\t\t\t$parent = $block->parent();\n\n\t\t\t\tif(preg_match(\"/{:parent:}/msU\", $content, $_matches)) { \n\n\t\t\t\t\tif($parent){\n\t\t\t\t\t\t$content = preg_replace(\"/{:parent:}/msU\", $parent->content(), $content);\n\t\t\t\t\t\t// go again\n\t\t\t\t\t\treturn $_parents($block->parent(), $content);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// no parent, remove the request\n\t\t\t\t\t\t$content = preg_replace(\"/{:parent:}/msU\", \"\", $content);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\treturn $content;\n\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Parse the block and check to see if it's parents request it.\n\t\t\t * @var method\n\t\t\t */\n\t\t\t$_children = function($block, $content = null) use (&$_children, &$matches, &$index, &$_pattern, &$_blocks){\n\n\t\t\t\t$content = ($content == null) ? $block->content() : $content;\n\n\t\t\t\t$_block = $_blocks->blocks($block->name());\n\t\t\t\t/**\n\t\t\t\t * If the block has a child then we're not at the bottom of the chain.\n\t\t\t\t * We need to move up until we cant\n\t\t\t\t * @var mixed `object` or `false`\n\t\t\t\t */\n\t\t\t\t$child = $block->child();\n\n\t\t\t\t/**\n\t\t\t\t * If the block has a parent then we cant be at the top of the chain.\n\t\t\t\t * As long as there's a parent we need to keep moving. \n\t\t\t\t * @var mixed `object` or `false`\n\t\t\t\t */\n\t\t\t\t$parent = $block->parent();\n\n\t\t\t\tif(preg_match(\"/{:child:}/msU\", $content)) { \n\t\t\t\t\t// Block doesn't have a child block\n\t\t\t\t\tif(!$child){\n\t\t\t\t\t\t// Also has no parent\n\t\t\t\t\t\tif(!$parent){\n\t\t\t\t\t\t\t// clear the entire block\n\t\t\t\t\t\t\t$content = \"\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Has a parent, still no child tho\n\t\t\t\t\t\t\t// just remove the call for child block\n\t\t\t\t\t\t\t$content = preg_replace(\"/{:child:}/msU\", \"\", $content);\n\t\t\t\t\t\t\treturn $_children($block, $content);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// not asking for a child\n\t\t\t\t} else {\n\n\t\t\t\t\t// Has a parent\n\t\t\t\t\tif($parent){\n\n\t\t\t\t\t\tif(preg_match(\"/{:child:}/msU\", $parent->content())){\n\t\t\t\t\t\t\t$content = preg_replace(\"/{:child:}/msU\", $content, $parent->content());\n\t\t\t\t\t\t\treturn $_children($parent, $content);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// must return content so we dont muck up parent\n\t\t\t\treturn $content;\n\n\t\t\t};\n\n\t\t\t// parse children\n\t\t\t$content = $_children($_block);\n\t\t\t// parse parents\n\t\t\t$content = $_parents($_block);\n\n\t\t\t$source = preg_replace($_pattern, $content, $source);\n\n\t\t}\n\n\t\t// 0 should always be the final template\n\t\tif($i == 0){\n\t\t\tif($cacheable = $cache->write($source, static::$_blocks->templates(0), $_blocks, $options)){\n\t\t\t\tstatic::$_template = $cacheable;\n\t\t\t}\n\n\t\t}\n\n\t}", "protected function _afterSave(\\Magento\\Framework\\Model\\AbstractModel $object)\r\n {\r\n if($object->getBlockType() == \"page\") {\r\n $oldStores = $this->lookupStoreIds($object->getId());\r\n $newStores = (array)$object->getStores();\r\n if (empty($newStores)) {\r\n $newStores = (array)$object->getStoreId();\r\n }\r\n\r\n $table = $this->getTable('ves_blockbuilder_cms');\r\n $insert = array_diff($newStores, $oldStores);\r\n $delete = array_diff($oldStores, $newStores);\r\n\r\n if ($delete) {\r\n $where = [\r\n 'block_id = ?' => (int) $object->getId(),\r\n 'store_id IN (?)' => $delete\r\n ];\r\n\r\n $this->getConnection()->delete($table, $where);\r\n }\r\n\r\n if ($insert) {\r\n $data = [];\r\n foreach ($insert as $storeId) {\r\n $data[] = [\r\n 'block_id' => (int) $object->getId(),\r\n 'store_id' => (int) $storeId\r\n ];\r\n }\r\n\r\n $this->getConnection()->insertMultiple($table, $data);\r\n }\r\n\r\n }\r\n\r\n //Store widget short code into table ves_blockbuilder_widget\r\n if($widgets = $object->getWpowidget()){\r\n $data = [];\r\n $table = $this->getTable('ves_blockbuilder_widget');\r\n foreach($widgets as $wkey=>$val){\r\n $widget_shortcode = isset($val['config'])?$val['config']:\"\";\r\n if($widget_shortcode) {\r\n if ($wkey) {\r\n $where = [\r\n 'block_id = ?' => (int) $object->getId()\r\n ];\r\n\r\n $this->getConnection()->delete($table, $where);\r\n\r\n $data[] = [\r\n 'block_id' => (int) $object->getId(),\r\n 'widget_key' => $wkey,\r\n 'widget_shortcode' => $widget_shortcode,\r\n 'created' => date( 'Y-m-d H:i:s' )\r\n ];\r\n }\r\n \r\n }\r\n }\r\n if ($data) {\r\n $this->getConnection()->insertMultiple($table, $data);\r\n }\r\n \r\n }\r\n\r\n return parent::_afterSave($object);\r\n }", "protected function afterFind()\n {\n parent::afterFind();\n $this->oldTags = $this->tags;\n }", "function register_block_core_tag_cloud()\n {\n }", "public function setTags($newVal) {\n $this->tags = $newVal;\n }", "protected function afterFind()\n\t{\n\t\tparent::afterFind();\n\t\t$this->_oldTags=$this->tags;\n\t}", "public function test_save_and_replace() {\n global $DB;\n $this->loadDataSet($this->createArrayDataSet(array(\n 'dragdrop_sentence_word_block' => array(\n array('id', 'wordblockid', 'sentenceid', 'position', 'xcoord', 'ycoord', 'timecreated'),\n array(1, 7, 1, 1, 0, 0, $this->_now),\n array(2, 10, 2, 1, 0, 0, $this->_now),\n array(3, 4, 1, 1, 0, 0, $this->_now),\n array(4, 2, 1, 1, 0, 0, $this->_now)\n ),\n 'dragdrop_sentence' => array(\n array('id', 'mark', 'instanceid', 'timecreated', 'timemodified'),\n array(1, 20, 13, $this->_now, $this->_now),\n array(2, 20, 13, $this->_now, $this->_now)\n ))\n ));\n\n $wordblocks = array(\n array('position' => 10, 'left' => 124, 'top' => 189, 'wordblockid' => 9),\n array('position' => 3, 'left' => 224, 'top' => 289, 'wordblockid' => 1),\n array('position' => 2, 'left' => 324, 'top' => 389, 'wordblockid' => 8),\n array('position' => 11, 'left' => 424, 'top' => 489, 'wordblockid' => 7),\n array('position' => 1, 'left' => 524, 'top' => 589, 'wordblockid' => 2),\n array('position' => 7, 'left' => 624, 'top' => 689, 'wordblockid' => 13),\n array('position' => 4, 'left' => 724, 'top' => 789, 'wordblockid' => 6),\n array('position' => 12, 'left' => 824, 'top' => 889, 'wordblockid' => 4),\n array('position' => 5, 'left' => 174, 'top' => 989, 'wordblockid' => 10),\n array('position' => 6, 'left' => 274, 'top' => 139, 'wordblockid' => 12),\n array('position' => 9, 'left' => 374, 'top' => 89, 'wordblockid' => 5),\n array('position' => 8, 'left' => 474, 'top' => 259, 'wordblockid' => 11),\n );\n\n $data = array(\n 'wordblocks' => array_map(function ($array) { return (object)$array; }, $wordblocks)\n );\n $returned_blocks = array_map(function ($array) {\n $array['xcoord'] = $array['left'];\n $array['ycoord'] = $array['top'];\n unset($array['top']);\n unset($array['left']);\n return $array;\n }, $wordblocks);\n $id = $this->_cut->save(45, $data, $this->_now, 1);\n $this->assertEquals(13, $DB->count_records('dragdrop_sentence_word_block'));\n foreach ($returned_blocks as $block) {\n $block['sentenceid'] = $id;\n $block['timecreated'] = $this->_now;\n $this->assertTrue($DB->record_exists('dragdrop_sentence_word_block', $block));\n }\n }", "function handle_tags_save($tags, $rel_id, $rel_type)\n{\n $CI =& get_instance();\n\n $affectedRows = 0;\n if ($tags == '') {\n $CI->db->where('rel_id', $rel_id);\n $CI->db->where('rel_type', $rel_type);\n $CI->db->delete('tbltags_in');\n if ($CI->db->affected_rows() > 0) {\n $affectedRows++;\n }\n } else {\n $tags_array = array();\n if (!is_array($tags)) {\n $tags = explode(',', $tags);\n }\n\n foreach ($tags as $tag) {\n $tag = trim($tag);\n if ($tag != '') {\n array_push($tags_array, $tag);\n }\n }\n\n // Check if there is removed tags\n $current_tags = get_tags_in($rel_id, $rel_type);\n\n foreach ($current_tags as $tag) {\n if (!in_array($tag, $tags_array)) {\n $tag = get_tag_by_name($tag);\n $CI->db->where('rel_id', $rel_id);\n $CI->db->where('rel_type', $rel_type);\n $CI->db->where('tag_id', $tag->id);\n $CI->db->delete('tbltags_in');\n if ($CI->db->affected_rows() > 0) {\n $affectedRows++;\n }\n }\n }\n\n // Insert new ones\n $order = 1;\n foreach ($tags_array as $tag) {\n $tag = str_replace('\"', '\\'', $tag);\n\n $CI->db->where('name', $tag);\n $tag_row = $CI->db->get('tbltags')->row();\n if ($tag_row) {\n $tag_id = $tag_row->id;\n } else {\n // Double quotes not allowed\n $CI->db->insert('tbltags', array('name'=>$tag));\n $tag_id = $CI->db->insert_id();\n }\n\n if (total_rows('tbltags_in', array('tag_id'=>$tag_id, 'rel_id'=>$rel_id, 'rel_type'=>$rel_type)) == 0) {\n $CI->db->insert('tbltags_in',\n array(\n 'tag_id'=>$tag_id,\n 'rel_id'=>$rel_id,\n 'rel_type'=>$rel_type,\n 'tag_order'=>$order\n ));\n\n if ($CI->db->affected_rows() > 0) {\n $affectedRows++;\n }\n }\n $order++;\n }\n }\n\n return ($affectedRows > 0 ? true : false);\n}", "public function parseBlock($blockName)\n {\n // Sometimes Word splits tags. Find and replace all of them with\n $documentSymbol = explode(self::$_templateSymbol, self::$_document);\n foreach ($documentSymbol as $documentSymbolValue) {\n if (strip_tags($documentSymbolValue) == $blockName) {\n self::$_document = str_replace($documentSymbolValue, $blockName, self::$_document);\n }\n }\n }", "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}", "function render_block_core_tag_cloud($attributes)\n {\n }", "public function deleteAllBlocks()\n {\n // Sometimes Word splits tags. Find and replace all of them with\n // new string surrounded by template symbol value\n $documentSymbol = explode(self::$_templateSymbol, self::$_document);\n foreach ($documentSymbol as $documentSymbolValue) {\n if (strpos(strip_tags($documentSymbolValue), 'BLOCK_') !== false) {\n self::$_document = str_replace($documentSymbolValue, strip_tags($documentSymbolValue), self::$_document);\n }\n }\n $domDocument = new DomDocument();\n $domDocument->loadXML(self::$_document);\n\n $xmlWP = $domDocument->getElementsByTagNameNS('http://schemas.openxmlformats.org/wordprocessingml/2006/main',\n 'p');\n $xpath = new DOMXPath($domDocument);\n $length = $xmlWP->length;\n $itemsWP = array();\n for ($i = 0; $i < $length; $i++) {\n $itemsWP[$i] = $xmlWP->item($i);\n }\n $query = 'w:r/w:t';\n for ($i = 0; $i < $length; $i++) {\n $variables = $xpath->query($query, $itemsWP[$i]);\n foreach ($variables as $entry) {\n $deleteCurrent = false;\n if (\n strpos($entry->nodeValue,\n self::$_templateSymbol . 'BLOCK_'\n ) !== false\n ) {\n //when we find a placeholder, we delete it\n $deleteCurrent = true;\n break;\n }\n }\n if ($deleteCurrent) {\n $padre = $itemsWP[$i]->parentNode;\n $padre->removeChild($itemsWP[$i]);\n self::$_document = $domDocument->saveXML();\n }\n }\n }", "public function replaceInlineDocumentElements($content){\n\t\t//regular expression indicating what a document inline element looks like\n\t\t$inline_document_expression = \"/\\{arch:document:(.*)\\/\\}/\";\n\t\t\n\t\t//array to hold blocks that need to be replaced\n\t\t$document_array = array();\n\t\t\n\t\t//fill the array\n\t\tpreg_match_all($inline_document_expression, $content, $document_array);\n\t\t\n\t\t//parse inline document elements array\n\t\tforeach($document_array[0] as $element){\n\t\t\t//strip name out of the block string\n\t\t\t$element_name = explode(':', $element);\n\t\t\t$element_name = explode('/', $element_name[2]);\n\t\t\t//final block name\n\t\t\t$element_name = $element_name[0];\n\t\t\t\n\t\t\t//inline editing variables\n\t\t\t$element_editing_type = \"\";\n\t\t\t\n\t\t\tif(in_array($element_name, $this->document_default_fields)){//if it is a default element\n\t\t\t\tif($element_name == \"title\"){//switch to inline definition to remove extra tags generated by ckeditor\n\t\t\t\t\t$element_editing_type = \" arch-inline_element\";\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//document element name\n\t\t\t\t$element_name = 'document_'.$element_name.'_'.getCurrentLanguage();\n\t\t\t\n\t\t\t\t//grab tag parser\n\t\t\t\trequire_once(constant(\"ARCH_BACK_END_PATH\").'modules/tag_parser.php');\n\n\t\t\t\t//variable to hold content with rendered tags filled with content\n\t\t\t\t$tag_rendered_content = $this->document[$element_name];\n\t\t\t\t//build handler and pass it the content to be rendered\n\t\t\t\t$tag_rendered_content_handler = new tagParser($tag_rendered_content, true, true, false);\n\t\t\t\t\n\t\t\t\t//retrieve the rendered content\n\t\t\t\t$tag_rendered_content = $tag_rendered_content_handler->getContent();\n\t\n\t\t\t\tob_start();\n\t\t\t\t//evaluate string as php append closing and open php tags to comply with expected php eval format\n\t\t\t\t//http://php.net/eval\n\t\t\t\teval(\"?>\".$tag_rendered_content.\"<?\");\n\t\t\t\t$evaluated_content = ob_get_contents();\n\t\t\t\tob_end_clean();\n\t\t\t\t\n\t\t\t\t$element_content = $evaluated_content;\n\t\t\t}else{//if it is not a default element\n\t\t\t\t$field_id = mysql_query('SELECT additional_field_ID \n\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_fields\n\t\t\t\t\t\t\t\t\t\tWHERE additional_field_name = \"'.clean($element_name).'\"\n\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\n\t\t\t\tif(mysql_num_rows($field_id) > 0){//if the field exsists\n\t\t\t\t\t$field_id = mysql_fetch_assoc($field_id);\n\t\t\t\t\t$field_id = $field_id['additional_field_ID'];\n\t\t\t\t\t\n\t\t\t\t\t$field_value = mysql_query('SELECT additional_field_value_'.getCurrentLanguage().'\n\t\t\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_field_values\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE additional_field_value_additional_field_FK = \"'.clean($field_id).'\"\n\t\t\t\t\t\t\t\t\t\t\t\tAND additional_field_value_document_FK = \"'.clean($this->document['document_ID']).'\"\n\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\t\n\t\t\t\t\tif(mysql_num_rows($field_value) > 0){//if the field has value\n\t\t\t\t\t\t$field_value = mysql_fetch_assoc($field_value);\n\t\t\t\t\t\t$field_value = $field_value['additional_field_value_'.getCurrentLanguage()];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$element_content = $field_value;\n\t\t\t\t\t}else{//the field has no value\n\t\t\t\t\t\t$element_content = '';\n\t\t\t\t\t}\n\t\t\t\t}else{//field dosn't exsist\n\t\t\t\t\t$element_content = '';\n\t\t\t\t}\n\t\t\t}//end non default element\n\t\t\t\n\t\t\tif($this->edit_mode == true){//check for editing mode\n\t\t\t\tif(trim($element_content) == ''){//check for empty elements in edit mode\n\t\t\t\t\t$element_content = $element;\n\t\t\t\t}\n\t\t\t\t$element_content = '<div class=\"arch-content_element'.$element_editing_type.'\" id=\"'.$element_name.'\" style=\"display:inline;\" contenteditable=\"true\">'.$element_content.'</div>';\n\t\t\t}\n\t\t\t\n\t\t\t//preform actual replacement\n\t\t\t$content = preg_replace(\"{\".$element.\"}\", $element_content, $content, 1);\n\t\t}//end inline document parsing\n\t\t\n\t\t//return parsed content\n\t\treturn $content;\n\t}", "function evd_restore_all_shortcodes() {\n global $shortcode_tags;\n global $temp_shortcode_tags;\n if(!empty($temp_shortcode_tags)) {\n $shortcode_tags = $temp_shortcode_tags;\n }\n}", "public function replaceBaseTokens(&$content);", "public static function localNestingCorrectlyRemovesInvalidTagsDataProvider() {}", "function custom_bcn_template_tag($replacements, $type, $id)\n{\n if (in_array('post-products', $type)) {\n $short_title = get_field('short_title', $id);\n $replacements['%short_title%'] = ($short_title) ? $short_title : $replacements['%htitle%'];\n } else {\n $replacements['%short_title%'] = $replacements['%htitle%'];\n }\n return $replacements;\n}", "function apachesolr_add_tags_to_document(&$document, $text) {\r\n $tags_to_index = variable_get('apachesolr_tags_to_index', array(\r\n 'h1' => 'tags_h1',\r\n 'h2' => 'tags_h2_h3',\r\n 'h3' => 'tags_h2_h3',\r\n 'h4' => 'tags_h4_h5_h6',\r\n 'h5' => 'tags_h4_h5_h6',\r\n 'h6' => 'tags_h4_h5_h6',\r\n 'u' => 'tags_inline',\r\n 'b' => 'tags_inline',\r\n 'i' => 'tags_inline',\r\n 'strong' => 'tags_inline',\r\n 'em' => 'tags_inline',\r\n 'a' => 'tags_a'\r\n ));\r\n\r\n // Strip off all ignored tags.\r\n $text = strip_tags($text, '<'. implode('><', array_keys($tags_to_index)) .'>');\r\n\r\n preg_match_all('@<('. implode('|', array_keys($tags_to_index)) .')[^>]*>(.*)</\\1>@Ui', $text, $matches);\r\n foreach ($matches[1] as $key => $tag) {\r\n $tag = strtolower($tag);\r\n // We don't want to index links auto-generated by the url filter.\r\n if ($tag != 'a' || !preg_match('@(?:http://|https://|ftp://|mailto:|smb://|afp://|file://|gopher://|news://|ssl://|sslv2://|sslv3://|tls://|tcp://|udp://|www\\.)[a-zA-Z0-9]+@', $matches[2][$key])) {\r\n $document->{$tags_to_index[$tag]} .= ' '. $matches[2][$key];\r\n }\r\n }\r\n}", "public function addTagToPostInTheMiddle() {}", "function replaceBlockContent($content,$className,$blockName,$bodyContent,$exClass)\n {\n if($exClass == \"Magento\\Backend\\Block\\Widget\\Grid\")\n $exClass = \"Magento\\Backend\\Block\\Widget\\Grid\\Extended\";\n if($exClass == \"Magento\\Backend\\Block\\Widget\\Form\")\n $exClass = \"Magento\\Backend\\Block\\Widget\\Form\\Generic\";\n if($exClass == \"Mage\\Core\\Helper\\Abstract\"){\n $exClass = \"Magento\\Framework\\App\\Helper\\AbstractHelper\" ; \n }\n $search = array(\n '/<ClassName>/',\n '/<BlockName>/',\n '/<BodyContent>/',\n '/<ExtendsClass>/',\n );\n\n $replace = array(\n $className,\n $blockName,\n $bodyContent,\n '\\\\'.$exClass,\n );\n //\n return preg_replace($search, $replace, $content);\n }", "public function clearTags()\n\t{\n\t\t$this->tags = array();\n\t}", "public function moveMeta() {\n $entity_type = 'node';\n\n $database = \\Drupal::database();\n $query = $database->query(\"SELECT entity_id, bundle FROM {node__field_meta_tags}\");\n $result = $query->fetchAllKeyed();\n\n print_r($result);\n\n // moving data form field_meta_tags to field_metatag\n foreach($result as $nid => $node_type) {\n $node = \\Drupal::entityTypeManager()->getStorage($entity_type)->load($nid);\n $this->logger()->notice($this->t('Node @nid loaded', ['@nid' => $nid,]));\n $field_meta_tags = $node->field_meta_tags->value;\n\n $field_metatag = $node->field_metatag->value;\n\n $node->field_metatag->value = $node->field_meta_tags->value;\n $node->save();\n }\n\n // Deleting field storage.\n FieldStorageConfig::loadByName('node', 'field_meta_tags')->delete();\n $this->logger()->notice($this->t('field_meta_tags deleted', ['@nid' => $nid,]));\n\n FieldStorageConfig::loadByName('node', 'field_meta_test')->delete();\n $this->logger()->notice($this->t('field_meta_tags deleted', ['@nid' => $nid,]));\n\n // Deleting field. not needed, since FieldConfig has a dependency on the FieldStorageConfigfield\n// FieldConfig::loadByName('node', 'blog', 'field_meta_tags')->delete();\n// FieldConfig::loadByName('node', 'event', 'field_meta_tags')->delete();\n// FieldConfig::loadByName('node', 'page', 'field_meta_tags')->delete();\n\n// field_meta_tags metatag blog\n// field_meta_tags metatag course\n// field_meta_tags metatag diplo_news\n// field_meta_tags metatag event\n// field_meta_tags metatag page\n// field_meta_tags metatag topic\n// field_meta_tags metatag book_reviews\n\n\n }", "function p1base_theme_suggestions_block_alter2(array &$suggestions, array $variables) {\n $node = \\Drupal::request()->attributes->get('node');\n\n // Add block suggestions based on what is the conten\n if ($node) {\n $bundle = $node->bundle();\n $suggestions[] = 'block__' . $bundle . '__' . $variables['elements']['#plugin_id'];\n }\n\n $block = $variables['elements'];\n $blockType = $block['#configuration']['provider'];\n if ($blockType == \"block_content\") {\n $bundle = $block['content']['#block_content']->bundle();\n $id = $block['content']['#block_content']->id();\n $suggestions[] = 'block__' . $blockType;\n $suggestions[] = 'block__' . $blockType . '__' . $bundle;\n $suggestions[] = 'block__' . $id;\n }\n}", "function Replace_Tokens($data)\n\t{\n\t\t// it could rely on tokens which are above it\n\t\t// in the token \"stack\"\n\t\tif (isset($this->token['BLOCK_MAIN']))\n\t\t{\n\t\t\t$data = str_replace('@@BLOCK_MAIN@@', $this->token['BLOCK_MAIN'], $data);\n\t\t\tunset($this->token['BLOCK_MAIN']);\n\t\t}\n\t\t\n\t\tforeach ($this->token as $key=>$value)\n\t\t{\n\t\t\t\n\t\t\tif ($value instanceof Token)\n\t\t\t{\n\t\t\t\t$value = $value->Value();\n\t\t\t}\n\t\t\t\n\t\t\t$data = str_replace('@@'.$key.'@@', $value, $data);\n\t\t\t\n\t\t}\n\t\t\n\t\t$data = preg_replace('/@@(.*?)@@/', '', $data);\n\t\t\n\t\treturn($data);\n\t\t\n\t}", "function sebd7tweaks_API_views_alter_blocks($blocks) {\n $displays = array();\n // For better performance, prepare an array of display by view to ensure not load the view twice or more\n foreach (array_keys($blocks) as $key) {\n list($view_name, $display_name) = explode('-', $key);\n $displays[$view_name][] = $display_name;\n }\n // Use the display title for associated blocks\n foreach ($displays as $view_name => $display_names) {\n // Load the view\n $view = views_get_view($view_name);\n // Load its displays\n $view->init_display();\n // Parse all of them which provide a block\n foreach ($display_names as $display_name) {\n foreach (array($display_name, 'default') as $candidate) {\n if (isset($view->display[$candidate]->display_options['title'])) {\n $blocks[\"$view_name-$display_name\"]['info'] = $view->display[$candidate]->display_options['title'];\n break;\n }\n }\n }\n // Save memory\n $view->destroy();\n }\n // Return blocks list\n return $blocks;\n}", "public static function globalNestingCorrectlyRemovesInvalidTagsDataProvider() {}", "public function undo_tag() {\n\t\t$version = $this->conf['common']['releasever'];\n\t\t$tag = str_replace( '$1', $version, $this->conf['common']['tagname'] );\n\n\t\tforeach ( $this->conf['extensions'] as $ext => $checkout ) {\n\t\t\tchdir( \"{$this->dir}/extensions/$ext\" );\n\t\t\t$cTag = escapeshellarg( $tag );\n\t\t\texec( \"git checkout master\" );\n\t\t\texec( \"git tag -d $cTag\" );\n\t\t\t$cTag = escapeshellarg( \":refs/tags/$tag\" );\n\t\t\texec( \"git push origin $cTag\" );\n\t\t}\n\t}", "function balanceTags($text, $force = \\false)\n {\n }", "public function createStoreTags($tags,$store_id) {\n\t\t##\n\t\t##\tPARAMETERS\n\t\t##\t\t@tags\t\t\t\tThe tags array\n\t\t##\t\t@store_id\t\t\tThe storeID\n\t\t$key = 0;\n\t\t$tags_added = array();\n\t\t## Add active tags\n\t\tforeach($tags as $tag) {\n\t\t\t$data = array(\n\t\t\t\t'store_id' => $store_id,\n\t\t\t\t'tag' => $tag,\n\t\t\t\t'order_num' => $key,\n\t\t\t\t'status' => 1\n\t\t\t);\n\t\t\t$format = array(\n\t\t\t\t'%d',\n\t\t\t\t'%s',\n\t\t\t\t'%d',\n\t\t\t\t'%d'\n\t\t\t);\n\t\t\t$this->wpdb->insert($this->wpdb->prefix.'topspin_stores_tag',$data,$format);\n\t\t\t$key++;\n\t\t\t$tags_added[] = $tag;\n\t\t}\n\t\t## Add inactive tags\n\t\t$tags_list = $this->getTagList();\n\t\tforeach($tags_list as $tag) {\n\t\t\tif(!in_array($tag['name'],$tags_added)) {\n\t\t\t\t$data = array(\n\t\t\t\t\t'store_id' => $store_id,\n\t\t\t\t\t'tag' => $tag['name'],\n\t\t\t\t\t'order_num' => $key,\n\t\t\t\t\t'status' => 0\n\t\t\t\t);\n\t\t\t\t$format = array(\n\t\t\t\t\t'%d',\n\t\t\t\t\t'%s',\n\t\t\t\t\t'%d',\n\t\t\t\t\t'%d'\n\t\t\t\t);\n\t\t\t\t$this->wpdb->insert($this->wpdb->prefix.'topspin_stores_tag',$data,$format);\n\t\t\t\t$key++;\n\t\t\t\t$tags_list[] = $tag['name'];\n\t\t\t}\n\t\t}\n\t}", "function fix_imported_image_taggits(&$import_taggits, $uploaded_imgs, $db_mdts)\n {\n // we need to get that new name\n foreach ($import_taggits as $file_img => &$img_taggits)\n {\n $img_taggits['new_img_name'] = '';\n\n foreach ($img_taggits as &$taggit)\n {\n $taggit['new_img_name'] = '';\n\n foreach ($uploaded_imgs as $img)\n {\n if (Util::strEndsWith($img['source_filename'], $file_img))\n {\n // yes -- the new_img_name is in two places.\n // why?? I don't know... it's late\n $taggit['new_img_name'] = $img['filename'];\n $img_taggits['new_img_name'] = $img['filename'];\n }\n }\n }\n }\n\n // go through all taggits and find the section_id and metadata_id for the corresponding section and metadata\n foreach ($import_taggits as $file_img => &$img_taggits)\n {\n foreach ($img_taggits as &$taggit)\n {\n // set a default sid/mid\n $taggit['sid'] = 0;\n $taggit['mid'] = 0;\n\n // go through all sections\n foreach ($db_mdts as &$db_section)\n {\n // we found a matching section, let's go through all metadata\n if ($db_section['name'] == $taggit['section'])\n {\n $sid = $db_section['section_id'];\n\n // go through all metadata items from the section\n foreach ($db_section['items'] as &$db_metadata)\n {\n // we found a matching metadata from the section\n if ($db_metadata['label'] == $taggit['metadata'])\n {\n $mid = $db_metadata['metadata_id'];\n\n // wow... we finally found the sid/mid\n $taggit['sid'] = $sid;\n $taggit['mid'] = $mid;\n }\n }\n }\n }\n }\n\n }\n }", "public function UpdateTags() {\n\t\t$tags = TaxonomyTerm::get()\n\t\t\t->innerJoin('BasePage_Terms', '\"TaxonomyTerm\".\"ID\"=\"BasePage_Terms\".\"TaxonomyTermID\"')\n\t\t\t->innerJoin(\n\t\t\t\t'SiteTree',\n\t\t\t\tsprintf('\"SiteTree\".\"ID\" = \"BasePage_Terms\".\"BasePageID\" AND \"SiteTree\".\"ParentID\" = \\'%d\\'', $this->ID)\n\t\t\t)\n\t\t\t->sort('Name');\n\n\t\treturn $tags;\n\t}", "function changes(&$asset) {\n global $changed;\n $changed = false;\n foreach ($asset[\"metadata\"]->dynamicFields->dynamicField as $dyn) {\n if ($dyn->name == \"audiences\") {\n if (isset($dyn->fieldValues->fieldValue) ) {\n $el = new StdClass();\n $el->value = 'Press Release';\n if ( is_array($dyn->fieldValues->fieldValue) ) {\n if ( !in_array($el, $dyn->fieldValues->fieldValue) ) {\n array_push($dyn->fieldValues->fieldValue, $el);\n $changed = true;\n echo 'added to array';\n } else {\n echo 'Already one of the tags';\n }\n } else {\n if ( $dyn->fieldValues->fieldValue->value != 'Press Release' ) {\n $dyn->fieldValues->fieldValue = array ($dyn->fieldValues->fieldValue);\n array_push($dyn->fieldValues->fieldValue, $el);\n $changed = true;\n echo 'added second tag';\n } else {\n echo 'Already the only tag';\n }\n }\n } else {\n $dyn->fieldValues->fieldValue = new StdClass();\n $dyn->fieldValues->fieldValue->value = 'Press Release';\n $changed = true;\n echo 'added as only tag';\n }\n }\n }\n}", "function layout_builder_post_update_fix_tempstore_keys() {\n /** @var \\Drupal\\layout_builder\\SectionStorage\\SectionStorageManagerInterface $section_storage_manager */\n $section_storage_manager = \\Drupal::service('plugin.manager.layout_builder.section_storage');\n /** @var \\Drupal\\Core\\KeyValueStore\\KeyValueExpirableFactoryInterface $key_value_factory */\n $key_value_factory = \\Drupal::service('keyvalue.expirable');\n\n // Loop through each section storage type.\n foreach (array_keys($section_storage_manager->getDefinitions()) as $section_storage_type) {\n $key_value = $key_value_factory->get(\"tempstore.shared.layout_builder.section_storage.$section_storage_type\");\n foreach ($key_value->getAll() as $key => $value) {\n $contexts = $section_storage_manager->loadEmpty($section_storage_type)->deriveContextsFromRoute($key, [], '', []);\n if ($section_storage = $section_storage_manager->load($section_storage_type, $contexts)) {\n\n // Some overrides were stored with an incorrect view mode value. Update\n // the view mode on the temporary section storage, if necessary.\n if ($section_storage_type === 'overrides') {\n $view_mode = $value->data['section_storage']->getContextValue('view_mode');\n $new_view_mode = $section_storage->getContextValue('view_mode');\n if ($view_mode !== $new_view_mode) {\n $value->data['section_storage']->setContextValue('view_mode', $new_view_mode);\n $key_value->set($key, $value);\n }\n }\n\n // The previous tempstore key names were exact matches with the section\n // storage ID. Attempt to load the corresponding section storage and\n // rename the tempstore entry if the section storage provides a more\n // granular tempstore key.\n if ($section_storage instanceof TempStoreIdentifierInterface) {\n $new_key = $section_storage->getTempstoreKey();\n if ($key !== $new_key) {\n if ($key_value->has($new_key)) {\n $key_value->delete($new_key);\n }\n $key_value->rename($key, $new_key);\n }\n }\n }\n }\n }\n}", "protected function saveTags()\n {\n $this->checkConstants();\n $articleId = $this->id;\n $tags = $this->tags;\n if ( $this->isNewRecord )\n {\n if ( !empty( $tags ) )\n {\n $this->addTags( $articleId, $tags );\n }\n }\n else\n {\n if ( is_array( $tags ) &&( !empty( $tags ) ) )\n {\n /*\n we received array with the same or different values of tags -\n in any case that will be an array with numbers\n */\n if ( is_numeric( $tags[0] ) )\n {\n $this->changeTags( $articleId, $tags );\n }\n /*\n if $tags was filled with models and user has removed from form all tags\n we will receive empty array and $tags will be the same as after initialization\n */\n elseif( is_object( $tags[0] ) )\n {\n $this->deleteAllTags( $articleId );\n }\n }\n }\n }", "public function update(): void\n {\n $content = $this->getOriginalContent();\n\n $parsed = $this->parseContent($content);\n\n $this->storeList($parsed);\n }", "function _drush_infinite_base_migrate_taxonomy_seo_data_batch_op(array $tids, $storage) {\n $connection = \\Drupal::service('database');\n $taxonomy_terms = $storage->loadMultiple($tids);\n $search = [\n '[term:title]',\n '[term:description]'\n ];\n $replace = [\n '[term:field_seo_title:value]',\n '[term:field_seo_description:value]'\n ];\n foreach ($taxonomy_terms as $term) {\n // In case the vocabulary does not have the new fields ignore.\n $field_definitions = $term->getFieldDefinitions();\n if (!isset($field_definitions['field_seo_title'])) {\n continue;\n }\n $meta = FALSE;\n // Check for meta info\n if (isset($term->field_meta_tags->value) && strlen($term->field_meta_tags->value) > 2) {\n $meta = unserialize($term->field_meta_tags->value);\n }\n // We try to update the tokens in the fields that we know may use them. If\n // there is no successfull replacement in the \"default\" meta tags, we\n // update the new fields from those and put the new tokens into the meta\n // tags.\n // Otherwise, we update the fields from the name and description fields\n // and leave the meta tags alone.\n if ($meta) {\n if (isset($meta['title'])) {\n $count = 0;\n $meta['title'] = str_replace($search, $replace, $meta['title'], $count);\n if ($count === 0) {\n $term->set('field_seo_title', $meta['title']);\n $meta['title'] = '[term:field_seo_title:value]';\n }\n else {\n $term->set('field_seo_title', $term->get('name')->value);\n }\n }\n else {\n $term->set('field_seo_title', $term->get('name')->value);\n }\n if (isset($meta['description'])) {\n $count = 0;\n $meta['description'] = str_replace($search, $replace, $meta['description'], $count);\n if ($count === 0) {\n $term->set('field_seo_description', $meta['description']);\n $meta['description'] = '[term:field_seo_description:value]';\n }\n else {\n $term->set('field_seo_description', strip_tags(Html::decodeEntities($term->get('description')->value)));\n }\n }\n else {\n $term->set('field_seo_description', strip_tags(Html::decodeEntities($term->get('description')->value)));\n }\n if (isset($meta['og_title'])) {\n $meta['og_title'] = str_replace($search, $replace, $meta['og_title']);\n }\n if (isset($meta['og_description'])) {\n $meta['og_description'] = str_replace($search, $replace, $meta['og_description']);\n }\n if (isset($meta['twitter_cards_title'])) {\n $meta['twitter_cards_title'] = str_replace($search, $replace, $meta['twitter_cards_title']);\n }\n // put the new values back\n $term->set('field_meta_tags', serialize($meta));\n }\n // no meta info, just set fields.\n else {\n $term->set('field_seo_title', $term->get('name')->value);\n $term->set('field_seo_description', strip_tags(Html::decodeEntities($term->get('description')->value)));\n }\n // We would like to call term->save() here, but the nexx module does some\n // time consuming stuff in its taxonomy_term_update hook which may make\n // the update fail.\n $connection->insert('taxonomy_term__field_seo_title')\n ->fields([\n 'bundle' => $term->bundle(),\n 'deleted' => 0,\n 'entity_id' => $term->id(),\n 'revision_id' => $term->id(),\n 'langcode' => 'de',\n 'delta' => 0,\n 'field_seo_title_value' => $term->get('field_seo_title')->value,\n ])\n ->execute();\n $connection->insert('taxonomy_term__field_seo_description')\n ->fields([\n 'bundle' => $term->bundle(),\n 'deleted' => 0,\n 'entity_id' => $term->id(),\n 'revision_id' => $term->id(),\n 'langcode' => 'de',\n 'delta' => 0,\n 'field_seo_description_value' => $term->get('field_seo_description')->value,\n ])\n ->execute();\n if ($meta) {\n $connection->update('taxonomy_term__field_meta_tags')\n ->fields([\n 'field_meta_tags_value' => $term->field_meta_tags->value,\n ])\n ->condition('entity_id', $term->id())\n ->execute();\n }\n }\n drush_log(dt('Batch finished...'), \"ok\");\n}", "function testRemoveTag_UsingCleanTags() {\n foreach ($this->photo->getTags() as $tag) {\n $this->photo->removeTag($tag);\n }\n $this->photo->addTags(array('something', 'another', '2004'));\n sleep(1);\n\n $this->photo->removeTag('another');\n\n $result = $this->photo->getTags();\n $this->assertEquals(array('something', '2004'), $result);\n }", "function _versioncontrol_git_process_tags($repository, $new_tags) {\n $tag_ops = _versioncontrol_git_get_tag_operations($repository, $new_tags);\n foreach ($tag_ops as $tag_op) {\n $op_items = array();\n versioncontrol_insert_operation($tag_op, $op_items);\n $constraints = array(\n 'vcs' => array('git'),\n 'repo_ids' => array($repository['repo_id']),\n 'types' => array(VERSIONCONTROL_OPERATION_COMMIT),\n 'revisions' => array($tag_op['revision'])\n );\n $tag_commits = versioncontrol_get_operations($constraints);\n foreach ($tag_commits as $vc_op_id => $tag_commit_op) {\n $tag_commit_op['labels'][] = array(\n 'name' => $tag_op['labels'][0]['name'],\n 'action' => VERSIONCONTROL_ACTION_MODIFIED,\n 'type' => VERSIONCONTROL_OPERATION_TAG\n );\n versioncontrol_update_operation_labels($tag_commit_op, $tag_commit_op['labels']);\n }\n }\n}", "private function _addTags()\n {\n $metadata = $this->getRecordMetadata();\n $this->_record->addTags($metadata[self::TAGS]);\n }", "protected function setTags()\n {\n /*todo check role and flush based on tags*/\n $this->authBasedTag();\n }", "function gwt_drupal_process_block(&$variables, $hook) {\n // Drupal 7 should use a $title variable instead of $block->subject.\n $variables['title'] = isset($variables['block']->subject) ? $variables['block']->subject : '';\n}", "function _parse($tags,$values,$text) {\n\t\tfor ($i = 0; $i<sizeof($tags); $i++) {\n\t\t\t\t$text = str_replace($tags[$i],$values[$i],$text);\n\t\t\t}\n\t\treturn $text;\n\t}", "function replaceTagsAll(&$string, $enabled = 1, $security_pass = 1)\n\t{\n\t\tif (!is_string($string) || $string == '')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (!$enabled)\n\t\t{\n\t\t\t// replace source block content with HTML comment\n\t\t\t$string = '<!-- ' . JText::_('SRC_COMMENT') . ': ' . JText::_('SRC_CODE_REMOVED_NOT_ENABLED') . ' -->';\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (!$security_pass)\n\t\t{\n\t\t\t// replace source block content with HTML comment\n\t\t\t$string = '<!-- ' . JText::_('SRC_COMMENT') . ': ' . JText::sprintf('SRC_CODE_REMOVED_SECURITY', '') . ' -->';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$this->cleanTags($string);\n\n\t\t$a = $this->src_params->areas['default'];\n\t\t$forbidden_tags_array = explode(',', $a['forbidden_tags']);\n\t\t$this->cleanArray($forbidden_tags_array);\n\t\t// remove the comment tag syntax from the array - they cannot be disabled\n\t\t$forbidden_tags_array = array_diff($forbidden_tags_array, array('!--'));\n\t\t// reindex the array\n\t\t$forbidden_tags_array = array_merge($forbidden_tags_array);\n\n\t\t$has_forbidden_tags = 0;\n\t\tforeach ($forbidden_tags_array as $forbidden_tag)\n\t\t{\n\t\t\tif (!(strpos($string, '<' . $forbidden_tag) == false))\n\t\t\t{\n\t\t\t\t$has_forbidden_tags = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (!$has_forbidden_tags)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// double tags\n\t\t$tag_regex = '#<\\s*([a-z\\!][^>\\s]*?)(?:\\s+.*?)?>.*?</\\1>#si';\n\t\tpreg_match_all($tag_regex, $string, $matches, PREG_SET_ORDER);\n\n\t\tif (!empty($matches))\n\t\t{\n\t\t\tforeach ($matches as $match)\n\t\t\t{\n\t\t\t\tif (!in_array($match['1'], $forbidden_tags_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$tag = '<!-- ' . JText::_('SRC_COMMENT') . ': ' . JText::sprintf('SRC_TAG_REMOVED_FORBIDDEN', $match['1']) . ' -->';\n\t\t\t\t$string = str_replace($match['0'], $tag, $string);\n\t\t\t}\n\t\t}\n\n\t\t// single tags\n\t\t$tag_regex = '#<\\s*([a-z\\!][^>\\s]*?)(?:\\s+.*?)?>#si';\n\t\tpreg_match_all($tag_regex, $string, $matches, PREG_SET_ORDER);\n\n\t\tif (!empty($matches))\n\t\t{\n\t\t\tforeach ($matches as $match)\n\t\t\t{\n\t\t\t\tif (!in_array($match['1'], $forbidden_tags_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$tag = '<!-- ' . JText::_('SRC_COMMENT') . ': ' . JText::sprintf('SRC_TAG_REMOVED_FORBIDDEN', $match['1']) . ' -->';\n\t\t\t\t$string = str_replace($match['0'], $tag, $string);\n\t\t\t}\n\t\t}\n\t}", "public function save() {\n // Check to see if another tag exists with the same name\n $duplicate_tag = ORM::factory(\"tag\")\n ->where(\"name\", \"=\", $this->name)\n ->where(\"id\", \"!=\", $this->id)\n ->find();\n if ($duplicate_tag->loaded()) {\n // If so, tag its items with this tag so as to merge it\n $duplicate_tag_items = ORM::factory(\"item\")\n ->join(\"items_tags\", \"items.id\", \"items_tags.item_id\")\n ->where(\"items_tags.tag_id\", \"=\", $duplicate_tag->id)\n ->find_all();\n foreach ($duplicate_tag_items as $item) {\n $this->add($item);\n }\n\n // ... and remove the duplicate tag\n $duplicate_tag->delete();\n }\n\n if (isset($this->object_relations[\"items\"])) {\n $added = array_diff($this->changed_relations[\"items\"], $this->object_relations[\"items\"]);\n $removed = array_diff($this->object_relations[\"items\"], $this->changed_relations[\"items\"]);\n if (isset($this->changed_relations[\"items\"])) {\n $changed = array_merge($added, $removed);\n }\n $this->count = count($this->object_relations[\"items\"]) + count($added) - count($removed);\n }\n\n $result = parent::save();\n\n if (!empty($changed)) {\n foreach (ORM::factory(\"item\")->where(\"id\", \"IN\", $changed)->find_all() as $item) {\n module::event(\"item_related_update\", $item);\n }\n }\n\n return $result;\n }", "public function testReplace()\n {\n $documentHandler = new DocumentHandler($this->connection);\n $result = $documentHandler->save($this->collection1->getName(), [ '_key' => 'test', 'value' => 'test' ]);\n static::assertEquals('test', $result);\n\n $trx = new StreamingTransaction($this->connection, [\n TransactionBase::ENTRY_COLLECTIONS => [\n TransactionBase::ENTRY_WRITE => [ $this->collection1->getName() ]\n ]\n ]);\n\n $trx = $this->transactionHandler->create($trx);\n $this->_shutdown[] = $trx;\n static::assertInstanceOf(StreamingTransaction::class, $trx);\n \n static::assertTrue(is_string($trx->getId()));\n\n $trxCollection = $trx->getCollection($this->collection1->getName());\n static::assertEquals($this->collection1->getName(), $trxCollection->getName());\n\n // document should be present inside transaction\n $doc = $documentHandler->getById($trxCollection, \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('test', $doc->value);\n\n // replace document inside transaction\n unset($doc->value);\n $doc->hihi = 'hoho';\n $result = $documentHandler->replaceById($trxCollection, 'test', $doc);\n static::assertTrue($result);\n\n // transactional lookup should find the modified document\n $doc = $documentHandler->getById($trxCollection, \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('hoho', $doc->hihi);\n static::assertObjectNotHasAttribute('value', $doc);\n \n // non-transactional lookup should still see the old document\n $doc = $documentHandler->getById($this->collection1->getName(), \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('test', $doc->value);\n static::assertObjectNotHasAttribute('hihi', $doc);\n \n // now commit\n static::assertTrue($this->transactionHandler->commit($trx->getId()));\n\n $doc = $documentHandler->getById($this->collection1->getName(), \"test\");\n static::assertEquals('test', $doc->getKey());\n static::assertEquals('hoho', $doc->hihi);\n static::assertObjectNotHasAttribute('value', $doc);\n }", "public function removeTag()\n\t{\n\t\tif(isset($this->primarySearchData[$this->ref_tag]))\n\t\t{\n\t\t\tunset($this->primarySearchData[$this->ref_tag]);\n\t\t}\n\t}", "public function testUpdateInvalidTag() {\n\t\t// Create a tag and try to update it without actually inserting it\n\t\t$tag = new Tag(null, $this->VALID_TAG_LABEL);\n\t\t$tag->update($this->getPDO());\n\t}", "private function update_wp_tag_cloud() {\n\n\t\t//filter tag clould output so that it can be styled by CSS\n\t\tadd_action( 'wp_tag_cloud', array($this, 'add_tag_class') );\n\n\t\t//Tweak tag cloud args\n\t\tadd_filter( 'widget_tag_cloud_args', array($this, 'my_widget_tag_cloud_args') );\n\n\t\t//Wrap tag cloud output\n\t\tadd_filter( 'wp_tag_cloud', array($this, 'wp_tag_cloud_filter'), 10, 2 );\n\n\t\t//Alter the link (<a>) tag html\n\t\tadd_filter( 'the_tags', array($this, 'add_class_the_tags') );\n\n\t}", "function _block_skinr_load_blocks($theme) {\n $cache = &drupal_static(__FUNCTION__, array());\n\n if (!isset($cache['code_blocks'])) {\n $cache['code_blocks'] = array();\n // Gather the blocks defined by modules.\n foreach (module_implements('block_info') as $module) {\n $module_blocks = module_invoke($module, 'block_info');\n foreach ($module_blocks as $delta => $block) {\n // Add identifiers.\n $block['module'] = $module;\n $block['delta'] = $delta;\n $block['theme'] = $theme;\n $cache['code_blocks'][$module][$delta] = $block;\n }\n }\n }\n\n if (!isset($cache['blocks'][$theme])) {\n $regions = system_region_list($theme);\n\n $current_blocks = $cache['code_blocks'];\n // These are {block}.bid values to be kept.\n $bids = array();\n $or = db_or();\n\n foreach ($cache['code_blocks'] as $module => $module_blocks) {\n foreach ($module_blocks as $delta => $block) {\n // Compile a condition to retrieve this block from the database.\n $condition = db_and()\n ->condition('module', $module)\n ->condition('delta', $delta);\n $or->condition($condition);\n }\n }\n\n $database_blocks = db_select('block', 'b')\n ->fields('b')\n ->condition($or)\n ->condition('theme', $theme)\n ->execute();\n foreach ($database_blocks as $block) {\n // Preserve info which is not in the database.\n $block->info = $current_blocks[$block->module][$block->delta]['info'];\n // The cache mode can only by set from hook_block_info(), so that has\n // precedence over the database's value.\n if (isset($current_blocks[$block->module][$block->delta]['cache'])) {\n $block->cache = $current_blocks[$block->module][$block->delta]['cache'];\n }\n // Blocks stored in the database override the blocks defined in code.\n $current_blocks[$block->module][$block->delta] = get_object_vars($block);\n // Preserve this block.\n $bids[$block->bid] = $block->bid;\n }\n drupal_alter('block_info', $current_blocks, $theme, $cache['code_blocks']);\n\n foreach ($current_blocks as $module => $module_blocks) {\n foreach ($module_blocks as $delta => $block) {\n if (!empty($block['region']) && $block['region'] != BLOCK_REGION_NONE && !isset($regions[$block['region']])) {\n // Disabled modules are moved into the BLOCK_REGION_NONE later so no\n // need to move the block to another region.\n $current_blocks[$module][$delta]['status'] = 0;\n }\n // Set region to none if not enabled and make sure status is set.\n if (empty($block['status'])) {\n $current_blocks[$module][$delta]['status'] = 0;\n $current_blocks[$module][$delta]['region'] = BLOCK_REGION_NONE;\n }\n }\n }\n\n $cache['blocks'][$theme] = array();\n foreach ($current_blocks as $module => $module_blocks) {\n foreach ($module_blocks as $delta => $block) {\n if (!$block['status']) {\n continue;\n }\n $cache['blocks'][$theme][$block['module'] . '__' . $block['delta']] = (object) $block;\n }\n }\n asort($cache['blocks'][$theme]);\n }\n\n return $cache['blocks'][$theme];\n}", "function block_plugin_my_block_view($delta) {\n return array(\n '#type' => 'markup',\n '#markup' => 'Yo block!'\n );\n}", "public function resetTagDetail() {\n\t\t$this->content_tag_detail = null;\n\t}", "public function normalizeTags($attribute,$params)\n {\n $this->tags=VideoTag::array2string(array_unique(VideoTag::string2array($this->tags)));\n }", "function customTagReplace($html)\r\n\t{\r\n\t\t//ensure all tags can be found\r\n\t\t$html = str_replace(\"<IMG\",\"<img\",$html);\r\n\t\t$html = str_replace(\"SRC=\",\"src=\",$html);\r\n\t\t$html = str_replace(\"ALT=\",\"alt=\",$html);\r\n\t\t$html = str_replace(\"<SPAN\",\"<span\",$html);\r\n\r\n\t\t$html = replaceIMG($html); //CSS format img tags\r\n\t\t$html = youtubeEmbed($html); //custom include youtube embeds\r\n\t\t$html = apostrapheFix($html); //apostraphe fix for sql INSERT statements\r\n\t\treturn $html;\r\n\t}", "function save_adrotate_blocks_to_page() {\n\t\tglobal $post;\n\t\tforeach($_POST as $key => $value) {\n\t\t\tif(substr($key, 0, 15) == 'adrotate_block_') {\n\t\t\t\t$block_position = substr($key, 15);\n\t\t\t\tupdate_post_meta($post->ID, $block_position, $value);\n\t\t\t} elseif(substr($key, 0, 15) == 'adrotate_title_') {\n\t\t\t\t$block_title = substr($key, 15) . '_title';\n\t\t\t\tupdate_post_meta($post->ID, $block_title, $value);\n\t\t\t}\n\t\t}\n\t}", "function save_tag($edit = false)\n{\n global $xoopsConfig, $xoopsSecurity;\n\n $page = rmc_server_var($_POST, 'page', 1);\n\n if (!$xoopsSecurity->check()) {\n redirectMsg('tags.php?page=' . $page, __('Operation not allowed!', 'mywords'), 1);\n die();\n }\n\n $name = rmc_server_var($_POST, 'name', '');\n $short = rmc_server_var($_POST, 'short', '');\n\n if ('' == $name) {\n redirectMsg('tags.php?page=' . $page, __('You must provide a name!', 'mywords'), 1);\n die();\n }\n\n if ($edit) {\n $id = rmc_server_var($_POST, 'id', 0);\n if ($id <= 0) {\n redirectMsg('tags.php?page=' . $page, __('Tag id not provided!', 'mywords'), 1);\n die();\n }\n\n $tag = new MWTag($id);\n if ($tag->isNew()) {\n redirectMsg('tags.php?page=' . $page, __('Tag does not exists!', 'mywords'), 1);\n die();\n }\n } else {\n $tag = new MWTag();\n }\n\n if ('' == trim($short)) {\n $short = TextCleaner::sweetstring($name);\n } else {\n $short = TextCleaner::sweetstring($short);\n }\n\n // Check if tag exists\n $db = XoopsDatabaseFactory::getDatabaseConnection();\n if ($edit) {\n $sql = 'SELECT COUNT(*) FROM ' . $db->prefix('mod_mywords_tags') . \" WHERE (tag='$name' OR shortname='$short') AND id_tag<>$id\";\n } else {\n $sql = 'SELECT COUNT(*) FROM ' . $db->prefix('mod_mywords_tags') . \" WHERE tag='$name' OR shortname='$short'\";\n }\n\n list($num) = $db->fetchRow($db->query($sql));\n if ($num > 0) {\n redirectMsg('tags.php?page=' . $page, __('A tag with same name or same short name already exists!', 'mywords'), 1);\n die();\n }\n\n $tag->setVar('tag', $name);\n $tag->setVar('shortname', $short);\n if ($tag->save()) {\n redirectMsg('tags.php', __('Database updated successfully!', 'mywords'), 0);\n die();\n }\n redirectMsg('tags.php?page=' . $page, __('A problem occurs while trying to save tag.', 'mywords') . '<br>' . $tag->errors(), 1);\n die();\n}", "public function removeAllTags() {}", "public function replaceBlock($string, $inList = false)\n\t{\n\t\t$string = $this->replaceHeaders($string);\n\t\t$string = $this->replaceHorizontalRules($string);\n\t\t$string = $this->replaceLists($string, $inList);\n\t\t$string = $this->replaceBlockCode($string);\n\t\t$string = $this->replaceBlockQuotes($string);\n\n\t\t// Prevent \"paragraphing\" from destroying our nice blocks\n\t\t$string = $this->hashifyBlocks($string);\n\n\t\t$string = $this->paragraphify($string);\n\n\t\treturn $string;\n\t}", "function gtags_save_tags( $group ) { \n\tglobal $bp;\n\tif ( isset( $_POST['group-tags'] ) && $_POST['group-tags'] ) {\n\t\t$grouptags = str_replace( \"\\'\", \"\", $_POST['group-tags'] ); // remove single quotes cause they dont work!\n\t\t$grouptags = apply_filters( 'gtags_save_tags', $grouptags );\n\t\tgroups_update_groupmeta( $group->id, 'gtags_group_tags', $grouptags );\n\t} elseif ( $bp->action_variables[0] == 'edit-details' ){ // delete the group tags if empty, and we're on the edit details page\n\t\tgroups_delete_groupmeta( $group->id, 'gtags_group_tags' );\n\t}\n}", "public function replace( $old, $new );", "public function replace(TagContainer $container, array $names)\n\t{\n\t\t$addScheduleTags = array();\n\t\t$deleteScheduleTags = $container->getNameArray();\n\n\t\tforeach($names as $name) {\n\t\t\tif(false !== ($key = array_search($name, $deleteScheduleTags))) {\n\t\t\t\t// already exists.\n\t\t\t\t// unset from the deleteScheduleTags\n\t\t\t\tunset($deleteScheduleTags[$key]);\n\t\t\t} else {\n\t\t\t\t$addScheduleTags[$name] = $name;\n\t\t\t}\n\t\t}\n\n\t\tforeach($deleteScheduleTags as $tag) {\n\t\t\t$container->remove($tag);\n\t\t}\n\n\t\tforeach($addScheduleTags as $tag) {\n\t\t\t$this->add($container, $tag);\n\t\t}\n\n\t\treturn $container;\n\t}", "function isfnet_process_block(&$variables, $hook) {\n // Drupal 7 should use a $title variable instead of $block->subject.\n $variables['title'] = $variables['block']->subject;\n}", "public function Admin_Action_UpdateBlock() {\n $blockId = $this->_getPOSTRequest ( 'blockid', 0 );\n $tagId = $this->_getPOSTRequest ( 'tagid', 0 );\n $name = $this->_getPOSTRequest ( 'name', 0 );\n $rules = $this->_getPOSTRequest ( 'rules', 0 );\n $activated = $this->_getPOSTRequest ( 'activated', 0 );\n $sortorder = $this->_getPOSTRequest ( 'sortorder', -1 );\n\n if (intval($activated) == 1) {\n \t$query = \"UPDATE [|PREFIX|]dynamic_content_block \"\n . \" SET activated = '0' \"\n . \" WHERE tagid = '\".intval($tagId).\"'\";\n $result = $this->db->Query ( $query );\n }\n\n\n $query = \"UPDATE [|PREFIX|]dynamic_content_block \"\n . \" SET name = '\".$this->db->Quote($name).\"'\"\n . \", rules = '\".$this->db->Quote($rules).\"'\"\n . \", activated = '\".intval($activated).\"'\"\n . \", sortorder = '\".$sortorder.\"'\"\n . \" WHERE blockid = '\".intval($blockId).\"'\";\n if (strlen($blockId) == 32) {\n $query = \"INSERT INTO [|PREFIX|]dynamic_content_block (tagid, name, rules, activated, sortorder) VALUES ('$tagId', '{$this->db->Quote($name)}', '{$this->db->Quote($rules)}', '$activated', '$sortorder')\";\n }\n $result = $this->db->Query ( $query );\n if ($result && strlen($blockId) == 32) {\n $blockId = $this->db->LastId('[|PREFIX|]dynamic_content_block');\n }\n\n echo $blockId;\n return;\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 onBlockReplace(BlockFormEvent $event): void {\n\n $arenaHandler = PracticeCore::getArenaHandler();\n\n $duelHandler = PracticeCore::getDuelHandler();\n\n $arena = $arenaHandler->getArenaClosestTo($event->getBlock());\n $cancel = false;\n if(!is_null($arena) and ($arena->getArenaType() === PracticeArena::DUEL_ARENA)) {\n if($duelHandler->isArenaInUse($arena->getName())) {\n $duel = $duelHandler->getDuel($arena->getName(), true);\n if($duel->isDuelRunning()) {\n if($event->getNewState() instanceof Liquid)\n $duel->addBlock($event->getBlock());\n else $cancel = true;\n }\n else $cancel = true;\n } else {\n $cancel = true;\n }\n } else {\n $cancel = true;\n }\n\n if($cancel === true) $event->setCancelled();\n }", "public function setTagsFor($objectid, $tags) {\n $prevTags = $this->getTagsFor($objectid);\n if( !$prevTags ) {\n $prevTags = array();\n }\n $delTags = array_diff($prevTags, $tags);\n $insTags = array_diff($tags, $prevTags);\n\n $this->deleteTagsFor($objectid, $delTags);\n $this->addTagsFor($objectid, $insTags);\n }", "public function getCacheTagsToInvalidate();", "function gratis_process_block(&$vars, $hook) {\n // Drupal 7 should use a $title variable instead of $block->subject.\n $vars['title'] = isset($vars['block']->subject) ? $vars['block']->subject : '';\n}", "function _migrateLyftenTags()\n\t{\n\t // no relations created for each blog vs tag\n\n\t $db \t= EasyBlogHelper::db();\n\t $suId = $this->_getSAUserId();\n\t $now\t= EasyBlogHelper::getDate();\n\n\t $query = 'insert into `#__easyblog_tag` (`created_by`, `title`, `alias`, `created`, `published`)';\n\t\t$query .= ' select ' . $db->Quote($suId) . ', `name`, `slug`, '. $db->Quote($now->toMySQL()).', ' . $db->Quote('1');\n\t\t$query .= ' from `#__bloggies_tags`';\n\t\t$query .= ' where `name` not in (select `title` from `#__easyblog_tag`)';\n\n\t\t$db->setQuery($query);\n\t\t$db->query();\n\n\t\treturn true;\n\t}", "protected function drukowanie()\n {\n for($i=0,$c=count($this->tags); $i<$c; $i++){\n $this->szkielet = $this->swap( $this->szkielet , $this->install($i) );\n }\n\n }", "private function processTags()\n {\n $dollarNotationPattern = \"~\" . REGEX_DOLLAR_NOTATION . \"~i\";\n $simpleTagPattern = \"~\" . REGEX_SIMPLE_TAG_PATTERN . \"~i\";\n $bodyTagPattern = \"~\" . REGEX_BODY_TAG_PATTERN . \"~is\";\n \n $tags = array();\n preg_match_all($this->REGEX_COMBINED, $this->view, $tags, PREG_SET_ORDER);\n \n foreach($tags as $tag)\n { \n $result = \"\";\n \n $tag = $tag[0];\n \n if (strlen($tag) == 0) continue;\n \n if (preg_match($simpleTagPattern, $tag) || preg_match($bodyTagPattern, $tag))\n {\n $this->handleTag($tag);\n }\n else if (preg_match($dollarNotationPattern, $tag))\n {\n $this->logger->log(Logger::LOG_LEVEL_DEBUG, 'View: processTags', \"Found ExpLang [$tag]\");\n $result = $this->EL_Engine->parse($tag);\n }\n \n if (isset ($result))\n {\n $this->update($tag, $result);\n }\n }\n }", "public function replace(array $data);", "function replaceCommonTags( $currentData ) \n {\n // Replace Module Name\n $tagModuleName = ModuleCreator::TAG_MODULE_NAME;\n $moduleName = $this->values[ ModuleCreator::KEY_MODULE_NAME ];\n $currentData = str_replace($tagModuleName, $moduleName, $currentData );\n \n // Replace Creator Name\n $tagCreatorName = ModuleCreator::TAG_CREATOR_NAME;\n $creatorName = $this->values[ ModuleCreator::KEY_MODULE_CREATOR ];\n $currentData = str_replace($tagCreatorName, $creatorName, $currentData );\n \n // Replace Creation Date\n $tagCreationDate = ModuleCreator::TAG_CREATION_DATE;\n $creationDate = $this->getCurrentDate();\n $currentData = str_replace($tagCreationDate, $creationDate, $currentData );\n \n // Replace Template Path\n $tagTemplatePath = ModuleCreator::TAG_PATH_TEMPLATES;\n $path = ModuleCreator::PATH_TEMPLATES;\n $currentData = str_replace($tagTemplatePath, $path, $currentData );\n \n return $currentData;\n \n }", "function block_core_gallery_data_id_backcompatibility($parsed_block)\n {\n }", "final public function set($tag, $content) {\n $this->template = str_replace(\"{\".$tag.\"}\", $content, $this->template);\n }", "private function remove_post_parse_conditionals($tags, $tagdata)\n\t{\n\t\t//--------------------------------------------\n\t\t//\tfirst find all if openers\n\t\t//--------------------------------------------\n\n\t\t//need a temp to work with\n\t\t$temp \t\t\t\t= $tagdata;\n\n\t\t$if_openers \t\t= array();\n\n\t\t$count = 0;\n\n\t\twhile ($temp = stristr($temp, LD . 'if'))\n\t\t{\n\t\t\t$count++;\n\n\t\t\t//we first have to find the proper end of the {if} tag\n\t\t\t$if_tag_pos \t= strpos($temp, RD, 0);\n\t\t\t$if_tag \t\t= substr($temp, 0, $if_tag_pos + 1);\n\n\t\t\t$inner_count = 0;\n\n\t\t\t//if we dont have an equal number of delimters...\n\t\t\twhile ( ! $this->equal_delimiters($if_tag))\n\t\t\t{\n\t\t\t\t$inner_count++;\n\n\t\t\t\t//we keep checking for the next right delmiter in line\n\t\t\t\t$if_tag_pos = strpos($temp, RD, $if_tag_pos + 1);\n\t\t\t\t$if_tag \t= substr($temp, 0, $if_tag_pos + 1);\n\n\t\t\t\tif ($inner_count > 1000) break;\n\t\t\t}\n\n\t\t\t$if_openers[] \t= $if_tag;\n\n\t\t\t//remove from temp so we can move on in the while loop\n\t\t\t$temp \t\t\t= substr($temp, strlen($if_tag));\n\n\t\t\tif ($count > 1000) break;\n\t\t}\n\n\t\t//--------------------------------------------\n\t\t//\treplace all items from if tags with\n\t\t//--------------------------------------------\n\n\t\t//keep a copy of old ones\n\t\t$original_ifs = $if_openers;\n\n\t\t//replace all tag names as the passed in hash (with pair tags)\n\t\tforeach ($tags as $tag => $hash)\n\t\t{\n\t\t\tforeach ($if_openers as $key => $value)\n\t\t\t{\n\t\t\t\t//--------------------------------------------\n\t\t\t\t//\tthis is complicated, but we have\n\t\t\t\t//\tto make sure no previous\n\t\t\t\t//\treplacements get double wrapped\n\t\t\t\t//--------------------------------------------\n\n\t\t\t\t$matches = array();\n\t\t\t\t$holders = array();\n\n\t\t\t\tif (preg_match_all(\n\t\t\t\t\t\"/\" . LD . 'count_hash_placeholder type=\"' . $tag . '\"' . RD . \"(.+?)\" .\n\t\t\t\t\t\t LD . preg_quote(T_SLASH, '/') . 'count_hash_placeholder' . RD . \"/s\",\n\t\t\t\t\t$if_openers[$key],\n\t\t\t\t\t$matches\n\t\t\t\t))\n\t\t\t\t{\n\t\t\t\t\tfor ($i = 0, $l = count($matches[0]); $i < $l; $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$holder_hash \t\t\t= md5($matches[0][$i]);\n\t\t\t\t\t\t$holders[$holder_hash] \t= $matches[0][$i];\n\t\t\t\t\t\t$if_openers[$key] \t\t= str_replace(\n\t\t\t\t\t\t\t$matches[0][$i],\n\t\t\t\t\t\t\t$holder_hash,\n\t\t\t\t\t\t\t$if_openers[$key]\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//fix any remaining\n\t\t\t\t$if_openers[$key] = str_replace($tag, $hash, $if_openers[$key]);\n\n\t\t\t\t//put any holders back in\n\t\t\t\tif ( ! empty($holders))\n\t\t\t\t{\n\t\t\t\t\tforeach($holders as $holder_hash => $held_data)\n\t\t\t\t\t{\n\t\t\t\t\t\t$if_openers[$key] = str_replace(\n\t\t\t\t\t\t\t$holder_hash,\n\t\t\t\t\t\t\t$held_data,\n\t\t\t\t\t\t\t$if_openers[$key]\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//replace old if blocks with new ones\n\t\tforeach ($original_ifs as $key => $value)\n\t\t{\n\t\t\t$tagdata = str_replace($original_ifs[$key], $if_openers[$key], $tagdata);\n\t\t}\n\n\t\treturn $tagdata;\n\t}", "public function run()\n {\n Post::find(1)->tags()->attach([3,4]);\n Post::find(2)->tags()->attach([1,2]);\n Post::find(3)->tags()->attach(1);\n Post::find(4)->tags()->attach(2);\n Post::find(5)->tags()->attach(1);\n }", "private function replaceDynamics($tpl, $blocks, $tID=''){\n\t\t\t//find and replace dynamic blocks\n\t\t\tif($this->settings->render_cache_level == 1){\n\t\t\t\t$posStart = strpos($tpl, '<pp:dynamic ');\n\t\t\t\twhile ($posStart !== false) {\n\t\t\t\t\t$startEnd = strpos($tpl, '>', $posStart + 15);\n\t\t\t\t\t$nameTag = trim(substr($tpl, $posStart + 11, $startEnd-11-$posStart));\n\t\t\t\t\t$nameTag = substr($nameTag, 6, -1);\n\t\t\t\t\t\n\t\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic ', $posStart + 20);\n\t\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posStart) + Template::DCTL;\n\t\n\t\t\t\t\twhile($nextStart !== false && $nextStart < $posEnd && $posEnd > Template::DCTL){\n\t\t\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posEnd) + Template::DCTL;\n\t\t\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic', $nextStart+20);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$tpl = substr_replace($tpl, '\\'.@$blocks[\\''.$nameTag.'\\'].\\'', $posStart, $posEnd - $posStart);\n\t\t\t\t\t\n\t\t\t\t\t$posStart = strpos($tpl, '<pp:dynamic ', $posStart + 20);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach ($blocks as $key => $value) {\n\t\t\t\t\t\n\t\t\t\t\t$posStart = strpos($tpl, '<pp:dynamic name=\"'.$key.'\">');\n\n\t\t\t\t\tif($posStart !== false){\n\t\t\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic', $posStart + 20);\n\t\t\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posStart) + Template::DCTL;\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile($nextStart !== false && $nextStart < $posEnd && $posEnd > Template::DCTL){\n\t\t\t\t\t\t\t$posEnd = strpos($tpl, '</pp:dynamic>', $posEnd) + Template::DCTL;\n\t\t\t\t\t\t\t$nextStart = strpos($tpl, '<pp:dynamic', $nextStart+20);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$tpl = substr_replace($tpl, $value, $posStart, $posEnd - $posStart);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->_msg(str_replace(array('{@pp:dynamic}', '{@pp:template}'), array($key, $tID), $this->_('DYNAMIC_NOT_FOUND', 'core')), Messages::DEBUG_ERROR);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\treturn $tpl;\n\t\t}", "function replace($search,$replace){\n\t\tsettype($search,\"string\");\n\n\t\t// prevod StringBuffer na string\n\t\tif(is_object($replace)){\n\t\t\t$replace = $replace->toString();\n\t\t}\n\n\t\tfor($i=0;$i<sizeof($this->_Items);$i++){\n\t\t\t$this->_Items[$i]->replace($search,$replace);\n\t\t}\n\t}" ]
[ "0.6830857", "0.58027816", "0.5635936", "0.55946606", "0.5524076", "0.55216116", "0.5509295", "0.5498454", "0.5497168", "0.5466859", "0.54468375", "0.53790313", "0.532858", "0.5231076", "0.51707333", "0.5168664", "0.5119124", "0.51177675", "0.5094164", "0.50585663", "0.5045005", "0.50340027", "0.5030025", "0.50298876", "0.50253993", "0.50225896", "0.50208503", "0.501697", "0.5015276", "0.5006835", "0.49992353", "0.49925458", "0.4986363", "0.4971744", "0.49666202", "0.49580678", "0.4935074", "0.4931466", "0.49247137", "0.49197054", "0.4914685", "0.4908093", "0.49031708", "0.49031556", "0.489758", "0.4893994", "0.48750228", "0.48620635", "0.48566926", "0.48507652", "0.48457605", "0.48409238", "0.4834771", "0.48193237", "0.48074302", "0.48065662", "0.48024184", "0.47984594", "0.4785784", "0.47628036", "0.47575969", "0.47549754", "0.47532505", "0.47435227", "0.47404614", "0.47402602", "0.47345304", "0.47220942", "0.47204894", "0.47200876", "0.47155738", "0.47072327", "0.47044614", "0.47022757", "0.46931684", "0.468909", "0.46764272", "0.46647635", "0.46635365", "0.46611243", "0.46575505", "0.46547326", "0.46543598", "0.46543127", "0.4653508", "0.46517777", "0.46506605", "0.464896", "0.46469715", "0.4646311", "0.46460584", "0.46445864", "0.4633337", "0.46283594", "0.46273857", "0.4624236", "0.462051", "0.4610964", "0.46101543", "0.46093017", "0.4602366" ]
0.0
-1
set a value for a tag to be replaced in the current block
public function set($key, $value) { $this->values[$this->block][$key] = $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function set($tag, $content) {\n $this->template = str_replace(\"{\".$tag.\"}\", $content, $this->template);\n }", "public function do_tags()\n\t{\n\t\tforeach ($this->values as $id => $block)\n\t\t{\n\t\t\tforeach ($block as $name => $replace)\n\t\t\t{\n\t\t\t\t$find = \"{:$name}\";\n\t\t\t\t$this->merged[$id] = str_replace($find, $replace, $this->merged[$id]);\n\t\t\t}\n\t\t}\n\n\t}", "public function setTag($value)\n {\n if ($value !== null) {\n $this->_params['tag'] = $value;\n } else {\n unset($this->_params['tag']);\n }\n }", "function setTag($name, $value) {\n if( is_array($name)) {\n foreach( $name as $n => $v) {\n $this -> $n = $v ;\n }\n } else {\n $this -> $name = $value ;\n }\n }", "public function setValue($_name=NULL, $_value=NULL){\n $getElements=self::getElements();\n if(\n $_name !== NULL &&\n isset($getElements[$_name]) &&\n $getElements[$_name] instanceof Dadiweb_Tags_Abstract\n ){\n $this->{$_name}=(\n (isset($_value))\n ?$_value\n :NULL\n );\n $getElements[$_name]->setValue($this->{$_name});\n }\n }", "public function set($n,$v){\n\t\t$this->Template->set($n, $v);\n\t}", "protected function setElementContent($node, $value)\n\t{\n\t\tif ($node->tagName == 'input') {\n\t\t\t$node->setAttribute('value', $value);\n\t\t} else if ($node->tagName == 'img') {\n\t\t\t$node->setAttribute('src', $value);\n\t\t} else if ($node->tagName == 'a') {\n\t\t\t$node->setAttribute('href', $value);\n\t\t} else if ($node->tagName == 'meta') {\n\t\t\t$node->setAttribute('content', $value);\n\t\t} else {\n\t\t\t$node->nodeValue = htmlentities($value);\n\t\t}\n\t}", "function set($name, $value)\n {\n $this->_template->set($name, $value);\n }", "function setLabelTag($key, $tag, $value) \n {\n\n // if desired [KEY] exists then\n if ( array_key_exists($key, $this->labels) ) {\n\n // if desired [LANGUAGEID] exists \n if (array_key_exists($this->languageID, $this->labels[ $key ] ) ) {\n \n // update label\n $labelData = $this->labels[ $key ][ $this->languageID ];\n $this->labels[ $key ][ $this->languageID ] = str_replace($tag, $value, $labelData);\n \n } else {\n // else \n \n // update label in 1st avaialble language\n $labelData = current( $this->labels[ $key ] );\n $langID = key( $this->labels[$key] ); // Oh, Johnny, you forgot this line, 90 minutes of debugging == free lunch for me!\n/*echo 'Debugging Multilingual Manaer (line 396).<br><br>Case is key matches but requested language not available ... on a tag update<br><br>';\necho 'labelData = [';\nvar_export($labelData);\necho ']<br><br>';\necho 'this->labels[] = [';\nvar_export($this->labels[ $key ]);\necho ']<br><br>';\nexit;*/\n $this->labels[$key][$langID] = str_replace($tag, $value, $labelData);\n \n } // end if\n \n } \n\n }", "function set($key, $value)\n {\n $this->content = str_replace('${'.$key.'}', $value, $this->content);\t\n }", "public function setTag($value, $searchById)\n\t{\n\t\t$this->primarySearchData[$this->ref_tag][$this->ref_value] = $value;\n\t\t$this->primarySearchData[$this->ref_tag][$this->ref_searchById] = $searchById;\n\t}", "public function setTag($value)\n {\n return $this->set('Tag', $value);\n }", "public function setTag($value)\n {\n return $this->set('Tag', $value);\n }", "public function setTag($value)\n {\n return $this->set('Tag', $value);\n }", "public function setTag($value)\n {\n return $this->set('Tag', $value);\n }", "public function setTag($value)\n {\n return $this->set('Tag', $value);\n }", "public function set($namespace, $tagName, $value) {}", "public function setEtag(string $value): void\n {\n $this->etag = '\"'.$value.'\"';\n }", "function block_plugin_my_block_save($block) {\n variable_set($block['delta'], $block['my_custom_field']);\n}", "public function setTags($value)\n {\n if (!array_key_exists('tags', $this->fieldsModified)) {\n $this->fieldsModified['tags'] = $this->data['fields']['tags'];\n } elseif ($value === $this->fieldsModified['tags']) {\n unset($this->fieldsModified['tags']);\n }\n\n $this->data['fields']['tags'] = $value;\n }", "private function assignValues() {\n $this->setIndicators('value');\n\n $leftIndicator = $this->sugarTemplateIndicators['valueLeft'] . $this->sugarTemplateIndicators['valueSeparator'];\n $rightIndicator = $this->sugarTemplateIndicators['valueSeparator'] . $this->sugarTemplateIndicators['valueRight'];\n\n foreach ($this->assignedValues as $tag => $value) {\n $this->rootContent = str_replace($leftIndicator . $tag . $rightIndicator, $value, $this->rootContent);\n }\n }", "public function replaceValue(&$node, $name, $value) {\n\t\t$domElement = $this->getChildNode($node, $name);\n\t\tif (!is_null($domElement)) {\n\t\t\t$node->removeChild($domElement);\n\t\t\t$this->setValue($node, $value, $name, true);\n\t\t}\n\t}", "function setAdditionalProductTag($key, $value)\n {\n $this->_tag_value_cache = array();\n $this->_fAdditionalTagList[$key] = $value;\n }", "function variant_set($variant, $value) {}", "protected function setUp()\n\t{\n\t\tif (isset($this->configurator->tags[$this->tagName]))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Create tag\n\t\t$tag = $this->configurator->tags->add($this->tagName);\n\n\t\t// Create attribute\n\t\t$tag->attributes->add($this->attrName);\n\n\t\t// Create a template that replaces its content with the replacement chat\n\t\t$tag->template\n\t\t\t= '<xsl:value-of select=\"@' . htmlspecialchars($this->attrName) . '\"/>';\n\t}", "function set($name, $value){\n if($this->_HTML AND $this->_HTML_load_view) $this->_template->set($name, $value);\n elseif($this->_JSON){\n if($name == null){\n array_push($this->_JSON_contents, $value);\n }else{\n $this->_JSON_contents[$name] = $value;\n }\n }\n }", "public static function setTag(string $name, string $value, bool $override = false): void\n {\n if (!isset(static::$tags[$name]) || $override) {\n static::$tags[$name] = new MetaTag($name, $value);\n } else {\n static::$tags[$name]->addValue($value);\n }\n }", "private function replaceTag(&$text, $newContent, $competitionId) {\n $text = preg_replace('/{hapodi id=\"'.$competitionId .'\"}/s', $newContent, $text);\n }", "public\n\tfunction setTagLabel(string $newTagLabel) {\n\t\tif($newTagLabel === null) {\n\t\t\t$this->tagLabel = $newTagLabel;\n\t\t}\n\t}", "protected function _setValue($name, $value) {}", "function update_tag( $tag_id, $tag_name = null, $tag_color = null, $tag_bg = null ) {\n $tag = E_Tag::set_instance( $tag_id, $tag_name, $tag_color, $tag_bg );\n return $tag;\n}", "public function setFactoryTag(?string $value): void {\n $this->getBackingStore()->set('factoryTag', $value);\n }", "public function setContent($value)\n {\n if (!array_key_exists('content', $this->fieldsModified)) {\n $this->fieldsModified['content'] = $this->data['fields']['content'];\n } elseif ($value === $this->fieldsModified['content']) {\n unset($this->fieldsModified['content']);\n }\n\n $this->data['fields']['content'] = $value;\n }", "public static function blockAssign($title, $value) {\n\t\tself::block($title);\n\t\techo $value;\n\t\tself::blockEnd();\n\t}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function setValue($value) {}", "public function tag($tag) {\n $this->tag = $tag;\n }", "public function setNodeValue($value) {\n $this->nodeValue = $value;\n }", "public function setElement($element, $content){\n \t$buffer = ob_get_contents();\n\t\tob_end_clean();\n\t\t$buffer=str_replace($element, $content, $buffer);\n\t\techo $buffer;\n\t}", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function setValue($value);", "public function set($var, $value){\n\t\t\t$this->template_vars[$var] = $value;\n\t\t}", "protected function add_dyntag($tag, $val)\r\n\t{\r\n\t\t$this->$tag = $val;\r\n\t}", "public function setTags($newVal) {\n $this->tags = $newVal;\n }", "function changeText($tagId, $content)\n{\n echo \"<script>document.getElementById(\\\"\" . $tagId . \"\\\").innerHTML = \\\"\" . $content . \"\\\";</script>\";\n}", "public function set_raw($tag, $value, $append = false)\n {\n $index = $append ? count($this->raw[$tag]) : 0;\n $this->raw[$tag][$index] = (array)$value;\n }", "public function setTag($tag) {\n $this->_tag = $tag;\n }", "public function setTag($tag) {\n $this->_tag = $tag;\n }", "abstract public function setValue($value);", "public function setValue($value) {\n $this->node->setAttribute('value', iconv(xp::ENCODING, 'utf-8', $value));\n }", "public function setTag($p)\n {\n // Check if not real tag => set it to null\n if ($p !== null && trim($p) !== \"\") {\n $this->appendCommandArgument(\"-r\");\n $this->appendCommandArgument($p);\n }\n }", "public function set($name, $content)\n {\n $this->slots[$name] = $content;\n }", "public function setSugarContent($value)\n {\n $this->sugarContent = $value;\n }", "function setValue($value){\r\n\t\t$this->value = $value;\r\n\t}", "function SM_varTag($attr) {\n $this->attributes = $attr;\n }", "public function setTag( $name, $ref = \"\", $rating = 0, $worst = 0, $best = 0 ) {\n\t\tif ( !empty( $name ) ) {\n\t\t\t$this->content = TRUE;\n\t\t\t$tag[\"name\"] = $name;\n\t\t\tif ( $this->validateRating( $rating, $worst, $best ) ) {\n\t\t\t\t$tag[\"rating\"] = $rating;\n\t\t\t\t$tag[\"worst\"] = $worst;\n\t\t\t\t$tag[\"best\"] = $best;\n\t\t\t}\n\t\t\tif ( preg_match( self::IRIRE, $ref ) ) {\n\t\t\t\t$tag[\"ref\"] = $ref;\n\t\t\t}\n\t\t\t$this->smoValues[\"complex\"][\"tags\"][] = $tag;\n\t\t}\n\t}", "public static function map($tag,$fullpath) {\n self::$snippets[$tag] = $fullpath;\n\t}", "function textblock_template_replace(&$textblock, $replace)\n{\n foreach ($replace as $key => $value) {\n $textblock['title'] = str_replace(\"%$key%\", $value, $textblock['title']);\n $textblock['text'] = str_replace(\"%$key%\", $value, $textblock['text']);\n }\n}", "abstract function setContent();", "protected function remebmer_variable( $name, $value ){\n\t\tstatic::$instance->variables[$name] = $value;\n\t}", "public function setTagID($value)\n {\n return $this->set('TagID', $value);\n }", "function setValue($value) {\n $this->value = $value;\n }", "function setValue ($value) {\n\t\t$this->_value = $value;\n\t}", "function set_var($name, $value){ // set the template variable\n\tif (func_num_args()> 2){\n\t\tif (!$this->in_vars($name)) $this->vars[$name] = array();\n\t\t$this->vars[$name][func_get_arg(2)] = $value;\n\t} else $this->vars[$name] = $value;\n}", "protected function etag($value, $type='strong')\r\n {\r\n $this->slim->etag($value);\r\n }", "public static function setCacheTag($tag)\n {\n static::$cacheTag = htmlspecialchars(trim($tag));\n }", "public function setElement($name, $value);", "function setContentAttribute(array $value) {\n\t\t$xml = new \\DOMDocument('1.0', 'UTF-8');\n\t\t$rootElement = $xml->createElement('content');\n\t\t$xml->appendChild($rootElement);\n\n\t\tforeach ($value['block'] as $block) {\n\t\t\t$cmsBlock = CmsBlock::create($block['type']);\n\n\t\t\t$blockToSeed = $block instanceof CmsBlock ? $block->toArray() : $block;\n\n\t\t\t$cmsBlock->seed($blockToSeed);\n\t\t\t$blockNode = $cmsBlock->toXml();\n\n\t\t\t$rootElement->appendChild($xml->importNode($blockNode, true));\n\t\t}\n\n\t\t$this->attributes['content'] = $xml->saveXML();\n\t}", "static function setGriditemValue($slug='',$value='')\r\n\t{\r\n\t\t$foundlocation = self::searchGriditemBySlug($slug);\t\t\t\t\t\t\r\n\t\tif ($foundlocation['scene_id'] != '0')\r\n\t\t{\r\n\t\t\t$item_info = self::getGriditemBySceneIdAndCellId($foundlocation['scene_id'],$foundlocation['cell_id']);\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tself::setGridItemState($item_info['id'],$value);\r\n\t\t\t//StoryData::set($slug,$value);\r\n\t\t}\t\r\n\t}", "public function testReplaceTags()\n\t{\n\t\t$this->assertEquals('143',$this->obj->replace_tags('1{{2}}3', '', array(\"2\"=>\"4\")));\n\t\t$this->assertEquals('143',$this->obj->replace_tags('1{{args:2}}3', 'args', array(\"2\"=>\"4\")));\n\t\t$this->assertEquals('143$var',$this->obj->replace_tags('1{{args:2}}3$var', 'args', array(\"2\"=>\"4\")));\n\t}", "function setHtmlData($name, $value){\n\t\tif(!$this->isConfigured()) return false;\n\n\t\treturn $this->getTemplateObj()->setHtmlData($name, $value);\t\t\n\t}", "public function appendValue($value) {\n $this->current->value($value);\n }", "public function setCommentTags($value)\n {\n if (!array_key_exists('comment_tags', $this->fieldsModified)) {\n $this->fieldsModified['comment_tags'] = $this->data['fields']['comment_tags'];\n } elseif ($value === $this->fieldsModified['comment_tags']) {\n unset($this->fieldsModified['comment_tags']);\n }\n\n $this->data['fields']['comment_tags'] = $value;\n }", "function bub_simple_replace($src_block, $target_html) {\n return $target_html;\n}", "protected function registerTag(): string\n {\n return 'var';\n }", "public function setData($key, $value) {\r\n\t\t$this->templateData[$key] = $value;\r\n\t}", "public function setDataIntoTemplate($reference,$data) {\n\t$this->assign($reference,$data);\n }", "public function doVariable($name, &$value): void\n {\n switch ($name) {\n case 'b':\n $value = 4;\n break;\n }\n }", "public function setValue2($value){\n $this->_value2 = $value;\n }", "public function setBlock(DerivationType $value): void\n {\n $this->blockAttr = $value;\n }", "public function set($id, $value)\n\t{\n\t\t$tag_name = $this->tag_name($id);\n\n\t\tif ($tag_name == 'textarea')\n\t\t{\n\t\t\t$this->connection()->post(\"element/$id/value\", array('value' => $value));\n\t\t}\n\t\telseif ($tag_name == 'input')\n\t\t{\n\t\t\t$type = $this->attribute($id, 'type');\n\t\t\tif ($type == 'checkbox' OR $type == 'radio')\n\t\t\t{\n\t\t\t\t$this->connection()->post(\"element/$id/click\", array());\n\t\t\t}\n\t\t\telseif ($type == 'file')\n\t\t\t{\n\t\t\t\t$this->connection()->post(\"element/$id/upload\", array('value' => $value));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->connection()->post(\"element/$id/value\", array('value' => $value));\n\t\t\t}\n\t\t}\n\t\telseif ($tag_name == 'option')\n\t\t{\n\t\t\t$this->connection()->post(\"element/$id/selected\", array('value' => $value));\n\t\t}\n\t}" ]
[ "0.68924546", "0.6356426", "0.6339238", "0.62259376", "0.6071217", "0.58956695", "0.5879631", "0.58601874", "0.5844479", "0.5828853", "0.58074003", "0.5807256", "0.5806264", "0.5806264", "0.5806264", "0.58049244", "0.5741832", "0.57028514", "0.56681925", "0.56602544", "0.56384015", "0.55697596", "0.55611396", "0.5509299", "0.5482529", "0.5481253", "0.5478879", "0.5469429", "0.5383574", "0.5374922", "0.53709745", "0.53443563", "0.53404415", "0.53403145", "0.5330588", "0.5330588", "0.533042", "0.533042", "0.533042", "0.533042", "0.533042", "0.533042", "0.533042", "0.533042", "0.533042", "0.533042", "0.533042", "0.5327984", "0.5325714", "0.5305086", "0.53046554", "0.53046554", "0.53046554", "0.53046554", "0.53046554", "0.53046554", "0.53046554", "0.53046554", "0.53046554", "0.53046554", "0.5300088", "0.5275886", "0.52558506", "0.5255136", "0.52534086", "0.52478063", "0.52478063", "0.5239713", "0.52367264", "0.52320004", "0.5227968", "0.52141577", "0.5212573", "0.5209864", "0.5209781", "0.52010137", "0.5193278", "0.5172955", "0.5164297", "0.51522046", "0.5151324", "0.5125653", "0.5125088", "0.5119068", "0.51030725", "0.5092365", "0.5092181", "0.5091563", "0.5090232", "0.5087917", "0.50877994", "0.5086593", "0.50820935", "0.5076727", "0.50717956", "0.5046897", "0.5044245", "0.50413173", "0.5038139", "0.50363714" ]
0.5221963
71
set multiple values to be replaced
public function set_many($replaces) { foreach ($replaces as $key => $value) { $this->values[$this->block][$key] = $value; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setValues($values = []);", "public function setValues($values);", "public function replace(array $values = []): void\n {\n\t\t$this->values = $values;\n\t}", "public function assignValues($values=[]) {\n }", "public function setValues($values)\n {\n foreach ($this->entities as $entity) \n {\n $entity->setValues($values);\n }\n }", "public function setValues(array $values);", "function setInputValues( array $values );", "public function setAll($values)\r\n {\r\n foreach ($values as $key => $value)\r\n $this->$key = $value;\r\n }", "public function setValues($values){\n\t\tif(!is_array($values)) return;\n\t\t\n\t\tforeach($values as $field_name => $value){\n\t\t\tif(isset($this->Fields[$field_name])){\n\t\t\t\t$this->Fields[$field_name]->value = $value;\n\t\t\t}\n\t\t}\n\t}", "function setValueByArray($a_values)\n\t{\n\t\t$this->setValue($a_values[$this->getPostVar()]);\n\t\tforeach($this->getOptions() as $option)\n\t\t{\n\t\t\tforeach($option->getSubItems() as $item)\n\t\t\t{\n\t\t\t\t$item->setValueByArray($a_values);\n\t\t\t}\n\t\t}\n\t}", "public function replace(array $data);", "public function setValues(array $values): void\n {\n $this->values = array_map(function ($value) {\n return ChunkRecommendationsValue::constructFromArray(['value' => $value]);\n }, $values);\n }", "function setValueByArray($a_values)\n\t{\n\t\t$this->setValue($a_values[$this->getPostVar()]);\n\t}", "public function replace($items);", "function setValues($list) {\n global $params;\n if (count($list)) {\n\tforeach ($list as $k=>$v) {\n\t $params[$k] = $v;\n\t}\n }\n}", "public function replace(array $values = [])/*# : ReplaceStatementInterface */;", "protected function replaceValues()\n {\n foreach($this->formulasValue as $key=>$fvalue) \n {\n //$fvalue['value']=mb_strtoupper($fvalue['value'], 'utf-8');\n preg_match_all('/\\{([^}]+)\\}/', $fvalue['value'], $matches);\n foreach($this->sizeList as $size) \n {\n $this->replacement=array();\n //$stag=mb_strtoupper($size.'_'.substr(substr($fvalue['tag'],0,-1),1), 'utf-8');\n $stag=$size.'_'.substr(substr($fvalue['tag'],0,-1),1);\n foreach($matches[1] as $match) \n {\n //$match=mb_strtoupper($match, 'utf-8');\n if(isset($this->itemProperties[$size . '_' . $match])) \n $this->replacement[$size . '_' . $match]=$this->itemProperties[$size . '_' . $match];\n elseIf(isset($this->clientProperties[$match]))\n $this->replacement[$match]=$this->clientProperties[$match];\n elseIf(isset($this->resultArray[$size . '_' . $match]))\n $this->replacement[$size . '_' . $match]=$this->resultArray[$size . '_' . $match];\n else \n $this->errorReplacements[$size . '_' . $match]=$size . '_' . $match;\n }\n \n \n// echo 'errorReplacements START';\n// Helper::myPrint_r($this->errorReplacements);\n// echo 'errorReplacements END';\n //calculates the equitation. But it should not be called unless all the values are replaced\n $matches[0]=array_unique($matches[0]);\n $matches[1]=array_unique($matches[1]);\n// echo 'STAG: ' . $stag . \"<br />\";\n// echo 'Fvalue: ' . $fvalue['value'] . \"<br />\";\n// if($matches[1][0]=='РПЛ')\n// echo 'Yes РПЛ' . '<br />';\n if((isset($matches[1][1])) && $matches[1][1]=='РПЛИ') {\n// echo 'Yes РПЛИ' . '<br />'; \n// echo 'value:' . $this->replacement[$size . '_РПЛИ'];\n// \n// echo \"<br />\";\n// echo str_replace($matches[0], $this->replacement, $fvalue['value']);\n// echo \"<br />\";\n \n // foreach($matches[0] as $m)\n// {\n// echo 'ttt';\n// echo \"<br />\";\n// echo \"<br />\";\n //echo preg_replace('/'.$m.'/', 777, $fvalue['value']);\n// echo str_replace($matches[0], 777, $fvalue['value']);\n// echo \"<br />\";\n// }\n \n\n //$exp=preg_replace($matches[0], $this->replacement, $fvalue['value']);\n $exp=str_replace($matches[0], $this->replacement, $fvalue['value']);\n //echo 'ERROR COUNT: ' . count($this->errorReplacements) . '<br />';\n \n// if(count($this->errorReplacements) > 0) {\n// echo CJavaScript::encode($this->itemId);\n// Yii::app()->end();\n// }\n \n \n $this->resultArray[$stag]=(count($this->errorReplacements) > 0) \n ? str_replace($exp)\n : $this->calculate($exp);\n \n } else\n {\n $this->resultArray[$stag]=(count($this->errorReplacements) > 0) \n ? str_replace($matches[0], $this->replacement, $fvalue['value'])\n : $this->calculate(str_replace($matches[0], $this->replacement, $fvalue['value'])); \n }\n \n \n //echo '<br />' . \"STAG:\" . $this->resultArray[$stag] . '<br />';\n\n \n //preg_replace($matches[0], $this->replacement, $fvalue['value'])\n //str_replace($matches[0], $this->replacement, $fvalue['value'])\n\n// Helper::myPrint_r($matches[0]);\n// Helper::myPrint_r($matches[1]);\n// Helper::myPrint_r($this->replacement); \n// echo 'fvalue' . $fvalue['value'] . '<br />';\n// echo 'val: ' . preg_replace($matches[0], $this->replacement, $fvalue['value']). '<br />';\n// echo 'val: ' . str_replace($matches[1], $this->replacement, $fvalue['value']). '<br />';\n// echo '--------------------<br />'; \n }\n }\n //if formulas dependency order was not observed\n //$this->checkReplaceValues();\n \n// Helper::myPrint_r($this->clientProperties);\n// Helper::myPrint_r($this->itemProperties);\n// Helper::myPrint_r($this->rangeProperties);\n// Helper::myPrint_r($this->formulasValue);\n// Helper::myPrint_r($this->resultArray,true);\n\n }", "public function setValues(array $values) {\n $this->_values = $values;\n $allowedValues = array();\n foreach ($values as $index => $group) {\n $groupValues = array_keys(isset($group['options']) ? $group['options'] : $group);\n $allowedValues = array_merge($allowedValues, $groupValues);\n }\n $this->setFilter(new PapayaFilterList($allowedValues));\n }", "private function setValues($values)\n {\n //echo \"<pre>\";\n //print_r($values);\n //echo \"</pre>\";\n foreach ($values as $field => $value) {\n $this->$field = $value;\n }\n\n //echo \"<pre>\";\n //print_r($this);\n //echo \"</pre>\";\n //die();\n\n }", "public function set_values( $values = array() ) {\n\t\t\n\t\t$this->values = $values;\n\t\t\n\t}", "public function setValues($values)\n {\n $this->values = $values;\n }", "public function setValues($values) {\n $this->values = $values;\n }", "public function setItems(array $items)\n {\n static $map;\n\n if (!$map) {\n $map = $this->getMatchingNames();\n }\n\n foreach ($items as $key => $value) {\n if (isset($map[$key])) {\n $this->item[$map[$key]] = strtr($value, ',', '|');\n }\n }\n }", "public function setMultiple($values) : bool;", "public function setValue($entries) {}", "public function bulkSet(array $args = array()) {\n foreach ($args as $argName => $arg) {\n $this->__set($argName, $arg);\n }\n }", "function setValues($list) {\n global $params;\n if ( count($list )) {\n foreach ($list as $k => $v ) {\n $params[$k] = $v;\n }\n }\n}", "public function setAll($values) {\n\t\tif (isset($values[self::$primaryKey[$this->table]])) {\n\t\t\t$this->originalData = $values;\n\t\t}\n\t\telse {\n\t\t\t$this->modifiedData = $values;\n\t\t}\n\t}", "private function setValues()\n {\n foreach($this->data as $type => $values)\n if(!preg_match('/(library)/i', $type))\n foreach($values as $key => $value)\n $this->{strtolower($type)}[$key] = $value;\n }", "protected function _setFieldValues($values) {\n foreach ($this->getElements() as $key => $element) {\n if (count(explode('_', $key)) == 3) {\n list($parent_id, $option_id, $field_id) = explode('_', $key);\n if (isset($values[$field_id])) {\n $element->setValue($values[$field_id]);\n }\n }\n }\n }", "public function substitute( array $substitute );", "function setValues($array){\r\n\t\tforeach($array as $key => $val){\r\n\t\t\t$key = lcfirst(str_replace(\" \",\"\",ucwords(str_replace(\"_\",\" \",$key))));\r\n\t\t\tif(property_exists($this,$key))\r\n\t\t\t\t$this->$key = $val;\r\n\t\t}\r\n\t}", "function setValues($array){\r\n\t\tforeach($array as $key => $val){\r\n\t\t\t$key = lcfirst(str_replace(\" \",\"\",ucwords(str_replace(\"_\",\" \",$key))));\r\n\t\t\tif(property_exists($this,$key))\r\n\t\t\t\t$this->$key = $val;\r\n\t\t}\r\n\t}", "public function setItems(array $items) {\n static $map;\n\n if (!$map) {\n $map = $this->getMachinNames();\n }\n\n foreach ($items as $key => $value) {\n if (isset($map[$key])) {\n $this->item[$map[$key]] = strtr($value, ',', '|');\n }\n }\n }", "public function setValues(array $values, $caseSensitive = false)\n\t{\n\t\tif (!is_bool($caseSensitive))\n\t\t{\n\t\t\tthrow new InvalidArgumentException('Argument 2 passed to ' . __METHOD__ . ' must be a boolean');\n\t\t}\n\n\t\t// Create a regexp based on the list of allowed values\n\t\t$regexp = RegexpBuilder::fromList($values, ['delimiter' => '/']);\n\t\t$regexp = '/^' . $regexp . '$/D';\n\n\t\t// Add the case-insensitive flag if applicable\n\t\tif (!$caseSensitive)\n\t\t{\n\t\t\t$regexp .= 'i';\n\t\t}\n\n\t\t// Add the Unicode flag if the regexp isn't purely ASCII\n\t\tif (!preg_match('#^[[:ascii:]]*$#D', $regexp))\n\t\t{\n\t\t\t$regexp .= 'u';\n\t\t}\n\n\t\t// Set the regexp associated with this list of values\n\t\t$this->setRegexp($regexp);\n\t}", "public function setValues(array $values): void\n {\n $this->values = $values;\n }", "public function setParts(array $values) {\n\n // add slashes to all semicolons and commas in the single values\n $values = array_map(\n function($val) {\n return strtr($val, array(',' => '\\,', ';' => '\\;'));\n }, $values);\n\n $this->setValue(\n implode($this->getDelimiter(), $values)\n );\n\n }", "abstract public function set();", "function setValueByArray($a_values)\n\t{\n\t\t$this->setLatitude($a_values[$this->getPostVar()][\"latitude\"]);\n\t\t$this->setLongitude($a_values[$this->getPostVar()][\"longitude\"]);\n\t\t$this->setZoom($a_values[$this->getPostVar()][\"zoom\"]);\n\t}", "public function setParamsValuesFromRegex(array $values) : self\n {\n\n foreach ($values as $order => $valueInDeep) {\n $this->params[$order]['value'] = $valueInDeep[0];\n }\n\n return $this;\n }", "public function setAll($args = [], $reassign = false);", "private function assignValues() {\n $this->setIndicators('value');\n\n $leftIndicator = $this->sugarTemplateIndicators['valueLeft'] . $this->sugarTemplateIndicators['valueSeparator'];\n $rightIndicator = $this->sugarTemplateIndicators['valueSeparator'] . $this->sugarTemplateIndicators['valueRight'];\n\n foreach ($this->assignedValues as $tag => $value) {\n $this->rootContent = str_replace($leftIndicator . $tag . $rightIndicator, $value, $this->rootContent);\n }\n }", "public function fill($values = []) {\n foreach ($values as $key => $value) {\n $key = explode('_', $key);\n if (count($key) > 1 && end($key) === 'id') {\n array_pop($key);\n }\n $key = array_values($key);\n for ($i = 0; $i < count($key); $i++) {\n $key[$i] = ucfirst($key[$i]);\n }\n $key = implode('', $key);\n $func = 'set' . $key;\n if (method_exists($this, $func)) {\n $this->$func($value);\n }\n }\n $this->afterFill();\n }", "public function setInputValues(&$values, $load = false);", "public function setValues(){\n if($this->getType() == \"var\"){\n $this->setValue($this->getArg());\n }else if($this->getType() == \"int\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"bool\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"string\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"nil\"){\n $pos = strpos($this->getArg(), \"@\");\n $this->setValue(substr($this->getArg(), $pos+1));\n }else if($this->getType() == \"label\"){\n $this->setValue($this->getArg());\n }else if($this->getType() == \"type\"){\n $this->setValue($this->getArg());\n }else{\n $this->setValue(\"CHYBA\");\n }\n }", "public function set()\n {\n $args = func_get_args();\n $num = func_num_args();\n if ($num == 2) {\n self::$data[$args[0]] = $args[1];\n } else {\n if (is_array($args[0])) {\n foreach ($args[0] as $k => $v) {\n self::$data[$k] = $v;\n }\n }\n }\n }", "public function setValues($values)\n {\n foreach ($values as $field => $value)\n {\n if (isset($this->properties[$field])) {\n /** @var Property $this->$field */\n $this->$field->set($value);\n }\n }\n }", "public function setValues(array $values): void\n {\n foreach ($this->getInputNames() as $name) {\n if (array_key_exists($name, $values)) {\n $this->$name = $values[$name];\n }\n }\n }", "public function set(string $name, $values, bool $shouldReplace = true)\n {\n $name = $this->normalizeName($name);\n $values = (array)$values;\n\n if ($shouldReplace || !$this->has($name)) {\n parent::set($name, $values);\n } else {\n parent::set($name, array_merge($this->values[$name], $values));\n }\n }", "public function setValues($valueCollection) {\n\n foreach ($valueCollection as $key => $value) {\n if (isset($this[$key])) {\n $this[$key]->setValue($value);\n } //if\n } //foreach\n \n }", "public function substituteRealValues()\n {\n $this->realValues = true;\n }", "public function setMulti(array $values, $expiry = 0) {}", "public function fill($new_values): void\n {\n foreach ($this->data['fields'] as $field_name => &$field_value) {\n if (key_exists($field_name, $new_values)) {\n $field_value['value'] = $new_values[$field_name];\n }\n }\n }", "public function setAllowedValues($values);", "abstract protected function reset_values();", "public function setFromArray(array &$_data);", "function setMultiple($properties) {\n foreach ($properties as $property => $value) {\n $this->set($property, $value);\n }\n }", "public function replaceValues($contents)\n {\n return str_replace(\n array_keys($this->values),\n array_values($this->values),\n $contents\n );\n }", "public function setMulti($list = array()) {\n foreach($list as $array) {\n $this->set($array[0], isset($array[1]) ? $array[1] : 300, isset($array[2]) ? $array[2] : array());\n }\n }", "public function update($listOfValue);", "function set($keys, $data) {\n\n $SET = array();\n\n foreach ($keys as $key) {\n $index = $key;\n $value = $data[$key];\n $SET[] = \"`$index` = '\" . str_replace(\"'\", \"\\'\", $value) . \"'\";\n }\n\n return implode(', ', $SET);\n}", "public function setValues(array $values) {\n $this->data = $values;\n }", "public function setValues(array $values, bool $forceQuote = false): self\n {\n foreach ($values as $key => $value) {\n $this->set($key, $value, $forceQuote);\n }\n\n return $this;\n }", "public function set($values, $alias = FALSE, $original = FALSE)\n\t{\n\t\t$meta = $this->meta();\n\t\t\n\t\t// Accept set('name', 'value');\n\t\tif (!is_array($values))\n\t\t{\n\t\t\t$values = array($values => $alias);\n\t\t\t$alias = FALSE;\n\t\t}\n\t\t\n\t\t// Determine where to write the data to, changed or original\n\t\tif ($original)\n\t\t{\n\t\t\t$data_location =& $this->_original;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data_location =& $this->_changed;\n\t\t}\n\n\t\t// Why this way? Because it allows the model to have \n\t\t// multiple fields that are based on the same column\n\t\tforeach($values as $key => $value)\n\t\t{\n\t\t\t// Key is coming from a with statement\n\t\t\tif (substr($key, 0, 1) === ':')\n\t\t\t{\n\t\t\t\t$targets = explode(':', ltrim($key, ':'), 2);\n\t\t\t\t\n\t\t\t\t// Alias as it comes back in, which allows people to use with()\n\t\t\t\t// with alaised field names\n\t\t\t\t$relationship = $this->field(array_shift($targets), TRUE);\n\t\t\t\t\t\t\t\t\n\t\t\t\tif (!array_key_exists($relationship, $this->_with_values))\n\t\t\t\t{\n\t\t\t\t\t$this->_with_values[$relationship] = array();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->_with_values[$relationship][implode(':', $targets)] = $value;\n\t\t\t}\n\t\t\t// Key is coming from a database result\n\t\t\telse if ($alias === TRUE && !empty($meta->columns[$key]))\n\t\t\t{\n\t\t\t\t// Contains an array of fields that the column is mapped to\n\t\t\t\t// This allows multiple fields to get data from the same column\n\t\t\t\tforeach ($meta->columns[$key] as $field)\n\t\t\t\t{\n\t\t\t\t\t$data_location[$field] = $meta->fields[$field]->set($value);\n\t\t\t\t\t\n\t\t\t\t\t// Invalidate the cache\n\t\t\t\t\tif (array_key_exists($field, $this->_retrieved))\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($this->_retrieved[$field]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Standard setting of a field \n\t\t\telse if ($alias === FALSE && $field = $this->field($key))\n\t {\n\t\t\t\t$value = $field->set($value);\n\t\t\t\t\n\t\t\t\t// Ensure value has actually changed\n\t\t\t\tif ($field->in_db && $value == $this->_original[$field->name])\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$data_location[$field->name] = $value;\n\n\t\t\t\t// Invalidate the cache\n\t\t\t\tif (array_key_exists($field->name, $this->_retrieved))\n\t\t\t\t{\n\t\t\t\t\tunset($this->_retrieved[$field->name]);\n\t\t\t\t}\n \t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->_unmapped[$key] = $value;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "public function setValues($item,$values) {\n\t\tif (array_key_exists($item,$this->_properties)) {\n\t\t\t$this->_properties[$item]['values']=$val;\n\t\t}\n\t}", "public static function setters();", "public function setValuesOption($values)\n {\n $this->values = $values;\n }", "public function modifyValue($value, array $arguments);", "function setValues($array){\r\n\t\tforeach($array as $key => $val)\r\n\t\t\tif(property_exists($this,$key))\r\n\t\t\t\t$this->$key = $val;\r\n\t}", "public function setValue( array $values ) {\n\t\t\t$this->value = $values;\n\t\t}", "public function setSelectedValues($values);", "function setValueList($valueList) {\n if ($valueList !== ($oldValueList = $this->valueList)) {\n $this->valueList = $valueList;\n }\n }", "private function searchAndReplace()\n {\n foreach ($this->objWorksheet->getRowIterator() as $row)\n\t\t{\n\t\t\t$cellIterator = $row->getCellIterator();\n\t\t\tforeach ($cellIterator as $cell)\n\t\t\t{\n\t\t\t\t$cell->setValue(str_replace($this->_search, $this->_replace, $cell->getValue()));\n\t\t\t}\n\t\t}\n }", "function setVariables($value) {\n \tif(is_array($value)) {\n \t return parent::setVariables(implode(\"\\n\", $value));\n \t} else {\n \t return parent::setVariables($value);\n \t} // if\n }", "public function setSubstitutions($subst)\n\t{\n\t\t$this->vars['substitution_data'] = $subst;\n\t}", "public function setValue($values = array())\n\t{\n\t\treturn $this->setTags($values);\n\t}", "public function setData(array $values): self\n\t{\n\t\t$this->valueMap = $values;\n\t\treturn $this;\n\t}", "function set(array $data) {\n\t\tforeach ($data as $key => $value) {\n\t\t\t$this->$key = $value;\n\t\t}\n\t}", "function setValueByArray($a_values)\r\n\t{\r\n\t\tglobal $ilUser;\r\n\t\t\r\n\t\t$this->setAllValue($a_values[$this->getPostVar()][\"all\"][\"num_value\"].\r\n\t\t\t$a_values[$this->getPostVar()][\"all\"][\"num_unit\"]);\r\n\t\t$this->setBottomValue($a_values[$this->getPostVar()][\"bottom\"][\"num_value\"].\r\n\t\t\t$a_values[$this->getPostVar()][\"bottom\"][\"num_unit\"]);\r\n\t\t$this->setTopValue($a_values[$this->getPostVar()][\"top\"][\"num_value\"].\r\n\t\t\t$a_values[$this->getPostVar()][\"top\"][\"num_unit\"]);\r\n\t\t$this->setLeftValue($a_values[$this->getPostVar()][\"left\"][\"num_value\"].\r\n\t\t\t$a_values[$this->getPostVar()][\"left\"][\"num_unit\"]);\r\n\t\t$this->setRightValue($a_values[$this->getPostVar()][\"right\"][\"num_value\"].\r\n\t\t\t$a_values[$this->getPostVar()][\"right\"][\"num_unit\"]);\r\n\t}", "function translate_replace($params){\n $string = array_shift($params);\n foreach ($params as $value){\n $replace[] = $value;\n }\n return XT::translate_replace($string, $replace);\n}", "public function setAssignments(AssignmentExpression ...$assignments): void;", "public function setValueByArray($a_values)\n\t{\t\t\n\t\t$incoming = $a_values[$this->getPostVar()];\t\t\t\t\n\t\tif(is_array($incoming))\n\t\t{\n\t\t\t$format = $this->getDatePickerTimeFormat();\n\t\t\t$this->setStart(ilCalendarUtil::parseIncomingDate($incoming[\"start\"], $format));\n\t\t\t$this->setEnd(ilCalendarUtil::parseIncomingDate($incoming[\"end\"], $format));\n\t\t}\n\t\t\n\t\tforeach($this->getSubItems() as $item)\n\t\t{\n\t\t\t$item->setValueByArray($a_values);\n\t\t}\n\t}", "public function setFromExternalValues(array $externalValues): void\n\t{\n\t\tforeach ($this->getExternalizableFieldNames() as $commonFieldName)\n\t\t{\n\t\t\tif (isset($externalValues[$commonFieldName]))\n\t\t\t{\n\t\t\t\t$this->set($commonFieldName, $externalValues[$commonFieldName]);\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "abstract protected function alter_set($name,$value);", "public function setFromArray(array $data);", "public function add_values($values) : void\n {\n foreach($values as $value){\n $this -> add_value($value);\n }\n }", "public function setPossibleMatches($sql_value_list)\r\n {\r\n if(!$this->isSQLValueList($sql_value_list)){\r\n $this->sql_value_list = new SQLValueList();\r\n $this->sql_value_list->add($sql_value_list);\r\n }\r\n else{\r\n $this->sql_value_list = $sql_value_list;\r\n }\r\n\r\n }", "public function set_fields($data)\n\t{\n\t\tforeach ($data as $key => $value)\n\t\t{\n\t\t\tif (isset($this->aliases[$key]))\n\t\t\t\t$key = $this->aliases[$key];\n\n\t\t\tif (array_key_exists($key, $this->data))\n\t\t\t\t$this->data[$key] = $value;\n\t\t}\n\t}", "protected function _compile_set(array $values)\n {\n //print_r($values);\n $quote = array($this, 'quote_value');\n\n $set = array();\n foreach ($values as $group)\n {\n // Split the set\n list($column, $value) = $group;\n\n if (is_string($value) AND array_key_exists($value, $this->_parameters))\n {\n // Use the parameter value\n $value = $this->_parameters[$value];\n }\n\n $value = $this->quote_value(array($value, $column));\n $column = $this->quote_identifier($column);\n\n // Quote the column name\n $set[$column] = $column.' = '.$value;\n }\n\n return implode(', ', $set);\n }", "public function bind(array $values) {\n foreach ($this->elements as $element) {\n if (array_key_exists($element->getName(), $values)) {\n $element->setFilteredValue($values[$element->getName()]);\n }\n }\n }", "public function add_values($values){\n foreach($values as $value){\n $this->add_value($value);\n }\n }", "function acf_update_values($values = array(), $post_id = 0)\n{\n}", "public function replace(array $values)\n {\n $this->values = array_replace_recursive($this->values, $values);\n\n return $this;\n }", "public function merge(array $values)\n {\n $this->values = array_replace($this->values, $values);\n }", "public function setSpecials(array $arr): void {\n\t\t$this->m_specials = $arr;\n\t}", "public function setValues(array $_values=array()){\n foreach(($getElements=self::getElements()) as $key=>$items){\n $this->{$key}=(\n (isset($_values[self::getFormName()][$key]))\n ?$_values[self::getFormName()][$key]\n :NULL\n );\n $getElementsv[$key]->setValue($this->{$key});\n }\n }", "public function set($values, $forceIndividualSaves = false)\r\n {\r\n $this->cleanup();\r\n throw new Exception('This method is not yet implemented');\r\n }", "protected function applyReplace(): void {\n\t\t$entity_types = $this->getRegisteredEntityTypes();\n\t\t$tag_names = $this->getTagNames();\n\t\t$to_tag = $this->to_tag;\n\t\t\n\t\tif (empty($entity_types) || empty($tag_names) || elgg_is_empty($to_tag)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$batch = elgg_get_entities([\n\t\t\t'type_subtype_pairs' => $entity_types,\n\t\t\t'metadata_names' => $tag_names,\n\t\t\t'metadata_value' => $this->from_tag,\n\t\t\t'metadata_case_sensitive' => false,\n\t\t\t'limit' => false,\n\t\t\t'batch' => true,\n\t\t\t'batch_inc_offset' => false,\n\t\t]);\n\t\t\n\t\t/* @var $entity \\ElggEntity */\n\t\tforeach ($batch as $entity) {\n\t\t\t// check all tag fields\n\t\t\tforeach ($tag_names as $tag_name) {\n\t\t\t\t$value = $entity->$tag_name;\n\t\t\t\tif (elgg_is_empty($value)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!is_array($value)) {\n\t\t\t\t\t$value = [$value];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$found = false;\n\t\t\t\t$add = true;\n\t\t\t\t\n\t\t\t\tforeach ($value as $index => $v) {\n\t\t\t\t\tif (strtolower($v) === $this->from_tag) {\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\tunset($value[$index]);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($v === $to_tag) {\n\t\t\t\t\t\t// found replacement value, no need to add\n\t\t\t\t\t\t$add = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!$found) {\n\t\t\t\t\t// this field doesn't contain the original value\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// only add new value if doesn't already contain this\n\t\t\t\tif ($add) {\n\t\t\t\t\t$value[] = $to_tag;\n\t\t\t\t\t\n\t\t\t\t\tif (($tag_name === 'tags') && tag_tools_is_notification_entity($entity->guid)) {\n\t\t\t\t\t\t// set tag as notified\n\t\t\t\t\t\ttag_tools_add_sent_tags($entity, [$to_tag]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// store new value\n\t\t\t\t$entity->$tag_name = $value;\n\t\t\t\t\n\t\t\t\t// let system know entity has been updated\n\t\t\t\t$entity->save();\n\t\t\t}\n\t\t}\n\t}", "function dbSetVars() {\n\n foreach ($this->fields() as $f) {\n if ($this->$f === false) continue;\n $this->db->set($f,$this->$f);\n }\n\n }", "public function set($one, $two=null){\n\t\tif (is_array($one)) {\n\t\t\tif (is_array($two)) {\n\t\t\t\t$data = array_combine($one, $two);\n\t\t\t}else{\n\t\t\t\t$data = $one;\n\t\t\t}\n\t\t}else{\n\t\t\t$data = array($one=>$two);\n\t\t}\n\n\t\t$this->_view->setVars($data);\n\n\t}" ]
[ "0.67728907", "0.6759351", "0.6603161", "0.64762175", "0.64360225", "0.63805115", "0.6378056", "0.6340752", "0.63164806", "0.62891155", "0.62593466", "0.6239974", "0.6231123", "0.62022156", "0.6181872", "0.6173142", "0.61052203", "0.6094056", "0.60896146", "0.6050574", "0.6020289", "0.5976415", "0.5970599", "0.5967575", "0.59541047", "0.5945603", "0.5935832", "0.5901397", "0.58990586", "0.58826256", "0.58822215", "0.58774436", "0.58774436", "0.58772796", "0.5849377", "0.58454454", "0.5837883", "0.58182275", "0.58087206", "0.58049697", "0.5799566", "0.57859087", "0.576605", "0.57353675", "0.57352436", "0.57317805", "0.572757", "0.5717352", "0.5714994", "0.57104015", "0.5702374", "0.5672455", "0.56676584", "0.56512386", "0.56446946", "0.56119025", "0.5601629", "0.55895144", "0.55857205", "0.5580797", "0.5571425", "0.55633795", "0.55590343", "0.5543657", "0.5532405", "0.5523897", "0.5521985", "0.55169106", "0.5506509", "0.54960984", "0.54687744", "0.545504", "0.54433316", "0.54409564", "0.5439646", "0.54335207", "0.54304844", "0.5420751", "0.5418012", "0.5411841", "0.54089475", "0.5407518", "0.5406897", "0.54016906", "0.54001576", "0.5398142", "0.53948295", "0.5390828", "0.53906184", "0.5388193", "0.5377414", "0.5372035", "0.5364979", "0.5360038", "0.53588325", "0.53584385", "0.5355804", "0.5350594", "0.53475225", "0.5347058" ]
0.7323282
0
set a value for a tag to be replaced in a previous block
public function set_previous($key, $value, $block) { $this->values[$block][$key] = $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function do_tags()\n\t{\n\t\tforeach ($this->values as $id => $block)\n\t\t{\n\t\t\tforeach ($block as $name => $replace)\n\t\t\t{\n\t\t\t\t$find = \"{:$name}\";\n\t\t\t\t$this->merged[$id] = str_replace($find, $replace, $this->merged[$id]);\n\t\t\t}\n\t\t}\n\n\t}", "final public function set($tag, $content) {\n $this->template = str_replace(\"{\".$tag.\"}\", $content, $this->template);\n }", "function block_plugin_my_block_save($block) {\n variable_set($block['delta'], $block['my_custom_field']);\n}", "public function setTag($value)\n {\n if ($value !== null) {\n $this->_params['tag'] = $value;\n } else {\n unset($this->_params['tag']);\n }\n }", "public function addTagToPostInTheMiddle() {}", "function setTag($name, $value) {\n if( is_array($name)) {\n foreach( $name as $n => $v) {\n $this -> $n = $v ;\n }\n } else {\n $this -> $name = $value ;\n }\n }", "private function assignValues() {\n $this->setIndicators('value');\n\n $leftIndicator = $this->sugarTemplateIndicators['valueLeft'] . $this->sugarTemplateIndicators['valueSeparator'];\n $rightIndicator = $this->sugarTemplateIndicators['valueSeparator'] . $this->sugarTemplateIndicators['valueRight'];\n\n foreach ($this->assignedValues as $tag => $value) {\n $this->rootContent = str_replace($leftIndicator . $tag . $rightIndicator, $value, $this->rootContent);\n }\n }", "function setLabelTag($key, $tag, $value) \n {\n\n // if desired [KEY] exists then\n if ( array_key_exists($key, $this->labels) ) {\n\n // if desired [LANGUAGEID] exists \n if (array_key_exists($this->languageID, $this->labels[ $key ] ) ) {\n \n // update label\n $labelData = $this->labels[ $key ][ $this->languageID ];\n $this->labels[ $key ][ $this->languageID ] = str_replace($tag, $value, $labelData);\n \n } else {\n // else \n \n // update label in 1st avaialble language\n $labelData = current( $this->labels[ $key ] );\n $langID = key( $this->labels[$key] ); // Oh, Johnny, you forgot this line, 90 minutes of debugging == free lunch for me!\n/*echo 'Debugging Multilingual Manaer (line 396).<br><br>Case is key matches but requested language not available ... on a tag update<br><br>';\necho 'labelData = [';\nvar_export($labelData);\necho ']<br><br>';\necho 'this->labels[] = [';\nvar_export($this->labels[ $key ]);\necho ']<br><br>';\nexit;*/\n $this->labels[$key][$langID] = str_replace($tag, $value, $labelData);\n \n } // end if\n \n } \n\n }", "private function record_tag($tag)\n {\n if (isset($this->tags[$tag . 'count'])) { //check for the existence of this tag type\n $this->tags[$tag . 'count']++;\n $this->tags[$tag . $this->tags[$tag . 'count']] = $this->indent_level; //and record the present indent level\n } else { //otherwise initialize this tag type\n $this->tags[$tag . 'count'] = 1;\n $this->tags[$tag . $this->tags[$tag . 'count']] = $this->indent_level; //and record the present indent level\n }\n $this->tags[$tag . $this->tags[$tag . 'count'] . 'parent'] = $this->tags['parent']; //set the parent (i.e. in the case of a div this.tags.div1parent)\n $this->tags['parent'] = $tag . $this->tags[$tag . 'count']; //and make this the current parent (i.e. in the case of a div 'div1')\n }", "public function setValue($_name=NULL, $_value=NULL){\n $getElements=self::getElements();\n if(\n $_name !== NULL &&\n isset($getElements[$_name]) &&\n $getElements[$_name] instanceof Dadiweb_Tags_Abstract\n ){\n $this->{$_name}=(\n (isset($_value))\n ?$_value\n :NULL\n );\n $getElements[$_name]->setValue($this->{$_name});\n }\n }", "public function setTags($value)\n {\n if (!array_key_exists('tags', $this->fieldsModified)) {\n $this->fieldsModified['tags'] = $this->data['fields']['tags'];\n } elseif ($value === $this->fieldsModified['tags']) {\n unset($this->fieldsModified['tags']);\n }\n\n $this->data['fields']['tags'] = $value;\n }", "private function replaceTag(&$text, $newContent, $competitionId) {\n $text = preg_replace('/{hapodi id=\"'.$competitionId .'\"}/s', $newContent, $text);\n }", "function setAdditionalProductTag($key, $value)\n {\n $this->_tag_value_cache = array();\n $this->_fAdditionalTagList[$key] = $value;\n }", "public function prependToRegion($tag, $content)\n\t{\n\t\tif(!isset($this->regions['tag']))\n\t\t\t$this->regions[$tag] = '';\n\n\t\t$this->regions[$tag] = $content . $this->regions[$tag];\n\t}", "protected function setUp()\n\t{\n\t\tif (isset($this->configurator->tags[$this->tagName]))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Create tag\n\t\t$tag = $this->configurator->tags->add($this->tagName);\n\n\t\t// Create attribute\n\t\t$tag->attributes->add($this->attrName);\n\n\t\t// Create a template that replaces its content with the replacement chat\n\t\t$tag->template\n\t\t\t= '<xsl:value-of select=\"@' . htmlspecialchars($this->attrName) . '\"/>';\n\t}", "public function set($n,$v){\n\t\t$this->Template->set($n, $v);\n\t}", "public function setTag($value)\n {\n return $this->set('Tag', $value);\n }", "public function setTag($value)\n {\n return $this->set('Tag', $value);\n }", "public function setTag($value)\n {\n return $this->set('Tag', $value);\n }", "public function setTag($value)\n {\n return $this->set('Tag', $value);\n }", "public function setTag($value)\n {\n return $this->set('Tag', $value);\n }", "public function setCurrHyperlink($tag)\n {\n $this->currHyperlink = $tag;\n }", "public function setTag($value, $searchById)\n\t{\n\t\t$this->primarySearchData[$this->ref_tag][$this->ref_value] = $value;\n\t\t$this->primarySearchData[$this->ref_tag][$this->ref_searchById] = $searchById;\n\t}", "public function appendValue($value) {\n $this->current->value($value);\n }", "function set($key, $value)\n {\n $this->content = str_replace('${'.$key.'}', $value, $this->content);\t\n }", "public function resetTagDetail() {\n\t\t$this->content_tag_detail = null;\n\t}", "function textblock_template_replace(&$textblock, $replace)\n{\n foreach ($replace as $key => $value) {\n $textblock['title'] = str_replace(\"%$key%\", $value, $textblock['title']);\n $textblock['text'] = str_replace(\"%$key%\", $value, $textblock['text']);\n }\n}", "public function replaceValue(&$node, $name, $value) {\n\t\t$domElement = $this->getChildNode($node, $name);\n\t\tif (!is_null($domElement)) {\n\t\t\t$node->removeChild($domElement);\n\t\t\t$this->setValue($node, $value, $name, true);\n\t\t}\n\t}", "public function setEtag(string $value): void\n {\n $this->etag = '\"'.$value.'\"';\n }", "public\n\tfunction setTagLabel(string $newTagLabel) {\n\t\tif($newTagLabel === null) {\n\t\t\t$this->tagLabel = $newTagLabel;\n\t\t}\n\t}", "function bub_simple_replace($src_block, $target_html) {\n return $target_html;\n}", "function _tag_close( $parser, $tag )\n {\n $this->curtag = &$this->curtag->parent;\n }", "function set($name, $value)\n {\n $this->_template->set($name, $value);\n }", "public function set($namespace, $tagName, $value) {}", "public function attachTagToPostAtTheEnd() {}", "function startTag($parser, $data){\n global $currentTag;\n $currentTag = $data;\n}", "function tagReset () {\n if (is_object($this->tptPointer)) \n $this->say($this->tptPointer->templateReset());\n }", "protected function setElementContent($node, $value)\n\t{\n\t\tif ($node->tagName == 'input') {\n\t\t\t$node->setAttribute('value', $value);\n\t\t} else if ($node->tagName == 'img') {\n\t\t\t$node->setAttribute('src', $value);\n\t\t} else if ($node->tagName == 'a') {\n\t\t\t$node->setAttribute('href', $value);\n\t\t} else if ($node->tagName == 'meta') {\n\t\t\t$node->setAttribute('content', $value);\n\t\t} else {\n\t\t\t$node->nodeValue = htmlentities($value);\n\t\t}\n\t}", "public function moveTagFromEndToTheMiddle() {}", "public function setHtmlBefore($string);", "public function setContent($value)\n {\n if (!array_key_exists('content', $this->fieldsModified)) {\n $this->fieldsModified['content'] = $this->data['fields']['content'];\n } elseif ($value === $this->fieldsModified['content']) {\n unset($this->fieldsModified['content']);\n }\n\n $this->data['fields']['content'] = $value;\n }", "public static function setTag(string $name, string $value, bool $override = false): void\n {\n if (!isset(static::$tags[$name]) || $override) {\n static::$tags[$name] = new MetaTag($name, $value);\n } else {\n static::$tags[$name]->addValue($value);\n }\n }", "public function setFactoryTag(?string $value): void {\n $this->getBackingStore()->set('factoryTag', $value);\n }", "public function update_meta( $key, $value, $prev_value = '' );", "function update_tag( $tag_id, $tag_name = null, $tag_color = null, $tag_bg = null ) {\n $tag = E_Tag::set_instance( $tag_id, $tag_name, $tag_color, $tag_bg );\n return $tag;\n}", "function key_tag_frequence_update($data)\n\t {\n\t $this->Tag_process->tag_frequence_update($data);\n\t }", "public function setTags($newVal) {\n $this->tags = $newVal;\n }", "public function setElement($element, $content){\n \t$buffer = ob_get_contents();\n\t\tob_end_clean();\n\t\t$buffer=str_replace($element, $content, $buffer);\n\t\techo $buffer;\n\t}", "function set($name, $value){\n if($this->_HTML AND $this->_HTML_load_view) $this->_template->set($name, $value);\n elseif($this->_JSON){\n if($name == null){\n array_push($this->_JSON_contents, $value);\n }else{\n $this->_JSON_contents[$name] = $value;\n }\n }\n }", "public function setDataIntoTemplate($reference,$data) {\n\t$this->assign($reference,$data);\n }", "public function setCommentTags($value)\n {\n if (!array_key_exists('comment_tags', $this->fieldsModified)) {\n $this->fieldsModified['comment_tags'] = $this->data['fields']['comment_tags'];\n } elseif ($value === $this->fieldsModified['comment_tags']) {\n unset($this->fieldsModified['comment_tags']);\n }\n\n $this->data['fields']['comment_tags'] = $value;\n }", "public function autoTag()\n {\n $tags = Tag::string2array($this->tags);\n \n if(isset($this->name) && !empty($this->name)) {\n $tags[] = $this->name;\n }\n \n $tags[] = $this->arena->name;\n $tags[] = $this->ltype->display_name;\n \n $this->tags = Tag::array2string(array_unique($tags));\n }", "public static function blockAssign($title, $value) {\n\t\tself::block($title);\n\t\techo $value;\n\t\tself::blockEnd();\n\t}", "public function setValue2($value){\n $this->_value2 = $value;\n }", "function changeText($tagId, $content)\n{\n echo \"<script>document.getElementById(\\\"\" . $tagId . \"\\\").innerHTML = \\\"\" . $content . \"\\\";</script>\";\n}", "public function setTag($p)\n {\n // Check if not real tag => set it to null\n if ($p !== null && trim($p) !== \"\") {\n $this->appendCommandArgument(\"-r\");\n $this->appendCommandArgument($p);\n }\n }", "public function testReplaceTags()\n\t{\n\t\t$this->assertEquals('143',$this->obj->replace_tags('1{{2}}3', '', array(\"2\"=>\"4\")));\n\t\t$this->assertEquals('143',$this->obj->replace_tags('1{{args:2}}3', 'args', array(\"2\"=>\"4\")));\n\t\t$this->assertEquals('143$var',$this->obj->replace_tags('1{{args:2}}3$var', 'args', array(\"2\"=>\"4\")));\n\t}", "public function setBlockRule($opening_tag, $closing_tag)\n {\n $this->block['opening_tag'] = $opening_tag;\n $this->block['closing_tag'] = $closing_tag;\n }", "function setBlock($resource_name, $variable = NULL, $cache_id = null)\n\t{ \n if (strpos($resource_name, '.') === false) {\n\t\t\t$resource_name .= '.tpl';\n\t\t}\n \n if ($variable){\n $content = parent::fetch($theme.'/'.$resource_name, $cache_id);\n \n $this->_globals[$variable] = $content;\n \n parent::clear_all_assign();\n\n } else {\n\t\t\n\n return parent::fetch($resource_name, $cache_id);\n }\n\t}", "public function setBefore(string $content): HtmlElementInterface;", "function change_tags($str){\r\n\r\n\t\t\t$str=str_replace('#ID#',$this->id,$str);\r\n\t\t\t$str=str_replace('#PAGE#',$this->page,$str);\r\n\t\t\t$str=str_replace('#ITEMS_PER_PAGE#',$this->items_per_page,$str);\r\n\t\t\t$str=str_replace('#TOTAL_ITEMS#',$this->total_items,$str);\r\n\r\n\t\t\treturn $str;\r\n\r\n\t}", "function variant_set($variant, $value) {}", "function custom_bcn_template_tag($replacements, $type, $id)\n{\n if (in_array('post-products', $type)) {\n $short_title = get_field('short_title', $id);\n $replacements['%short_title%'] = ($short_title) ? $short_title : $replacements['%htitle%'];\n } else {\n $replacements['%short_title%'] = $replacements['%htitle%'];\n }\n return $replacements;\n}", "protected function remebmer_variable( $name, $value ){\n\t\tstatic::$instance->variables[$name] = $value;\n\t}", "protected function afterFind()\n {\n parent::afterFind();\n $this->_oldTags=$this->tags;\n }", "public function replace_meta_content($key, $parameters = array()){\n foreach($this->metatags as $tag_id=>$metatag){\n if(isset($metatag[$key]) && $metatag[$key] == $parameters[$key]){\n $this->metatags[$tag_id] = $parameters;\n }\n }\n }", "function setInnerXML($node,$xml) {\n\t\t$doc=$node->ownerDocument;\n\t\t$f = $doc->createDocumentFragment();\n\t\t$f->appendXML($xml);\n\t\t$node->parentNode->replaceChild($f,$node);\n\t}", "function HookIt($tag,$attr=\"\",$indenting=\"1\"){\n\t\t$this->clsTag($tag,$attr,$indenting);\n\t}", "protected function afterFind()\n\t{\n\t\tparent::afterFind();\n\t\t$this->_oldTags=$this->tags;\n\t}", "function replace($data, &$element, $c)\r\n \t{\r\n \t\treturn $data;\r\n \t}", "protected function storeRawBlock($value, Template $template) : string\n {\n return $this->rawPlaceHolder(array_push($template['rawBlocks'], $value) - 1);\n }", "abstract function setContent();", "function wp_replace_in_html_tags($haystack, $replace_pairs)\n {\n }", "function dbReplace()\n {\n $args = [\n 'id' => $this->id,\n 'parent' => $this->parent,\n 'lecture_id' => $this->lecture_id,\n 'type' => $this->type,\n 'title' => $this->title,\n 'mtitle' => $this->mtitle,\n 'text' => $this->text,\n 'position' => $this->position,\n 'redirect' => $this->redirect,\n 'lastmodified' => null,\n 'ival1' => $this->ival1\n ];\n dibi::query('REPLACE `section`', $args);\n $this->updateId();\n }", "public function setTag( $name, $ref = \"\", $rating = 0, $worst = 0, $best = 0 ) {\n\t\tif ( !empty( $name ) ) {\n\t\t\t$this->content = TRUE;\n\t\t\t$tag[\"name\"] = $name;\n\t\t\tif ( $this->validateRating( $rating, $worst, $best ) ) {\n\t\t\t\t$tag[\"rating\"] = $rating;\n\t\t\t\t$tag[\"worst\"] = $worst;\n\t\t\t\t$tag[\"best\"] = $best;\n\t\t\t}\n\t\t\tif ( preg_match( self::IRIRE, $ref ) ) {\n\t\t\t\t$tag[\"ref\"] = $ref;\n\t\t\t}\n\t\t\t$this->smoValues[\"complex\"][\"tags\"][] = $tag;\n\t\t}\n\t}", "public static function map($tag,$fullpath) {\n self::$snippets[$tag] = $fullpath;\n\t}", "function changeURL($tagId, $content)\n{\n echo \"<script>document.getElementById(\\\"\" . $tagId . \"\\\").setAttribute('href', \\\"\" . $content . \"\\\");</script>\";\n}", "function _tag_holding_add($name, $line)\n\t{\n\t\t$this->_tag_holding[] = array('name' => $name, 'line' => $line);\n\t}", "function gwt_drupal_process_block(&$variables, $hook) {\n // Drupal 7 should use a $title variable instead of $block->subject.\n $variables['title'] = isset($variables['block']->subject) ? $variables['block']->subject : '';\n}", "public function testEditWithNewTag() {\n $this->markTestIncomplete('Not implemented yet.');\n }", "function setRef($name, &$value) {\n $this->vars[$name] =& $value; //is_object($value) ? $value->fetch() : $value;\n }", "private function beforeAttributeValueState() {\n $this->char++;\n $char = $this->character($this->char);\n\n if(preg_match('/^[\\t\\n\\x0b\\x0c ]$/', $char)) {\n /* U+0009 CHARACTER TABULATION\n U+000A LINE FEED (LF)\n U+000B LINE TABULATION\n U+000C FORM FEED (FF)\n U+0020 SPACE\n Stay in the before attribute value state. */\n $this->state = 'beforeAttributeValue';\n\n } elseif($char === '\"') {\n /* U+0022 QUOTATION MARK (\")\n Switch to the attribute value (double-quoted) state. */\n $this->state = 'attributeValueDoubleQuoted';\n\n } elseif($char === '&') {\n /* U+0026 AMPERSAND (&)\n Switch to the attribute value (unquoted) state and reconsume\n this input character. */\n $this->char--;\n $this->state = 'attributeValueUnquoted';\n\n } elseif($char === '\\'') {\n /* U+0027 APOSTROPHE (')\n Switch to the attribute value (single-quoted) state. */\n $this->state = 'attributeValueSingleQuoted';\n\n } elseif($char === '>') {\n /* U+003E GREATER-THAN SIGN (>)\n Emit the current tag token. Switch to the data state. */\n $this->emitToken($this->token);\n $this->state = 'data';\n\n } else {\n /* Anything else\n Append the current input character to the current attribute's value.\n Switch to the attribute value (unquoted) state. */\n $last = count($this->token['attr']) - 1;\n $this->token['attr'][$last]['value'] .= $char;\n\n $this->state = 'attributeValueUnquoted';\n }\n }", "private function beforeAttributeValueState()\n {\n $this->char++;\n $char = $this->character($this->char);\n\n if (preg_match('/^[\\t\\n\\x0b\\x0c ]$/', $char)) {\n /* U+0009 CHARACTER TABULATION\n U+000A LINE FEED (LF)\n U+000B LINE TABULATION\n U+000C FORM FEED (FF)\n U+0020 SPACE\n Stay in the before attribute value state. */\n $this->state = 'beforeAttributeValue';\n\n } elseif ($char === '\"') {\n /* U+0022 QUOTATION MARK (\")\n Switch to the attribute value (double-quoted) state. */\n $this->state = 'attributeValueDoubleQuoted';\n\n } elseif ($char === '&') {\n /* U+0026 AMPERSAND (&)\n Switch to the attribute value (unquoted) state and reconsume\n this input character. */\n $this->char--;\n $this->state = 'attributeValueUnquoted';\n\n } elseif ($char === '\\'') {\n /* U+0027 APOSTROPHE (')\n Switch to the attribute value (single-quoted) state. */\n $this->state = 'attributeValueSingleQuoted';\n\n } elseif ($char === '>') {\n /* U+003E GREATER-THAN SIGN (>)\n Emit the current tag token. Switch to the data state. */\n $this->emitToken($this->token);\n $this->state = 'data';\n\n } else {\n /* Anything else\n Append the current input character to the current attribute's value.\n Switch to the attribute value (unquoted) state. */\n $last = count($this->token['attr']) - 1;\n $this->token['attr'][$last]['value'] .= $char;\n\n $this->state = 'attributeValueUnquoted';\n }\n }", "function addTag($line)\n{\n\t$elem = $this->parser->parseLine($line);\n\n\tif (isset($elem['after'])) {\n\t\t$this->elements = $this->insertAfter($this->elements, \n\t\t\tarray($elem['id'] => $elem), $elem['after']\n\t\t);\n\t}\n\telse {\n\t\t$this->elements[$elem['id']] = $elem;\n\t}\n}", "protected function afterFind()\n {\n parent::afterFind();\n $this->oldTags = $this->tags;\n }", "public function end() {\n\n $this->current = 0;\n\n // remove the suffix which was set by self::start()\n $suffixes = Zend_Registry::get(\"pimcore_tag_block_current\");\n array_pop($suffixes);\n Zend_Registry::set(\"pimcore_tag_block_current\", $suffixes);\n\n $this->outputEditmode(\"</div>\");\n }", "protected function add_dyntag($tag, $val)\r\n\t{\r\n\t\t$this->$tag = $val;\r\n\t}", "public function set_raw($tag, $value, $append = false)\n {\n $index = $append ? count($this->raw[$tag]) : 0;\n $this->raw[$tag][$index] = (array)$value;\n }", "public function set($name, $content)\n {\n $this->slots[$name] = $content;\n }", "public function setHtmlCache($value)\n {\n if (!array_key_exists('html_cache', $this->fieldsModified)) {\n $this->fieldsModified['html_cache'] = $this->data['fields']['html_cache'];\n } elseif ($value === $this->fieldsModified['html_cache']) {\n unset($this->fieldsModified['html_cache']);\n }\n\n $this->data['fields']['html_cache'] = $value;\n }", "public function replace_value($value)\n {\n if ( ! self::$assets_init)\n { \n // Assets library\n ee()->load->add_package_path(PATH_THIRD.'assets/');\n ee()->load->library('assets_lib');\n self::$assets_init = TRUE;\n }\n\n // get selected file url\n if ( ! empty($value))\n {\n // heavy lifting\n $file_row = ee()->assets_lib->get_file_row_by_id($value);\n $source = ee()->assets_lib->instantiate_source_type($file_row);\n $file = $source->get_file($value);\n\n if ($file instanceof Assets_base_file)\n {\n // get the file_url\n $value = $file->url();\n }\n }\n\n return $value;\n }", "function SM_varTag($attr) {\n $this->attributes = $attr;\n }", "function _inject_theme_attribute_in_block_template_content($template_content)\n {\n }", "function setPlace( &$value )\n {\n $this->Place = $value;\n }", "public function tag($tag) {\n $this->tag = $tag;\n }", "function onSetContent( $editor, $html ) {\n\t\treturn \"document.getElementById( '$editor' ).value = $html;\\n\";\n\t}", "public static function action_before_content() {\n\t\t\tglobal $shortcode_tags, $cv_shortcode_tags_backup;\n\n\t\t\tif ( !$cv_shortcode_tags_backup ) {\n\t\t\t\t$trans_key = 'cv_shortcode_tags_193';\n\t\t\t\tif ( !defined( 'PT_CV_DOING_PAGINATION' ) && !defined( 'PT_CV_DOING_PREVIEW' ) ) {\n\t\t\t\t\t$tagnames\t\t\t\t\t = array_keys( $shortcode_tags );\n\t\t\t\t\t$cv_shortcode_tags_backup\t = join( '|', array_map( 'preg_quote', $tagnames ) );\n\t\t\t\t\tset_transient( $trans_key, $cv_shortcode_tags_backup, DAY_IN_SECONDS );\n\t\t\t\t} else {\n\t\t\t\t\t$cv_shortcode_tags_backup = get_transient( $trans_key );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static function setCacheTag($tag)\n {\n static::$cacheTag = htmlspecialchars(trim($tag));\n }", "protected function etag($value, $type='strong')\r\n {\r\n $this->slim->etag($value);\r\n }", "function replaceCommonTags( $currentData ) \n {\n // Replace Module Name\n $tagModuleName = ModuleCreator::TAG_MODULE_NAME;\n $moduleName = $this->values[ ModuleCreator::KEY_MODULE_NAME ];\n $currentData = str_replace($tagModuleName, $moduleName, $currentData );\n \n // Replace Creator Name\n $tagCreatorName = ModuleCreator::TAG_CREATOR_NAME;\n $creatorName = $this->values[ ModuleCreator::KEY_MODULE_CREATOR ];\n $currentData = str_replace($tagCreatorName, $creatorName, $currentData );\n \n // Replace Creation Date\n $tagCreationDate = ModuleCreator::TAG_CREATION_DATE;\n $creationDate = $this->getCurrentDate();\n $currentData = str_replace($tagCreationDate, $creationDate, $currentData );\n \n // Replace Template Path\n $tagTemplatePath = ModuleCreator::TAG_PATH_TEMPLATES;\n $path = ModuleCreator::PATH_TEMPLATES;\n $currentData = str_replace($tagTemplatePath, $path, $currentData );\n \n return $currentData;\n \n }" ]
[ "0.61412036", "0.5996937", "0.5676182", "0.56265295", "0.5549422", "0.5512288", "0.5409513", "0.5337536", "0.5284421", "0.5208788", "0.52064407", "0.5153565", "0.51341105", "0.51091635", "0.5107955", "0.5096476", "0.50904113", "0.50887656", "0.50887656", "0.50887656", "0.5088657", "0.50883704", "0.5061246", "0.50601315", "0.50545406", "0.5054536", "0.50453776", "0.5034523", "0.5012291", "0.5007892", "0.49990106", "0.49912065", "0.49814352", "0.49684736", "0.49650207", "0.4933001", "0.49174947", "0.49110252", "0.49102467", "0.4896027", "0.4887223", "0.4879695", "0.48781416", "0.4863905", "0.48622108", "0.48574167", "0.48498175", "0.4848767", "0.48418832", "0.48396096", "0.48368293", "0.48197445", "0.48142606", "0.48105758", "0.47915125", "0.47875568", "0.47846112", "0.47805285", "0.47730285", "0.4770198", "0.47638044", "0.47631535", "0.47583172", "0.475323", "0.47516698", "0.4740291", "0.47383833", "0.4738157", "0.47324377", "0.4726286", "0.4715806", "0.4703643", "0.4692625", "0.46905473", "0.46808583", "0.4678601", "0.46779525", "0.46496943", "0.4629447", "0.46268225", "0.46266022", "0.46264234", "0.4626118", "0.46251112", "0.46221092", "0.46206096", "0.4619316", "0.46175298", "0.4612968", "0.46036565", "0.46033198", "0.46013767", "0.45979136", "0.45972598", "0.45939687", "0.4593736", "0.45875618", "0.45854577", "0.45743385", "0.45730427" ]
0.55401796
5
this will replace the tags in the current block
public function do_tags() { foreach ($this->values as $id => $block) { foreach ($block as $name => $replace) { $find = "{:$name}"; $this->merged[$id] = str_replace($find, $replace, $this->merged[$id]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function replaceBlockDocumentElements($content){\n\t\t//regular expression indiicating what a document block looks like\n\t\t$document_block_string = \"/\\{arch:document\\}(.*?)\\{\\/arch:document\\}/s\";\n\t\t\n\t\t//array to hold blocks that need to be replaced\n\t\t$document_array = array();\n\t\t\n\t\t//fill the array\n\t\tpreg_match_all($document_block_string, $content, $document_array);\n\t\t\n\t\t//parse document block array\n\t\tforeach($document_array[0] as $block){\n\t\t\t//start block content and fill it with all of the content in the block\n\t\t\t$block_content = $block;\n\n\t\t\t//array to hold elements in the block\n\t\t\t$element_array = array();\n\t\t\t\n\t\t\t//string to match document elements against\n\t\t\t$document_elements_string = \"/{arch:[a-zA-Z0-9\\s]*\\/}/\";\n\t\t\t\n\t\t\t//fill array\n\t\t\tpreg_match_all($document_elements_string, $block, $element_array);\n\t\t\t\n\t\t\t//parse element array\n\t\t\tforeach($element_array[0] as $element){\n\t\t\t\t//strip name out of the element string\n\t\t\t\t$element_name = explode(':', $element);\n\t\t\t\t$element_name = explode('/', $element_name[1]);\n\t\t\t\t//final element name\n\t\t\t\t$element_name = $element_name[0];\n\t\t\t\t\n\t\t\t\t//inline editing variables\n\t\t\t\t$element_editing_type = \"\";\n\t\t\t\t\n\t\t\t\tif(in_array($element_name, $this->document_default_fields)){//if it is a default element\n\t\t\t\t\tif($element_name == \"title\"){//switch to inline definition to remove extra tags generated by ckeditor\n\t\t\t\t\t\t$element_editing_type = \" arch-inline_element\";\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t//document element name\n\t\t\t\t\t$element_name = 'document_'.$element_name.'_'.getCurrentLanguage();\n\t\t\t\t\t\n\t\t\t\t\t//grab tag parser\n\t\t\t\t\trequire_once(constant(\"ARCH_BACK_END_PATH\").'modules/tag_parser.php');\n\n\t\t\t\t\t//variable to hold content with rendered tags filled with content\n\t\t\t\t\t$tag_rendered_content = $this->document[$element_name];\n\t\t\t\t\t//build handler and pass it the content to be rendered\n\t\t\t\t\t$tag_rendered_content_handler = new tagParser($tag_rendered_content, true, true, false);\n\t\t\t\t\t\n\t\t\t\t\t//retrieve the rendered content\n\t\t\t\t\t$tag_rendered_content = $tag_rendered_content_handler->getContent();\n\t\t\n\t\t\t\t\tob_start();\n\t\t\t\t\t//evaluate string as php append closing and open php tags to comply with expected php eval format\n\t\t\t\t\t//http://php.net/eval\n eval(\"?>\".$tag_rendered_content.\"<?\");\n\t\t\t\t\t$evaluated_content = ob_get_clean();\n\t\t\t\t\t\n\t\t\t\t\t$element_content = $evaluated_content;\n\t\t\t\t}else{//if it is not a default element\n\t\t\t\t\t$field_id = mysql_query('SELECT additional_field_ID \n\t\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_fields\n\t\t\t\t\t\t\t\t\t\t\tWHERE additional_field_name = \"'.clean($element_name).'\"\n\t\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\t\n\t\t\t\t\tif(mysql_num_rows($field_id) > 0){//if the field exsists\n\t\t\t\t\t\t$field_id = mysql_fetch_assoc($field_id);\n\t\t\t\t\t\t$field_id = $field_id['additional_field_ID'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$field_value = mysql_query('SELECT additional_field_value_'.getCurrentLanguage().'\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_field_values\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE additional_field_value_additional_field_FK = \"'.clean($field_id).'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tAND additional_field_value_document_FK = \"'.clean($this->document['document_ID']).'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(mysql_num_rows($field_value) > 0){//if the field has value\n\t\t\t\t\t\t\t$field_value = mysql_fetch_assoc($field_value);\n\t\t\t\t\t\t\t$field_value = $field_value['additional_field_value_'.getCurrentLanguage()];\n\n\t\t\t\t\t\t\t$element_content = $field_value;\n\t\t\t\t\t\t}else{//the field has no value\n\t\t\t\t\t\t\t$element_content = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{//field dosn't exsist\n\t\t\t\t\t\t$element_content = '';\n\t\t\t\t\t}\n\t\t\t\t}//end non default element\n\n\t\t\t\tif($this->edit_mode == true){//check for editing mode\n\t\t\t\t\tif(trim($element_content) == ''){//check for empty elements in edit mode\n\t\t\t\t\t\t$element_content = $element;\n\t\t\t\t\t}\n\t\t\t\t\t$element_content = '<div class=\"arch-content_element'.$element_editing_type.'\" id=\"'.$element_name.'\" style=\"display:inline;\" contenteditable=\"true\">'.$element_content.'</div>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//grab content for element out of the database and replace it in the block\n\t\t\t\t$block_content = preg_replace(\"{\".$element.\"}\", $element_content, $block_content, 1);\n\t\t\t\t//echo $block_content;\n\t\t\t}\n\t\t\t\n\t\t\t//clean out document start and end tags\n\t\t\t$block_content = str_replace(\"{arch:document}\", \"\", $block_content);\n\t\t\t$block_content = str_replace(\"{/arch:document}\", \"\", $block_content);\n\t\t\t\n\t\t\t//preform actual replacement\n\t\t\t$content = preg_replace(\"{\".$block.\"}\", $block_content, $content, 1);\n\t\t}//end document block parsing\n\t\t\n\t\treturn $content;\n\t}", "function bub_simple_replace($src_block, $target_html) {\n return $target_html;\n}", "function wp_replace_in_html_tags($haystack, $replace_pairs)\n {\n }", "function textblock_template_replace(&$textblock, $replace)\n{\n foreach ($replace as $key => $value) {\n $textblock['title'] = str_replace(\"%$key%\", $value, $textblock['title']);\n $textblock['text'] = str_replace(\"%$key%\", $value, $textblock['text']);\n }\n}", "function customTagReplace($html)\r\n\t{\r\n\t\t//ensure all tags can be found\r\n\t\t$html = str_replace(\"<IMG\",\"<img\",$html);\r\n\t\t$html = str_replace(\"SRC=\",\"src=\",$html);\r\n\t\t$html = str_replace(\"ALT=\",\"alt=\",$html);\r\n\t\t$html = str_replace(\"<SPAN\",\"<span\",$html);\r\n\r\n\t\t$html = replaceIMG($html); //CSS format img tags\r\n\t\t$html = youtubeEmbed($html); //custom include youtube embeds\r\n\t\t$html = apostrapheFix($html); //apostraphe fix for sql INSERT statements\r\n\t\treturn $html;\r\n\t}", "function replaceCommonTags( $currentData ) \n {\n // Replace Module Name\n $tagModuleName = ModuleCreator::TAG_MODULE_NAME;\n $moduleName = $this->values[ ModuleCreator::KEY_MODULE_NAME ];\n $currentData = str_replace($tagModuleName, $moduleName, $currentData );\n \n // Replace Creator Name\n $tagCreatorName = ModuleCreator::TAG_CREATOR_NAME;\n $creatorName = $this->values[ ModuleCreator::KEY_MODULE_CREATOR ];\n $currentData = str_replace($tagCreatorName, $creatorName, $currentData );\n \n // Replace Creation Date\n $tagCreationDate = ModuleCreator::TAG_CREATION_DATE;\n $creationDate = $this->getCurrentDate();\n $currentData = str_replace($tagCreationDate, $creationDate, $currentData );\n \n // Replace Template Path\n $tagTemplatePath = ModuleCreator::TAG_PATH_TEMPLATES;\n $path = ModuleCreator::PATH_TEMPLATES;\n $currentData = str_replace($tagTemplatePath, $path, $currentData );\n \n return $currentData;\n \n }", "function p1base_theme_suggestions_block_alter(array &$suggestions, array $variables)\n{\n // block\n if (isset($variables['elements']['content']['#block_content'])) {\n array_splice($suggestions, 1, 0, 'block__bundle__' . $variables['elements']['content']['#block_content']->bundle());\n }\n}", "public function addTagToPostInTheMiddle() {}", "public function testReplaceTags()\n\t{\n\t\t$this->assertEquals('143',$this->obj->replace_tags('1{{2}}3', '', array(\"2\"=>\"4\")));\n\t\t$this->assertEquals('143',$this->obj->replace_tags('1{{args:2}}3', 'args', array(\"2\"=>\"4\")));\n\t\t$this->assertEquals('143$var',$this->obj->replace_tags('1{{args:2}}3$var', 'args', array(\"2\"=>\"4\")));\n\t}", "public function end() {\n\n $this->current = 0;\n\n // remove the suffix which was set by self::start()\n $suffixes = Zend_Registry::get(\"pimcore_tag_block_current\");\n array_pop($suffixes);\n Zend_Registry::set(\"pimcore_tag_block_current\", $suffixes);\n\n $this->outputEditmode(\"</div>\");\n }", "function replaceBlockContent($content,$className,$blockName,$bodyContent,$exClass)\n {\n if($exClass == \"Magento\\Backend\\Block\\Widget\\Grid\")\n $exClass = \"Magento\\Backend\\Block\\Widget\\Grid\\Extended\";\n if($exClass == \"Magento\\Backend\\Block\\Widget\\Form\")\n $exClass = \"Magento\\Backend\\Block\\Widget\\Form\\Generic\";\n if($exClass == \"Mage\\Core\\Helper\\Abstract\"){\n $exClass = \"Magento\\Framework\\App\\Helper\\AbstractHelper\" ; \n }\n $search = array(\n '/<ClassName>/',\n '/<BlockName>/',\n '/<BodyContent>/',\n '/<ExtendsClass>/',\n );\n\n $replace = array(\n $className,\n $blockName,\n $bodyContent,\n '\\\\'.$exClass,\n );\n //\n return preg_replace($search, $replace, $content);\n }", "function excerpt_remove_blocks($content)\n {\n }", "private function replaceTag(&$text, $newContent, $competitionId) {\n $text = preg_replace('/{hapodi id=\"'.$competitionId .'\"}/s', $newContent, $text);\n }", "function do_shortcodes_in_html_tags($content, $ignore_html, $tagnames)\n {\n }", "function single_product_content_replace() {\n\tthe_content();\n}", "public function deleteAllBlocks()\n {\n // Sometimes Word splits tags. Find and replace all of them with\n // new string surrounded by template symbol value\n $documentSymbol = explode(self::$_templateSymbol, self::$_document);\n foreach ($documentSymbol as $documentSymbolValue) {\n if (strpos(strip_tags($documentSymbolValue), 'BLOCK_') !== false) {\n self::$_document = str_replace($documentSymbolValue, strip_tags($documentSymbolValue), self::$_document);\n }\n }\n $domDocument = new DomDocument();\n $domDocument->loadXML(self::$_document);\n\n $xmlWP = $domDocument->getElementsByTagNameNS('http://schemas.openxmlformats.org/wordprocessingml/2006/main',\n 'p');\n $xpath = new DOMXPath($domDocument);\n $length = $xmlWP->length;\n $itemsWP = array();\n for ($i = 0; $i < $length; $i++) {\n $itemsWP[$i] = $xmlWP->item($i);\n }\n $query = 'w:r/w:t';\n for ($i = 0; $i < $length; $i++) {\n $variables = $xpath->query($query, $itemsWP[$i]);\n foreach ($variables as $entry) {\n $deleteCurrent = false;\n if (\n strpos($entry->nodeValue,\n self::$_templateSymbol . 'BLOCK_'\n ) !== false\n ) {\n //when we find a placeholder, we delete it\n $deleteCurrent = true;\n break;\n }\n }\n if ($deleteCurrent) {\n $padre = $itemsWP[$i]->parentNode;\n $padre->removeChild($itemsWP[$i]);\n self::$_document = $domDocument->saveXML();\n }\n }\n }", "function doTagStuff(){}", "public function replaceInlineDocumentElements($content){\n\t\t//regular expression indicating what a document inline element looks like\n\t\t$inline_document_expression = \"/\\{arch:document:(.*)\\/\\}/\";\n\t\t\n\t\t//array to hold blocks that need to be replaced\n\t\t$document_array = array();\n\t\t\n\t\t//fill the array\n\t\tpreg_match_all($inline_document_expression, $content, $document_array);\n\t\t\n\t\t//parse inline document elements array\n\t\tforeach($document_array[0] as $element){\n\t\t\t//strip name out of the block string\n\t\t\t$element_name = explode(':', $element);\n\t\t\t$element_name = explode('/', $element_name[2]);\n\t\t\t//final block name\n\t\t\t$element_name = $element_name[0];\n\t\t\t\n\t\t\t//inline editing variables\n\t\t\t$element_editing_type = \"\";\n\t\t\t\n\t\t\tif(in_array($element_name, $this->document_default_fields)){//if it is a default element\n\t\t\t\tif($element_name == \"title\"){//switch to inline definition to remove extra tags generated by ckeditor\n\t\t\t\t\t$element_editing_type = \" arch-inline_element\";\n\t\t\t\t}\n\t\t\t\n\t\t\t\t//document element name\n\t\t\t\t$element_name = 'document_'.$element_name.'_'.getCurrentLanguage();\n\t\t\t\n\t\t\t\t//grab tag parser\n\t\t\t\trequire_once(constant(\"ARCH_BACK_END_PATH\").'modules/tag_parser.php');\n\n\t\t\t\t//variable to hold content with rendered tags filled with content\n\t\t\t\t$tag_rendered_content = $this->document[$element_name];\n\t\t\t\t//build handler and pass it the content to be rendered\n\t\t\t\t$tag_rendered_content_handler = new tagParser($tag_rendered_content, true, true, false);\n\t\t\t\t\n\t\t\t\t//retrieve the rendered content\n\t\t\t\t$tag_rendered_content = $tag_rendered_content_handler->getContent();\n\t\n\t\t\t\tob_start();\n\t\t\t\t//evaluate string as php append closing and open php tags to comply with expected php eval format\n\t\t\t\t//http://php.net/eval\n\t\t\t\teval(\"?>\".$tag_rendered_content.\"<?\");\n\t\t\t\t$evaluated_content = ob_get_contents();\n\t\t\t\tob_end_clean();\n\t\t\t\t\n\t\t\t\t$element_content = $evaluated_content;\n\t\t\t}else{//if it is not a default element\n\t\t\t\t$field_id = mysql_query('SELECT additional_field_ID \n\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_fields\n\t\t\t\t\t\t\t\t\t\tWHERE additional_field_name = \"'.clean($element_name).'\"\n\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\n\t\t\t\tif(mysql_num_rows($field_id) > 0){//if the field exsists\n\t\t\t\t\t$field_id = mysql_fetch_assoc($field_id);\n\t\t\t\t\t$field_id = $field_id['additional_field_ID'];\n\t\t\t\t\t\n\t\t\t\t\t$field_value = mysql_query('SELECT additional_field_value_'.getCurrentLanguage().'\n\t\t\t\t\t\t\t\t\t\t\t\tFROM tbl_additional_field_values\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE additional_field_value_additional_field_FK = \"'.clean($field_id).'\"\n\t\t\t\t\t\t\t\t\t\t\t\tAND additional_field_value_document_FK = \"'.clean($this->document['document_ID']).'\"\n\t\t\t\t\t\t\t\t\t\t\t\tLIMIT 1');\n\t\t\t\t\t\n\t\t\t\t\tif(mysql_num_rows($field_value) > 0){//if the field has value\n\t\t\t\t\t\t$field_value = mysql_fetch_assoc($field_value);\n\t\t\t\t\t\t$field_value = $field_value['additional_field_value_'.getCurrentLanguage()];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$element_content = $field_value;\n\t\t\t\t\t}else{//the field has no value\n\t\t\t\t\t\t$element_content = '';\n\t\t\t\t\t}\n\t\t\t\t}else{//field dosn't exsist\n\t\t\t\t\t$element_content = '';\n\t\t\t\t}\n\t\t\t}//end non default element\n\t\t\t\n\t\t\tif($this->edit_mode == true){//check for editing mode\n\t\t\t\tif(trim($element_content) == ''){//check for empty elements in edit mode\n\t\t\t\t\t$element_content = $element;\n\t\t\t\t}\n\t\t\t\t$element_content = '<div class=\"arch-content_element'.$element_editing_type.'\" id=\"'.$element_name.'\" style=\"display:inline;\" contenteditable=\"true\">'.$element_content.'</div>';\n\t\t\t}\n\t\t\t\n\t\t\t//preform actual replacement\n\t\t\t$content = preg_replace(\"{\".$element.\"}\", $element_content, $content, 1);\n\t\t}//end inline document parsing\n\t\t\n\t\t//return parsed content\n\t\treturn $content;\n\t}", "private static function _replace($source, $i, $options){\n\t\t$cache = new Cache();\n\t\t$cachePath = $cache->cacheDir().\"/template/\";\n\n\t\t$pattern = \"/{:(block) \\\"({:block})\\\"(?: \\[(.+)\\])?}(.*){\\\\1:}/msU\";\n\n\t\tpreg_match_all(static::$_terminals['T_BLOCK'], $source, $matches);\n\n\t\t$_blocks = null;\n\n\t\tforeach($matches[2] as $index => $block){\n\n\t\t\t$_pattern = String::insert($pattern, array('block' => $block));\n\n\t\t\t$_block = static::$_blocks->blocks(\"{$block}\");\n\n\t\t\t$_blocks = static::$_blocks;\n\n\t\t\t/**\n\t\t\t * Top level content for block\n\t\t\t * @var string\n\t\t\t */\n\t\t\t$content = trim($_block->content());\n\n\t\t\t/**\n\t\t\t * The request for block content in the final template\n\t\t\t * @var string\n\t\t\t */\n\t\t\t$request = $matches[4][$index];\n\n\t\t\t/**\n\t\t\t * Parent/child matches/replacement\n\t\t\t */\n\t\t\t$_parents = function($block) use (&$content, &$_parents, &$matches, &$index, &$_pattern){\n\n\t\t\t\t$parent = $block->parent();\n\n\t\t\t\tif(preg_match(\"/{:parent:}/msU\", $content, $_matches)) { \n\n\t\t\t\t\tif($parent){\n\t\t\t\t\t\t$content = preg_replace(\"/{:parent:}/msU\", $parent->content(), $content);\n\t\t\t\t\t\t// go again\n\t\t\t\t\t\treturn $_parents($block->parent(), $content);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// no parent, remove the request\n\t\t\t\t\t\t$content = preg_replace(\"/{:parent:}/msU\", \"\", $content);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\treturn $content;\n\n\t\t\t};\n\n\t\t\t/**\n\t\t\t * Parse the block and check to see if it's parents request it.\n\t\t\t * @var method\n\t\t\t */\n\t\t\t$_children = function($block, $content = null) use (&$_children, &$matches, &$index, &$_pattern, &$_blocks){\n\n\t\t\t\t$content = ($content == null) ? $block->content() : $content;\n\n\t\t\t\t$_block = $_blocks->blocks($block->name());\n\t\t\t\t/**\n\t\t\t\t * If the block has a child then we're not at the bottom of the chain.\n\t\t\t\t * We need to move up until we cant\n\t\t\t\t * @var mixed `object` or `false`\n\t\t\t\t */\n\t\t\t\t$child = $block->child();\n\n\t\t\t\t/**\n\t\t\t\t * If the block has a parent then we cant be at the top of the chain.\n\t\t\t\t * As long as there's a parent we need to keep moving. \n\t\t\t\t * @var mixed `object` or `false`\n\t\t\t\t */\n\t\t\t\t$parent = $block->parent();\n\n\t\t\t\tif(preg_match(\"/{:child:}/msU\", $content)) { \n\t\t\t\t\t// Block doesn't have a child block\n\t\t\t\t\tif(!$child){\n\t\t\t\t\t\t// Also has no parent\n\t\t\t\t\t\tif(!$parent){\n\t\t\t\t\t\t\t// clear the entire block\n\t\t\t\t\t\t\t$content = \"\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Has a parent, still no child tho\n\t\t\t\t\t\t\t// just remove the call for child block\n\t\t\t\t\t\t\t$content = preg_replace(\"/{:child:}/msU\", \"\", $content);\n\t\t\t\t\t\t\treturn $_children($block, $content);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// not asking for a child\n\t\t\t\t} else {\n\n\t\t\t\t\t// Has a parent\n\t\t\t\t\tif($parent){\n\n\t\t\t\t\t\tif(preg_match(\"/{:child:}/msU\", $parent->content())){\n\t\t\t\t\t\t\t$content = preg_replace(\"/{:child:}/msU\", $content, $parent->content());\n\t\t\t\t\t\t\treturn $_children($parent, $content);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// must return content so we dont muck up parent\n\t\t\t\treturn $content;\n\n\t\t\t};\n\n\t\t\t// parse children\n\t\t\t$content = $_children($_block);\n\t\t\t// parse parents\n\t\t\t$content = $_parents($_block);\n\n\t\t\t$source = preg_replace($_pattern, $content, $source);\n\n\t\t}\n\n\t\t// 0 should always be the final template\n\t\tif($i == 0){\n\t\t\tif($cacheable = $cache->write($source, static::$_blocks->templates(0), $_blocks, $options)){\n\t\t\t\tstatic::$_template = $cacheable;\n\t\t\t}\n\n\t\t}\n\n\t}", "function change_tags($str){\r\n\r\n\t\t\t$str=str_replace('#ID#',$this->id,$str);\r\n\t\t\t$str=str_replace('#PAGE#',$this->page,$str);\r\n\t\t\t$str=str_replace('#ITEMS_PER_PAGE#',$this->items_per_page,$str);\r\n\t\t\t$str=str_replace('#TOTAL_ITEMS#',$this->total_items,$str);\r\n\r\n\t\t\treturn $str;\r\n\r\n\t}", "private function processTags()\n {\n $dollarNotationPattern = \"~\" . REGEX_DOLLAR_NOTATION . \"~i\";\n $simpleTagPattern = \"~\" . REGEX_SIMPLE_TAG_PATTERN . \"~i\";\n $bodyTagPattern = \"~\" . REGEX_BODY_TAG_PATTERN . \"~is\";\n \n $tags = array();\n preg_match_all($this->REGEX_COMBINED, $this->view, $tags, PREG_SET_ORDER);\n \n foreach($tags as $tag)\n { \n $result = \"\";\n \n $tag = $tag[0];\n \n if (strlen($tag) == 0) continue;\n \n if (preg_match($simpleTagPattern, $tag) || preg_match($bodyTagPattern, $tag))\n {\n $this->handleTag($tag);\n }\n else if (preg_match($dollarNotationPattern, $tag))\n {\n $this->logger->log(Logger::LOG_LEVEL_DEBUG, 'View: processTags', \"Found ExpLang [$tag]\");\n $result = $this->EL_Engine->parse($tag);\n }\n \n if (isset ($result))\n {\n $this->update($tag, $result);\n }\n }\n }", "function custom_bcn_template_tag($replacements, $type, $id)\n{\n if (in_array('post-products', $type)) {\n $short_title = get_field('short_title', $id);\n $replacements['%short_title%'] = ($short_title) ? $short_title : $replacements['%htitle%'];\n } else {\n $replacements['%short_title%'] = $replacements['%htitle%'];\n }\n return $replacements;\n}", "public static function replaceTagContent(EventData_IEM_ADDON_DYNAMICCONTENTTAGS_REPLACETAGCONTENT $data) {\n require_once (SENDSTUDIO_API_DIRECTORY . '/subscribers.php');\n $subsrciberApi = new Subscribers_API();\n $subscriberInfo = $data->info;\n\n foreach ($subscriberInfo as $subscriberInfoEntry) {\n $tagObject = new Addons_dynamiccontenttags();\n $subscriberList = $subsrciberApi->GetAllListsForEmailAddress($subscriberInfoEntry['emailaddress'], $data->lists);\n if (is_array($subscriberList)) {\n foreach($subscriberList as $listKey => $listVal) {\n $subscriberList[$listKey] = $listVal['listid'];\n }\n } else {\n $subscriberList = array($subscriberList);\n }\n\n // preload the array key value and customfield id\n $preloadCustomFieldLoc = array();\n if (is_array($subscriberInfoEntry['CustomFields'])) {\n foreach($subscriberInfoEntry['CustomFields'] as $customFieldKey => $customFieldVal) {\n $preloadCustomFieldLoc[$customFieldVal['fieldid']] = $customFieldKey;\n }\n }\n\n $tagObject->loadTagsByList($subscriberList);\n if ($tagObject->getTagObjectsSize()) {\n $tagsTobeReplaced = array();\n $tagsContentTobeReplaced = array();\n $permanentRulesMatches = array(\n 'email'=>'emailaddress',\n 'format'=>'format',\n 'confirmation'=>'confirmed',\n 'subscribe'=>'subscribedate',\n );\n foreach($tagObject->tags as $tagEntry) {\n $tagEntry->loadBlocks();\n $blocks = $tagEntry->getBlocks();\n $defaultBlock = null;\n foreach($blocks as $blockEntry) {\n $rulesPassed = true;\n $decodedRules = $blockEntry->getDecodedRules();\n foreach ($decodedRules->Rules[0]->rules as $ruleEntry) {\n $continue = false;\n $tempRuleValues = trim(strtolower($ruleEntry->rules->ruleValues));\n $tempActualValues = (isset ($permanentRulesMatches[$ruleEntry->rules->ruleName]) && isset ($subscriberInfoEntry[$permanentRulesMatches[$ruleEntry->rules->ruleName]]))?trim(strtolower($subscriberInfoEntry[$permanentRulesMatches[$ruleEntry->rules->ruleName]])):'';\n switch ($ruleEntry->rules->ruleName) {\n case 'email':\n case 'format':\n case 'confirmation':\n $continue = true;\n break;\n case 'status':\n $tempActualValues = array();\n $tempIndex = '';\n switch ($tempRuleValues) {\n case 'a':\n $tempIndex = 'notboth';\n break;\n case 'b':\n $tempIndex = 'bounced';\n break;\n case 'u':\n $tempIndex = 'unsubscribed';\n break;\n }\n\n switch ($ruleEntry->rules->ruleOperator) {\n case 'equalto':\n if (isset($subscriberInfoEntry[$tempIndex]) && $subscriberInfoEntry[$tempIndex] == 0) {\n $rulesPassed = false;\n } elseif (!(isset($subscriberInfoEntry[$tempIndex])) && !($subscriberInfoEntry['bounced'] == 0 && $subscriberInfoEntry['unsubscribed'] == 0) ) {\n $rulesPassed = false;\n }\n break;\n case 'notequalto':\n if (isset($subscriberInfoEntry[$tempIndex]) && !($subscriberInfoEntry[$tempIndex] == 0)) {\n $rulesPassed = false;\n } elseif (!(isset($subscriberInfoEntry[$tempIndex])) && ($subscriberInfoEntry['bounced'] == 0 && $subscriberInfoEntry['unsubscribed'] == 0) ) {\n $rulesPassed = false;\n }\n break;\n\n }\n break;\n case 'subscribe':\n // date conversion\n $tempActualValues = strtotime(date('Y-m-d', $tempActualValues));\n $tempRuleValues = split('/', $tempRuleValues);\n $tempRuleValues = strtotime(implode('-', array_reverse($tempRuleValues)));\n $continue = true;\n break;\n case 'campaign':\n switch ($ruleEntry->rules->ruleOperator) {\n case 'equalto':\n if (!$subsrciberApi->IsSubscriberHasOpenedNewsletters($subscriberInfoEntry['emailaddress'], $tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n case 'notequalto':\n if ($subsrciberApi->IsSubscriberHasOpenedNewsletters($subscriberInfoEntry['emailaddress'], $tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n\n }\n break;\n default:\n $continue = true;\n }\n if ($continue) {\n if ((int)$ruleEntry->rules->ruleName) {\n $tempActualValues = (isset ($preloadCustomFieldLoc[$ruleEntry->rules->ruleName]) && isset ($subscriberInfoEntry['CustomFields'][$preloadCustomFieldLoc[$ruleEntry->rules->ruleName]]['data']))?trim(strtolower($subscriberInfoEntry['CustomFields'][$preloadCustomFieldLoc[$ruleEntry->rules->ruleName]]['data'])):'';\n if ($ruleEntry->rules->ruleType == 'date') {\n $tempActualValues = split('/', $tempActualValues);\n $tempActualValues = strtotime(implode('-', array_reverse($tempActualValues)));\n $tempRuleValues = split('/', $tempRuleValues);\n $tempRuleValues = strtotime(implode('-', array_reverse($tempRuleValues)));\n }\n\n\n }\n switch ($ruleEntry->rules->ruleType) {\n case 'text':\n case 'textarea':\n case 'dropdown':\n case 'number':\n case 'radiobutton':\n case 'date':\n switch ($ruleEntry->rules->ruleOperator) {\n case 'equalto':\n if (!($tempActualValues == $tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n case 'notequalto':\n if ($tempActualValues == $tempRuleValues) {\n $rulesPassed = false;\n }\n break;\n case 'like':\n if (!(strstr($tempActualValues, $tempRuleValues))) {\n $rulesPassed = false;\n }\n break;\n case 'notlike':\n if (strstr($tempActualValues, $tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n case 'greaterthan':\n if ($tempActualValues <= $tempRuleValues) {\n $rulesPassed = false;\n }\n break;\n case 'lessthan':\n if ($tempActualValues >= $tempRuleValues) {\n $rulesPassed = false;\n }\n break;\n default:\n $rulesPassed = false;\n }\n break;\n case 'checkbox':\n $tempActualValues = unserialize($tempActualValues);\n $tempRuleValues = explode(', ', $tempRuleValues);\n $tempRuleValues = (is_array($tempRuleValues)) ? $tempRuleValues : array() ;\n $tempActualValues = (is_array($tempActualValues)) ? $tempActualValues : array() ;\n switch ($ruleEntry->rules->ruleOperator) {\n case 'equalto':\n if (sizeof(array_intersect($tempActualValues, $tempRuleValues)) != sizeof($tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n case 'notequalto':\n if (sizeof(array_intersect($tempActualValues, $tempRuleValues)) == sizeof($tempRuleValues)) {\n $rulesPassed = false;\n }\n break;\n default:\n $rulesPassed = false;\n }\n break;\n default:\n $rulesPassed = false;\n }\n }\n }\n if ($blockEntry->isActivated()) {\n $defaultBlock = $decodedRules;\n }\n if ($rulesPassed) {\n $data->contentTobeReplaced[$subscriberInfoEntry['subscriberid']]['tagsTobeReplaced'][] = '%%[' . trim($tagEntry->getName()) . ']%%';\n $data->contentTobeReplaced[$subscriberInfoEntry['subscriberid']]['tagsContentTobeReplaced'][] = $decodedRules->Content;\n break; // only get the first matched\n }\n }\n if (!$rulesPassed) {\n $data->contentTobeReplaced[$subscriberInfoEntry['subscriberid']]['tagsTobeReplaced'][] = '%%[' . trim($tagEntry->getName()) . ']%%';\n $data->contentTobeReplaced[$subscriberInfoEntry['subscriberid']]['tagsContentTobeReplaced'][] = $defaultBlock->Content;\n }\n }\n }\n }\n }", "function render_block_core_tag_cloud($attributes)\n {\n }", "function clean_inside_tags($txt,$tags){\n\t\t\t$txt =removeemptytags($txt);\n\t\t\tpreg_match_all(\"/<([^>]+)>/i\",$tags,$allTags,PREG_PATTERN_ORDER);\n\t\t\n\t\t\tforeach ($allTags[1] as $tag){\n\t\t\t\t$txt = preg_replace(\"/<\".$tag.\"[^>]*>/i\",\"<\".$tag.\">\",$txt);\n\t\t\t}\n\t\t\treturn $txt;\n\t\t}", "function register_block_core_site_tagline()\n {\n }", "function remove_blocks() {\n if ( is_singular( 'webinar' ) && in_the_loop() && is_main_query() ) {\n //parse the blocks so they can be run through the foreach loop\n $blocks = parse_blocks( get_the_content() );\n foreach ( $blocks as $block ) {\n //look to see if your block is in the post content -> if yes continue past it if no then render block as normal\n \n echo $block['blockName'];\n \n if ( 'lazyblock/top-of-page' === $block['blockName'] ) {\n continue;\n } else {\n echo render_block( $block );\n }\n }\n }\n}", "private function processContent(){\n\t\t$this->textEnd = strpos($this->raw,\"</{$this->tag}\");\n\t\t$this->text = trim(substr($this->raw, $this->textStart, $this->textEnd - $this->textStart));\n\t}", "function block_plugin_my_block_view($delta) {\n return array(\n '#type' => 'markup',\n '#markup' => 'Yo block!'\n );\n}", "public function replaceContent() {\n \treturn $this->_doReplacement();\n\t}", "public static function globalNestingCorrectlyRemovesInvalidTagsDataProvider() {}", "public function parseBlock($blockName)\n {\n // Sometimes Word splits tags. Find and replace all of them with\n $documentSymbol = explode(self::$_templateSymbol, self::$_document);\n foreach ($documentSymbol as $documentSymbolValue) {\n if (strip_tags($documentSymbolValue) == $blockName) {\n self::$_document = str_replace($documentSymbolValue, $blockName, self::$_document);\n }\n }\n }", "public static function localNestingCorrectlyRemovesInvalidTagsDataProvider() {}", "function render_block_core_site_tagline($attributes)\n {\n }", "function force_balance_tags($text)\n {\n }", "public function applyTemplateBlocks(Template $t)\n {\n\n }", "function edd_incentives_render_template_tags() {\n global $post;\n\n if( $post->post_type == 'incentive' ) {\n ?>\n <div class=\"edd-incentive-template-tags postbox\">\n <h3><span><?php _e( 'Template Tags', 'edd-incentives' ); ?></span></h3>\n <div class=\"inside\">\n <?php\n echo '<h4>' . __( 'Use the following template tags for entering the given data in the modal.', 'edd-incentives' ) . '</h4>';\n\n $template_tags = edd_incentives_get_template_tags();\n foreach( $template_tags as $tag => $description ) {\n echo '<div class=\"edd-incentive-template-tag-block\">';\n echo '<span class=\"edd-incentive-template-tag\">{' . $tag . '}</span>';\n echo '<span class=\"edd-incentive-template-tag-description\">' . $description . '</span>';\n echo '</div>';\n }\n ?>\n <div class=\"edd-incentive-clear\"></div>\n <br />\n <p class=\"edd-incentive-tip description\"><?php printf( __( 'Need more help? <a href=\"%s\">Click here</a> for a more in-depth tutorial on creating Incentives!', 'edd-incentives' ), 'edit.php?post_type=download&page=incentives-tutorial&post=' . $post->ID ); ?></p>\n </div>\n </div>\n <?php\n }\n}", "function Replace_Tokens($data)\n\t{\n\t\t// it could rely on tokens which are above it\n\t\t// in the token \"stack\"\n\t\tif (isset($this->token['BLOCK_MAIN']))\n\t\t{\n\t\t\t$data = str_replace('@@BLOCK_MAIN@@', $this->token['BLOCK_MAIN'], $data);\n\t\t\tunset($this->token['BLOCK_MAIN']);\n\t\t}\n\t\t\n\t\tforeach ($this->token as $key=>$value)\n\t\t{\n\t\t\t\n\t\t\tif ($value instanceof Token)\n\t\t\t{\n\t\t\t\t$value = $value->Value();\n\t\t\t}\n\t\t\t\n\t\t\t$data = str_replace('@@'.$key.'@@', $value, $data);\n\t\t\t\n\t\t}\n\t\t\n\t\t$data = preg_replace('/@@(.*?)@@/', '', $data);\n\t\t\n\t\treturn($data);\n\t\t\n\t}", "function templateCode_older() {\r\n\t\tif ($this->template !== \"none\") {\r\n\t\t\tprint('do not use this function 43096809683069836');exit(0);\r\n\t\t\t$bodycode = ReTidy::getBodyCode();\r\n\t\t\tif(strpos($bodycode, '<div class=\"center\">') !== false) {\r\n\t\t\t\tvar_dump(OM::getTagString('abvb<div class=\"center\">adsfds</div>sdsgdsgds', '<div class=\"center\">'));exit(0);\r\n\t\t\t\t$bodycode = substr(OM::getTagString($bodycode, '<div class=\"center\">'), strlen('<div class=\"center\">'), strlen($bodycode)-strlen('<div class=\"center\">')-4);\r\n\t\t\t}\r\n\t\t\t$this->code = str_replace(\"{content}\", $bodycode, file_get_contents($this->template));\r\n\t\t}\r\n\t}", "public function endBlock(): void\n {\n $output = ob_get_clean();\n\n [$blockName, $replace] = $this->blockStack->pop();\n\n if (!array_key_exists($blockName, $this->blocks)) {\n $this->blocks[$blockName] = [];\n }\n\n if ($replace) {\n $this->blocks[$blockName] = [$output];\n } else {\n $this->blocks[$blockName][] = $output;\n }\n }", "function gallery2_sidebarblock_modify($blockinfo)\n{\n // get current content\n if (!is_array($blockinfo['content'])) {\n $vars = @unserialize($blockinfo['content']);\n } else {\n $vars = $blockinfo['content'];\n }\n\n $vars['blockid'] = $blockinfo['bid'];\n return $vars;\n}", "function dbReplace()\n {\n $args = [\n 'id' => $this->id,\n 'parent' => $this->parent,\n 'lecture_id' => $this->lecture_id,\n 'type' => $this->type,\n 'title' => $this->title,\n 'mtitle' => $this->mtitle,\n 'text' => $this->text,\n 'position' => $this->position,\n 'redirect' => $this->redirect,\n 'lastmodified' => null,\n 'ival1' => $this->ival1\n ];\n dibi::query('REPLACE `section`', $args);\n $this->updateId();\n }", "private static function replaceTags($content)\n {\n $content = preg_replace(self::FORMAT['echo'], '<?php echo htmlspecialchars($2, ENT_QUOTES) ?>', $content);\n $content = preg_replace(self::FORMAT['plain_echo'], '<?php echo $2 ?>', $content);\n $content = preg_replace(self::FORMAT['tag'], '<?php $2 ?>', $content);\n\n return $content;\n }", "protected function recursivelyReplaceIntPlaceholdersInContent() {}", "function get_the_block_template_html()\n {\n }", "public function resetTagDetail() {\n\t\t$this->content_tag_detail = null;\n\t}", "function end_tag() {\r\n\t\t$this->push_nodelist();\r\n\t\t\r\n\t}", "function do_blocks($content)\n {\n }", "function remove_tags_intra_tags() {\r\n\t\t$ct_intra_tags = 0;\r\n\t\t$ct2 = -1;\r\n\t\twhile($ct2 != 0) {\r\n\t\t\t/*preg_match_all('/(<[^>]*)<[^<>]+?>/is', $this->code, $debug_matches);\r\n\t\t\tprint('$debug_matches: ');var_dump($debug_matches);*/\r\n\t\t\t$this->code = preg_replace('/(<(![^\\-][^<>]+|[^!<>]+))<[^<>]+?>/is', '$1', $this->code, -1, $ct2); // changed (2012-01-25)\r\n\t\t\t$ct_intra_tags += $ct2;\r\n\t\t}\r\n\t\t$this->logMsgIf(\"tags intra tags removed\", $ct_intra_tags);\r\n\t\t// we must also ignore the <head>!\r\n\t\t// the only tag that has content in the head that I can think of is <title>, so:\r\n\t\tpreg_match_all('/<title>(.*?)<\\/title>/is', $this->code, $title_matches);\r\n\t\tif(sizeof($title_matches[0]) > 1) {\r\n\t\t\tprint(\"Well, that's not good; found more than one (\" . sizeof($title_matches[0]) . \") &lt;title&gt; tags on this page!\");exit(0);\r\n\t\t}\r\n\t\tif(sizeof($title_matches[0]) === 0) {\r\n\t\t\t// nothing to do\r\n\t\t} else {\r\n\t\t\t$ct_title = 0;\r\n\t\t\t$initial_title_string = $title_string = $title_matches[0][0];\r\n\t\t\t$ct1 = -1;\r\n\t\t\r\n\t\t\twhile($ct1 != 0) {\r\n\t\t\t\t$title_string = preg_replace('/<title>(.*?)<[^<>]+?>(.*?)<\\/title>/is', '<title>$1$2</title>', $title_string, -1, $ct1);\r\n\t\t\t\t$ct_title += $ct1;\r\n\t\t\t}\r\n\t\t\t$this->code = str_replace($initial_title_string, $title_string, $this->code);\r\n\t\t}\r\n\t\t$this->logMsgIf(\"tags removed from title tag\", $ct_title);\r\n\t\t// this should only happen if something exists in both the acronyms and abbr files (erroneously) or if\r\n\t\t// an bbreviation is a substring of another abbreviation but we'll still clean it up\r\n\t\t//$this->code = preg_replace('/<(abbr|acronym) title=\"([^\"]*?)\"><(abbr|acronym) title=\"([^\"]*?)\">(.*?)<\\/(abbr|acronym)><\\/(abbr|acronym)>/is', '<$1 title=\"$2\">$4</$5>', $this->code, -1, $ct_redundant_acro);\r\n\t\t$ct_redundant_acro = 0;\r\n\t\t$array_tags = array('abbr', 'acronym');\r\n\t\t$tagNamesString = implode('|', $array_tags);\r\n\t\tforeach($array_tags as $tagName) {\r\n\t\t\t$OStrings = OM::getAllOStrings($this->code, '<' . $tagName, '</' . $tagName . '>');\r\n\t\t\t//var_dump($OStrings);exit(0);\r\n\t\t\t$counter = sizeof($OStrings) - 1;\r\n\t\t\twhile($counter >= 0) {\r\n\t\t\t\t$OString = $OStrings[$counter][0];\r\n\t\t\t\t$opening_tag = substr($OString, 0, strpos($OString, '>') + 1);\r\n\t\t\t\t$closing_tag = substr($OString, ReTidy::strpos_last($OString, '<'));\r\n\t\t\t\t$code_to_clean = substr($OString, strlen($opening_tag), strlen($OString) - strlen($opening_tag) - strlen($closing_tag));\r\n\t\t\t\t$needs_to_be_cleaned = false;\r\n\t\t\t\tforeach($array_tags as $tagName2) {\r\n\t\t\t\t\tif(strpos($code_to_clean, '<' . $tagName2) !== false) {\r\n\t\t\t\t\t\t$needs_to_be_cleaned = true;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif($needs_to_be_cleaned) {\r\n\t\t\t\t\t$offset = $OStrings[$counter][1];\r\n\t\t\t\t\t$code_to_clean = preg_replace('/<(' . $tagNamesString . ')[^<>]*?>/is', '', $code_to_clean);\r\n\t\t\t\t\t$code_to_clean = preg_replace('/<\\/(' . $tagNamesString . ')>/is', '', $code_to_clean);\r\n\t\t\t\t\t$new_OString = $opening_tag . $code_to_clean . $closing_tag;\r\n\t\t\t\t\t$this->code = substr($this->code, 0, $offset) . $new_OString . substr($this->code, $offset + strlen($OString));\r\n\t\t\t\t\t$ct_redundant_acro += 1;\r\n\t\t\t\t}\r\n\t\t\t\t$counter--;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->logMsgIf(\"redundant acronyms applications removed\", $ct_redundant_acro);\r\n\t}", "function closetags($html) {\n\t\tpreg_match_all('#<([a-z]+)(?: .*)?(?<![/|/ ])>#iU', $html, $result);\n\t\t$openedtags = $result[1]; #put all closed tags into an array\n\t\tpreg_match_all('#</([a-z]+)>#iU', $html, $result);\n\t\t$closedtags = $result[1];\n\t\t$len_opened = count($openedtags);\n\t\t# all tags are closed\n\t\tif (count($closedtags) == $len_opened) {\n\t\t\treturn $html;\n\t\t}\n\t\t\n\t\t$openedtags = array_reverse($openedtags);\n\t\t# close tags\n\t\tfor ($i=0; $i < $len_opened; $i++) {\n\t\t\tif (!in_array($openedtags[$i], $closedtags)){\n\t\t\t $html .= '</'.$openedtags[$i].'>';\n\t\t\t} else {\n\t\t\t unset($closedtags[array_search($openedtags[$i], $closedtags)]); }\n\t\t\t} \n\t\t\treturn $html;\n\t\t}", "function tagReset () {\n if (is_object($this->tptPointer)) \n $this->say($this->tptPointer->templateReset());\n }", "function tags_tinymce_fix( $init )\n{\n // html elements being stripped\n $init['extended_valid_elements'] = 'i[*],span[*]';\n // don't remove line breaks\n $init['remove_linebreaks'] = false;\n // convert newline characters to BR\n $init['convert_newlines_to_brs'] = true;\n // don't remove redundant BR\n $init['remove_redundant_brs'] = false;\n // pass back to wordpress\n return $init;\n}", "function tag_wrap($tag, $content = \"\", $class = NULL){\n\t$result = (is_block($tag)) ? \"\\r<\" : \"<\" ;\n\t$result .= $tag;\n\t$result .= (!empty($class)) ? ' class=\"'.$class.'\">' : '>' ;\n\t$result .= $content;\n\t$result .= (is_block($tag)) ? \"\\r</$tag>\\n\" : \"</$tag>\" ;\n\t\n\treturn $result;\n}", "public function replaceBlock($string, $inList = false)\n\t{\n\t\t$string = $this->replaceHeaders($string);\n\t\t$string = $this->replaceHorizontalRules($string);\n\t\t$string = $this->replaceLists($string, $inList);\n\t\t$string = $this->replaceBlockCode($string);\n\t\t$string = $this->replaceBlockQuotes($string);\n\n\t\t// Prevent \"paragraphing\" from destroying our nice blocks\n\t\t$string = $this->hashifyBlocks($string);\n\n\t\t$string = $this->paragraphify($string);\n\n\t\treturn $string;\n\t}", "function register_block_core_post_template()\n {\n }", "public function addInsertBlocks() {\n foreach ($this->_explodedBody as $key => $paragraph) {\n if (isset($this->_inserts[$key])) {\n $this->_body = str_replace($paragraph . '</p>', $paragraph . $this->_explodeTag . $this->_inserts[$key], $this->_body);\n }\n else {\n $this->_body = str_replace($paragraph . '</p>', $paragraph . $this->_explodeTag, $this->_body);\n }\n }\n\n $this->_insertedBody = $this->_body;\n\n }", "private function render_block_tag($r)\n\t{\n\t\tswitch (strtolower($r[1])) {\n\t\tcase \"html\": // don't parse any syntax\n\t\t\t$pre = '';\n\t\t\t$post = '';\n\t\tcase \"code\":\n\t\t\t$pre = '<pre class=\"code\">';\n\t\t\t$post = '</pre>';\n\t\t\tbreak;\t\n\t\tdefault:\n\t\t\treturn $r[0];\n\t\t}\n\n\t\t// consume to the end of the tag\n\t\tob_start();\n\t\twhile (!is_null($line = $this->nextLine())) {\n\t\t\tif (trim($line) == '</'.$r[1].'>') break; // end of tag\n\n\t\t\techo $line.\"\\n\";\n\t\t}\n\n\t\treturn $pre.ob_get_clean().$post;\n\t}", "function _excerpt_render_inner_blocks($parsed_block, $allowed_blocks)\n {\n }", "private static function replaceExtend(string $content)\n {\n preg_match(self::FORMAT['extends'], $content, $matches);\n\n if (!isset($matches[1])) {\n return $content;\n }\n\n $filename = Str::sanitizePath(trim($matches[1], '\"\\''));\n $parent_content = self::getContent($filename);\n\n //Replace parent block imports in child view\n preg_match_all(self::FORMAT['parent_block'], $content, $parent_blocks);\n\n foreach ($parent_blocks[1] as $block_name) {\n $block_regex = str_replace(self::BLOCK_NAME, $block_name, self::FORMAT['block']);\n $parent_block_regex = str_replace(self::BLOCK_NAME, $block_name, self::FORMAT['parent_block']);\n preg_match($block_regex, $parent_content, $block_content);\n\n $content = preg_replace($parent_block_regex, trim($block_content[2] ?? ''), $content);\n }\n\n //Replace blocks in parent with child blocks content\n preg_match_all(self::FORMAT['block'], $content, $child_blocks);\n\n foreach ($child_blocks[1] as $key => $block_name) {\n $block_regex = str_replace(self::BLOCK_NAME, $block_name, self::FORMAT['block']);\n $parent_content = preg_replace($block_regex, trim($child_blocks[2][$key]), $parent_content);\n }\n\n //Remove remaining unused tags\n $parent_content = preg_replace(self::FORMAT['block'], '', $parent_content);\n $parent_content = preg_replace(self::FORMAT['parent_block'], '', $parent_content);\n\n return $parent_content;\n }", "public static function ReplaceHtml($html, $block) {\n\n return 'Html.Replace(\\'' . String::BuildStringNewLines(String::AddSQSlashes($html)) . '\\',\\'' . $block . '\\');';\n }", "function gsb_public_custom_blocks_preprocess_gsb_public_custom_blocks_follow_us(&$variables) {\n\n}", "function render_block_core_post_template($attributes, $content, $block)\n {\n }", "function do_blocks( $content ) {\n\tglobal $wp_registered_blocks;\n\n\t// Extract the blocks from the post content.\n\t$open_matcher = '/<!--\\s*wp:([a-z](?:[a-z0-9\\/]+)*)\\s+((?:(?!-->).)*)-->.*?<!--\\s*\\/wp:\\g1\\s+-->/';\n\tpreg_match_all( $open_matcher, $content, $matches, PREG_OFFSET_CAPTURE );\n\n\t$new_content = $content;\n\tforeach ( $matches[0] as $index => $block_match ) {\n\t\t$block_name = $matches[1][ $index ][0];\n\t\t// do nothing if the block is not registered.\n\t\tif ( ! isset( $wp_registered_blocks[ $block_name ] ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$block_markup = $block_match[0];\n\t\t$block_position = $block_match[1];\n\t\t$block_attributes_string = $matches[2][ $index ][0];\n\t\t$block_attributes = parse_block_attributes( $block_attributes_string );\n\n\t\t// Call the block's render function to generate the dynamic output.\n\t\t$output = call_user_func( $wp_registered_blocks[ $block_name ]['render'], $block_attributes );\n\n\t\t// Replace the matched block with the dynamic output.\n\t\t$new_content = str_replace( $block_markup, $output, $new_content );\n\t}\n\n\treturn $new_content;\n}", "function wp_pre_kses_block_attributes($content, $allowed_html, $allowed_protocols)\n {\n }", "function replaceCustomTemplateTags($tag, $tagContent) {\n\t\tglobal $pun_user,$pun_config;\n\n\t\tswitch($tag) {\n\n\t\t\tcase 'FORUM_LOGIN_URL':\n\t\t\t\tif(!$pun_user['is_guest']) {\n\t\t\t\t\treturn ($this->getRequestVar('view') == 'logs') ? './?view=logs' : './';\n\t\t\t\t} else {\n\t\t\t\t\treturn $this->htmlEncode($pun_config['o_base_url'].'/login.php?action=in');\n\t\t\t\t}\n\t\t\t\t\n\t\t\tcase 'REDIRECT_URL':\n\t\t\t\tif(!$pun_user['is_guest']) {\n\t\t\t\t\treturn '';\n\t\t\t\t} else {\n\t\t\t\t\treturn $this->htmlEncode($this->getRequestVar('view') == 'logs' ? $this->getChatURL().'?view=logs' : $this->getChatURL());\n\t\t\t\t}\n\t\t\t\n\t\t\tdefault:\n\t\t\t\treturn null;\n\t\t}\n\t}", "function gtags_display_hook() {\n add_filter( 'bp_current_action', 'gtags_return_blank' );\n bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'groups/index' ) );\n remove_filter( 'bp_current_action', 'gtags_return_blank' );\n}", "function _opened_tag($mindless_mode,$as_admin,$source_member,$attribute_map,$current_tag,$pos,$comcode_dangerous,$comcode_dangerous_html,$in_separate_parse_section,$in_html,$in_semihtml,$close,&$len,&$comcode)\n{\n\tglobal $BLOCK_TAGS,$TEXTUAL_TAGS,$CODE_TAGS;\n\n\t$block_tag=isset($BLOCK_TAGS[$current_tag]);\n\n\tif (($block_tag) && ($pos<$len) && ($comcode[$pos]==chr(10)))\n\t{\n\t\t++$pos;\n\t\tglobal $NUM_LINES;\n\t\t++$NUM_LINES;\n\t}\n\n\t$tag_output=new ocp_tempcode();\n\t$textual_area=isset($TEXTUAL_TAGS[$current_tag]);\n\n\t$white_space_area=$textual_area;\n\tif (((($current_tag=='code') || ($current_tag=='codebox')) && (isset($attribute_map['param'])) && ((strtolower($attribute_map['param'])=='php') || (file_exists(get_file_base().'/sources/geshi/'.filter_naughty(strtolower($attribute_map['param'])).'.php')) || (file_exists(get_file_base().'/sources_custom/geshi/'.filter_naughty($attribute_map['param']).'.php')))) || ($current_tag=='php') || ($current_tag=='attachment') || ($current_tag=='attachment2') || ($current_tag=='attachment_safe') || ($current_tag=='menu'))\n\t{\n\t\t$in_separate_parse_section=true;\n\t} else\n\t{\n\t\t// Code tags are white space area, but not textual area\n\t\tif (isset($CODE_TAGS[$current_tag])) $white_space_area=true;\n\t}\n\n\t$in_code_tag=isset($CODE_TAGS[$current_tag]);\n\n\t$attribute_map=array();\n\n\t$formatting_allowed=(($textual_area?1:0) & ($block_tag?1:0))!=0;\n\n//\t\t\t\t\t\tif (in_array($current_tag,$BLOCK_TAGS)) $just_new_line=true;\n\n\tif ($current_tag=='html') $in_html=!$close;\n\telseif ($current_tag=='semihtml') $in_semihtml=!$close;\n\t$status=CCP_NO_MANS_LAND;\n\n\tif (($current_tag=='html') || ($current_tag=='semihtml')) // New state meaning we need to filter the contents\n\t{\n\t\tif (($in_html) || ($in_semihtml))\n\t\t{\n\t\t\tfilter_html($as_admin,$source_member,$pos,$len,$comcode,$in_html,$in_semihtml);\n\t\t}\n\t}\n\n\tif ($mindless_mode)\n\t{\n\t\t$white_space_area=true;\n\t\t$in_separate_parse_section=false;\n\t}\n\n\tif ($current_tag=='quote')\n\t{\n\t\t$comcode_dangerous=false;\n\t\t$comcode_dangerous_html=false;\n\t}\n\n\treturn array($tag_output,$comcode_dangerous,$comcode_dangerous_html,$white_space_area,$formatting_allowed,$in_separate_parse_section,$textual_area,$attribute_map,$status,$in_html,$in_semihtml,$pos,$in_code_tag);\n}", "function CloseTag() {\n\t\tif (!empty($this->tag)) {\n\t\t\tfor ($in=0;$in<$this->indent; $in++) {\n\t\t\t\t$this->outputCode.=\"\";\n\t\t\t}\n\t\t\tif (!empty($this->tag))\n\t\t\t$this->outputCode.=\"</\".$this->tag.\">\";\n\t\t}\n\t\t//$this->outputCode.=\"\\n\";\n\t\t$this->indent--;\n\t}", "function event_details_cpt_single_blocks( $blocks ) {\n // Add new blocks with custom function output\n // Below is an example with an anonymous function but you can use custom functions as well ;)\n $blocks['custom_block'] = function() {\n\n echo '';\n\n };\n\n // Remove these content blocks\n unset( $blocks['comments'] );\n\t unset( $blocks['meta'] );\n\t unset( $blocks['title'] );\n\t unset( $blocks['media'] );\n\t\n // Return blocks\n return $blocks;\n\n}", "function p1base_theme_suggestions_block_alter2(array &$suggestions, array $variables) {\n $node = \\Drupal::request()->attributes->get('node');\n\n // Add block suggestions based on what is the conten\n if ($node) {\n $bundle = $node->bundle();\n $suggestions[] = 'block__' . $bundle . '__' . $variables['elements']['#plugin_id'];\n }\n\n $block = $variables['elements'];\n $blockType = $block['#configuration']['provider'];\n if ($blockType == \"block_content\") {\n $bundle = $block['content']['#block_content']->bundle();\n $id = $block['content']['#block_content']->id();\n $suggestions[] = 'block__' . $blockType;\n $suggestions[] = 'block__' . $blockType . '__' . $bundle;\n $suggestions[] = 'block__' . $id;\n }\n}", "public function replaceBaseTokens(&$content);", "function _inject_theme_attribute_in_block_template_content($template_content)\n {\n }", "function _tag_close( $parser, $tag )\n {\n $this->curtag = &$this->curtag->parent;\n }", "private function update_wp_tag_cloud() {\n\n\t\t//filter tag clould output so that it can be styled by CSS\n\t\tadd_action( 'wp_tag_cloud', array($this, 'add_tag_class') );\n\n\t\t//Tweak tag cloud args\n\t\tadd_filter( 'widget_tag_cloud_args', array($this, 'my_widget_tag_cloud_args') );\n\n\t\t//Wrap tag cloud output\n\t\tadd_filter( 'wp_tag_cloud', array($this, 'wp_tag_cloud_filter'), 10, 2 );\n\n\t\t//Alter the link (<a>) tag html\n\t\tadd_filter( 'the_tags', array($this, 'add_class_the_tags') );\n\n\t}", "protected function stripBlockTags($text) {\n\t\t$blockElements = 'address|blockquote|center|del|dir|div|dl|fieldset|form|h[1-6]|hr|ins|isindex|menu|noframes|noscript|ol|p|pre|table|ul|center|dir|isindex|menu|noframes';\n\t\t$text = preg_replace('%' . $this->getOpeningTag('li|dd') . '%xs', '&nbsp;&nbsp;*&nbsp;', $text);\n\t\t$text = preg_replace('%' . $this->getClosingTag('li|dt') . '%xs', '<br />', $text);\n\t\t$text = preg_replace('%' . $this->getClosingTag('ol|ul|dl') . '%xs', '', $text);\n\t\t$text = preg_replace('%' . $this->getOpeningTag($blockElements) . '%xs', '', $text);\n\t\t$text = preg_replace('%' . $this->getClosingTag($blockElements) . '%xs', '<br />', $text);\n\t\t$text = preg_replace('%' . $this->getOpeningTag('br') . '{2,2}%xs', '<br />', $text);\n\t\treturn $text;\n\t}", "function the_content_filter($content) {\n $block = join(\"|\",$this->shortcodes);\n $rep = preg_replace(\"/(<p>|<br \\/>)?\\[($block)(\\s[^\\]]+)?\\](<\\/p>|<br \\/>)?/\",\"[$2$3]\",$content);\n $rep = preg_replace(\"/(<p>|<br \\/>)?\\[\\/($block)](<\\/p>|<br \\/>)?/\",\"[/$2]\",$rep);\n return $rep;\n }", "function filter_eliminate_autop( $content ) {\n\t\t$block = join( \"|\", $this->shortcodes );\n\n\t\t// replace opening tag\n\t\t$content = preg_replace( \"/(<p>)?\\[($block)(\\s[^\\]]+)?\\](<\\/p>|<br \\/>)?/\", \"[$2$3]\", $content );\n\n\t\t// replace closing tag\n\t\t$content = preg_replace( \"/(<p>)?\\[\\/($block)](<\\/p>|<br \\/>)/\", \"[/$2]\", $content );\n\t\treturn $content;\n\t}", "public function attachTagToPostAtTheEnd() {}", "function ParaReplace( $article, $case_sensitive = false )\n{\n \n global $wp_query;\n global $sql;\n global $wpdb;\n global $post;\n global $wp;\n \n $krURLtags = ( ! empty( $wp_query->query_vars[\"krtags\"] ) ? $wp_query->query_vars[\"krtags\"] : '' );\n $parent = esc_sql( $krURLtags );\n \n if(!empty ($krURLtags)){\n $data = $sql->GetParaByTags($krURLtags);\n if(!empty($data)){\n $paragraph = $data[0];\n $article = str_replace(array_keys($paragraph), array_values($paragraph), $article, $count);\n }else{\n $paragraph = array(\n '##PARA1##' => '',\n '##PARA2##' => '',\n '##PARA3##' => '' \n );\n $article = str_replace(array_keys($paragraph), array_values($paragraph), $article, $count);\n }\n \n \n }elseif(!empty ($parent)){\n $pages = explode(\"/\", $parent);\n $data = $sql->GetParaByTags(end($pages));\n if(!empty($data)){\n $paragraph = $data[0];\n $article = str_replace(array_keys($paragraph), array_values($paragraph), $article, $count);\n }else{\n $paragraph = array(\n '##PARA1##' => '',\n '##PARA2##' => '',\n '##PARA3##' => '' \n );\n $article = str_replace(array_keys($paragraph), array_values($paragraph), $article, $count);\n } \n }else{\n $paragraph = array(\n '##PARA1##' => '',\n '##PARA2##' => '',\n '##PARA3##' => '' \n );\n $article = str_replace(array_keys($paragraph), array_values($paragraph), $article, $count);\n }\n \n return $article;\n}", "protected function _beforeToHtml()\n {\n $this->prepareBlockData();\n return parent::_beforeToHtml();\n }", "private static function closetags ($html) {\n\t\t// put all opened tags into an array\n\t\tpreg_match_all ( \"#<([a-z]+)( .*)?(?!/)>#iU\", $html, $result );\n\t\t$openedtags = $result[1];\n\t\t// put all closed tags into an array\n\t\tpreg_match_all ( \"#</([a-z]+)>#iU\", $html, $result );\n\t\t$closedtags = $result[1];\n\t\t$len_opened = count ( $openedtags );\n\t\t// all tags are closed\n\t\tif(count($closedtags ) == $len_opened)\n\t\t\treturn $html;\n\t\t$openedtags = array_reverse ( $openedtags );\n\t\t// close tags\n\t\tfor( $i = 0; $i < $len_opened; $i++ ){\n\t\t\tif ( !in_array ( $openedtags[$i], $closedtags ) )\n\t\t\t\t$html .= \"</\" . $openedtags[$i] . \">\";\n\t\t\telse\n\t\t\t\tunset ( $closedtags[array_search ( $openedtags[$i], $closedtags)] );\n\t\t}\n\t\treturn $html;\n\t}", "function _remove_theme_attribute_in_block_template_content($template_content)\n {\n }", "public static function action_before_content() {\n\t\t\tglobal $shortcode_tags, $cv_shortcode_tags_backup;\n\n\t\t\tif ( !$cv_shortcode_tags_backup ) {\n\t\t\t\t$trans_key = 'cv_shortcode_tags_193';\n\t\t\t\tif ( !defined( 'PT_CV_DOING_PAGINATION' ) && !defined( 'PT_CV_DOING_PREVIEW' ) ) {\n\t\t\t\t\t$tagnames\t\t\t\t\t = array_keys( $shortcode_tags );\n\t\t\t\t\t$cv_shortcode_tags_backup\t = join( '|', array_map( 'preg_quote', $tagnames ) );\n\t\t\t\t\tset_transient( $trans_key, $cv_shortcode_tags_backup, DAY_IN_SECONDS );\n\t\t\t\t} else {\n\t\t\t\t\t$cv_shortcode_tags_backup = get_transient( $trans_key );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function replaceTagsAll(&$string, $enabled = 1, $security_pass = 1)\n\t{\n\t\tif (!is_string($string) || $string == '')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (!$enabled)\n\t\t{\n\t\t\t// replace source block content with HTML comment\n\t\t\t$string = '<!-- ' . JText::_('SRC_COMMENT') . ': ' . JText::_('SRC_CODE_REMOVED_NOT_ENABLED') . ' -->';\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (!$security_pass)\n\t\t{\n\t\t\t// replace source block content with HTML comment\n\t\t\t$string = '<!-- ' . JText::_('SRC_COMMENT') . ': ' . JText::sprintf('SRC_CODE_REMOVED_SECURITY', '') . ' -->';\n\n\t\t\treturn;\n\t\t}\n\n\t\t$this->cleanTags($string);\n\n\t\t$a = $this->src_params->areas['default'];\n\t\t$forbidden_tags_array = explode(',', $a['forbidden_tags']);\n\t\t$this->cleanArray($forbidden_tags_array);\n\t\t// remove the comment tag syntax from the array - they cannot be disabled\n\t\t$forbidden_tags_array = array_diff($forbidden_tags_array, array('!--'));\n\t\t// reindex the array\n\t\t$forbidden_tags_array = array_merge($forbidden_tags_array);\n\n\t\t$has_forbidden_tags = 0;\n\t\tforeach ($forbidden_tags_array as $forbidden_tag)\n\t\t{\n\t\t\tif (!(strpos($string, '<' . $forbidden_tag) == false))\n\t\t\t{\n\t\t\t\t$has_forbidden_tags = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (!$has_forbidden_tags)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// double tags\n\t\t$tag_regex = '#<\\s*([a-z\\!][^>\\s]*?)(?:\\s+.*?)?>.*?</\\1>#si';\n\t\tpreg_match_all($tag_regex, $string, $matches, PREG_SET_ORDER);\n\n\t\tif (!empty($matches))\n\t\t{\n\t\t\tforeach ($matches as $match)\n\t\t\t{\n\t\t\t\tif (!in_array($match['1'], $forbidden_tags_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$tag = '<!-- ' . JText::_('SRC_COMMENT') . ': ' . JText::sprintf('SRC_TAG_REMOVED_FORBIDDEN', $match['1']) . ' -->';\n\t\t\t\t$string = str_replace($match['0'], $tag, $string);\n\t\t\t}\n\t\t}\n\n\t\t// single tags\n\t\t$tag_regex = '#<\\s*([a-z\\!][^>\\s]*?)(?:\\s+.*?)?>#si';\n\t\tpreg_match_all($tag_regex, $string, $matches, PREG_SET_ORDER);\n\n\t\tif (!empty($matches))\n\t\t{\n\t\t\tforeach ($matches as $match)\n\t\t\t{\n\t\t\t\tif (!in_array($match['1'], $forbidden_tags_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$tag = '<!-- ' . JText::_('SRC_COMMENT') . ': ' . JText::sprintf('SRC_TAG_REMOVED_FORBIDDEN', $match['1']) . ' -->';\n\t\t\t\t$string = str_replace($match['0'], $tag, $string);\n\t\t\t}\n\t\t}\n\t}", "public function removeAllTags() {}", "protected function afterFind()\n {\n parent::afterFind();\n $this->_oldTags=$this->tags;\n }", "function htmlblock($text) {\n $this->html($text, 'pre');\n }", "function restoreTags($input)\n {\n $opened = array();\n\n // loop through opened and closed tags in order\n if(preg_match_all(\"/<(\\/?[a-z]+)>?/i\", $input, $matches)) {\n foreach($matches[1] as $tag) {\n if(preg_match(\"/^[a-z]+$/i\", $tag, $regs)) {\n // a tag has been opened\n if(strtolower($regs[0]) != 'br') $opened[] = $regs[0];\n } elseif(preg_match(\"/^\\/([a-z]+)$/i\", $tag, $regs)) {\n // a tag has been closed\n unset($opened[array_pop(array_keys($opened, $regs[1]))]);\n }\n }\n }\n\n // close tags that are still open\n if($opened) {\n $tagstoclose = array_reverse($opened);\n foreach($tagstoclose as $tag) $input .= \"</$tag>\";\n }\n\n return $input;\n }", "function gwt_drupal_process_block(&$variables, $hook) {\n // Drupal 7 should use a $title variable instead of $block->subject.\n $variables['title'] = isset($variables['block']->subject) ? $variables['block']->subject : '';\n}", "function mc_admin_strip_tags() {\n\n\treturn '<strong><em><i><b><span><a><code><pre>';\n}", "final public function set($tag, $content) {\n $this->template = str_replace(\"{\".$tag.\"}\", $content, $this->template);\n }", "function render_block_core_shortcode($attributes, $content)\n {\n }", "protected function afterFind()\n\t{\n\t\tparent::afterFind();\n\t\t$this->_oldTags=$this->tags;\n\t}", "function formTagsForRowFiles($htmlForRow, $settingRowTags){ //this part for others blocks with equal class\n $originalBlocks = [];\n $usedBiBlocks = [];\n\n foreach ($htmlForRow as $blockInRow){\n $bitrixClass = findBitrixTag($blockInRow[0], $settingRowTags);\n if(isset($bitrixClass)){\n if (!in_array(findBitrixTag($blockInRow[0], $settingRowTags), $usedBiBlocks)) {\n array_push($usedBiBlocks, findBitrixTag($blockInRow[0], $settingRowTags));\n array_push($originalBlocks, $blockInRow);\n }\n }\n\n }\n\n echo \"\\n\".\"(form) sort block for row is done\";\n return $originalBlocks;\n\n}", "private function removeTagsWithMultiplication() {\n\t\t$special = array(\n\t\t\t// TagText-TagAttribut => Multiplikate\n\t\t\t'img-alt' => 3,\n\t\t\t'img-title' => 4,\n\t\t\t'a-title' => 5,\n\t\t\t'a' => 5,\n\t\t\t'h1' => 20,\n\t\t\t'h2' => 9,\n\t\t\t'h3' => 8,\n\t\t\t'h4' => 7,\n\t\t\t'h5' => 6,\n\t\t\t'h6' => 5,\n\t\t\t'b' => 4,\n\t\t\t'u' => 3,\n\t\t\t'i' => 2,\n\t\t\t'em' => 3,\n\t\t\t'strong' => 4,\n\t\t\t'cite' => 2,\n\t\t\t'blockquote' => 2\n\t\t);\n\t\tforeach ($special as $tag => $multis) {\n\t\t\tif (strpos($tag, '-') !== false) {\n\t\t\t\t$split = explode('-', $tag);\n\t\t\t\t$tag = $split[0];\n\t\t\t\t$attr = $split[1];\n\t\t\t\t$this->html = preg_replace('#<'.$tag.'[^>]*'.$attr.'=\"([^\"]*)\"[^>]*>#i', str_repeat(' $1 ', $multis), $this->html);\n\t\t\t} else {\n\t\t\t\t$this->html = preg_replace('#<'.$tag.'(>|\\s.*?>)(.*?)</'.$tag.'>#is', str_repeat(' $2 ', $multis), $this->html);\n\t\t\t}\n\t\t}\n\t\t$this->html = strip_tags($this->html);\n\t}", "function wp_render_elements_support($block_content, $block)\n {\n }", "function block_plugin_my_block_save($block) {\n variable_set($block['delta'], $block['my_custom_field']);\n}", "function udesign_inside_body_tag() {\r\n do_action('udesign_inside_body_tag');\r\n}", "function register_block_core_tag_cloud()\n {\n }", "function render_block_core_post_content($attributes, $content, $block)\n {\n }" ]
[ "0.645628", "0.6428538", "0.62610906", "0.6064476", "0.5979072", "0.5914047", "0.5882833", "0.5852715", "0.57815", "0.57423013", "0.57420915", "0.5726671", "0.5646644", "0.5646053", "0.56335765", "0.56334096", "0.5617191", "0.56067884", "0.559265", "0.5555665", "0.5551675", "0.55498457", "0.5529367", "0.5527094", "0.5524364", "0.55192894", "0.5497103", "0.5487494", "0.5487176", "0.5472734", "0.54620254", "0.54555327", "0.54547286", "0.5450224", "0.54325324", "0.5424429", "0.5422494", "0.5418213", "0.5410337", "0.53993917", "0.53984916", "0.53905827", "0.53838116", "0.5382149", "0.5379101", "0.537895", "0.5359551", "0.5357958", "0.5356071", "0.53521", "0.53505284", "0.5340648", "0.533614", "0.5334867", "0.53117496", "0.52969974", "0.5294588", "0.52917105", "0.5288188", "0.52866805", "0.5286616", "0.5284498", "0.5282727", "0.52819103", "0.52815706", "0.5280846", "0.5272867", "0.52722925", "0.5267573", "0.52635", "0.52624893", "0.5261065", "0.5252176", "0.5247942", "0.5246144", "0.5244719", "0.52408385", "0.5234688", "0.52320486", "0.5231037", "0.5230473", "0.5229334", "0.5229312", "0.5221376", "0.52174336", "0.52147573", "0.5210078", "0.5204547", "0.5203234", "0.51975334", "0.51970434", "0.5194704", "0.51942337", "0.5191819", "0.5186431", "0.5183827", "0.5182097", "0.51778024", "0.5177319", "0.5170254" ]
0.7523821
0
everything else is done, so show us the page
public function output() { $this->do_tags(); $this->final_output = ''; foreach ($this->merged as $block) { $this->final_output .= $block; } $this->last_file = ''; $this->values = array(); $this->files = array(); $this->merged = array(); // the final template all put together return $this->final_output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ee_breakouts_page_load() {}", "function main()\n {\n $this->page_id = 113;\n $this->get_text();\n $this->body .= \"<table cellpadding=5 cellspacing=1 border=0 width=\\\"100%\\\">\\n\";\n if (strlen(trim($this->messages[500021])) > 0) {\n $this->body .= \"<tr class=\\\"browse_sellers_main_page_title\\\">\\n\\t<td valign=top height=20>\" . $this->messages[500021] . \"</td>\\n</tr>\\n\";\n }\n if (strlen(trim($this->messages[500022])) > 0) {\n $this->body .= \"<tr class=\\\"browse_sellers_main_page_message\\\">\\n\\t<td valign=top height=20>\" . $this->messages[500022] . \"</td>\\n</tr>\\n\";\n }\n $this->body .= \"<tr>\\n\\t<td valign=top>\\n\\t\";\n if (!$this->browse_main()) {\n $this->browse_error();\n }\n $this->body .= \"</td>\\n</tr>\\n\";\n $this->body .= \"</table>\\n\";\n $this->display_page();\n return true;\n }", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "function showUploadCompletePage() {\n\t\t$this->setCacheLevelNone();\n\t\t$this->render($this->getTpl('uploadComplete', '/account'));\t\t\n\t\n\t}", "public function displayPage()\n {\n\n // I check if there is a duplicate action\n $this->handleDuplicate();\n\n $formTable = new FormListTable();\n\n $formTable->prepare_items();\n require_once __DIR__ . '/templates/index.php';\n }", "public function action_view()\n {\n // Correct page has been loaded in the before() function\n $pagename = Wi3::inst()->routing->args[0];\n $this->prepareForViewing($pagename);\n // Render page\n $renderedInAdminArea = false;\n $this->request->response = Wi3_Renderer::renderPage($pagename, $renderedInAdminArea);\n // Page caching will be handled via an Event. See bootstrap.php and the Caching plugin\n }", "protected function makePage() {\n // \n // get the user's constituency\n // \n // get the candidates for this election in this constituency\n // \n // make the page output\n }", "public function main() {\r\n // Access check!\r\n // The page will show only if there is a valid page and if this page may be viewed by the user\r\n $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);\r\n $access = is_array($this->pageinfo) ? 1 : 0;\r\n\r\n if (($this->id && $access) || ($GLOBALS['BE_USER']->user['admin'] && !$this->id)) {\r\n\r\n // Draw the header.\r\n $this->doc = t3lib_div::makeInstance('bigDoc');\r\n $this->doc->getPageRenderer()->addCssFile(t3lib_extMgm::extRelPath('medbootstraptools').'res/css/bemodul.css'); \r\n $this->doc->getPageRenderer()->addCssFile(t3lib_extMgm::extRelPath('medbootstraptools').'res/bootstrap/css/bootstrap.min.css'); \r\n $this->doc->backPath = $GLOBALS['BACK_PATH'];\r\n $this->doc->form = '<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">';\r\n\r\n // JavaScript\r\n $this->doc->JScode = '\r\n <script src=\"../typo3conf/ext/medbootstraptools/res/js/jquery-1.8.3.min.js\"></script>\r\n <script src=\"../typo3conf/ext/medbootstraptools/res/js/functions.js\"></script>\r\n <script language=\"javascript\" type=\"text/javascript\">\r\n script_ended = 0;\r\n function jumpToUrl(URL) {\r\n document.location = URL;\r\n }\r\n </script>\r\n ';\r\n $this->doc->postCode = '\r\n <script language=\"javascript\" type=\"text/javascript\">\r\n script_ended = 1;\r\n if (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\r\n </script>\r\n ';\r\n\r\n $headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />'\r\n . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\r\n\r\n $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));\r\n //$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));\r\n //$this->content .= $this->doc->spacer(5);\r\n //$this->content .= $this->doc->section('', $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));\r\n //$this->content .= $this->doc->divider(5);\r\n // Render content:\r\n $this->moduleContent();\r\n\r\n // Shortcut\r\n if ($GLOBALS['BE_USER']->mayMakeShortcut()) {\r\n $this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));\r\n }\r\n\r\n $this->content .= $this->doc->spacer(10);\r\n } else {\r\n // If no access or if ID == zero\r\n\r\n $this->doc = t3lib_div::makeInstance('bigDoc');\r\n $this->doc->backPath = $GLOBALS['BACK_PATH'];\r\n\r\n $this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));\r\n $this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));\r\n $this->content .= $this->doc->spacer(5);\r\n $this->content .= $this->doc->spacer(10);\r\n }\r\n }", "public function show() {\n $this->buildPage();\n echo $this->_page;\n }", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\tif (($this->id && $access) || ($BE_USER->user[\"admin\"] && !$this->id))\t{\n\n\t\t\t\t// Draw the header.\n\t\t\t$this->doc = t3lib_div::makeInstance(\"bigDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t$this->doc->form='<form action=\"index.php?id='.$this->id.'\" method=\"POST\">';\n\n\t\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader(\"pages\",$this->pageinfo,$this->pageinfo[\"_thePath\"]).\"<br />\".$LANG->sL(\"LLL:EXT:lang/locallang_core.xml:labels.path\").\": \".t3lib_div::fixed_lgd_pre($this->pageinfo[\"_thePath\"],50);\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\t\n\t\t\texec('hostname',$ret);\n\t\t\t$ret=implode(\"\",$ret);\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\") .\" on: $ret\");\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section(\"\",$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,\"SET[function]\",$this->MOD_SETTINGS[\"function\"],$this->MOD_MENU[\"function\"])));\n\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section(\"\",$this->doc->makeShortcutIcon(\"id\",implode(\",\",array_keys($this->MOD_MENU)),$this->MCONF[\"name\"]));\n\t\t\t}\n\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t} else {\n\t\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\t}", "public function send()\n\t{\n\t\t$this->page->generatePage();\n\t\texit;\n\t}", "function go()\n {\n $this->session->layout == 'gallery' ? \n $this->data['pagebody'] = 'Roster/rosterGal' : \n $this->data['pagebody'] = 'Roster/rosterTab'; \n $this->render();\n }", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\tif (($this->id && $access) || ($BE_USER->user[\"admin\"] && !$this->id))\t{\n\n\t\t\t// Draw the header.\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t$this->doc->form = '<form action=\"\" method=\"post\">';\n\n\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL) {\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . intval($this->id) . ';\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader(\"pages\",$this->pageinfo,$this->pageinfo[\"_thePath\"]).\"<br>\".$LANG->sL(\"LLL:EXT:lang/locallang_core.php:labels.path\").\": \".t3lib_div::fixed_lgd_pre($this->pageinfo[\"_thePath\"],50);\n\n\t\t\t$this->content .= $this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content .= $this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content .= $this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section(\"\",$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,\"SET[function]\",$this->MOD_SETTINGS[\"function\"],$this->MOD_MENU[\"function\"])));\n\t\t\t$this->content .= $this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content .= $this->doc->spacer(20).$this->doc->section(\"\",$this->doc->makeShortcutIcon(\"id\",implode(\",\",array_keys($this->MOD_MENU)),$this->MCONF[\"name\"]));\n\t\t\t}\n\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t} else {\n\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\t}", "public function finish_display ()\n {\n $this->_finish_body ();\n?>\n </body>\n</html>\n<?php\n }", "protected function setupPage() {}", "function displayPage()\n {\n $this->getState()->template = 'transition-page';\n }", "protected function displayContent() {\r\n\t\t$this -> model -> processLogout();\r\n\t\theader('Location: index.php?page=home');\r\n\t}", "private function content() {\n $this->checkPost();\n\n if (isset($_SESSION['CREATE'])) {\n\n switch ($_SESSION['CREATE']['page']) {\n case 0:\n $this->pageAgreement();\n break;\n case 1:\n $this->pageNameIntro();\n break;\n case 2:\n $this->pageMark();\n break;\n case 3:\n $this->pageFinal();\n break;\n default:\n echo '<h1>Error: Page Invalid<h1>';\n break;\n }\n\n }else\n echo '<h1>Error: Session invalid</h1>';\n }", "public function indexAction()\n\t{\n\t\t// Render\n\t\t/*$this->_helper->content\n\t\t\t//->setNoRender()\n\t\t\t->setEnabled()\n\t\t\t;*/\n\t}", "public function main() {\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\tif (($this->id && $access) || (tx_laterpay_helper_user::isAdmin() && !$this->id)) {\n\t\t\t$this->doc->backPath = $GLOBALS['BACK_PATH'];\n\n\t\t\t// load LaterPay-specific CSS\n\t\t\t$this->doc->addStyleSheet('laterpay-backend', t3lib_extMgm::extRelPath('laterpay') . 'res/css/laterpay-backend.css');\n\t\t\t$this->doc->addStyleSheet('fonts.googleapis.com', 'http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,300,400,600&subset=latin,latin-ext');\n\t\t\t// load LaterPay-specific JS\n\t\t\t$this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('laterpay') . 'res/js/vendor/jquery-1.11.2.min.js');\n\t\t\t$this->doc->loadJavascriptLib(t3lib_extMgm::extRelPath('laterpay') . 'res/js/laterpay-backend.js');\n\n\t\t\t$pageContent = $this->getModuleContent();\n\n\t\t\t// Draw the header.\n\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />' .\n\t\t\t\t$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.path') .\n\t\t\t\t': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\n\n\t\t\t$this->content .= $this->doc->startPage(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->header(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->spacer(5);\n\t\t\t$this->content .= $this->doc->section(\n\t\t\t\t\t'', $this->doc->funcMenu($headerSection, t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]',\n\t\t\t\t\t$this->MOD_SETTINGS['function'], $this->MOD_MENU['function']))\n\t\t\t);\n\t\t\t$this->content .= $this->doc->divider(5);\n\t\t\t\t// Render content:\n\t\t\t$this->content .= $pageContent;\n\t\t\t\t// Shortcut\n\t\t\tif ($GLOBALS['BE_USER']->mayMakeShortcut()) {\n\t\t\t\t$this->content .= $this->doc->spacer(20) . $this->doc->section('', $this->doc->makeShortcutIcon('id', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']));\n\t\t\t}\n\n\t\t\t$this->content .= $this->doc->spacer(10);\n\t\t} else {\n\t\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc->backPath = $GLOBALS['BACK_PATH'];\n\n\t\t\t$this->content .= $this->doc->startPage(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->header(tx_laterpay_helper_string::tr('title'));\n\t\t\t$this->content .= $this->doc->spacer(5);\n\t\t\t$this->content .= $this->doc->spacer(10);\n\t\t}\n\t}", "public function displayContent(){\n\t\t\tinclude('/includes/homepage.inc.php');\t\n\t\t}", "public function main()\n {\n $lang = $this->getLanguageService();\n // Access check...\n // The page will show only if there is a valid page and if this page may be viewed by the user\n $access = is_array($this->pageinfo) ? 1 : 0;\n // Content\n $content = '';\n if ($this->id && $access) {\n // Initialize permission settings:\n $this->CALC_PERMS = $this->getBackendUser()->calcPerms($this->pageinfo);\n $this->EDIT_CONTENT = $this->contentIsNotLockedForEditors();\n\n $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);\n\n // override the default jumpToUrl\n $this->moduleTemplate->addJavaScriptCode('jumpToUrl', '\n function jumpToUrl(URL,formEl) {\n if (document.editform && TBE_EDITOR.isFormChanged) { // Check if the function exists... (works in all browsers?)\n if (!TBE_EDITOR.isFormChanged()) {\n window.location.href = URL;\n } else if (formEl) {\n if (formEl.type==\"checkbox\") formEl.checked = formEl.checked ? 0 : 1;\n }\n } else {\n window.location.href = URL;\n }\n }\n ');\n $this->moduleTemplate->addJavaScriptCode('mainJsFunctions', '\n if (top.fsMod) {\n top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';\n top.fsMod.navFrameHighlightedID[\"web\"] = \"pages' . (int)$this->id . '_\"+top.fsMod.currentBank; ' . (int)$this->id . ';\n }\n ' . ($this->popView ? BackendUtility::viewOnClick($this->id, '', BackendUtility::BEgetRootLine($this->id)) : '') . '\n function deleteRecord(table,id,url) { //\n window.location.href = ' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('tce_db') . '&cmd[')\n . ' + table + \"][\" + id + \"][delete]=1&redirect=\" + encodeURIComponent(url) + \"&prErr=1&uPT=1\";\n return false;\n }\n ');\n\n // Find backend layout / columns\n $backendLayout = GeneralUtility::callUserFunction(BackendLayoutView::class . '->getSelectedBackendLayout', $this->id, $this);\n if (!empty($backendLayout['__colPosList'])) {\n $this->colPosList = implode(',', $backendLayout['__colPosList']);\n }\n // Removing duplicates, if any\n $this->colPosList = array_unique(GeneralUtility::intExplode(',', $this->colPosList));\n // Accessible columns\n if (isset($this->modSharedTSconfig['properties']['colPos_list']) && trim($this->modSharedTSconfig['properties']['colPos_list']) !== '') {\n $this->activeColPosList = array_unique(GeneralUtility::intExplode(',', trim($this->modSharedTSconfig['properties']['colPos_list'])));\n // Match with the list which is present in the colPosList for the current page\n if (!empty($this->colPosList) && !empty($this->activeColPosList)) {\n $this->activeColPosList = array_unique(array_intersect(\n $this->activeColPosList,\n $this->colPosList\n ));\n }\n } else {\n $this->activeColPosList = $this->colPosList;\n }\n $this->activeColPosList = implode(',', $this->activeColPosList);\n $this->colPosList = implode(',', $this->colPosList);\n\n $content .= $this->getHeaderFlashMessagesForCurrentPid();\n\n // Render the primary module content:\n if ($this->MOD_SETTINGS['function'] == 1 || $this->MOD_SETTINGS['function'] == 2) {\n $content .= '<form action=\"' . htmlspecialchars(BackendUtility::getModuleUrl($this->moduleName, ['id' => $this->id, 'imagemode' => $this->imagemode])) . '\" id=\"PageLayoutController\" method=\"post\">';\n // Page title\n $content .= '<h1 class=\"t3js-title-inlineedit\">' . htmlspecialchars($this->getLocalizedPageTitle()) . '</h1>';\n // All other listings\n $content .= $this->renderContent();\n }\n $content .= '</form>';\n $content .= $this->searchContent;\n // Setting up the buttons for the docheader\n $this->makeButtons();\n // @internal: This is an internal hook for compatibility7 only, this hook will be removed without further notice\n if ($this->MOD_SETTINGS['function'] != 1 && $this->MOD_SETTINGS['function'] != 2) {\n $renderActionHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['renderActionHook'];\n if (is_array($renderActionHook)) {\n foreach ($renderActionHook as $hook) {\n $params = [\n 'deleteButton' => $this->deleteButton,\n ''\n ];\n $content .= GeneralUtility::callUserFunction($hook, $params, $this);\n }\n }\n }\n // Create LanguageMenu\n $this->makeLanguageMenu();\n } else {\n $this->moduleTemplate->addJavaScriptCode(\n 'mainJsFunctions',\n 'if (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';'\n );\n $content .= '<h1>' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '</h1>';\n $view = GeneralUtility::makeInstance(StandaloneView::class);\n $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/InfoBox.html'));\n $view->assignMultiple([\n 'title' => $lang->getLL('clickAPage_header'),\n 'message' => $lang->getLL('clickAPage_content'),\n 'state' => InfoboxViewHelper::STATE_INFO\n ]);\n $content .= $view->render();\n }\n // Set content\n $this->moduleTemplate->setContent($content);\n }", "function main()\t{\n\t\t\t\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t\t\t\t// Access check!\n\t\t\t\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t\t\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t\t\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\t\t\t\n\t\t\t\t\tif (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))\t{\n\n\t\t\t\t\t\t\t// Draw the header.\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t\t\t\t$this->doc->form='<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">';\n\n\t\t\t\t\t\t\t// JavaScript\n\t\t\t\t\t\t$this->doc->JScode = '\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction confirmURL(text,URL){\n\t\t\t\t\t\t\t\t\tvar agree=confirm(text);\n\t\t\t\t\t\t\t\t\tif (agree) {\n\t\t\t\t\t\t\t\t\t\tjumpToUrl(URL);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t$this->doc->postCode='\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t';\n\n\t\t\t\t\t\t$headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />'\n\t\t\t\t\t\t\t. $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n\t\t\t\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t\t\t\t// Render content:\n\t\t\t\t\t\t$this->moduleContent();\n\n\n\t\t\t\t\t\t// ShortCut\n\t\t\t\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// If no access or if ID == zero\n\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}", "public function indexAction()\n {\n $this->page = Brightfame_Builder::loadPage(null, 'initialize.xml');\n \n // load the data\n Brightfame_Builder::loadPage(null, 'load_data.xml', $this->page);\n\n // load the view\n Brightfame_Builder::loadPage(null, 'load_view.xml', $this->page, $this->view);\n \n // render the page\n $this->view->page = $this->page;\n $this->view->layout()->page = $this->page->getParam('xhtml');\n }", "private function show_page()\n\t{\n\t\t$parse['user_link']\t= $this->_base_url . 'recruit/' . $this->_friends[0]['user_name'];\n\t\n\t\t$this->template->page ( FRIENDS_FOLDER . 'friends_view' , $parse );\t\n\t}", "protected function renderPage()\n {\n $this->requestCallback();\n require_once \\dirname(__FILE__) . '/../../views/settings.php';\n }", "public function generatePage_postProcessing() {}", "function perform()\n { \n // template var with charset used for the html pages\n $this->viewVar['charset'] = $this->config->getModuleVar('common', 'charset');\n // template var with css folder\n $this->viewVar['cssFolder'] = JAPA_PUBLIC_DIR . 'styles/'.$this->config->getModuleVar('common', 'styles_folder');\n\n if(isset($this->dontPerform))\n {\n return;\n }\n \n // init template 'pic' variable \n $this->viewVar['pic'] = array();\n \n // get requested picture content\n $this->model->action($this->module,'getPicture', \n array('result' => & $this->viewVar['pic'],\n 'id_pic' => (int)$this->current_id_pic,\n 'fields' => array('title','description',\n 'file','size','width','height',\n 'mime','media_folder')));\n }", "private function buildPage() {\n ob_clean();\n ob_start();\n\n //session_start();\n require_once $this->_template;\n\n $this->_page = ob_get_clean();\n }", "public function display() {\r\n\t\t$this->script();\r\n\t\t$this->html();\r\n\t\t\r\n\t}", "public function index()\n\t{\n\t\tif ( $this->auth->check() )\n\t\t{\t\t\n\t\t\t// MUESTRA LA PAGINA\n\t\t\t$this->show_page();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect ( $this->_base_url );\n\t\t}\n\t}", "public function HandlePage()\n\t{\n\t\tif(!gzte11(ISC_HUGEPRINT)) {\n\t\t\texit;\n\t\t}\n\n\t\t$this->SetVendorData();\n\n\t\tif($this->displaying == 'products') {\n\t\t\t$this->ShowVendorProducts();\n\t\t}\n\t\telse if($this->displaying == 'page') {\n\t\t\t$this->ShowVendorPage();\n\t\t}\n\t\telse if($this->displaying == 'profile') {\n\t\t\t$this->ShowVendorProfile();\n\t\t}\n\t\telse {\n\t\t\t$this->ShowVendors();\n\t\t}\n\t}", "function slide_show_splash()\n {\n // Grab the category information\n if( $this->ipsclass->input['cat'] )\n {\n $info = $this->setup_cat();\n }\n else\n {\n $info = $this->setup_album();\n }\n \n // Show the form\n $this->output .= $this->html->ss_form();\n\n $sort = $this->glib->build_sort_order_info( $info['def_view'] );\n\n $this->output = preg_replace( \"/<#SORT_KEY_HTML#>/\", $sort['SORT_KEY_HTML'], $this->output );\n $this->output = preg_replace( \"/<#ORDER_HTML#>/\" , $sort['ORDER_KEY_HTML'], $this->output );\n $this->output = preg_replace( \"/<#PRUNE_HTML#>/\" , $sort['PRUNE_KEY_HTML'], $this->output );\n \n // Page Info\n $this->title = $this->ipsclass->vars['board_name'].$this->ipsclass->lang['sep'].$this->ipsclass->lang['gallery'];\n $this->nav[] = \"<a href='{$this->ipsclass->base_url}act=module&amp;module=gallery'>{$this->ipsclass->lang['gallery']}</a>\";\n $this->nav[] = \"{$this->ipsclass->lang['ss_start']} {$info['name']}\";\n }", "function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\n\t\n\t\t\t// Draw the header.\n\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t$this->doc->backPath = $BACK_PATH;\n\t\t$this->doc->form='<form action=\"\" method=\"POST\">';\n\n\t\t\t// JavaScript\n\t\t$this->doc->JScode = '\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 0;\n\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\tdocument.location = URL;\n\t\t\t\t}\n\t\t\t</script>\n\t\t';\n\t\t$this->doc->postCode='\n\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\tscript_ended = 1;\n\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t</script>\n\t\t';\n\n\t\t$headerSection = $this->doc->getHeader('pages',$this->pageinfo,$this->pageinfo['_thePath']).'<br />'.$LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path').': '.t3lib_div::fixed_lgd_pre($this->pageinfo['_thePath'],50);\n\n\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t$this->content.=$this->doc->divider(5);\n\n\t\t// Render content:\n\t\t$this->moduleContent();\n\n\t\t// ShortCut\n\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t}\n\n\t\t$this->content.=$this->doc->spacer(10);\n\n\t}", "public function displayPage()\n\t{\n\t\t$this->assign('rightMenu', $this->rightMenu);\n\t\t$this->assign('content', $this->content);\n\t\t$this->display(\"main.tpl\");\n\t}", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "public function renderPage()\r\n {\r\n $this->setMasterContent();\r\n // Echo the page immediately.\r\n $this->_htmlpage->renderPage();\r\n }", "public function initCursedPage() {\n parent::setMedia();\n parent::initHeader();\n parent::initContent();\n parent::initFooter();\n parent::display();\n die();\n }", "function afterroute() {\t\t\n\t\t$f3=Base::instance();\n\t\t// Render HTML layout\n\t\tif (!$f3->exists('title')) {\n\t\t\t$f3->set('title', $f3->get('site'));\n\t\t}\n\t\t$f3->set('foot','footer.htm');\n\t\t/**\n\t\tif ($f3->get('ajax')) echo Template::instance()->render('layoutajax.htm');\n\t\telse **/\n\t\techo Template::instance()->render('layout.htm');\n\t\t/**\n\t\t$f3->set('SESSION.message','');\n\t\t$f3->set('SESSION.messagetype','');\t\n\t\t**/\n\t}", "function index() {\r\n $this->page();\r\n }", "public function screen() {\n\t\tGFireMAutoComplete::getFreemius()->get_logger()->entrance();\n\t\tGFireMAutoComplete::getFreemius()->_account_page_load();\n\t\tGFireMAutoComplete::getFreemius()->_account_page_render();\n\t}", "public function show()\n\t{\n\t\t$this->process_post();\n\t\t$this->output();\n\t}", "public function send(){\n\t\t\n\t\texit($this->page->generate());\n\t}", "abstract function render_page();", "public static function outputPage() {\n\t\tself::phpSetup();\n\t\t// Set the session\n global $clsession;\n $clsession =new SessionV4;\n //--------------------------------------------------------------\n // Exit if the web is closed for maintenance except\n // when the user is the master\n if( self::ISCLOSED && $_SESSION['usr'] != 'master' )\n exit(pageMaintenance::show());\n # --------------------------------------------------------------\n \t# Show the parameters entered with the request\n self::see();\n\t\tif( self::SEEPHPINFO ) phpinfo();\n\t\t# --------------------------------------------------------------\n\t\t# Reset the session if requested\n\t\tif( isset($_POST['reset']) && $_POST['reset'] == 'XRESET')\n\t\t\t$clsession->logout(sessionV4::NOACT);\n # --------------------------------------------------------------\n\t\t# Open the main class of the system\n\t\trequire_once('main.php');\n $clmain=new main;\n $s=$clmain->execute();\n $shses=(singleton::SHOWSESSION ? $clsession->getSession() : '');\n\t\treturn $s.$shses;\n\t}", "public function render_wizard() {\n\t\tinclude Plugin::instance()->get_view( 'common/page' );\n\t}", "function runShowAction() {\n // Fetch data from database and pass it to the template\n $dao = new sample_SampleDAO;\n $this->samples = $dao->find(); // Get all 'samples'\n\n $this->title = \"'Show' Action\"; // Set the page (<h1>) title, and append to the document <title>\n $this->addNotice(\"Something happened.\"); // Send a notice to the user\n $this->greeting = \"Hello, world!\"; // Send some data to the template\n }", "function preloadPage(){\n\t\tif($this->hasFlag(0,\"logout\")){\n\t\t\t$this->usr->log_out();\n\t\t\t\n\t\t\t\n\t\t\t$this->bodyContent .= \"<h1>Logged out</h1>\";\n\t\t\tif(!$this->lastFlag(\"iframe\")){\n\t\t\t\t$this->bodyContent .= \"<script type=\\\"text/javascript\\\"> function fwd(){ window.location = \\\"/home\\\"; } setTimeout('fwd()', 1000); </script>\";\n\t\t\t}\n\t\t\t//header(\"Location: /home/loggedout\");\n\t\t\t//return false; \n\t\t}\n\t\telse if($this->hasFlag(0,\"register\")){\n\t\t\tif($this->hasFlag(1,\"success\")){\n\t\t\t\tif($this->usr->is_logged_in()){\n\t\t\t\t\t$this->bodyContent .= \"<h1>Registration successful!</h1>\n\t\t\t\t\t<script type=\\\"text/javascript\\\"> function fwd(){ window.location = \\\"/home\\\"; } setTimeout('fwd()', 1000); </script>\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\theader(\"Location: /home\" . $this->add_iframe());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$regVars = $this->getValues($_POST,array(\"input_first_name\",\"input_last_name\",\"input_email\",\"input_password\",\"input_password_conf\"));\n\t\t\t\tif($regVars === false){\n\t\t\t\t\t$this->bodyContent .= $this->errorTemplate(\"You must fill out all of the registration form!\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//echo \"two\";\n\t\t\t\t\tif($regVars[\"input_password\"] !== $regVars[\"input_password_conf\"]){\n\t\t\t\t\t\t$this->bodyContent .= $this->errorTemplate(\"Your password and the confirmation do not match!\");\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$regInfo = $this->usr->register_user($regVars[\"input_email\"],$regVars[\"input_password\"],$regVars[\"input_first_name\"],$regVars[\"input_last_name\"]);\n\t\t\t\t\t\tif($regInfo[\"success\"] === 1){\n\t\t\t\t\t\t\t//$this->bodyContent .= \"<h1>Registration successful!</h1>\";\n\t\t\t\t\t\t\theader(\"Location: /auth/register/success\" . $this->add_iframe());\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t$temp = \"\";\n\t\t\t\t\t\t\tforeach($regInfo[\"errors\"] as $error){\n\t\t\t\t\t\t\t\t$temp .= $error . \"<br />\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$this->bodyContent .= $this->errorTemplate($temp);\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\telse if($this->hasFlag(0,\"login\")){\n\t\t\tif($this->hasFlag(1,\"success\")){\n\t\t\t\tif($this->usr->is_logged_in()){\n\t\t\t\t\t$this->bodyContent .= \"<h1>Log in successful!</h1>\n\t\t\t\t\t<script type=\\\"text/javascript\\\"> function fwd(){ window.location = \\\"/home\\\"; } setTimeout('fwd()', 1000); </script>\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\theader(\"Location: /auth\" . $this->add_iframe());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$regVars = $this->getValues($_POST,array(\"input_email\",\"input_password\"));\n\t\t\t\tif($regVars === false){\n\t\t\t\t\t$this->bodyContent .= $this->errorTemplate(\"You must fill out all of the log in form!\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$regInfo = $this->usr->log_in($regVars[\"input_email\"],$regVars[\"input_password\"]);\n\t\t\t\t\tif($regInfo[\"success\"] === 1){\n\t\t\t\t\t\t//$this->bodyContent .= \"<h1>Log in successful!</h1>\";\n\t\t\t\t\t\theader(\"Location: /auth/login/success\" . $this->add_iframe());\n\t\t\t\t\t\treturn false; \n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t$temp = \"\";\n\t\t\t\t\t\tforeach($regInfo[\"errors\"] as $error){\n\t\t\t\t\t\t\t$temp .= $error . \"<br />\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->bodyContent .= $this->errorTemplate($temp);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if($this->usr->is_logged_in()){\n\t\t\theader(\"Location: /home\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function index()\n {\n $this->data['pagebody'] = 'sign_up';\n\t$this->render();\n echo \"this is the most pointless thing I have ever done\";\n \n }", "public function action() {\n // $this->view->page();\n }", "public function render_page() {\n\t\t$this->render_template();\n\t}", "protected function build_page() {\n\t\t\n\t\treturn false;\n\t}", "function _endpage()\n\t\t{\n\t\t\t$this->state=1;\n\t\t}", "public function perform()\n {\n // template var with charset used for the html pages\n $this->viewVar['charset'] = $this->config->getModuleVar('common', 'charset');\n $this->viewVar['cssFolder'] = JAPA_PUBLIC_DIR . 'styles/'.$this->config->getModuleVar('common', 'styles_folder');\n $this->viewVar['urlBase'] = $this->router->getBase(); \n $this->viewVar['loggedUserRole'] = $this->controllerVar['loggedUserRole'];\n $this->viewVar['isUserLogged'] = $this->controllerVar['isUserLogged'];\n $this->viewVar['adminWebController'] = $this->config->getVar('default_module_application_controller'); \n \n $this->viewVar['text'] = array();\n\n // get text for the front page\n $this->model->action('misc','getText', \n array('id_text' => 1,\n 'result' => & $this->viewVar['text'],\n 'fields' => array('body'))); \n \n // get result of the header and footer controller\n // \n $this->viewVar['header'] = $this->controllerLoader->header(); \n $this->viewVar['footer'] = $this->controllerLoader->footer(); \n $this->viewVar['rightBorder'] = $this->controllerLoader->rightBorder(); \n }", "function execute() {\n\t\tglobal $wgUser;\n\t\t$skin = $wgUser->getSkin();\n\n\t\t// Suppress warnings to prevent notices about missing indexes in $this->data\n\t\twfSuppressWarnings();\n\n?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"<?php $this->text('lang') ?>\" lang=\"<?php $this->text('lang') ?>\" dir=\"<?php $this->text('dir') ?>\">\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>\" />\n\t\t<?php $this->html('headlinks') ?>\n\t\t<title><?php $this->text('pagetitle') ?></title>\n <link rel=\"stylesheet\" type=\"text/css\" media=\"screen, projection\" href=\"<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css\" />\n <link rel=\"stylesheet\" type=\"text/css\" <?php if(empty($this->data['printable']) ) { ?>media=\"print\"<?php } ?> href=\"<?php $this->text('stylepath') ?>/common/commonPrint.css\" />\n <style type=\"text/css\">@media print { #head, #left, #right, #foot, .editsection { display: none; }}</style>\n\t\t<?php print Skin::makeGlobalVariablesScript( $this->data ); ?>\n\t\t<script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('stylepath') ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>\"></script>\n <?php if($this->data['jsvarurl']) { ?><script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('jsvarurl') ?>\"></script><?php\t} ?>\n <?php\tif($this->data['pagecss']) { ?><style type=\"text/css\"><?php $this->html('pagecss') ?></style><?php } ?>\n\t\t<?php if($this->data['usercss']) { ?><style type=\"text/css\"><?php $this->html('usercss') ?></style><?php } ?>\n <?php if($this->data['userjs']) { ?><script type=\"<?php $this->text('jsmimetype') ?>\" src=\"<?php $this->text('userjs') ?>\"></script><?php\t} ?>\n <?php if($this->data['userjsprev']) { ?><script type=\"<?php $this->text('jsmimetype') ?>\"><?php $this->html('userjsprev') ?></script><?php } ?>\n\t\t<?php if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?><?php $this->html('headscripts') ?>\n </head>\n\t<body\n\t\t<?php if($this->data['body_ondblclick']) { ?>ondblclick=\"<?php $this->text('body_ondblclick') ?>\"<?php } ?>\n\t\t<?php if($this->data['body_onload']) { ?>onload=\"<?php $this->text('body_onload') ?>\"<?php } ?>\n\t\tclass=\"<?php $this->text('nsclass') ?>\"\n\t>\n <a name=\"top\" id=\"top\"></a>\n <div id=\"content\">\n <div id=\"head\">\n <?php if ($this->data['loggedin']) { ?>\n\t <h5><?php $this->msg('views') ?></h5>\n\t <ul>\n\t <?php foreach($this->data['content_actions'] as $key => $action) {\n\t ?><li id=\"ca-<?php echo htmlspecialchars($key) ?>\"\n\t <?php if($action['class']) { ?>class=\"<?php echo htmlspecialchars($action['class']) ?>\"<?php } ?>\n\t ><a href=\"<?php echo htmlspecialchars($action['href']) ?>\"><?php\n\t echo htmlspecialchars($action['text']) ?></a></li><?php\n\t } ?>\n\t </ul>\n <?php } ?>\n </div>\n <div id=\"left\" class=\"sidebar\">\n\t\t\t<?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>\n\t\t\t\t<h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>\n\t\t\t\t<ul>\n <?php foreach($cont as $key => $val) { ?>\n <li id=\"<?php echo Sanitizer::escapeId($val['id']) ?>\"><a href=\"<?php echo htmlspecialchars($val['href']) ?>\"<?php echo $skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>\n <?php } ?>\n\t\t\t\t</ul>\n\t\t\t<?php } ?>\n\t\t\t<?php if($this->data['loggedin']) { ?>\n\t <h5><?php $this->msg('toolbox') ?></h5>\n\t\t\t <ul>\n\t <?php if($this->data['notspecialpage']) { ?>\n\t \t<li><a href=\"<?php echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href']) ?>\" <?php echo $skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li>\n\t <?php if( $this->data['nav_urls']['recentchangeslinked'] ) { ?><li><a href=\"<?php\techo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href']) ?>\"<?php echo $skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li><?php } ?>\n\t <?php\t} ?>\n\t <?php\tif(isset($this->data['nav_urls']['trackbacklink'])) { ?><li><a href=\"<?php echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])\t?>\"<?php echo $skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li><?php } ?>\n\t <?php\tif($this->data['feeds']) { ?><li><?php foreach($this->data['feeds'] as $key => $feed) {\t?><a href=\"<?php echo htmlspecialchars($feed['href']) ?>\"<?php echo $skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a><?php } ?></li><?php } ?>\n\t <?php\tforeach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) { ?>\n\t \t <?php\tif($this->data['nav_urls'][$special]) {\t?><li><a href=\"<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href']) ?>\"<?php echo $skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li><?php } ?>\n\t \t <?php\t} ?>\n\t \t <?php\tif(!empty($this->data['nav_urls']['permalink']['href'])) { ?><li><a href=\"<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])\t?>\"<?php echo $skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php\t} elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?><li><?php $this->msg('permalink') ?></li><?php\t} ?>\n\t \t <?php\twfRunHooks( 'NordlichtTemplateToolboxEnd', array( &$this ) ); ?>\n\t\t\t </ul>\n\t\t <?php } ?>\n </div>\n <div id=\"main\">\n \t\t<?php if($this->data['sitenotice']) { ?><?php $this->html('sitenotice') ?><?php } ?>\n\t\t <h1 class=\"firstHeading\"><?php $this->data['displaytitle']!=\"\"?$this->html('title'):$this->text('title') ?></h1>\n\t\t\t<h3 id=\"siteSub\"><?php $this->msg('tagline') ?></h3>\n\t\t\t<div id=\"contentSub\"><?php $this->html('subtitle') ?></div>\n\t\t\t<?php if($this->data['undelete']) { ?><div id=\"contentSub2\"><?php $this->html('undelete') ?></div><?php } ?>\n\t\t\t<?php if($this->data['newtalk'] ) { ?><div class=\"usermessage\"><?php $this->html('newtalk') ?></div><?php } ?>\n\t\t\t<!-- start content -->\n\t\t\t<?php $this->html('bodytext') ?>\n\t\t\t<?php if($this->data['catlinks']) { ?><?php $this->html('catlinks') ?><?php } ?>\n </div>\n <div id=\"right\" class=\"sidebar\">\n \t <h5><label for=\"searchInput\"><?php $this->msg('search') ?></label></h5>\n\t\t <form action=\"<?php $this->text('searchaction') ?>\" id=\"searchform\">\n\t\t \t<input id=\"searchInput\" name=\"search\" type=\"text\"<?php echo $skin->tooltipAndAccesskey('search');\tif( isset( $this->data['search'] ) ) { ?> value=\"<?php $this->text('search') ?>\"<?php } ?> />\n\t\t\t\t<input type='submit' name=\"go\" class=\"searchButton\" id=\"searchGoButton\"\tvalue=\"<?php $this->msg('searcharticle') ?>\" />&nbsp;\n\t\t\t\t<input type='submit' name=\"fulltext\" class=\"searchButton\" id=\"mw-searchButton\" value=\"<?php $this->msg('searchbutton') ?>\" />\n\t\t\t</form>\n \t\t<h5><?php $this->msg('personaltools') ?></h5>\n\t\t\t<ul>\n <?php\tforeach($this->data['personal_urls'] as $key => $item) { ?>\n\t\t\t\t<li><a href=\"<?php echo htmlspecialchars($item['href']) ?>\"<?php echo $skin->tooltipAndAccesskey('pt-'.$key) ?>><?php\techo htmlspecialchars($item['text']) ?></a></li><?php } ?>\n\t\t </ul>\n </div>\n <div id=\"foot\">\n\t\t\t<ul>\n\t\t\t <?php\t$footerlinks = array('lastmod', 'viewcount'); ?>\n\t\t\t <?php\tforeach( $footerlinks as $aLink ) {?>\n\t\t\t \t<?php\tif( isset( $this->data[$aLink] ) && $this->data[$aLink] ) { ?><li><?php $this->html($aLink) ?></li><?php } ?>\n\t\t\t <?php } ?>\n\t\t\t</ul>\n </div>\n </div>\n\t<?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>\n <?php $this->html('reporttime') ?>\n <?php if ( $this->data['debug'] ): ?>\n <!-- Debug output:\n <?php $this->text( 'debug' ); ?>\n -->\n <?php endif; ?>\n </body>\n</html>\n<?php\n\twfRestoreWarnings();\n\t}", "function renderResponse() {\n // le header contient le début de la page jusqu'à la balise <body>\n // on redéclare title pour le header\n $header = new View('global.header', array('title' => $this->title));\n echo $header->getHtml();\n\n\n // le menu est composé de la balise <nav> et de ses items\n $menu = new View('global.menu');\n echo $menu->getHtml();\n\n /* début corps de page */\n\n // on affiche les messages éventuels\n $this->showMessages();\n\n // on affiche le contenu principal de la page\n\n echo $this->content;\n\n /* fin corps de page */\n\n // on affiche le footer et on ferme la page html\n $footer = new View('global.footer');\n echo $footer->getHtml();\n }", "function showPage($db) {\n $this->user_info($db);\n $this->log_visitor($db,$_SERVER['PHP_SELF'],0);\n $this->showPage=true;\n }", "function startup_view()\n\t{\n\t\t$data['error_msg'] = $this->error_msg;\n\t\t$response_body = $this->template_html($this->html_template_path,$data);\n\t\t$this->return_response($response_body);\n\t}", "public function startNewPage()\n {\n }", "public function show_full_page()\n\t{\n\t\tglobal $__server;\n\t\t\n\t\t// hent familierangering\n\t\t$ff_list = ff::get_fam_points_rank();\n\t\t\n\t\t// deaktiver høyre side\n\t\t//define(\"DISABLE_RIGHT_COL\", true);\n\t\t\n\t\tess::$b->page->add_css('\n#default_main { overflow: visible }');\n\t\t\n\t\tess::$b->page->add_js_domready('\n\tsm_scripts.load_hm();\n\twindow.HM.addEvent(\"f-changed\", function(data) {\n\t\t//$$(\".bydeler_filter a\").removeClass(\"active\");\n\t\t$$(\".bydeler_ressurs\").setStyle(\"display\", \"none\");\n\t\t$$(\".bydeler_ressurs_\"+data).setStyle(\"display\", \"block\");\n\t\t//$(\"f_\"+data).addClass(\"active\");\n\t});\n\twindow.HM.addEvent(\"f-removed\", function() {\n\t\t//$$(\".bydeler_filter a\").removeClass(\"active\");\n\t\t//$(\"f_\").addClass(\"active\");\n\t\t$$(\".bydeler_ressurs\").setStyle(\"display\", \"block\");\n\t});\n\twindow.HM.addEvent(\"b-added\", function() {\n\t\t//$$(\".bydeler_alt a\").removeClass(\"active\");\n\t\t//$(\"v_b\").addClass(\"active\");\n\t\t$$(\".bydeler_br\").setStyle(\"display\", \"none\");\n\t\t$$(\".bydeler_steder\").setStyle(\"display\", \"block\");\n\t});\n\twindow.HM.addEvent(\"b-removed\", function() {\n\t\t//$$(\".bydeler_alt a\").removeClass(\"active\");\n\t\t//$(\"v_\").addClass(\"active\");\n\t\t$$(\".bydeler_br\").setStyle(\"display\", \"block\");\n\t\t$$(\".bydeler_steder\").setStyle(\"display\", \"none\");\n\t});\n\t\n\t$$(\".bydeler_steder\").setStyle(\"display\", \"none\");\n\t$$(\".bydeler_alt a\").addEvent(\"click\", function(e)\n\t{\n\t\twindow.HM.remove(\"f\");\n\t\twindow.HM.set(\"b\", \"\");\n\t\te.stop();\n\t});\n\t\n\t$$(\".bydeler_filter a\").addEvent(\"click\", function(e)\n\t{\n\t\twindow.HM.remove(\"b\");\n\t\tif (this.get(\"id\") == \"f_\") window.HM.remove(\"f\");\n\t\telse window.HM.set(\"f\", this.get(\"id\").substring(2));\n\t\te.stop();\n\t});\n\t\n\twindow.HM.recheck();\n');\n\t\t\n\t\t// sett opp alle FF og sorter dem i y-retning\n\t\t$data = array();\n\t\t$pos_x = array();\n\t\t$pos_y = array();\n\t\tforeach ($this->bydeler as $id => $bydel)\n\t\t{\n\t\t\tif ($id == 0) continue;\n\t\t\t\n\t\t\tforeach ($bydel['ff'] as $row)\n\t\t\t{\n\t\t\t\t$pos_x[] = $row['br_pos_x'];\n\t\t\t\t$pos_y[] = $row['br_pos_y'];\n\t\t\t\t\n\t\t\t\t$type = ff::$types[$row['ff_type']];\n\t\t\t\t\n\t\t\t\t// familie\n\t\t\t\tif ($row['ff_type'] == 1)\n\t\t\t\t{\n\t\t\t\t\t$eier = count($row['eier']) == 0 ? 'Ingen leder av broderskapet' : 'Styres av '.self::list_players($row['eier']);\n\t\t\t\t\t$class = \"bydeler_ressurs_familie\";\n\t\t\t\t\t\n\t\t\t\t\t// antall poeng\n\t\t\t\t\tif (isset($ff_list[$row['ff_id']]) && $ff_list[$row['ff_id']]->data['ff_is_crew'] == 0) $eier .= '<br />'.game::format_num($ff_list[$row['ff_id']]->data['ff_points_sum']).' poeng';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// firma\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($type['type'] == \"bomberom\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$eier = count($row['eier']) == 0 ? 'Ingen styrer bomberommet' : 'Styres av '.self::list_players($row['eier']);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$eier = count($row['eier']) == 0 ? 'Ingen eier av firmaet' : 'Eies av '.self::list_players($row['eier']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$class = \"bydeler_ressurs_firma bydeler_ressurs_{$type['type']}firma\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$data[] = '\n\t\t<a href=\"'.$__server['relative_path'].'/ff/?ff_id='.$row['ff_id'].'\" class=\"bydeler_ressurs '.$class.'\" style=\"left: '.$row['br_pos_x'].'%; top: '.$row['br_pos_y'].'%\">\n\t\t\t<img class=\"bydeler_ressurs_t\" src=\"'.htmlspecialchars($type['bydeler_graphic']).'\" alt=\"'.htmlspecialchars($type['bydeler_alt_pre']).htmlspecialchars($row['ff_name']).'\" />\n\t\t\t<span class=\"bydeler_ressurs_tekst\">\n\t\t\t\t'.htmlspecialchars($row['ff_name']).'<span class=\"bydeler_owner\"><br />\n\t\t\t\t'.$eier.'</span>\n\t\t\t</span>\n\t\t\t<img class=\"bydeler_ressurs_graphic\" src=\"'.htmlspecialchars(ff::get_logo_path_static($row['ff_id'], $row['ff_logo_path'])).'\" alt=\"\" />\n\t\t</a>';\n\t\t\t}\n\t\t}\n\t\tarray_multisort($pos_y, $pos_x, $data);\n\t\t\n\t\t$bydeler_0 = $this->bydeler[0];\n\t\tunset($this->bydeler[0]);\n\t\t\n\t\t// sorter bydelene i y-retning\n\t\t$bydeler_x = array();\n\t\t$bydeler_y = array();\n\t\tforeach ($this->bydeler as $id => $bydel)\n\t\t{\n\t\t\t$bydeler_x[] = $bydel['bydel_x'];\n\t\t\t$bydeler_y[] = $bydel['bydel_y'];\n\t\t}\n\t\tarray_multisort($bydeler_x, $bydeler_y, $this->bydeler);\n\t\t\n\t\t// invitasjoner til FF\n\t\tif (count($this->ff_invites) > 0)\n\t\t{\n\t\t\techo '\n<div class=\"bg1_c small\">\n\t<h1 class=\"bg1\">Invitasjoner<span class=\"left2\"></span><span class=\"right2\"></span></h1>\n\t<div class=\"bg1\">';\n\t\t\t\n\t\t\tforeach ($this->ff_invites as $row)\n\t\t\t{\n\t\t\t\t$type = ff::$types[$row['ff_type']];\n\t\t\t\techo '\n\t\t<p>Du er invitert til '.$type['refobj'].' <a href=\"'.$__server['relative_path'].'/ff/?ff_id='.$row['ff_id'].'\">'.htmlspecialchars($row['ff_name']).'</a> som '.$type['priority'][$row['ffm_priority']].' ('.ess::$b->date->get($row['ffm_date_join'])->format(date::FORMAT_NOTIME).') - <a href=\"'.$__server['relative_path'].'/ff/?ff_id='.$row['ff_id'].'\">Godta/avslå</a></p>';\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t</div>\n</div>';\n\t\t}\n\n\t\tif (count($this->fff) > 0 || access::has(\"mod\"))\n\t\t{\n\t\t\techo '\n<div class=\"bg1_c medium bydeler_br bydeler_ressurs bydeler_ressurs_familie\">\n\t<h1 class=\"bg1\">Konkurranse om å danne broderskap <span class=\"left2\"></span><span class=\"right2\"></span></h1>\n\t<div class=\"bg1 c\">\n\t\t<table class=\"table center tablem\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t'.(access::has(\"mod\") ? '<th>Admin</th>' : '').'\n\t\t\t\t\t<th>Avsluttes</th>\n\t\t\t\t\t<th>Gjenstår</th>\n\t\t\t\t\t<th>Antall broderskap</th>\n\t\t\t\t\t<th>Gjenstående broderskap</th>\n\t\t\t\t\t<th>Status</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody class=\"r\">';\n\t\t\t\n\t\t\t$i = 0;\n\t\t\t$free = 0;\n\t\t\tforeach ($this->fff as $row)\n\t\t\t{\n\t\t\t\t$time = time();\n\n\t\t\t\tif ($row['ff_count'] < ff::MAX_FFF_FF_COUNT && $time >= $row['fff_time_start']) $free += ff::MAX_FFF_FF_COUNT-$row['ff_count'];\n\n\t\t\t\techo '\n\t\t\t\t<tr'.(++$i % 2 == 0 ? ' class=\"color\"' : '').'>\n\t\t\t\t\t'.(access::has(\"mod\") ? '<td><form action=\"'.$__server['relative_path'].'/ff/\" method=\"post\"><input type=\"hidden\" name=\"fff_id\" value=\"'.$row['fff_id'].'\">'.show_sbutton(\"Deaktiver\", 'name=\"comp_deactivate\"').'</form></td>' : '').'\t\t\t\t\n\t\t\t\t\t<td>'.ess::$b->date->get($row['fff_time_expire'])->format(date::FORMAT_SEC).'</td>\n\t\t\t\t\t<td>'.game::timespan(max(time(), $row['fff_time_expire']), game::TIME_ABS).'</td>\n\t\t\t\t\t<td>'.$row['ff_count'].'</td>\n\t\t\t\t\t<td>'.$row['ff_count_active'].'</td>\n\t\t\t\t\t'.($time >= $row['fff_time_start'] ?\n\t\t\t\t\t\t'<td><a href=\"'.$__server['relative_path'].'/ff/?fff_id='.$row['fff_id'].'\">Vis &raquo;</a></td>' :\n\t\t\t\t\t\t'<td>Starter om '.game::timespan(max(time(), $row['fff_time_start']), game::TIME_ABS).'</td>').'\n\t\t\t\t</tr>';\n\t\t\t}\n\t\t\t\n\t\t\t$create_link = login::$logged_in\n\t\t\t\t? ($this->up->rank['number'] < ff::$types[1]['priority_rank'][1]\n\t\t\t\t\t? ' - Du har ikke høy nok rank til å opprette et broderskap'\n\t\t\t\t\t: ' - Du har høy nok rank - <a href=\"'.$__server['relative_path'].'/ff/?create\">Opprett broderskap &raquo;</a>')\n\t\t\t\t: '';\n\n\t\t\techo '\n\t\t\t</tbody>\n\t\t</table>'.($free > 0 ? '\n\t\t<p class=\"c\" style=\"margin-top: 0\">Det er '.$free.' '.fword(\"ledig konkurranseplass\", \"ledige konkurranseplasser\", $free).$create_link.'</p>' : '\n\t\t<p class=\"c\" style=\"margin-top: 0\">Ingen ledige konkurranseplasser.</p>').'\n\t\t'.(access::has(\"mod\") ? '<p style=\"margin-top: 20px;\"><form action=\"'.$__server['relative_path'].'/ff/\" method=\"post\">'.show_sbutton(\"Opprett ny broderskapskonkurranse\", 'name=\"new_comp\"').'</form></p>' : '').'\n\t</div>\n</div>';\n\t\t}\n\t\t\n\t\t// topp rangerte familier\n\t\tif (count($ff_list) > 0)\n\t\t{\n\t\t\techo '\n<div class=\"bg1_c xxsmall bydeler_br bydeler_ressurs bydeler_ressurs_familie\">\n\t<h1 class=\"bg1\">Topp rangerte broderskap<span class=\"left\"></span><span class=\"right\"></span></h1>\n\t<div class=\"bg1\">\n\t\t<dl class=\"dd_right\">';\n\t\t\t\n\t\t\t$i = 0;\n\t\t\tforeach ($ff_list as $ff)\n\t\t\t{\n\t\t\t\t$title = \"For rank til medlemmer: \".$ff->data['ff_points_up'].\" - For firma til medlemmer: \".$ff->data['ff_points_ff'].\" - For drap: \".$ff->data['ff_points_kill'];\n\t\t\t\t\n\t\t\t\techo '\n\t\t\t<dt><a href=\"'.ess::$s['rpath'].'/ff/?ff_id='.$ff->id.'\">'.htmlspecialchars($ff->data['ff_name']).'</a></dt>\n\t\t\t<dd title=\"'.$title.'\">'.game::format_num($ff->data['ff_points_sum']).' poeng</dd>';\n\t\t\t\t\n\t\t\t\t// vis kun 3 beste familiene\n\t\t\t\tif (++$i == 3) break;\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t\t</dl>\n\t\t<p class=\"c\"><a href=\"'.ess::$s['rpath'].'/node/19\">Poenginformasjon</a></p>\n\t</div>\n</div>';\n\t\t}\n\t\t\n\t\tkf_menu::$data['bydeler_menu'] = true;\n\t\t\n\t\techo '\n<h1 class=\"bydeler\">Bydeler</h1>\n<div class=\"bydeler\">\n\t<div class=\"bydeler_kart bydeler_br\">\n\t\t<img src=\"'.STATIC_LINK.'/themes/kofradia/drammen_stor.gif\" class=\"bydeler_bg\" />\n\t\t'.implode('', $data).'\n\t</div>';\n\t\t\n\t\t// har vi noen FF som ikke er plassert?\n\t\tif ($bydeler_0['active'])\n\t\t{\n\t\t\techo '\n\t<div class=\"bydeler_uplassert bydeler_br\">';\n\t\t\t\n\t\t\tforeach ($bydeler_0['ff'] as $row)\n\t\t\t{\n\t\t\t\t$type = ff::$types[$row['ff_type']];\n\t\t\t\t\n\t\t\t\t// familie\n\t\t\t\tif ($row['ff_type'] == 1)\n\t\t\t\t{\n\t\t\t\t\t$eier = count($row['eier']) == 0 ? 'Ingen leder av broderskapet' : 'Styres av '.self::list_players($row['eier']);\n\t\t\t\t\t$class = \"bydeler_ressurs_familie\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// firma\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($type['type'] == \"bomberom\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$eier = count($row['eier']) == 0 ? 'Ingen styrer bomberommet' : 'Styres av '.self::list_players($row['eier']);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$eier = count($row['eier']) == 0 ? 'Ingen eier av firmaet' : 'Eies av '.self::list_players($row['eier']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$class = \"bydeler_ressurs_firma bydeler_ressurs_{$type['type']}firma\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '\n\t\t<div class=\"bydeler_uplassert_boks\">\n\t\t\t<a href=\"'.$__server['relative_path'].'/ff/?ff_id='.$row['ff_id'].'\" class=\"bydeler_ressurs '.$class.'\">\n\t\t\t\t<img class=\"bydeler_ressurs_graphic\" src=\"'.htmlspecialchars(ff::get_logo_path_static($row['ff_id'], $row['ff_logo_path'])).'\" alt=\"\" />\n\t\t\t\t<span class=\"bydeler_ressurs_tekst\">\n\t\t\t\t\t'.htmlspecialchars($row['ff_name']).'<span class=\"bydeler_owner\"><br />\n\t\t\t\t\t'.$eier.'</span>\n\t\t\t\t</span>\n\t\t\t\t<img class=\"bydeler_ressurs_t\" src=\"'.htmlspecialchars($type['bydeler_graphic']).'\" alt=\"'.htmlspecialchars($type['bydeler_alt_pre']).htmlspecialchars($row['ff_name']).'\" />\n\t\t\t</a>\n\t\t</div>';\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t</div>';\n\t\t}\n\t\t\n\t\techo '\n\t<div class=\"bydeler_kart bydeler_steder\">\n\t\t<img src=\"'.STATIC_LINK.'/themes/kofradia/drammen_stor.gif\" class=\"bydeler_bg\" />';\n\t\t\n\t\tforeach ($this->bydeler as $bydel)\n\t\t{\n\t\t\tif ($bydel['active'] == 0) continue;\n\t\t\t\n\t\t\tif ($this->up)\n\t\t\t{\n\t\t\t\t$distance = self::calc_travel_distance($this->up->bydel, $bydel);\n\t\t\t\t\n\t\t\t\t$taxi_price = round($distance * self::TAXI_PRICE_KM);\n\t\t\t\t$taxi_points = round($distance * self::TAXI_POINTS_KM * $this->up->rank['number']);\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t\t<div class=\"map_unit'.($this->up && $this->up->bydel['id'] == $bydel['id'] ? ' map_active' : '').'\" style=\"left: '.$bydel['bydel_x'].'%; top: '.$bydel['bydel_y'].'%\" id=\"map_link_'.$bydel['id'].'\">\n\t\t\t<div class=\"map_title\">\n\t\t\t\t<p class=\"map_link\"><b><b><b>'.htmlspecialchars($bydel['name']).'</b></b></b></p>\n\t\t\t\t<div class=\"bydeler_sted\">\n\t\t\t\t\t<div class=\"bydeler_sted_info\">\n\t\t\t\t\t\t<dl class=\"dd_right\">\n\t\t\t\t\t\t\t<dt>Spillere</dt>\n\t\t\t\t\t\t\t<dd>'.game::format_number($bydel['num_players']).'</dd>\n\t\t\t\t\t\t\t<dt>Penger i omløp</dt>\n\t\t\t\t\t\t\t<dd>'.game::format_cash($bydel['sum_money']).'</dd>\n\t\t\t\t\t\t</dl>';\n\t\t\t\n\t\t\tif (!$this->up) {} // ignorer anonyme brukere\n\t\t\telseif ($this->up->bydel['id'] == $bydel['id'])\n\t\t\t{\n\t\t\t\techo '\n\t\t\t\t\t\t<p>Du befinner deg i denne bydelen.</p>';\n\t\t\t}\n\t\t\telseif ($this->up->fengsel_check())\n\t\t\t{\n\t\t\t\techo '\n\t\t\t\t\t\t<p>Du er i fengsel og kan ikke reise.</p>';\n\t\t\t}\n\t\t\telseif ($this->up->bomberom_check())\n\t\t\t{\n\t\t\t\techo '\n\t\t\t\t\t\t<p>Du er i bomberom og kan ikke reise.</p>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '\n\t\t\t\t\t\t<div class=\"bydeler_reise c\">\n\t\t\t\t\t\t\t<form action=\"bydeler\" method=\"post\">\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"reise\" value=\"'.htmlspecialchars($bydel['name']).'\" />';\n\t\t\t\t\n\t\t\t\t// taxi\n\t\t\t\tif (!$this->up->energy_check(self::TAXI_ENERGY*1.3))\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>Du har ikke nok energi til å ta taxi hit.</p>';\n\t\t\t\t}\n\t\t\t\telseif ($this->up->data['up_points'] < $taxi_points * 2) // må ha dobbelte\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>Du har ikke høy nok rank til å ta taxi hit.</p>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>'.show_sbutton(\"Ta taxi (\".game::format_cash($taxi_price).\", \".game::format_number(round($taxi_points)).\" poeng)\", 'name=\"taxi\"').'</p>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// gta\n\t\t\t\tif ($this->gta_count == 0)\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>Du har ingen biler i bydelen du oppholder deg i for å reise med.</p>';\n\t\t\t\t}\n\t\t\t\telseif (!$this->gta_garage[$bydel['id']]['garage'])\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>Det er ingen garasje i denne bydelen.</p>';\n\t\t\t\t}\n\t\t\t\telseif ($this->gta_garage[$bydel['id']]['garage_free'] == 0)\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>Det er ingen ledige plasser i garasjen i denne bydelen.</p>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>'.show_sbutton(\"Kjør egen bil\", 'name=\"gta\"').'</p>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// teleportere\n\t\t\t\tif (access::is_nostat())\n\t\t\t\t{\n\t\t\t\t\techo '\n\t\t\t\t\t\t\t\t<p>'.show_sbutton(\"Teleporter hit (nostat)\", 'name=\"teleporter\"').'</p>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</div>';\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>';\n\t\t}\n\t\t\n\t\techo '\n\t</div>';\n\t\t\n\t\techo '\n</div>';\n\t\t\n\t\tess::$b->page->load();\n\t}", "function display() {\r\n \t$pageNo = null;\r\n\r\n \tif (isset($this->params['pass']['page'])) {\r\n \t\t$pageNo = $this->params['pass']['page'];\r\n \t}\r\n \t$pageCount = $this->params['paging']['Post']['pageCount'];\r\n\t\techo $this->getPaginationString($pageNo, $pageCount * 15, 15, 2, \"/messages/index/\", \"page:\");\r\n }", "public function run()\n {\n \tStaticPage::truncate();\n\t\tStaticPage::create([\n\t\t\t'page_name' => 'About Us',\n\t\t\t'status' => '1'\n\t\t]);\t\n \t\n StaticPage::create([\n 'page_name' => 'T&C',\n 'status' => '1'\n ]);\n }", "public function displayPage()\n {\n $this->getState()->template = 'displaygroup-page';\n }", "private function indexAction()\n {\n $page = isset($_GET['page']) ? substr($_GET['page'],0,-1) : \"home\" ;\n $this->reg->pages->getPageContent(strtolower($page));\n }", "public function index() {\n $this->html->displayHeaderAndFooter(true);\n $this->load_content();\n }", "public function main()\n {\n // check if user logged if not redirect to login page.\n if(Session::logged() == NULL){\n header(\"location: /\" . ROOT . 'login');\n }\n // if logged only administrator with role owner or manager have access to administration page.\n else if(Session::logged()['role'] == 'manager' || Session::logged()['role'] == 'owner'){\n // creating administration page.\n\n $data = NULL;\n $p = new Page(\"Administration Page\");\n $p->setComponent(\"htmlAdministrator.php\", $data);\n $p->addCss(\"administrator.css\");\n $p->addJs('administrator.js');\n $p->dumpView();\n }\n // not owner or manager trying access to administrator page, redirect to school page.\n else{\n header(\"location: /\" . ROOT . 'school');\n }\n }", "public function adminBodyBegin(): void {\n global $media_admin;\n\n // Check if Administration Page is shown\n if($media_admin->view !== \"media\" || $media_admin->method !== \"index\") {\n return;\n }\n\n // Catch Page not Found Message\n ob_start();\n }", "public function execute() {\n\t\twfSuppressWarnings();\n\t\t\n\t\t$this->html('headelement'); ?>\n\t\t\n\t\t<header class=\"header\">\n\t\t\t<div class=\"container\">\n\t\t\t\t<nav class=\"navbar navbar-default hidden-print\" role=\"navigation\">\n\t\t\t\t\t<div class=\"navbar-header\"><?php\n\t\t\t\t\t\t// Create index link for wiki header\n\t\t\t\t\t\techo '\n\t\t\t\t\t\t<a href=\"'. $this->data['nav_urls']['mainpage']['href'] .'\" class=\"navbar-brand\">\n\t\t\t\t\t\t\t'. $this->data['sitename'] .'\n\t\t\t\t\t\t</a>'; ?>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"navbar-form navbar-right form-inline\"><?php\n\t\t\t\t\t\t// Create a search form for wiki header\n\t\t\t\t\t\t$this->searchBox(); ?>\n\t\t\t\t\t</div>\n\t\t\t\t</nav>\n\t\t\t</div>\n\t\t</header>\n\t\t<main class=\"wiki\">\n\t\t\t<nav class=\"navbar-wiki\">\n\t\t\t\t<div class=\"container\"><?php\n\t\t\t\t\t// Print content actions nav items\n\t\t\t\t\t$this->contentActions(); ?>\n\t\t\t\t</div>\n\t\t\t</nav>\n\t\t\t<div class=\"container\">\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<section class=\"col-md-10 col-sm-12 page\">\n\t\t\t\t\t\t<?php if($this->data['sitenotice']) { ?><div id=\"alert alert-info\"><?php $this->html('sitenotice'); ?></div><?php }; ?>\n\t\t\t\t\t\t<div class=\"page-header\">\n\t\t\t\t\t\t\t<h1><?php $this->html('title'); ?> <small class=\"visible-print\"><?php $this->msg('tagline'); ?></small></h1>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"page\">\n\t\t\t\t\t\t\t<div class=\"subtitle\"><?php $this->html('subtitle'); ?></div>\n\t\t\t\t\t\t\t<?php if($this->data['undelete']) { ?><div class=\"undelete\"><?php $this->html('undelete'); ?></div><?php } ?>\n\t\t\t\t\t\t\t<?php if($this->data['newtalk'] ) { ?><div class=\"newtalk\"><?php $this->html('newtalk'); ?></div><?php } ?>\n\t\t\t\t\t\t\t<?php if($this->data['showjumplinks']) {\n\t\t\t\t\t\t\t\t// Todo: showing these for mobiles to easily navigate ?>\n\t\t\t\t\t\t\t\t<div class=\"jumplinks\">\n\t\t\t\t\t\t\t\t\t<?php $this->msg('jumpto'); ?><a href=\"#column-one\"><?php $this->msg('jumptonavigation'); ?></a>\n\t\t\t\t\t\t\t\t\t<?php $this->msg('comma-separator'); ?><a href=\"#searchInput\"><?php $this->msg('jumptosearch'); ?></a>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<?php };\n\t\t\t\t\t\t\t// Now print the acutal page content\n\t\t\t\t\t\t\t$this->html('bodytext');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Print the catagory links for this content\n\t\t\t\t\t\t\tif($this->data['catlinks']) { $this->html('catlinks'); }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Print any remaining data after the content\n\t\t\t\t\t\t\tif($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); }?>\n\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</section>\n\t\t\t\t\t<aside class=\"col-md-2 hidden-sm hidden-xs sidebar hidden-print\"><?php\n\t\t\t\t\t\t// Print the personal tools\n\t\t\t\t\t\t$this->personalTools();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Print all the other navigation blocks\n\t\t\t\t\t\t$this->renderPortals($this->data['sidebar']); ?>\n\t\t\t\t\t</aside>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<footer class=\"footer\">\n\t\t\t\t<div class=\"container\"><?php\n\t\t\t\t\t$validFooterIcons = $this->getFooterIcons('icononly');\n\t\t\t\t\t$validFooterLinks = $this->getFooterLinks('flat'); // Additional footer links\n\t\t\t\t\n\t\t\t\t\tif ( count( $validFooterLinks ) > 0 ) { ?>\n\t\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\t<div class=\"col-md-12\">\n\t\t\t\t\t\t\t\t<ul class=\"list\"><?php\n\t\t\t\t\t\t\t\t\tforeach( $validFooterLinks as $aLink ) { ?>\n\t\t\t\t\t\t\t\t\t\t<li class=\"footer-<?php echo $aLink ?>\"><?php $this->html($aLink) ?></li>\n\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t<li><a href=\"https://github.com/South-Paw/Bootstrap-MW\">Bootstrap MW Skin</a> v1.0</li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<?php }; ?>\n\t\t\t\t\t<div class=\"row\"><?php\n\t\t\t\t\t\tforeach ( $validFooterIcons as $blockName => $footerIcons ) { ?>\n\t\t\t\t\t\t\t\t<div class=\"col-md-6 icons footer-<?php echo htmlspecialchars($blockName); ?>\"><?php\n\t\t\t\t\t\t\t\t\tforeach ( $footerIcons as $icon ) {\n\t\t\t\t\t\t\t\t\t\techo $this->getSkin()->makeFooterIcon( $icon );\n\t\t\t\t\t\t\t\t\t}; ?>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<?php }; ?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</footer>\n\t\t</main>\n\t\t\n\t\t<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\"></script>\n\t\t<script src=\"skins/Bootstrap-MW/js/bootstrap.min.js\"></script>\n\t\t<?php $this->printTrail(); ?>\n\t</body>\n</html><?php\n\t\twfRestoreWarnings();\n\t}", "public function reqEncyclicalPage() {\n $this->instance = new Encyclical();\n $this->view($this->instance->getEncyclical(false, false), 'encyclics', 'Encíclicas papais');\n }", "private function loadPage()\n\t{\n\t $data = $this->getData();\n \t \n\t $this->load->view('index', $data);\n\t}", "public function reqBiblePage() {\n $this->instance = new Bible();\n $this->view($this->instance->getBible(false, false), 'bible', 'Bíblia');\n }", "function pastIntro() {\n // move progress forward and redirect to the runSurvey action\n $this->autoRender = false; // turn off autoRender\n $this->Session->write('Survey.progress', RIGHTS);\n $this->redirect(array('action' => 'runSurvey'));\n\n }", "public function createPage()\n {\n echo $this->output;\n }", "public function demos_page() {\n\t\t\t//delete_transient( 'wpex_demos_data' );\n\t\t\t$this->init_checks = self::init_checks();\n\n\t\t\tif ( 'passed' != $this->init_checks ) {\n\t\t\t\tinclude_once( 'views/not-supported.php' );\n\t\t\t} else {\n\t\t\t\t$this->init_demos_data();\n\t\t\t}\n\n\t\t\tif ( ! $this->demos ) {\n\t\t\t\tdelete_transient( 'wpex_demos_data' );\n\t\t\t\tinclude_once( 'views/no-demos.php' );\n\t\t\t} else {\n\t\t\t\tinclude_once( 'views/demos.php' );\n\t\t\t}\n\t\t}", "function showContent()\n {\n $this->showForm();\n\n $this->elementStart('div', array('id' => 'notices_primary'));\n\n\n $sharing = null;\n $sharing = $this->getSharings();\n $cnt = 0;\n\n if (!empty($sharing)) {\n $profileList = new SharingsList(\n $sharing,\n $this\n );\n\n $cnt = $profileList->show();\n $sharing->free();\n\n if (0 == $cnt) {\n $this->showEmptyListMessage();\n }\n }\n\n $this->elementEnd('div');\n\n }", "public function indexAction()\n\t\t{\n//\t\t\techo 'first leg';\n\t\t\t//$this->view->layout =''\n\t\t}", "public function gamed(){\n\t\t$this->data['game_content'] = \"we are always playing\" ;\n\t\t//$this->viewpage($this->data, null) ;\n\t\t$this->route();\n\t}", "function on_page_done() {\n $this->_destroy_objects();\n return true;\n }", "public function HandlePage()\n\t\t{\n\t\t\t$this->SetOrderData();\n\n\t\t\t$action = \"\";\n\t\t\tif(isset($_REQUEST['action'])) {\n\t\t\t\t$action = isc_strtolower($_REQUEST['action']);\n\t\t\t}\n\n\t\t\tswitch($action) {\n\t\t\t\tdefault: {\n\t\t\t\t\t$this->FinishOrder();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function display () {\n\t\t// So that if we're displaying a list of reports that are\n\t\t// available for editing, it's accurate.\n\t\t$this->_update_locked();\n\t\n\t\t$data = $this->_get_data_by_recent ();\n\t\t\n\t\t$this->render($data);\n\t\n\t}", "public function show_action() {\n if (Request::submitted('save')) {\n CSRFProtection::verifyUnsafeRequest();\n $this->setBody(Request::get('body'));\n }\n $this->actionHeader();\n $this->renderBodyTemplate('show');\n }", "function show_after_running_page()\n\t\t{\n\t\t\t$this->t->set_file('after_running', 'after_running.tpl');\n\t\t\t\n\t\t\t//prepare the links form\n\t\t\t$link_data_proc = array(\n\t\t\t\t'menuaction'\t\t=> 'workflow.ui_userinstances.form',\n\t\t\t\t'filter_process'\t=> $this->process_id,\n\t\t\t);\n\t\t\t$link_data_inst = array(\n\t\t\t\t'menuaction'\t\t=> 'workflow.ui_userinstances.form',\n\t\t\t\t'filter_instance'\t=> $this->instance_id,\n\t\t\t);\n\t\t\tif ($this->activity_type == 'start')\n\t\t\t{\n\t\t\t\t$activitytxt = lang('get back to instance creation');\n\t\t\t\t$act_button_name = lang('New instance');\n\t\t\t\t$link_data_act = array(\n\t\t\t\t\t'menuaction'\t\t=> 'workflow.ui_useropeninstance.form',\n\t\t\t\t);\n\t\t\t}\n\t\t\telseif ($this->activity_type == 'standalone')\n\t\t\t{\n\t\t\t\t$activitytxt = lang('get back to global activities');\n\t\t\t\t$act_button_name = lang('Global activities');\n\t\t\t\t$link_data_act = array(\n\t\t\t\t\t'menuaction'\t\t=> 'workflow.ui_useractivities.form',\n\t\t\t\t\t'show_globals'\t\t=> true,\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$activitytxt = lang('go to same activities for other instances of this process');\n\t\t\t\t$act_button_name = lang('activity %1', $this->activity_name);\n\t\t\t\t$link_data_act = array(\n\t\t\t\t\t'menuaction'\t\t=> 'workflow.ui_userinstances.form',\n\t\t\t\t\t'filter_process' => $this->process_id,\n\t\t\t\t\t'filter_activity_name'\t=> $this->activity_name,\n\t\t\t\t);\n\t\t\t}\n\t\t\t$button='<img src=\"'. $GLOBALS['egw']->common->image('workflow', 'next')\n\t\t\t\t.'\" alt=\"'.lang('go').'\" title=\"'.lang('go').'\" width=\"16\" >';\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'same_instance_text'\t=> ($this->activity_type=='standalone')? '-' : lang('go to the actual state of this instance'),\n\t\t\t\t'same_activities_text'\t=> $activitytxt,\n\t\t\t\t'same_process_text'\t=> lang('go to same process activities'),\n\t\t\t\t'same_instance_button'\t=> ($this->activity_type=='standalone')? '-' : '<a href=\"'.$GLOBALS['egw']->link('/index.php',$link_data_inst).'\">'\n\t\t\t\t\t.$button.lang('instance %1', ($this->instance_name=='')? $this->instance_id: $this->instance_name).'</a>',\n\t\t\t\t'same_activities_button'=> '<a href=\"'.$GLOBALS['egw']->link('/index.php',$link_data_act).'\">'\n\t\t\t\t\t.$button.$act_button_name.'</a>',\n\t\t\t\t'same_process_button'\t=> '<a href=\"'.$GLOBALS['egw']->link('/index.php',$link_data_proc).'\">'\n\t\t\t\t\t.$button.lang('process %1', $this->process_name).'</a>',\n\t\t\t));\n\t\t\t$this->translate_template('after_running');\n\t\t\t$this->t->pparse('output', 'after_running');\n\t\t\t$GLOBALS['egw']->common->egw_footer();\n\t\t}", "public function render_index() {\n $this->prepare_new_game($this->_player_info->current_level, 'ma_quiz');\n redirect('/mod/rtw/view.php?id='.$this->course_module->id.'&c=ma_quiz&a=question','Đang lấy danh sách câu hỏi, vui lòng đợi trong giây lát...');\n }", "protected function expulsaVisitante()\n {\n header( \"Location: \".self::index );\n }", "protected function displayMaintenancePage()\n {\n }", "protected function displayMaintenancePage()\n {\n }", "protected function displayMaintenancePage()\n {\n }", "public function makePage()\n {\n $db = new DB();\n $page_color = !empty($db->getOptions('page_color')) ? 'style=\"background-color:' . $db->getOptions('page_color') . ';\"' : '';\n $footer_color = !empty($db->getOptions('footer_color')) ? 'style=\"background-color:' . $db->getOptions('footer_color') . ';\"' : '';\n echo '<!DOCTYPE html>\n<html lang=\"en\">\n<head>';\n\n $this->makeMeta();\n $this->setTitle();\n $this->makeStyles();\n $this->makeHeaderScripts();\n echo '<!-- header code -->' . PHP_EOL;\n if (!empty($this->getHeaderCode())) {\n echo $this->getHeaderCode() . PHP_EOL;\n }\n echo '<!-- header code -->' . PHP_EOL;\n echo '</head>\n\n\t\t<body class=\"' . $this->getbodyClass() . '\" ' . $page_color . '>';\n\n echo '<div class=\"main-wrapper\" >';\n if ($this->hasHeader) {\n echo '<header class=\"header\" >';\n if ($this->hasNavbar) {\n require_once 'Navbar.php';\n }\n echo '</header>';\n }\n\n\n//--main content---\n if ($this->hasBreadcrumb) {\n $routes = explode(\"/\", $_SERVER['REQUEST_URI']);\n echo '\n<div class=\"breadcrumb-bar d-print-none\" ' . $footer_color . '>\n\t\t\t\t<div class=\"container-fluid\">\n\t\t\t\t\t<div class=\"row align-items-center\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t\t\t\t<nav aria-label=\"breadcrumb\" class=\"page-breadcrumb\">\n\t\t\t\t\t\t\t\t<ol class=\"breadcrumb\">\n\t\t\t\t\t\t\t\t\t<li class=\"breadcrumb-item\"><a href=\"' . BASE_PATH . $routes[1] . '/\"><i class=\"bx bx-home-alt\"></i></a></li>';\n\n for ($i = 1; $i < count($routes) - 1; $i++) {\n if ($i != count($routes) - 1) {\n echo '<li class=\"breadcrumb-item\"><a href=\"' . BASE_PATH . $routes[1] . '/' . $routes[$i] . '/\">' . $routes[$i] . '</a></li>';\n } else {\n echo '<li class=\"breadcrumb-item active\">' . $routes[$i] . '</li>';\n }\n }\n echo '\n\t\t\t\t\t\t\t\t</ol>\n\t\t\t\t\t\t\t</nav>\n\t\t\t\t\t\t\t<h2 class=\"breadcrumb-title\">' . $this->getPageTitle() . '</h2>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>';\n }\n echo '<div class=\"content\">';\n echo '<div class=\"container-fluid\">';\n if ($this->isHasContent()) {\n $this->addPageContent($this->getPageContent());\n }\n\n echo '</div></div>';\n\n echo '<!-- above footer code -->' . PHP_EOL;\n\n /*--footer---*/\n if ($this->hasFooter) {\n require_once 'footer.php';\n }\n echo '</div>';\n $this->makeScripts();\n $this->makeFooterScripts();\n if ($this->ishasError()) {\n $this->showPageError();\n }\n\n echo '<!-- footer code -->' . PHP_EOL;\n if (!empty($this->getFooterCode())) {\n echo $this->getFooterCode() . PHP_EOL;\n }\n echo '<!-- footer code -->' . PHP_EOL;\n echo '</body>\n</html>';\n }", "public function pageOne()\n {\n\n\n View::show(\"pageOne.php\", \"pageOne\");\n }", "public function endPage() {}", "public function page () {\n\t\tinclude _APP_ . '/views/pages/' . $this->_reg->controller . '/' . $this->_page . '.phtml';\n\t}", "public function show()\n {\n /** Configure generic views */\n $this->setupViews();\n /** Render views */\n ?>\n <html>\n <body>\n <?php\n /** Render views */\n $this->head_view->render();\n $this->secondary_nav_bar->render();\n $this->tree_view->render();\n $this->title_view->render();\n $this->primary_nav_bar->render();\n $this->render_page();\n ?>\n </body>\n </html>\n <?php\n }", "protected function displayMaintenancePage()\n {\n return;\n }", "public function index() {\n\t\t\t$this->render();\n\t\t}", "public function index() {\n\t\t$this->landing();\n\t}", "public function actionIndex()\n\t{\n\t\t// do stuff that's not the main content?\n\t}", "abstract protected function view_generatePageContent();", "public function index_action() {\n \\TPL::output('/pl/be/sns/wx/main');\n exit;\n }", "public function displayPageStart() {\r\n\t\t\r\n\t\t$html = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"';\r\n\t\t$html .= '\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">';\r\n\r\n\t\t$html .= '<html xmlns=\"http://www.w3.org/1999/xhtml\">';\r\n\t\t$html .= \"<head>\";\r\n\t\t$html .= '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />';\r\n\t\t// get title from the entity?...\r\n\t\t$html .= \"<title>NGOData hosted data management system</title>\";\r\n\t\t\r\n\t\t$html .= '<link href=\"/css/oneColFixCtr.css\" rel=\"stylesheet\" type=\"text/css\" />';\r\n\t\t//$html .= '<link href=\"'.dirname(dirname($_SERVER['DOCUMENT_ROOT'])).'/ngodata/css/oneColFixCtr.css\" rel=\"stylesheet\" type=\"text/css\" />';\r\n\t\t//$html .= '<link href=\"'.self::getPath('css').'oneColFixCtr.css\" rel=\"stylesheet\" type=\"text/css\" />';\r\n\t\t//$html .= '<link href=\"../css/superfish.css\" rel=\"stylesheet\" type=\"text/css\" />';\r\n\t\t\r\n\t\t$html .= '<link rel=\"stylesheet\" href=\"/css/menu_style.css\" type=\"text/css\" />';\r\n\t\t//$html .= '<link rel=\"stylesheet\" href=\"'.dirname(dirname($_SERVER['DOCUMENT_ROOT'])).'/ngodata/css/menu_style.css\" type=\"text/css\" />';\r\n\t\t//$html .= '<link rel=\"stylesheet\" href=\"'.self::getPath('css').'menu_style.css\" type=\"text/css\" />';\r\n\t\t\r\n\t\t$html .= \"</head>\";\r\n\r\n\t\t$html .= \"<body>\";\r\n\t\t$html .= \"<div class=\\\"container\\\">\";\r\n\t\t$html .= \"<div class=header>\";\r\n\t\t$html .= \"<!-- Logo Goes here -->\";\r\n\t\t//$html .= \"Logo\";\r\n\t\t$html .= '<img src=\"'.self::getPath('images').'NGODataLogo-noBack.png\" alt=\"NGOData logo\" />';\r\n\t\t$html .= \"<!-- End Logo -->\";\r\n\t\t$html .= \"</div>\";\r\n\t\t\r\n\t\t\r\n\t\t// the menu items\r\n\t\t$html .= '<div class=\"menu\">';\r\n\t\t$html .= '<ul>';// class=\"sf-menu\">';\r\n\t\t$html .= \"<!-- Add menu items by adding <li> tags -->\";\r\n \r\n\t\t$html .= '<li><a href=\"'.self::getPath('home').'\">Home</a> ';\r\n\t\t$html .= \"<!-- Start Sub Menu Items -->\";\r\n\t\t//$html .= '<ul>';// class=\\\"subnav\\\">\";\r\n\t\t//$html .= '<li><a href=\"#\">Sub Nav</a></li>';\r\n\t\t//$html .= '<li><a href=\"#\\>Sub Nav</a></li>';\r\n\t\t//$html .= \"</ul>\";\r\n\t\t$html .= \"<!-- End Sub MEnu Item --> \";\r\n\t\t$html .= \"</li>\";\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// If authorised, can add other options here\r\n\t\t$html .= \"<li><a href=\\\"#\\\">Services</a>\";\r\n\t\t$html .= '<ul>'; //class=\\\"subnav\\\">\";\r\n\t\t$html .= '<li><a href=\"NGODataController.php?request=auth\">NGOData login</a></li>';\r\n\t\t//$html .= '<li><a href=\"'.$_SERVER['DOCUMENT_ROOT'].'/NGODataController.php?request=auth\">NGOData login</a></li>';\r\n\t\t$html .= '<li><a href=\"NGODataController.php?request=reg\">Register</a></li>';\r\n\t\t$html .= \"</ul>\";\r\n\t\t$html .= \"</li>\";\r\n\t\t\r\n\t\t\r\n\t\t$html .= \"<li><a href=\\\"#\\\">About</a>\";\r\n\t\t$html .= \"<ul class=\\\"subnav\\\">\";\r\n\t\t$html .= \"<li><a href=\\\"#\\\">Sub Nav</a></li>\";\r\n\t\t$html .= \"<li><a href=\\\"#\\\">Sub Nav</a></li>\";\r\n\t\t$html .= \"</ul>\";\r\n\t\t$html .= \"</li>\";\r\n\t\t$html .= \"</ul>\";\r\n\t\t$html .= \"</div>\";\r\n\r\n\t\treturn $html;\r\n\t}", "public function run()\n {\n PageContent::factory()->aboutUs()->state([\n 'content' => 'D\\'more Event Planner is an Event Planning Software is cutting-edge tool which will allow the client all the resources and visual aids for their event planning. They will be able to play with decoration themes, listen to theme music, design invitations, thank-you cards, and RSVP cards, use the interactive planning calendar, and much more. This software will bring your event into the millennium with cutting edge technology that is designed to save time and money.'\n ])->create();\n PageContent::factory()->aboutUs()->state([\n 'content' => 'We also provide a Step-by-Step Guide in preparation to your event which include a calendar to map out the event, a step-by-step guide on what is needed for and how to put together a successful, worry-free event, resource information, popular refreshments with recipes, games, and tips to put their event in the record books. The events available include birthdays for all ages, meetings, retreats, parties, vacations, and special occasion celebrations such as graduations, holidays, showers, weddings, and receptions.'\n ])->create();\n }", "function renderPage( &$outPage )\n {\n #echo \"eZNewsFlowerArticleViewer::renderPage( \\$outPage = $outPage )<br />\\n\";\n $value = false;\n $continue = false;\n\n global $form_abort;\n global $form_submit;\n global $form_delete;\n global $form_publish;\n global $form_preview;\n #echo \"\\$form_preview = $form_preview <br />\\n\";\n #echo \"\\$form_abort = $form_abort <br />\\n\";\n #echo \"\\$form_submit = $form_submit <br />\\n\";\n #echo \"\\$form_delete = $form_delete <br />\\n\";\n #echo \"\\$form_publish = $form_publish <br />\\n\";\n\n #echo \"\\$this->Item->id() = \" . $this->Item->id() . \" <br />\\n\";\n #echo \"\\$this->Item->getIsFrontImage() = \" . $this->Item->getFrontImage() . \" <br />\\n\";\n \n if( $form_publish )\n {\n $this->Item = new eZNewsArticle( $this->Item->id() );\n $this->Item->setStatus( \"publish\" );\n\n $this->Item->store( $outID );\n\n global $QUERY_STRING;\n $QUERY_STRING = \"\";\n \n $adminObject = new eZNewsAdmin( \"site.ini\" );\n $value = $adminObject->doItem( $this->Item->getIsCanonical() );\n }\n\n if( $this->URLObject->getQueries( $queries, \"edit\\+this\" ) && empty( $form_abort ) && empty( $form_publish ) && empty( $form_submit ) )\n {\n $value = $this->editPage( $outPage );\n }\n \n if( $this->URLObject->getQueries( $queries, \"delete\\+this\" ) && empty( $form_abort ) && empty( $form_delete ) && empty( $form_publish ) )\n {\n $value = $this->deletePage( $outPage );\n }\n \n if( !empty( $form_delete ) )\n {\n $parentID = $this->Item->getIsCanonical();\n \n $this->Item->delete();\n $this->Item->errors();\n $this->Item->store( $outID );\n \n global $QUERY_STRING;\n $QUERY_STRING = \"\";\n \n $adminObject = new eZNewsAdmin( \"site.ini\" );\n $value = $adminObject->doItem( $parentID );\n }\n\n if( $form_abort && !$this->URLObject->getQueries( $queries, \"delete\\+this\" ) )\n {\n $item = $this->Item->getIsCanonical();\n $this->Item->setName( \"no-name\" );\n $this->Item->errors();\n $this->Item->delete();\n $this->Item->errors();\n $this->Item->store( $outID );\n $adminObject = new eZNewsAdmin( \"site.ini\" );\n $value = $adminObject->doItem( $item );\n }\n\n if( $value == false )\n {\n $value = $this->viewPage( $outPage );\n }\n \n return $value;\n }" ]
[ "0.71206367", "0.6839401", "0.68206185", "0.68094", "0.67677134", "0.66736937", "0.6665796", "0.6625356", "0.661213", "0.661207", "0.65895486", "0.6574805", "0.6567629", "0.656572", "0.65394986", "0.6520486", "0.6504462", "0.6469387", "0.6449979", "0.6443561", "0.64235324", "0.6422516", "0.6396539", "0.63794285", "0.63787484", "0.63686585", "0.63682425", "0.63639116", "0.63458", "0.6341751", "0.63379043", "0.6333202", "0.6331406", "0.6326272", "0.6325574", "0.6321443", "0.6321443", "0.63119125", "0.62680334", "0.6261142", "0.62603104", "0.6259642", "0.62575233", "0.62543297", "0.6246701", "0.6244102", "0.62431985", "0.62411255", "0.6241064", "0.6233372", "0.6228881", "0.6223536", "0.62196994", "0.6213087", "0.62114733", "0.62077737", "0.6193004", "0.6192906", "0.61889124", "0.6187157", "0.61861193", "0.6171926", "0.61672246", "0.61628586", "0.6145678", "0.6140659", "0.61391735", "0.6137979", "0.61360776", "0.6132586", "0.6130026", "0.6123466", "0.612278", "0.6120722", "0.61178887", "0.61166716", "0.6116604", "0.61112016", "0.61097515", "0.61071515", "0.61035", "0.6101142", "0.6100216", "0.609982", "0.609674", "0.609674", "0.609674", "0.60935825", "0.60909045", "0.60838145", "0.6075717", "0.6072441", "0.6067637", "0.60645926", "0.6062313", "0.6054844", "0.6053025", "0.60506856", "0.60491127", "0.6046917", "0.6046185" ]
0.0
-1
/ Get inscripcion_materia by id
function get_inscripcion_materia($id) { return $this->db->get_where('inscripcion_materia',array('id'=>$id))->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_materia($materia_id)\n {\n $materia = $this->db->query(\"\n SELECT\n *\n\n FROM\n `materia`\n\n WHERE\n `materia_id` = ?\n \",array($materia_id))->row_array();\n\n return $materia;\n }", "public function materia_get()\n {\n $idmateria = $this->get( 'idmateria' );\n\n if ( $idmateria !== null )\n {\n $materia = $this->ApiModel->obtenerMateria($idmateria);\n\n $this->response([\n 'error' => false,\n 'status' => \"encontrado\",\n 'data' => $materia\n ], 400 );\n }else{\n $this->response([\n 'error' => true,\n 'status' => \"noencontrado\",\n 'message' => 'Materia no encontrada'\n ], 400 );\n }\n }", "function MaterialId($id,$indice){\n //Construimos la consulta\n $sql=\"SELECT* FROM material_entregado\n WHERE materiales=$indice and empleado=$id order by id desc limit 1\";\n //Realizamos la consulta\n $resultado=$this->realizarConsulta($sql);\n if($resultado!=false){\n if($resultado!=false){\n return $resultado->fetch_assoc();\n }else{\n return null;\n }\n }else{\n return null;\n }\n }", "public function consultMatricula( $id ) {\n $consulta = $this->db->prepare('SELECT * FROM matricula WHERE id = \"'.$id.'\"'); \n $consulta->execute();\n $matricula = $consulta->fetch(PDO::FETCH_ASSOC); \n return $matricula; \n }", "function delete_inscripcion_materia($id)\r\n {\r\n return $this->db->delete('inscripcion_materia',array('id'=>$id));\r\n }", "public function getMateria(){\n\t\treturn $this->materia;\n }", "function get_codigo_pre_requisito($materia_id)\n {\n $materia = $this->db->query(\"\n SELECT\n m.materia_codigo\n\n FROM\n materia m\n\n WHERE\n `materia_id` = ?\n \",array($materia_id))->row_array();\n\n return $materia;\n }", "public function materias(){\n\t\t\n\t\t$connection = Connection::getInstance();\n\t\t$result \t= $connection->query(\"SELECT grupos.materia_id \n\t\t\t\t\t\t\t\t\t\t FROM usuarios, inscripciones, grupos \n\t\t\t\t\t\t\t\t\t\t WHERE tipo_usuario = \".Usuario::ESTUDIANTE.\" AND \n\t\t\t\t\t\t\t\t\t\t usuarios.id = $this->id AND \n\t\t\t\t\t\t\t\t\t\t usuarios.id = inscripciones.usuario_id AND \n\t\t\t\t\t\t\t\t\t\t grupos.id = inscripciones.grupo_id\");\n\t\t$res \t\t= array();\n\t\t\n\t\twhile ($id = pg_fetch_array($result)[0]){\n\t\t\t$res[] = new Materia($id);\n\t\t}\n\t\t\n\t\treturn $res;\n\t}", "public static function getMateriasEquivalencias($idequivalencia,$idmateriaplan)\n {\n \t$q = Doctrine_Query::create()\n \t->select('*')\n \t->from('MateriasEquivalencias')\n \t->where('idequivalencia = '.$idequivalencia)\n \t->andWhere('idmateriaplan = '.$idmateriaplan);\n \n \treturn $q->fetchOne();\n }", "function get_all_materia()\n {\n $materia = $this->db->query(\"\n SELECT\n m.*, a.*, n.*, e.*, t.materia_nombre as 'requisito', pa.carrera_id, ca.carrera_nombre\n\n FROM\n materia m\n LEFT JOIN area_materia a ON m.area_id=a.area_id\n LEFT JOIN nivel n ON m.nivel_id=n.nivel_id\n LEFT JOIN plan_academico pa ON pa.planacad_id=n.planacad_id\n LEFT JOIN carrera ca ON ca.carrera_id=pa.carrera_id\n LEFT JOIN estado e ON m.estado_id=e.estado_id\n LEFT JOIN materia t ON m.mat_materia_id=t.materia_id\n\n WHERE\n 1 = 1\n\n ORDER BY carrera_id, n.nivel_id ASC\n \")->result_array();\n\n return $materia;\n }", "function get_all_materias_activo_plan($planacad_id)\n {\n $materia = $this->db->query(\"\n SELECT\n m.materia_id, m.materia_nombre, m.materia_codigo\n\n FROM\n materia m, nivel n\n\n WHERE\n m.estado_id = 1\n and m.nivel_id = n.nivel_id\n and n.planacad_id = $planacad_id\n\n ORDER BY `materia_id` ASC\n \")->result_array();\n\n return $materia;\n }", "public function materia()\n {\n return $this->belongsTo(Materia::class);\n }", "private function getMateriais() {\n\n $oDaoMaterial = new cl_matmater();\n $sCampos = \" m60_codmater as codigo, m60_descr as descricao, m61_descr as unidade\";\n\n $sCamposGrupo = \" , 0 as codigogrupo \";\n if ($this->lAgruparGrupoSubgrupo) {\n $sCamposGrupo = \" , m65_sequencial as codigogrupo \";\n }\n $sCampos .= $sCamposGrupo;\n\n $aOrdem = array();\n $aWhere = array();\n $aWhere[] = \" instit = {$this->iInstituicao} \";\n\n $aOrdem[] = \" m60_descr \";\n\n if ($this->sDepartamentos) {\n $aWhere[] = \" m70_coddepto in ({$this->sDepartamentos}) \";\n }\n\n if ($this->sGrupoSubgrupo) {\n $aWhere[] = \" db121_sequencial in ({$this->sGrupoSubgrupo}) \";\n }\n\n $sCampoDepartamento = \", 0 as depto, '' as departamento\";\n if ($this->iQuebraPagina == RelatorioDeDistribuicao::QUEBRA_PAGINA_DEPARTAMENTO) {\n $sCampoDepartamento = \", m70_coddepto as depto, descrdepto as departamento \";\n }\n $sCampos .= $sCampoDepartamento;\n $sWhere = \" where \" . implode(\" and \", $aWhere);\n $sOrdem = \" order by \" . implode(\", \", $aOrdem);\n\n $sql = \" select distinct {$sCampos} \";\n $sql .= \" from matmater \";\n $sql .= \" inner join matunid on m60_codmatunid = m61_codmatunid \";\n $sql .= \" inner join matmatermaterialestoquegrupo on m60_codmater = m68_matmater \";\n $sql .= \" inner join materialestoquegrupo on m68_materialestoquegrupo = m65_sequencial \";\n $sql .= \" inner join db_estruturavalor on db121_sequencial = m65_db_estruturavalor \";\n $sql .= \" inner join matestoque on m60_codmater = m70_codmatmater \";\n $sql .= \" inner join db_depart on coddepto = m70_coddepto \";\n\n\n $sql .= \"{$sWhere} {$sOrdem} \";\n\n $rsMateriais = $oDaoMaterial->sql_record($sql);\n\n $aMateriais = array();\n for ($i = 0; $i < $oDaoMaterial->numrows; $i++) {\n\n $oMaterial = db_utils::fieldsMemory($rsMateriais, $i);\n $oMaterial->totalPeriodo = 0.0;\n $oMaterial->mediaPeriodo = 0.0;\n $aMateriais[] = $oMaterial;\n\n if (!isset($this->aDepartamentos[$oMaterial->depto])) {\n\n $oDeptartamento = new stdClass();\n $oDeptartamento->codigo = $oMaterial->depto;\n $oDeptartamento->descricao = $oMaterial->departamento;\n $oDeptartamento->itens = array();\n $this->aDepartamentos[$oDeptartamento->codigo] = $oDeptartamento;\n }\n }\n return $aMateriais;\n }", "public function selectMatiere($id){\n $con=new Connexion();\n $conn2=$con->con; \n $query=\"SELECT * FROM matiere where IdM=$id\";\n $result = $conn2->prepare($query);\n $result->execute();\n return $result->fetchAll(PDO::FETCH_ASSOC);\n }", "public function getIdMatiere()\n {\n return $this->idMatiere;\n }", "public function materias_get()\n {\n $iddocente = $this->get( 'iddocente' );\n\n if ( $iddocente !== null )\n {\n $materias = $this->ApiModel->obtenerMateriasDelDocente($iddocente);\n\n $this->response($materias, 200 );\n }else{\n $this->response([\n 'error' => true,\n 'status' => \"noencontrado\",\n 'message' => 'Materias del Profesor no encontradas'\n ], 400 );\n }\n }", "public function materias()\n {\n return $this->belongsTo('App\\Model\\PrimerSemestre\\PrimSemMateria', 'prim_sem_materia_id');\n }", "function get($id) {\r\n //devuelve el objeto entero\r\n $parametros = array();\r\n $parametros[\"id\"] = $id;\r\n $this->bd->select($this->tabla, \"*\", \"id =:id\", $parametros);\r\n $fila = $this->bd->getRow();\r\n $mecanico = new Mecanico();\r\n $mecanico->set($fila);\r\n return $mecanico;\r\n }", "public function edit($id)\n {\n //\n $materia=materiap::where('idmateria',$id)->first();\n return view('edit_materia',['materia'=>$materia]);\n }", "public function show($id)\n {\n //\n $matricula=DB::table('matriculas')\n ->join('grados','grados.id','=','matriculas.grados_id')\n ->join('estudiantes','estudiantes.id','=','matriculas.estudiantes_id')\n ->join('turnos','turnos.id','=','grados.turnos_id')\n ->join('anios','anios.id','=','grados.anios_id')\n ->where('matriculas.id',$id)\n ->select( 'matriculas.fecha_matricula',//\n 'matriculas.tipoMatricula',//\n 'estudiantes.nombre',//\n 'estudiantes.apellido',//\n 'grados.grado',//\n 'grados.seccion',//\n 'turnos.nombre_turno',\n 'matriculas.id',\n 'anios.año')//\n ->get()->toArray();\n //dd($matricula[0]->id);\n\n //$matricula=matricula::findOrFail($id);\n //return view('matriculas.show', compact('matricula'));\n //return view('matriculas.show')->with('matricula',$matricula);\n return view('matriculas.show',['matricula' => $matricula[0]]);\n }", "public function getMateris()\n {\n return $this->hasMany(Materi::className(), ['dosen_pengampuh_id' => 'id']);\n }", "public function materias()\n {\n return $this->belongsToMany('DSIproject\\Materia', 'grado_materia')\n ->withPivot('grado_id')\n ->withTimestamps();\n }", "function ConverseMaterial($id){\n //Construimos la consulta\n $sql= \"SELECT tipo_material from material where id=\".$id;\n //Realizamos la consulta\n $resultado = $this->realizarConsulta($sql);\n if($resultado!=false){\n if($resultado!=false){\n return $resultado->fetch_assoc();\n }else{\n return null;\n }\n }else{\n return null;\n }\n }", "public static function find(string $id): Materia{\n return Materia::find($id)->load('correlativas_cursadas_cursadas','correlativas_cursadas_aprobadas','correlativas_aprobadas_aprobadas','correlativas_aprobadas_cursadas');\n }", "static public function ctrMostrarUnidadMedida($id_inventario){\n\n\t\t$tabla = \"inventario_x_unidad_medida_salida\";\n\n\t\t$respuesta = ModeloInventario::mdlMostrarUnidadMedida($tabla , $id_inventario);\n\n\t\treturn $respuesta;\n\n\n\n}", "public function indexTablaMateriales($id){\n return view('backend.bodega3.verificacion.materiales.index', compact('id'));\n }", "public function getInformacionMujer($id) {\n $mujer = Mujer::findOrFail($id);\n \n if(Auth::check() ) {\n $usuario = Auth::user();\n } else {\n $usuario = \"anonimo\";\n }\n\n return view('imprimir.informacion', compact(\"usuario\", \"mujer\"));\n }", "public function ver_boleta($id_materia)\n {\n $boleta = BoletaModel::select('id_materia','id_alumno','promedio','aprobado')\n ->where('id_materia',$id_materia)->get();\n\n return $boleta;\n }", "public function readOneByMedicoInOrden($id,$fecha){\n $objC=new citaDAO();\n $resul=$objC->readOneByMedicoInOrden($id,$fecha);\n return $resul;\n }", "Public function info($id){\n return Paciente::where('id',$id)->first();\n }", "function ficha_material($id_material) {\n\t\t$query = \"SELECT materiales.*, licencias.*\n\t\tFROM materiales, licencias\n\t\tWHERE materiales.id_material = '$id_material'\n\t\tAND materiales.material_licencia=licencias.id_licencia\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $row;\n\t\t}\n\t\telse {\n\t\t\treturn $row;\n\t\t}\n\t}", "public function califica($id_docente){\n\n\n $alumnos = DB::table('materias as mat')\n ->join('docente as dc', 'mat.id_docente', '=','dc.id')\n ->join('alumnos as al','mat.id_grado','=','al.grado')\n ->join('users as usr','usr.dni','=','al.dni_alumno')\n ->join('grados as gr','gr.id','=','mat.id_grado')\n ->select('al.dni_alumno','usr.nombre','usr.apellidos','mat.clave_materia','mat.materia','mat.id_grado','dc.dni_docente','gr.grado','mat.id as id_materia')\n ->where('dc.dni_docente','=',$id_docente)\n ->get();\n ;\n\n $materias = DB::table('materias as mat')\n ->join('docente as dc', 'mat.id_docente', '=','dc.id')\n ->join('grados as gr','gr.id','=','mat.id_grado')\n ->select('mat.materia','gr.grado','mat.id_docente')\n ->where('dc.dni_docente','=',$id_docente)\n ->get();\n\n return response()->json(['alumnos'=>$alumnos,'matgr'=>$materias]);\n\n }", "function datos_material($id_material) {\n\t\t$query = \"SELECT materiales.*\n\t\tFROM materiales\n\t\tWHERE id_material = '$id_material'\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $row;\n\t\t}\n\t}", "public function bySubcategoria($id){\n return Material::where('idsubcategoria','=',$id)->get();\n //Este de aqui nos dara una coleccion una respuesta, para probar ello se creara un ruta\n }", "public function findByMateria(Materia $materia)\n\t{\n\t\t$query = $this->getEntityManager()\n\t\t\t\t->createQuery(\"SELECT n FROM RegistroAcademicoBundle:Nota n WHERE n.materia = :materia AND n.periodo IN (SELECT p.periodo FROM RegistroAcademicoBundle:Periodo p WHERE p.anho = anho_actual()) GROUP BY p.periodo\")\n\t\t\t\t->setParameter(':materia', $materia->getId());\n\t\treturn $query->getResult();\n\t}", "public function show($id)\n {\n $obj=Materias::with('materias_has_niveles')->findOrFail($id);\n $ev=new EventlogRegister;\n $msj='Consulta de elemento. Tabla=Materias, id='.$id;\n $ev->registro(0,$msj,$this->req->user()->id);\n return $obj->toJson();\n }", "public function getRetFuente($id)\n {\n $result=$this->adapter->query(\"select b.id , b.idEmp, d.idCcos, year(a.fechaI) as ano , month(a.fechaI) as mes \n from n_nomina a\n inner join n_nomina_e b on b.idNom = a.id\n inner join a_empleados_rete c on c.idEmp = b.idEmp\n inner join a_empleados d on d.id = c.idEmp\n where a.id = \".$id ,Adapter::QUERY_MODE_EXECUTE);\n //$datos = $result->current();\n $datos=$result->toArray();\n return $datos;\n }", "public function show($id)\n {\n $multa=DB::table('multa as m')\n ->join('socio as s','m.idSocio','=','s.idSocio')\n ->join('usuario as u','m.idUsuario','=','u.idUsuario')\n ->select('m.idMulta','m.nombreMulta','m.concepto','m.monto','s.nombre + s.apellidoP + s.apellidoM as NombreSocio', 'm.fechaMulta')\n ->where('m.idMulta','=' ,$id)\n ->first();\n return view('administracion.multa.show',['multa'=>$multa]);\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}", "public function getServicioMedicoUsuario($id){\n $sql=\"SELECT * FROM servicio_medico WHERE ID_Mt_Ctl= ?\";//Se hace la consulta para validar los datos\n $consulta=$this->db->connect()->prepare($sql);//se asigna una variable para usar el metodo prepare\n $consulta->execute(array($id)); \n \n return !empty($consulta) ? $fila = $consulta->fetch(PDO::FETCH_ASSOC) : false;\n }", "public function edit($id)\n {\n $materia = \\App\\Materia::find($id);\n return view('admin/materias/editar', compact('materia'));\n }", "function listar_materiales($objeto){\n\t\t$condicion.=(!empty($objeto['id']))?' AND p.id='.$objeto['id']:'';\n\t// Filtra por los IDs de los insumo si existe\n\t\t$condicion.=(!empty($objeto['ids']))?' AND p.id IN ('.$objeto['ids'].')':'';\n\n\t// Filtra por el nombre del insumo si existe\n\t\t$condicion.=(!empty($objeto['tipo_producto']))?' AND p.tipo_producto='.$objeto['tipo_producto']:'';\n\n\t\t$sql = \"SELECT\n\t\t\t\t\tp.id AS idProducto, p.nombre, IF(p.tipo_producto=4, ROUND(p.costo_servicio, 2), IFNULL(pro.costo,0)) AS costo,\n\t\t\t\t\tp.id_unidad_compra AS idunidadCompra, p.id_unidad_venta AS idunidad,\n\t\t\t\t\t(SELECT\n\t\t\t\t\t\tnombre\n\t\t\t\t\tFROM\n\t\t\t\t\t\tapp_unidades_medida uni\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tuni.id=p.id_unidad_venta) AS unidad,\n\t\t\t\t\t\t(SELECT\n\t\t\t\t\t\t\tclave\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tapp_unidades_medida uni\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tuni.id=p.id_unidad_venta) AS unidad_clave, p.codigo, u.factor, m.cantidad, m.opcionales AS opcionales\n\t\t\t\tFROM\n\t\t\t\t\tapp_productos p\n\t\t\t\tINNER JOIN\n\t\t\t\t\t\tapp_producto_material m\n\t\t\t\t\tON\n\t\t\t\t\t\tp.id=m.id_material\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tapp_unidades_medida u\n\t\t\t\t\tON\n\t\t\t\t\t\tu.id=p.id_unidad_compra\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tapp_costos_proveedor pro\n\t\t\t\t\tON\n\t\t\t\t\t\tpro.id_producto=p.id\n\t\t\t\tWHERE\n\t\t\t\t\tp.status=1\n\t\t\t\tAND\n\t\t\t\t\tm.id_producto = \".$objeto['id_receta'].\n\t\t\t\t$condicion;\n\t\t// return $sql;\n\t\t$result = $this->queryArray($sql);\n\n\t\treturn $result;\n\t}", "static public function ctrObtenerMensajePorId(){\n\n\t\t\tif(isset($_GET[\"id\"])){\n\n\t\t\t\t$tabla = \"mensajes\";\n\n\t\t\t\t$id = $_GET[\"id\"];\n\n\t\t\t\t$respuesta = ModeloMensajes::mdlObtenerMensajePorId($tabla, $id);\n\n\t\t\t\treturn $respuesta;\t\n\t\t\t\n\t\t\t}\n\n \t}", "public function materias()\n {\n return $this->belongsToMany('DSIproject\\Materia')->withTimestamps();\n }", "public static function get_materias(){ \n $response = new Response();\n\n $response->data = Materia::select()?? 'No hay registros en la base de datos';\n $response->status = 'success';\n\n return $response;\n }", "public function DisplayAchat($id_marchant){\n $req = $this->pdo->prepare(\"SELECT * FROM inventaire \n INNER JOIN objet on objet.id_objet = inventaire.id_objet\n WHERE id_perso = :id\n \");\n $req->execute([\n \":id\" => $id_marchant\n ]);\n return $req->fetchAll(PDO::FETCH_ASSOC);\n }", "public function show($id)\n {\n $p=Proyecto::where('proyectos.id',$id)\n ->join('users','proyectos.docente_id','=','users.id')\n ->join('cursos','proyectos.curso_id','=','cursos.id')\n ->select('proyectos.*', 'users.nombres as n', 'users.apellidos as a','cursos.curso as curso')\n ->first();\n $satisfaccion=array(\n '' => '',\n '1' => 'Totalmente insatisfecho',\n '2' => 'Insatisfecho',\n '3' => 'Parcialmente satisfecho',\n '5' => 'Satisfecho',\n '6' => 'Totalmente satisfecho');\n $estudiantes=User::join('proyests','users.id','=','proyests.estudiante_id')->where('proyests.proyecto_id',$id)->select('users.*')->get();\n return view('docente.acciones.informacion', compact('p','estudiantes','satisfaccion')); \n }", "public function show($id)\n {\n\t\t$cita = Cita::select('medicos.nombre AS nombre_medico',\n\t\t\t\t\t\t\t 'medicos.apellido_1 AS apellido_1_medico',\n\t\t\t\t\t\t\t 'medicos.apellido_2 AS apellido_2_medico',\n\t\t\t\t\t\t\t 'medicos.fecha_nacimiento AS fecha_nacimiento_medico',\n\t\t\t\t\t\t\t 'medicos.telefono AS telefono_medico', \n\t\t\t\t\t\t\t 'pacientes.nombre AS nombre_paciente',\n\t\t\t\t\t\t\t 'pacientes.apellido_1 AS apellido_1_paciente',\n\t\t\t\t\t\t\t 'pacientes.apellido_2 AS apellido_2_paciente',\n\t\t\t\t\t\t\t 'pacientes.telefono AS telefono_paciente',\n\t\t\t\t\t\t\t 'citas.id AS id_citas',\n\t\t\t\t\t\t\t 'pais','ciudad', 'email', 'dni', 'genero', 'direccion', 'fecha', 'hora', 'motivo', 'observaciones' )\n\t\t\t\t\t\t->join('pacientes', 'citas.paciente_id', '=', 'pacientes.id')\n\t\t\t\t\t\t->join('medicos', 'citas.medico_id', '=', 'medicos.id')\n\t\t\t\t\t\t->find($id);\n\t\tif($cita){\n\t\t\treturn $cita;\t\n\t\t}else{\n\t\t\techo \"error\";\n\t\t}\n \n }", "public function getById($idManifiesto) {\n $db = $this->getAdapter();\n $db->setFetchMode(Zend_Db::FETCH_OBJ);\n $select = $db->select();\n $select->from(array('m' => 'manifiesto'), array('id_manifiesto', 'fecha', 'hora', 'despachador', 'viaje',\n 'bus', 'chofer', 'total', 'destino', 'origen', 'estado', 'tipo'));\n $select->joinLeft(array(\"ch\" => \"chofer\"), \"ch.id_chofer=m.chofer\", \"nombre_chofer\");\n $select->joinLeft(array(\"b\" => \"bus\"), \"b.id_bus=m.bus\", \"numero\");\n $select->join(array(\"o\" => \"ciudad\"), \"o.id_ciudad=m.origen\", \"nombre as ciudadOrigen\");\n $select->join(array(\"d\" => \"ciudad\"), \"d.id_ciudad=m.destino\", \"nombre as ciudadDestino\");\n $select->where(\"id_manifiesto=?\", $idManifiesto);\n $results = $db->fetchRow($select);\n return $results;\n }", "public function show($id)\n {\n $materiaPrima = $this->materiaPrima->find($id);\n $tercero_id = $materiaPrima->terceros[0]->id;\n $tercero = $this->tercero->find($tercero_id);\n\n $sendtoview;\n if (count($tercero->personas) > 0) {\n $sendtoview = array('materiaPrima' => $materiaPrima, 'proveedor' => $tercero->personas[0]->nombre . ' ' . $tercero->personas[0]->apellido);\n }elseif (count($tercero->empresas) > 0) {\n $sendtoview = array('materiaPrima' => $materiaPrima, 'proveedor' => $tercero->empresas[0]->razon_social);\n }\n\n if (empty($materiaPrima)) {\n Log::error('Materia_Prima, Show, No se encuentra la materia prima: ' . $id);\n Flash::error('Materia_Prima not found');\n\n return redirect(route('materiaPrima.index'));\n }\n\n return view('materiaPrima.show')->with($sendtoview);\n }", "public function getMedicine($id)\n\t{\n\t\treturn $this->database->table(self::TABLE_NAME)\n\t\t\t->where(self::COLUMND_ID, $id)->fetch();\n\t}", "function ColegioPersonal($id)\n {\n if (isset($id)) {\n $colegio = Colegio::where('id',$id)->pluck('nombre','id')->toarray();\n } else {\n $colegio=[];\n }\n return $colegio;\n }", "public function materiasHabilitadas(){\n\t\t$connection = Connection::getInstance();\n\t\t$result \t= $connection->query(\"SELECT distinct materias.id \n\t\t\t\t\t\t\t\t\t\t FROM materias, grupos \n\t\t\t\t\t\t\t\t\t\t WHERE grupos.materia_id = materias.id AND \n\t\t\t\t\t\t\t\t\t\t materias.id NOT IN \n\t\t\t\t\t\t\t\t\t\t (SELECT grupos.materia_id \n\t\t\t\t\t\t\t\t\t\t FROM usuarios, inscripciones, grupos \n\t\t\t\t\t\t\t\t\t\t WHERE tipo_usuario = \".Usuario::ESTUDIANTE.\" AND \n\t\t\t\t\t\t\t\t\t\t usuarios.id = $this->id AND \n\t\t\t\t\t\t\t\t\t\t usuarios.id = inscripciones.usuario_id AND \n\t\t\t\t\t\t\t\t\t\t grupos.id = inscripciones.grupo_id)\");\n\t\t$res \t\t= array();\n\t\t\n\t\twhile ($id = pg_fetch_array($result)[0]){\n\t\t\t$res[] = new Materia($id);\n\t\t}\n\t\t\n\t\treturn $res;\n\t}", "public static function read($id=NULL)\n {\n $query = \"SELECT id, matricula_usuarios, id_vouchers, nome, acessado_em FROM acessos\";\n\n if(!empty($id)){\n $query .= \" WHERE id= ?\";\n }\n\n $query .= \" ORDER BY id ASC\";\n\n $conexao = new Conexao();\n\n return $conexao->select($query, $id);\n }", "public function getmaterias($param = null)\n {\n $criteria = new TCriteria;\n $criteria->add(new TFilter('professor_id', '=', $this->id));\n if (!empty($param))\n {\n if (is_array($param))\n {\n foreach ($param as $p)\n {\n $criteria->add($p);\n }\n }\n else\n {\n $criteria->add($param);\n }\n }\n \n return professormateria::getObjects( $criteria );\n }", "public function leerInforme($id)\n {\n $this->db->where(\"id\", $id);\n return $this->db->get(\"vista_resumen_informes\")->row_array();\n }", "public function edit($id)\n {\n $materia = materia::find($id);\n $curso = curso::all();\n return view('materia.edit', compact('materia'), compact('curso'));\n }", "public function show($id)\n {\n $medidor=DB::table('medidor as m')\n ->where('idMedidor','=',$id)\n ->first();\n\n $socio=DB::table('socio as s')\n ->where('s.idSocio','=',$medidor->idSocio)\n ->first();\n\n $lectura=DB::table('lectura as l')\n ->join('users as u','l.idUsuario','=','u.id')\n ->select('u.*','l.*')\n ->where('l.idMedidor','=',$medidor->idMedidor)\n ->get();\n\n return view('administracion.lectura.show',['socio'=>$socio,'medidor'=>$medidor,'lectura'=>$lectura]);\n\n\n }", "function datos_material_tipo($id_tipo) {\n\t\t$query = \"SELECT material_tipo.*\n\t\tFROM material_tipo\n\t\tWHERE id_tipo_material = '$id_tipo'\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $row;\n\t\t}\n\t}", "public function consultarId($conexion, $id){\n\n $query = \"SELECT * FROM profesor WHERE id_profesor=$id\";\n $consulta = mysqli_query($conexion, $query);\n\n return $consulta;\n\n }", "public function getIdMarca()\n {\n return $this->idMarca;\n }", "function NameCatalogo($id)\n {\n $role = Catalogo::select('nombres')->where('id',$id)->first();\n return $role->nombres;\n }", "function update_inscripcion_materia($id,$params)\r\n {\r\n $this->db->where('id',$id);\r\n return $this->db->update('inscripcion_materia',$params);\r\n }", "function get_all_inscripcion_materia($where = array())\r\n {\r\n $this->db->order_by('id', 'desc');\r\n if(isset($where) && !empty($where))\r\n {\r\n $this->db->where($where['row'], $where['value']);\r\n }\r\n return $this->db->get('inscripcion_materia')->result_array();\r\n }", "public function vistaAlumnoMateriaModel($tabla, $materia){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM $tabla WHERE id_materia = :materia\");\r\n\t\t$stmt->bindParam(\":materia\", $materia, PDO::PARAM_INT);\r\n\t\t$stmt->execute();\r\n\r\n\t\t#fetchAll(): Obtiene todas las filas de un conjunto de resultados asociado al objeto PDOStatement. \r\n\t\treturn $stmt->fetchAll();\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "public function edit($id)\n {\n $masakan = Masakan::find($id);\n return $masakan;\n }", "public function showMedaille($id){\n return \\App\\Models\\Medaille::where(\"id\", \"=\", $id)->get()->first();\n }", "public function getQuestaoId($id){\n $this->db->where('idquestoes', $id);\n return $this->db->get('questoes_matriz')->row(0);\n }", "public function selectById($id){\r\n $sql = SELECT . VIEW_ANUNCIOS . \" WHERE idVeiculo=\".$id;\r\n\r\n //Abrindo conexão com o BD\r\n $PDO_conex = $this->conex->connectDataBase();\r\n\r\n //executa o script de select no bd\r\n $select = $PDO_conex->query($sql);\r\n\r\n /* $select->fetch no formado pdo retorna os dados do BD\r\n também retorna com característica do PDO como o fetch\r\n é necessário especificar o modelo de conversão.\r\n EX: PDO::FETCH_ASSOC, PDO::FETCH_ARRAY etc. */\r\n if($rsAnuncios=$select->fetch(PDO::FETCH_ASSOC)){\r\n $anuncios = new anuncios();\r\n $anuncios->setIdVeiculo($rsAnuncios[\"idVeiculo\"]);\r\n $anuncios->setNomeModelo($rsAnuncios[\"nomeModelo\"]);\r\n $anuncios->setNomeMarca($rsAnuncios[\"nomeMarca\"]);\r\n $anuncios->setFotoVeiculo($rsAnuncios[\"fotoVeiculo\"]);\r\n }\r\n\r\n $this->conex->closeDataBase();\r\n\r\n return($anuncios);\r\n }", "function getById($dato=null){\n $id=$dato[0];\n $alumno=$this->model->getById($id);\n\n session_start();\n $_SESSION['id_Alumno']=$alumno->id;\n\n //renderizando la vista de detalles\n $this->view->alumno=$alumno;\n $this->view->render('alumno/detalle');\n }", "public function ajaxmaterias() { //Se le agrego idalumnocarrera\n $idCarrera = $_POST['carrera'];\n $idAlumno = $_POST['alumno'];\n $idAlumnoCarrera = $_POST['idalumnocarrera'];\n $dataIdModo = htmlentities($_POST['modo'], ENT_COMPAT | ENT_QUOTES, \"UTF-8\");\n $db = & $this->POROTO->DB;\n $db->dbConnect(\"matriculacion/ajaxmaterias/\" . $idCarrera . \"/\" . $idAlumno . \"/\" . $dataIdModo);\n\n include($this->POROTO->ControllerPath . '/correlativas.php');\n $claseCorrelativas = new correlativas($this->POROTO);\n\n if ($dataIdModo == 3) { //solo inscriptas (estadomateria=2)\n $sql = \"select m.idmateria, m.anio, m.materiacompleta as nombre,c.nombre as comision \";\n $sql .= \" from alumnomateria am inner join viewmaterias m on (am.idmateria=m.idmateria and m.idcarrera=\" . $idCarrera . \")\";\n $sql .= \" left join comisiones c on am.idcomision=c.idcomision \";\n $sql .= \" where am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursando'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_libre'] . \") \";\n $sql .= \" and am.idpersona=\" . $idAlumno;\n $sql .= \" and am.idalumnocarrera=\" . $idAlumnoCarrera;\n $sql .= \" order by m.orden\";\n $arrMateriasOk = $db->getSQLArray($sql);\n }\n if ($dataIdModo == 1 || $dataIdModo == 2) { //1 Alumno 2 Administrativo.\t\t\t\t\t\t\t\t\t\t\n //levanto el listado de materias de la carrera. por un left join me \n //fijo si ya fue cursada (puede haber mas de un registro)\n //Si materia cursada aprobada o libre => solo_cursada>=1 y \n //la considero como ya cursada\n //si tuvo un estado 3,4 (aprobada,aprobada por equiv) => aprobada>1 y la considero como materia aprobada\n //elimino las materias que tienen estado CURSANDO (inscriptas) y las libres al menos una vez.\n $sql = \"select m.idmateria,m.anio,m.materiacompleta as nombre,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursadaaprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_libre'] . \") then 1 else 0 end) solo_cursada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_aprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_aprobadaxequiv'] . \",\" . $this->POROTO->Config['estado_alumnomateria_cursadaaprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_nivelacion'] . \") then 1 else 0 end) cursada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_aprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_aprobadaxequiv'] . \",\" . $this->POROTO->Config['estado_alumnomateria_nivelacion'];\n $sql .= \") then 1 else 0 end) aprobada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursando'] . \") then 1 else 0 end) inscripta \";\n $sql .= \" from viewmaterias m \";\n $sql .= \" left join alumnomateria am on am.idmateria=m.idmateria and am.idpersona=\" . $db->dbEscape($idAlumno);\n $sql .= \" and am.idalumnocarrera=\" . $db->dbEscape($idAlumnoCarrera);\n $sql .= \" where m.idcarrera=\" . $db->dbEscape($idCarrera);\n $sql .= \" and m.estado=1\";\n $sql .= \" group by m.idmateria\";\n $sql .= \" order by m.orden\";\n $arrMaterias = $db->getSQLArray($sql);\n\n $arrMateriasOk = array();\n\n foreach ($arrMaterias as $row) {\n if ($row['solo_cursada'] == \"0\") { //Solo traigo las que no estoy cursando aun o libre.\n //Busco las correlativas para este alumno.\n $resultados = $claseCorrelativas->getCorrelativasAlumno($idCarrera, $row['idmateria'], 0, $idAlumno, $idAlumnoCarrera);\n if ($dataIdModo == 1) { //Si es alumno, solo traigo materias sin correlativas\n $valida = true;\n foreach ($resultados as $regla) {\n if ($regla[\"idregla\"] != 6 && $regla[\"estado\"] == false)\n $valida = false;\n }\n if ($valida)\n $arrMateriasOk[] = array(\"idmateria\" => $row['idmateria'], \"nombre\" => $row['nombre'], \"anio\" => $row['anio'], \"correlativas\" => $resultados);\n }else { //Traigo todas, cumplan o no las correlatividades.\n $arrMateriasOk[] = array(\"idmateria\" => $row['idmateria'], \"nombre\" => $row['nombre'], \"anio\" => $row['anio'], \"correlativas\" => $resultados);\n }\n }\n }\n\n //busco en arrMateriasOk, las materia que tienen inscriptas>0\n foreach ($arrMateriasOk as $k => $item)\n foreach ($arrMaterias as $materia)\n if ($materia['idmateria'] == $item['idmateria'])\n if ($materia['inscripta'] > 0 || $materia['aprobada'] > 0)\n unset($arrMateriasOk[$k]);\n } // if ($dataIdModo == 1 || $dataIdModo == 2 {\n $db->dbDisconnect();\n echo json_encode($arrMateriasOk);\n }", "#[Route(path: '/{id}', name: 'materiaux_show', methods: ['GET'])]\n public function show(Materiaux $materiaux): Response\n {\n $deleteForm = $this->createDeleteForm($materiaux->getId());\n\n return $this->render(\n '@Sepulture/materiaux/show.html.twig',\n [\n 'entity' => $materiaux,\n 'delete_form' => $deleteForm->createView(),\n ]\n );\n }", "public function show($id)\n {\n $matricular = Matriculacion::find($id);\n return view('matricular.show', compact('matricular'));\n }", "function info($id) \n { \n $oaux=new maritalStatus();\n if($id==$oaux->single())\n \t$this->single();\n if($id==$oaux->married())\n $this->married();\n if($id==$oaux->divorced())\n $this->divorced(); \n return($this->marsta_id);\n }", "function fetchDispo($id) {\n global $conn;\n $sql = \"SELECT id, nom FROM disponibilite_materiel WHERE id=$id\";\n $result = mysqli_query($conn, $sql);\n \n if(mysqli_num_rows($result) > 0) {\n return $result;\n } else {\n echo \"0 results\";\n }\n}", "function datos_material_ac($id_ac) {\n\t\t$query = \"SELECT material_area_curricular.*\n\t\tFROM material_area_curricular\n\t\tWHERE id_ac_material = '$id_ac'\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\t$row=mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $row;\n\t\t}\n\t}", "public function get($ID_MANUTENCE){\n\n\t\t\t$sql = new Sql();\n\n\t\t\t$results = $sql->select(\"SELECT\n\t\t\t\t\t\t\t\t\t\ttb_manutence.*,\n\t\t\t\t\t\t\t\t\t\ttb_frota.PLACA,\n\t\t\t\t\t\t\t\t\t\ttb_frota.FABRICANTE,\n\t\t\t\t\t\t\t\t\t\ttb_frota.MODELO\n\t\t\t\t\t\t\t\t\tFROM tb_manutence\n\t\t\t\t\t\t\t\t\t\tINNER JOIN tb_frota\n\t\t\t\t\t\t\t\t\t\tON tb_manutence.COD_VEICULO = tb_frota.COD_VEICULO\n\t\t\t\t\t\t\t\t\tWHERE tb_manutence.ID_MANUTENCE = :ID_MANUTENCE\", [\n\t\t\t\t\t\t\t\t\t\t\":ID_MANUTENCE\"=> $ID_MANUTENCE\n\t\t\t\t\t\t\t\t\t]);\n\n\t\t\t$this->setData($results[0]);\n\t\t}", "public function modificac($id)\n {\n $cliente = clientes::where('id','=',$id)->get();\n $id_s=$cliente[0]->id_s;\n $genero = generos::where('id_s','=',$id_s)->get();\n $demas = clientes::where('id_s','!=',$id_s)->get();\n\n\n return view('cliente.modificacliente')\n // el cero es para que todos los datos de la consulta aparezcan\n ->with('clientes',$cliente[0])\n ->with('id_s',$id_s)\n ->with('generos',$genero[0]->genero)\n ->with('demas',$demas);\n\n }", "public function getMebrosEquipeByidMembroEquipe($id)\n {\n $this->db->select('membros_equipe.id as id, users_setores.id as id_usuario_setor, users.id as id_usuario, users.first_name as name, users.last_name as last, setores.nome as setor, papeis_responsabilidades.papel as papel, papeis_responsabilidades.descricao as descricao')\n ->join('users_setores', 'membros_equipe.usuario = users_setores.id', 'inner') \n ->join('users', 'users_setores.usuario = users.id', 'inner') \n ->join('setores', 'users_setores.setor = setores.id', 'inner')\n ->join('papeis_responsabilidades', 'membros_equipe.papel = papeis_responsabilidades.id', 'inner') \n ->order_by('users.first_name', 'asc');\n $q = $this->db->get_where('membros_equipe', array('membros_equipe.id ' => $id), 1);\n \n if ($q->num_rows() > 0) {\n \n return $q->row();\n }\n return FALSE;\n \n }", "function affichageEditionFormation(){// création de la fonction\r\n try {\r\n $id=$_GET['idFormation'];//on récupère la valeur idFormation dans l'url avec $_GET dans une variable $id\r\n $co=connexion();//connxion a la bdd\r\n $sql='SELECT * FROM formation WHERE idformation = \"'.$id.'\"';// requete sql\r\n $affichageEdition=$co->prepare($sql);//création de la variable qui fait appel au pdo pour préparer la requete req\r\n $affichageEdition->execute();//exécution de cette variable\r\n return $affichageEdition;// on retourne le résultat obtenu pour pouvoir l'utiliser\r\n }catch(PDOException $e){\r\n echo 'Erreur: ' .$e->getMessage();// si le try ne fonctionne pas, on attrape l'erreur pout ensuite l'afficher\r\n }finally {\r\n $co=null;// on arrete la connexion\r\n }\r\n }", "function get_ua($id_des){\n $sql=\"select uni_acad from designacion where id_designacion=\".$id_des;\n $res= toba::db('designa')->consultar($sql); \n return $res[0]['uni_acad'];\n }", "public function edit($id)\n {\n $materiaPrimaId = MateriaPrima::select('nombre')->get();\n foreach ($materiaPrimaId as $materiaPrima) {\n $idMat[] = $materiaPrima->nombre;\n }\n\n $compra = Compra::where('id', $id)->firstOrFail();\n\n $nombreMateriaPrima = Compra::find($id)->materiasPrimas()->first()->nombre;\n\n $keyMat = array_search($nombreMateriaPrima, $idMat);\n\n return view('compras.edit', ['firstM'=> $keyMat, 'compra'=>$compra, 'materiasPrimas'=>$idMat]);\n }", "public static function encontrarPorID($id)\n\t{\n\t\t// Crear una instancia de la conexion\n\t\t$conexion = new Conexion;\n\n\n\t\t// Consulta para la base de datos y despues lo guarda en la variable\n\t\t$resultado = $conexion->conn->query(\"SELECT * FROM \". static::$tablaConsulta . \" WHERE id = $id LIMIT 1\");\n\n\t\t// Guardar el rol encontrado por id en la variable\n\t\t$medioEncontrado = $resultado->fetch_assoc();\n\n\n\t\t// Crear un tipo de rol\n\t\t$medio = new MedioPago;\n\n\t\t// Añadir los campos al tipo de rol\n\t\t$medio->id \t = $medioEncontrado['id'];\n\t\t$medio->medio \t = $medioEncontrado['medio'];\n\n\t\t// Si se llama este metodo cambiara la variable de update, ya que cuando se utilice la funcion guardar(), hara un update\n\t\t$medio->update = true;\n\n\t\t// Devolver el rol solicitado\n\t\treturn $medio;\n\t}", "public function show($id)\n {\n $ramo = DB::table('coordinacion')\n ->join('coordinacion_horario', 'coordinacion.id', '=', 'coordinacion_horario.id_coordinacion')\n ->where('coordinacion.id_asignatura','=',$id)\n ->select('cupo','id_profesor','sala','id_coordinacion','id_horario')\n ->get();\n return $ramo;\n }", "function getDemandesAmiRecue($id) {\n\t\t$selectPrepa = self::$bdd -> prepare(\"SELECT envoyeur FROM demandeami WHERE receveur = '$id'\");\n\t\t$selectPrepa -> execute();\n\t\t$result = $selectPrepa -> fetchAll();\n\t\treturn $result;\n\t}", "public function show($id){\n\n $exist = DB::table('nutricional_inicials')->where('paciente', $id)->exists();\n #return((string)$exist);\n \n if ($exist ==1){\n $nutricional_inicial = NutricionalInicial::Where('paciente', $id)->first();\n $nuevoCliente= Cliente::findOrFail($id);\n return view ('Valoraciones/Ver_NutricionalInicial', compact(\"nutricional_inicial\", \"nuevoCliente\"));\n }\n\n else {\n return view ('Valoraciones/ValoracionNoExiste');\n }\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 Medicamento()\n {\n return $this->belongsTo('App\\Models\\Medicamento','medicamento_id','id');\n }", "function getMeGustaId($id, $id_usuario) {\n $c = new Conexion();\n $resultado = $c->query(\"SELECT val_mg.megusta FROM valoracion_mg val_mg, usuario usu where val_mg.id_usuario=usu.id && val_mg.id_contenido=$id && val_mg.id_usuario=$id_usuario\");\n\n if ($objeto = $resultado->fetch(PDO::FETCH_OBJ)) {\n return $objeto;\n }\n else{\n return null;\n } \n}", "public function show($id)\n {\n $idcommande = $id;\n \n $commandes = Commande\n ::join('articles_cmds', 'articles_cmds.commandeId','=', 'commandes.commandeId')\n ->join('articles', 'articles.articleId', '=', 'articles_cmds.articleId')\n ->join('users', 'users.id', '=', 'commandes.userId')\n ->select('users.name','commandes.commandeId','articles.image','articles.nomArticle', 'articles_cmds.quantite', 'articles.prixUnitaire', 'commandes.dateCommande','commandes.montant')\n ->where('commandes.commandeId', '=' , $id)\n ->getQuery()\n ->orderBy('nomArticle', 'ASC')\n ->paginate(5);\n // dd($commandes); \n return view('commandes.show', compact('commandes', 'idcommande'));\n }", "function voirCommandeId($id){\n\t$conditions = array();\n\tarray_push($conditions, array('nameChamps'=>'idCommande','type'=>'=','name'=>'idCommande','value'=>$id));\n\t$req = new myQueryClass('commande',$conditions);\n\t$r = $req->myQuerySelect();\n\tif(count($r)== 1){\n\t\treturn $r[0];\n\t}else{\n\t\treturn false;\n\t}\n}", "public static function get_materiasPorProfesor(){ \n $response = new Response();\n\n $lista = array();\n $profesores = Profesor::select();\n if($profesores){\n $i=0;\n foreach($profesores as $profesor){\n $lista[$i]['profesor']=$profesor;\n $lista[$i]['materias']=Asignacion::getMateriasByUserID($profesor->legajo)?? 'No tiene materias asignadas';\n $i++;\n }\n $response->data = $lista;\n $response->status = 'success'; \n }else{\n $response->data = 'No hay registros en la base de datos';\n $response->status = 'fail'; \n }\n\n\n return $response;\n }", "function get_all_materia_nivel($nivel_id)\n {\n $materia = $this->db->query(\"\n SELECT\n m.materia_id, m.materia_nombre, m.materia_codigo, m.materia_horas,\n m.materia_alias, c.carrera_modalidad, n.nivel_descripcion,\n pr.mat_materia_id, pr.materia_codigo as cod, m.area_id\n FROM\n materia m\n LEFT JOIN materia pr on m.materia_id = pr.materia_id\n LEFT JOIN nivel n on m.nivel_id = n.nivel_id\n LEFT JOIN plan_academico pa on n.planacad_id = pa.planacad_id\n LEFT JOIN carrera c on pa.carrera_id = c.carrera_id\n where m.nivel_id = $nivel_id\n \n GROUP BY m.materia_id\n\n /*SELECT\n m.materia_id, m.materia_nombre, m.materia_codigo, m.materia_horas, c.carrera_modalidad\n\n FROM\n materia m, nivel n, plan_academico pa, carrera c\n\n WHERE\n m.nivel_id = $nivel_id\n and m.nivel_id = n.nivel_id\n and n.planacad_id = pa.planacad_id\n and pa.carrera_id = c.carrera_id\n \n ORDER BY m.materia_id ASC */\n \")->result_array();\n\n return $materia;\n }", "function delete_materia($materia_id)\n {\n return $this->db->delete('materia',array('materia_id'=>$materia_id));\n }", "public function edit($id)\n {\n $receta = Receta::findOrFail($id);\n $producto = Producto::findOrFail($receta->producto_id);\n $detalle_receta = DB::table('detalle_receta')->join('materia_prima','detalle_receta.materiaPrima_id','=','materia_prima.id')\n ->select('detalle_receta.cantidad_individual','detalle_receta.id','materia_prima.nombre_materia')->where('detalle_receta.receta_id','=',$id)->get();\n\n return view('administracion.receta.editar',[\"receta\"=>$receta,\"detalle_receta\"=>$detalle_receta,'producto'=>$producto]);\n }", "public function check_inscripcion($id_persona,$id_curso){\r\n return $this->db->get_where('inscripcion_materia',array('id_persona'=>$id_persona,'id_curso'=>$id_curso))->row_array();\r\n }", "public function equipoShow($id)\n {\n $equipoGet=DB::table('detalle_recepcion_tecnicos')\n ->join('distribuidors', 'distribuidors.id', '=', 'detalle_recepcion_tecnicos.distribuidor_id')\n ->join('users', 'distribuidors.user_id', '=', 'users.id')\n ->join('detalle_donacions','detalle_donacions.id','=','detalle_recepcion_tecnicos.detalle_donacion_id')\n ->join('equipos','detalle_donacions.equipo_id','=','equipos.id')\n ->select('distribuidors.id as distribuidorId','users.id as userId',\n 'detalle_donacions.id as donacionId',\n 'equipos.id as equipoId','detalle_recepcion_tecnicos.id as recepcionId',\n 'detalle_recepcion_tecnicos.fecha as recepcionFecha','detalle_recepcion_tecnicos.hora as recepcionHora',\n 'users.nombre as userNombre','users.apellido as userApellido',\n 'users.email as userEmail','equipos.sistema_operativo as equipoSistema',\n 'equipos.procesador as equipoProcesador','equipos.ram as equipoRam','equipos.almacenamiento as equipoAlmacenamiento',\n 'equipos.detalle as equipoDetalle','equipos.estado as equipoEstado')\n ->where('detalle_recepcion_tecnicos.id','=',$id)\n ->get();\n \n return view('tecnico.edit-equipo',compact('equipoGet'));\n }", "public function show($id)\n {\n //iniciada ya la sesion\n //entra a la pagina del usuario\n switch (Auth::user()->rol){\n case 'tecnico':\n $incidencia = Incidencia::find($id);\n $vehiculo = Vehiculo::find($incidencia->vehiculo_id);\n $cliente = Cliente::find($incidencia->cliente_id);\n $tecnico = Tecnico::where('usuarios_id', Auth::user()->id)->get();\n $comentarios = Comentario::where('incidencia_id', $incidencia->id)->get();\n return view('usuario/tecnico-incidencias-show', ['incidencia' => $incidencia, 'cliente' => $cliente, 'vehiculo' => $vehiculo, 'tecnico' => $tecnico[0], 'comentarios' => $comentarios,'usuario' => Auth::user()]);\n break;\n default:\n // coger incidencias para mostrar en una paginacion\n $incidencia = Incidencia::find($id);\n $cliente = Cliente::find($incidencia->cliente_id);\n $vehiculo = Vehiculo::find($incidencia->vehiculo_id);\n $comentarios = Comentario::where('incidencia_id', $incidencia->id)->get();\n return view('usuario/resto-incidencia-show', ['incidencia' => $incidencia, 'cliente' => $cliente, 'vehiculo' => $vehiculo, 'comentarios' => $comentarios, 'hideMap' => request('hideMap'), 'usuario' => Auth::user()]);\n }\n }", "public function informe(){\r\n return $this->belongsTo(Informe::class, 'idinforme');\r\n }", "public function getUsuarioUni($idusuario) {\n }" ]
[ "0.7759912", "0.70723164", "0.6887433", "0.6764801", "0.67504174", "0.66065264", "0.6471261", "0.64213836", "0.6419327", "0.64173734", "0.640201", "0.63936853", "0.6374128", "0.63737464", "0.63533664", "0.6288632", "0.62690294", "0.626051", "0.6246982", "0.6238707", "0.6188337", "0.6142956", "0.6133448", "0.6130844", "0.611181", "0.6105125", "0.6042277", "0.6022342", "0.6007558", "0.60029167", "0.5995978", "0.5958623", "0.595398", "0.59517354", "0.59233445", "0.58932537", "0.589012", "0.587573", "0.58741647", "0.5842105", "0.58282816", "0.5827491", "0.5823372", "0.5814971", "0.580927", "0.5784103", "0.57801235", "0.5773346", "0.57702076", "0.576939", "0.5758087", "0.5749255", "0.5746024", "0.57448816", "0.57429105", "0.57423717", "0.57401884", "0.57331735", "0.5732413", "0.5729341", "0.5729148", "0.57283866", "0.5726925", "0.57244104", "0.5722713", "0.5719175", "0.5708074", "0.57073534", "0.56999904", "0.5696272", "0.56866896", "0.56861883", "0.5684855", "0.5684473", "0.5682148", "0.56805253", "0.5679393", "0.5679367", "0.56773704", "0.5672669", "0.56666327", "0.56660247", "0.5664584", "0.5652066", "0.5643423", "0.5640984", "0.5633006", "0.56292945", "0.56216466", "0.5619362", "0.5610422", "0.5608752", "0.5607795", "0.5594657", "0.55937093", "0.55911905", "0.5590714", "0.5589783", "0.5585283", "0.5583204" ]
0.85556287
0
/ Get all inscripcion_materia
function get_all_inscripcion_materia($where = array()) { $this->db->order_by('id', 'desc'); if(isset($where) && !empty($where)) { $this->db->where($where['row'], $where['value']); } return $this->db->get('inscripcion_materia')->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_all_materia()\n {\n $materia = $this->db->query(\"\n SELECT\n m.*, a.*, n.*, e.*, t.materia_nombre as 'requisito', pa.carrera_id, ca.carrera_nombre\n\n FROM\n materia m\n LEFT JOIN area_materia a ON m.area_id=a.area_id\n LEFT JOIN nivel n ON m.nivel_id=n.nivel_id\n LEFT JOIN plan_academico pa ON pa.planacad_id=n.planacad_id\n LEFT JOIN carrera ca ON ca.carrera_id=pa.carrera_id\n LEFT JOIN estado e ON m.estado_id=e.estado_id\n LEFT JOIN materia t ON m.mat_materia_id=t.materia_id\n\n WHERE\n 1 = 1\n\n ORDER BY carrera_id, n.nivel_id ASC\n \")->result_array();\n\n return $materia;\n }", "public function materias(){\n\t\t\n\t\t$connection = Connection::getInstance();\n\t\t$result \t= $connection->query(\"SELECT grupos.materia_id \n\t\t\t\t\t\t\t\t\t\t FROM usuarios, inscripciones, grupos \n\t\t\t\t\t\t\t\t\t\t WHERE tipo_usuario = \".Usuario::ESTUDIANTE.\" AND \n\t\t\t\t\t\t\t\t\t\t usuarios.id = $this->id AND \n\t\t\t\t\t\t\t\t\t\t usuarios.id = inscripciones.usuario_id AND \n\t\t\t\t\t\t\t\t\t\t grupos.id = inscripciones.grupo_id\");\n\t\t$res \t\t= array();\n\t\t\n\t\twhile ($id = pg_fetch_array($result)[0]){\n\t\t\t$res[] = new Materia($id);\n\t\t}\n\t\t\n\t\treturn $res;\n\t}", "function get_inscripcion_materia($id)\r\n {\r\n return $this->db->get_where('inscripcion_materia',array('id'=>$id))->row_array();\r\n }", "public function materias()\n {\n return $this->belongsToMany('DSIproject\\Materia', 'grado_materia')\n ->withPivot('grado_id')\n ->withTimestamps();\n }", "private function getMateriais() {\n\n $oDaoMaterial = new cl_matmater();\n $sCampos = \" m60_codmater as codigo, m60_descr as descricao, m61_descr as unidade\";\n\n $sCamposGrupo = \" , 0 as codigogrupo \";\n if ($this->lAgruparGrupoSubgrupo) {\n $sCamposGrupo = \" , m65_sequencial as codigogrupo \";\n }\n $sCampos .= $sCamposGrupo;\n\n $aOrdem = array();\n $aWhere = array();\n $aWhere[] = \" instit = {$this->iInstituicao} \";\n\n $aOrdem[] = \" m60_descr \";\n\n if ($this->sDepartamentos) {\n $aWhere[] = \" m70_coddepto in ({$this->sDepartamentos}) \";\n }\n\n if ($this->sGrupoSubgrupo) {\n $aWhere[] = \" db121_sequencial in ({$this->sGrupoSubgrupo}) \";\n }\n\n $sCampoDepartamento = \", 0 as depto, '' as departamento\";\n if ($this->iQuebraPagina == RelatorioDeDistribuicao::QUEBRA_PAGINA_DEPARTAMENTO) {\n $sCampoDepartamento = \", m70_coddepto as depto, descrdepto as departamento \";\n }\n $sCampos .= $sCampoDepartamento;\n $sWhere = \" where \" . implode(\" and \", $aWhere);\n $sOrdem = \" order by \" . implode(\", \", $aOrdem);\n\n $sql = \" select distinct {$sCampos} \";\n $sql .= \" from matmater \";\n $sql .= \" inner join matunid on m60_codmatunid = m61_codmatunid \";\n $sql .= \" inner join matmatermaterialestoquegrupo on m60_codmater = m68_matmater \";\n $sql .= \" inner join materialestoquegrupo on m68_materialestoquegrupo = m65_sequencial \";\n $sql .= \" inner join db_estruturavalor on db121_sequencial = m65_db_estruturavalor \";\n $sql .= \" inner join matestoque on m60_codmater = m70_codmatmater \";\n $sql .= \" inner join db_depart on coddepto = m70_coddepto \";\n\n\n $sql .= \"{$sWhere} {$sOrdem} \";\n\n $rsMateriais = $oDaoMaterial->sql_record($sql);\n\n $aMateriais = array();\n for ($i = 0; $i < $oDaoMaterial->numrows; $i++) {\n\n $oMaterial = db_utils::fieldsMemory($rsMateriais, $i);\n $oMaterial->totalPeriodo = 0.0;\n $oMaterial->mediaPeriodo = 0.0;\n $aMateriais[] = $oMaterial;\n\n if (!isset($this->aDepartamentos[$oMaterial->depto])) {\n\n $oDeptartamento = new stdClass();\n $oDeptartamento->codigo = $oMaterial->depto;\n $oDeptartamento->descricao = $oMaterial->departamento;\n $oDeptartamento->itens = array();\n $this->aDepartamentos[$oDeptartamento->codigo] = $oDeptartamento;\n }\n }\n return $aMateriais;\n }", "public function materiasHabilitadas(){\n\t\t$connection = Connection::getInstance();\n\t\t$result \t= $connection->query(\"SELECT distinct materias.id \n\t\t\t\t\t\t\t\t\t\t FROM materias, grupos \n\t\t\t\t\t\t\t\t\t\t WHERE grupos.materia_id = materias.id AND \n\t\t\t\t\t\t\t\t\t\t materias.id NOT IN \n\t\t\t\t\t\t\t\t\t\t (SELECT grupos.materia_id \n\t\t\t\t\t\t\t\t\t\t FROM usuarios, inscripciones, grupos \n\t\t\t\t\t\t\t\t\t\t WHERE tipo_usuario = \".Usuario::ESTUDIANTE.\" AND \n\t\t\t\t\t\t\t\t\t\t usuarios.id = $this->id AND \n\t\t\t\t\t\t\t\t\t\t usuarios.id = inscripciones.usuario_id AND \n\t\t\t\t\t\t\t\t\t\t grupos.id = inscripciones.grupo_id)\");\n\t\t$res \t\t= array();\n\t\t\n\t\twhile ($id = pg_fetch_array($result)[0]){\n\t\t\t$res[] = new Materia($id);\n\t\t}\n\t\t\n\t\treturn $res;\n\t}", "public function materias()\n {\n return $this->belongsToMany('DSIproject\\Materia')->withTimestamps();\n }", "public static function all(){\n return Materia::orderBy('cuatrimestre', 'ASC')->get(); \n }", "public function materias_get()\n {\n $iddocente = $this->get( 'iddocente' );\n\n if ( $iddocente !== null )\n {\n $materias = $this->ApiModel->obtenerMateriasDelDocente($iddocente);\n\n $this->response($materias, 200 );\n }else{\n $this->response([\n 'error' => true,\n 'status' => \"noencontrado\",\n 'message' => 'Materias del Profesor no encontradas'\n ], 400 );\n }\n }", "public function getmaterias($param = null)\n {\n $criteria = new TCriteria;\n $criteria->add(new TFilter('professor_id', '=', $this->id));\n if (!empty($param))\n {\n if (is_array($param))\n {\n foreach ($param as $p)\n {\n $criteria->add($p);\n }\n }\n else\n {\n $criteria->add($param);\n }\n }\n \n return professormateria::getObjects( $criteria );\n }", "public function materias()\n {\n return $this->belongsTo('App\\Model\\PrimerSemestre\\PrimSemMateria', 'prim_sem_materia_id');\n }", "public function getMateris()\n {\n return $this->hasMany(Materi::className(), ['dosen_pengampuh_id' => 'id']);\n }", "public function materia_get()\n {\n $idmateria = $this->get( 'idmateria' );\n\n if ( $idmateria !== null )\n {\n $materia = $this->ApiModel->obtenerMateria($idmateria);\n\n $this->response([\n 'error' => false,\n 'status' => \"encontrado\",\n 'data' => $materia\n ], 400 );\n }else{\n $this->response([\n 'error' => true,\n 'status' => \"noencontrado\",\n 'message' => 'Materia no encontrada'\n ], 400 );\n }\n }", "public function getMedicamentos()\n {\n return $this->hasMany(Medicamento::className(), ['id' => 'id_medicamento'])->viaTable('receita_medicamento', ['id_receita' => 'id']);\n }", "function listar_materiales($objeto){\n\t\t$condicion.=(!empty($objeto['id']))?' AND p.id='.$objeto['id']:'';\n\t// Filtra por los IDs de los insumo si existe\n\t\t$condicion.=(!empty($objeto['ids']))?' AND p.id IN ('.$objeto['ids'].')':'';\n\n\t// Filtra por el nombre del insumo si existe\n\t\t$condicion.=(!empty($objeto['tipo_producto']))?' AND p.tipo_producto='.$objeto['tipo_producto']:'';\n\n\t\t$sql = \"SELECT\n\t\t\t\t\tp.id AS idProducto, p.nombre, IF(p.tipo_producto=4, ROUND(p.costo_servicio, 2), IFNULL(pro.costo,0)) AS costo,\n\t\t\t\t\tp.id_unidad_compra AS idunidadCompra, p.id_unidad_venta AS idunidad,\n\t\t\t\t\t(SELECT\n\t\t\t\t\t\tnombre\n\t\t\t\t\tFROM\n\t\t\t\t\t\tapp_unidades_medida uni\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tuni.id=p.id_unidad_venta) AS unidad,\n\t\t\t\t\t\t(SELECT\n\t\t\t\t\t\t\tclave\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tapp_unidades_medida uni\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tuni.id=p.id_unidad_venta) AS unidad_clave, p.codigo, u.factor, m.cantidad, m.opcionales AS opcionales\n\t\t\t\tFROM\n\t\t\t\t\tapp_productos p\n\t\t\t\tINNER JOIN\n\t\t\t\t\t\tapp_producto_material m\n\t\t\t\t\tON\n\t\t\t\t\t\tp.id=m.id_material\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tapp_unidades_medida u\n\t\t\t\t\tON\n\t\t\t\t\t\tu.id=p.id_unidad_compra\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t\tapp_costos_proveedor pro\n\t\t\t\t\tON\n\t\t\t\t\t\tpro.id_producto=p.id\n\t\t\t\tWHERE\n\t\t\t\t\tp.status=1\n\t\t\t\tAND\n\t\t\t\t\tm.id_producto = \".$objeto['id_receta'].\n\t\t\t\t$condicion;\n\t\t// return $sql;\n\t\t$result = $this->queryArray($sql);\n\n\t\treturn $result;\n\t}", "function get_all_materia_nivel($nivel_id)\n {\n $materia = $this->db->query(\"\n SELECT\n m.materia_id, m.materia_nombre, m.materia_codigo, m.materia_horas,\n m.materia_alias, c.carrera_modalidad, n.nivel_descripcion,\n pr.mat_materia_id, pr.materia_codigo as cod, m.area_id\n FROM\n materia m\n LEFT JOIN materia pr on m.materia_id = pr.materia_id\n LEFT JOIN nivel n on m.nivel_id = n.nivel_id\n LEFT JOIN plan_academico pa on n.planacad_id = pa.planacad_id\n LEFT JOIN carrera c on pa.carrera_id = c.carrera_id\n where m.nivel_id = $nivel_id\n \n GROUP BY m.materia_id\n\n /*SELECT\n m.materia_id, m.materia_nombre, m.materia_codigo, m.materia_horas, c.carrera_modalidad\n\n FROM\n materia m, nivel n, plan_academico pa, carrera c\n\n WHERE\n m.nivel_id = $nivel_id\n and m.nivel_id = n.nivel_id\n and n.planacad_id = pa.planacad_id\n and pa.carrera_id = c.carrera_id\n \n ORDER BY m.materia_id ASC */\n \")->result_array();\n\n return $materia;\n }", "public static function get_materias(){ \n $response = new Response();\n\n $response->data = Materia::select()?? 'No hay registros en la base de datos';\n $response->status = 'success';\n\n return $response;\n }", "function get_materia($materia_id)\n {\n $materia = $this->db->query(\"\n SELECT\n *\n\n FROM\n `materia`\n\n WHERE\n `materia_id` = ?\n \",array($materia_id))->row_array();\n\n return $materia;\n }", "function get_all_materias_activo_plan($planacad_id)\n {\n $materia = $this->db->query(\"\n SELECT\n m.materia_id, m.materia_nombre, m.materia_codigo\n\n FROM\n materia m, nivel n\n\n WHERE\n m.estado_id = 1\n and m.nivel_id = n.nivel_id\n and n.planacad_id = $planacad_id\n\n ORDER BY `materia_id` ASC\n \")->result_array();\n\n return $materia;\n }", "public function buscarMaterias($datos){\n try {\n $parametros = array(\"id_plan\" => $datos[\"id_plan\"] , \n \"anio\" => $datos[\"anio\"]);\n $resultado = $this->refControladorPersistencia->ejecutarSentencia(DbSentencias::BUSCAR_MATERIAS_EC, $parametros);\n $fila = $resultado->fetchAll(PDO::FETCH_ASSOC);\n\n return $fila;\n } catch(Exception $e){\n echo \"Error :\" . $e->getMessage(); \n }\n }", "public function tableauMatieres()\n\t\t{\n\t\t\t// On dit à mysql que l'on veut travailler en UTF-8\n\t\t\tmysqli_query($this->co,\"SET NAMES UTF8\");\n\t\t\t$result = mysqli_query($this->co,\n\t\t\t\t\t\t\t\t \"SELECT nom_matiere FROM matiere\")\n\t\t\tor die(\"Connexion impossible : Connexion tableauMatieres()\");\n\n\t\t\t$matiere = Array ();\n\n\t\t\twhile ($row = mysqli_fetch_array($result)) {\n\t\t\t\t$matiere[] = $row[0];\n\t\t\t}\n\n\t\t\treturn $matiere;\n\t\t}", "public function index()\n {\n $movimientosMateria = DB::table('movimientos_m_p_s')\n ->join('registro_materia_primas', 'movimientos_m_p_s.MateriaPrimaID', '=', 'registro_materia_primas.IdRegistroMP')\n ->join('sucursals','movimientos_m_p_s.SucursalID','=','sucursals.IdSucursal')\n ->select(\n 'movimientos_m_p_s.IdMovimiento',\n 'movimientos_m_p_s.Cantidad',\n 'movimientos_m_p_s.FechaMovimiento',\n 'registro_materia_primas.IdRegistroMP',\n 'registro_materia_primas.NombreMP',\n 'sucursals.IdSucursal',\n 'sucursals.NombreSucursal',\n )\n ->orderByDesc(\"IdMovimiento\")\n ->get();\n return $movimientosMateria;\n }", "public function getReceitaMedicamentos()\n {\n return $this->hasMany(ReceitaMedicamento::className(), ['id_receita' => 'id']);\n }", "public function listar()\n {\n return $this->request('GET', 'unidadesmedida');\n }", "public function vistaAlumnoMateriaModel($tabla, $materia){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM $tabla WHERE id_materia = :materia\");\r\n\t\t$stmt->bindParam(\":materia\", $materia, PDO::PARAM_INT);\r\n\t\t$stmt->execute();\r\n\r\n\t\t#fetchAll(): Obtiene todas las filas de un conjunto de resultados asociado al objeto PDOStatement. \r\n\t\treturn $stmt->fetchAll();\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "public function findByMateria(Materia $materia)\n\t{\n\t\t$query = $this->getEntityManager()\n\t\t\t\t->createQuery(\"SELECT n FROM RegistroAcademicoBundle:Nota n WHERE n.materia = :materia AND n.periodo IN (SELECT p.periodo FROM RegistroAcademicoBundle:Periodo p WHERE p.anho = anho_actual()) GROUP BY p.periodo\")\n\t\t\t\t->setParameter(':materia', $materia->getId());\n\t\treturn $query->getResult();\n\t}", "public function getDiagnosaformItems()\n {\n return Yii::app()->db->createCommand('SELECT diagnosa_id, diagnosa_nama FROM diagnosa_m WHERE diagnosa_aktif=TRUE')->queryAll();\n }", "public function readAllInfo()\n {\n //recupération des données en post\n $data = $this->request->data;\n try\n {\n //selection d'une UE en foction de l'identifiant\n if (!empty($data['id_matiere'])) {\n $results = $this->model->read_all_info_id((int)$data['id_matiere']);\n\n if (empty($results)) {\n $this->_return('la matière demandée n\\'existe pas dans la base de donnée', false);\n }\n $this->_return('Informations sur la matière '.$results->nom_matiere.' ', true, $results);\n }\n //selection de toutes les UE d'enseignement\n $results = $this->model->read_all_info_matiere();\n if (empty($results)) {\n $this->_return('Vous n\\'avez pas encore de matière en base de données', false);\n }\n $this->_return('liste des matières disponibles dans la base de données', true, $results);\n }\n catch(Exception $e)\n {\n $this->_exception($e);\n }\n }", "public function getMedicos()\r\n {\r\n return $this->hasMany(Medico::className(), ['id_medico' => 'medico_id'])->viaTable('medico_horario_atencion', ['horario_atencion_id' => 'id_horarioAtencion']);\r\n }", "public static function get_materiasPorProfesor(){ \n $response = new Response();\n\n $lista = array();\n $profesores = Profesor::select();\n if($profesores){\n $i=0;\n foreach($profesores as $profesor){\n $lista[$i]['profesor']=$profesor;\n $lista[$i]['materias']=Asignacion::getMateriasByUserID($profesor->legajo)?? 'No tiene materias asignadas';\n $i++;\n }\n $response->data = $lista;\n $response->status = 'success'; \n }else{\n $response->data = 'No hay registros en la base de datos';\n $response->status = 'fail'; \n }\n\n\n return $response;\n }", "function get_materias_equipo($filtro=array()){\n $where=\" WHERE 1=1 \";\n $where2=\" WHERE 1=1 \";\n if (isset($filtro['anio'])) {\n $where.= \" and anio= \".quote($filtro['anio']['valor']);\n }\n if (isset($filtro['carrera'])) {\n switch ($filtro['carrera']['condicion']) {\n case 'contiene':$where2.= \" and carrera ILIKE \".quote(\"%{$filtro['carrera']['valor']}%\");break;\n case 'no_contiene':$where2.= \" and carrera NOT ILIKE \".quote(\"%{$filtro['carrera']['valor']}%\");break;\n case 'comienza_con':$where2.= \"and carrera ILIKE \".quote(\"{$filtro['carrera']['valor']}%\");break;\n case 'termina_con':$where2.= \"and carrera ILIKE \".quote(\"%{$filtro['carrera']['valor']}\");break;\n case 'es_igual_a':$where2.= \" and carrera = \".quote(\"{$filtro['carrera']['valor']}\");break;\n case 'es_distinto_de':$where2.= \" and carrera <> \".quote(\"{$filtro['carrera']['valor']}\");break;\n }\t\n\t }\n if (isset($filtro['legajo'])) {\n $where2.= \" and legajo = \".quote($filtro['legajo']['valor']);\n }\n if (isset($filtro['vencidas'])) {\n $pdia = dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($filtro['anio']['valor']);\n $udia = dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($filtro['anio']['valor']);\n switch ($filtro['vencidas']['valor']) {\n //sin las designaciones vencidas, es decir solo vigentes\n case 1:$where.= \" and desde<='\".$udia.\"' and ( hasta>='\".$pdia.\"' or hasta is null )\";break;\n case 0:$where.= \" and not(desde<='\".$udia.\"' and ( hasta>='\".$pdia.\"' or hasta is null ))\";break;\n }\n }\n// if (isset($filtro['carrera'])) {\n// $where2.= \" and carrera= \".quote($filtro['carrera']['valor']);\n// }\n //si el usuario esta asociado a un perfil de datos\n $con=\"select sigla from unidad_acad \";\n $con = toba::perfil_de_datos()->filtrar($con);\n $resul=toba::db('designa')->consultar($con);\n if(count($resul)<=1){//es usuario de una unidad academica\n $where.=\" and uni_acad = \".quote($resul[0]['sigla']);\n }else{\n //print_r($filtro);exit;\n if (isset($filtro['uni_acad'])) {\n $where.= \" and uni_acad= \".quote($filtro['uni_acad']['valor']);\n }\n }\n \n $sql=\"select * from (select \n case when conj='sin_conj' then desc_materia else desc_mat_conj end as materia,\n case when conj='sin_conj' then cod_siu else cod_conj end as cod_siu,\n case when conj='sin_conj' then cod_carrera else car_conj end as carrera,\n case when conj='sin_conj' then ordenanza else ord_conj end as ordenanza,\n docente_nombre,legajo,cat_est,id_designacion,modulo,rol,periodo,id_conjunto\n from(\n select sub5.uni_acad,trim(d.apellido)||', '||trim(d.nombre) as docente_nombre,d.legajo,cat_est,sub5.id_designacion,carac,t_mo.descripcion as modulo,case when trim(rol)='NE' then 'Aux' else 'Resp' end as rol,p.descripcion as periodo,\n case when sub5.desc_materia is not null then 'en_conj' else 'sin_conj' end as conj,id_conjunto,\n m.desc_materia,m.cod_siu,pl.cod_carrera,pl.ordenanza,\n sub5.desc_materia as desc_mat_conj,sub5.cod_siu as cod_conj,sub5.cod_carrera as car_conj,sub5.ordenanza as ord_conj\n from(\n\n select sub2.id_designacion,sub2.id_materia,sub2.id_docente,sub2.id_periodo,sub2.modulo,sub2.carga_horaria,sub2.rol,sub2.observacion,cat_est,dedic,carac,desde,hasta,sub2.uni_acad,sub2.id_departamento,sub2.id_area,sub2.id_orientacion,sub4.desc_materia ,sub4.cod_carrera,sub4.ordenanza,sub4.cod_siu,sub3.id_conjunto\n from (select distinct * from (\n select distinct a.anio,b.id_designacion,b.id_docente,a.id_periodo,a.modulo,a.carga_horaria,a.rol,a.observacion,a.id_materia,b.uni_acad,cat_estat||dedic as cat_est,dedic,carac,desde,hasta,b.id_departamento,b.id_area,b.id_orientacion\n from asignacion_materia a, designacion b\n where a.id_designacion=b.id_designacion\n and not (b.hasta is not null and b.hasta<=b.desde)\n )sub1\n --where uni_acad='CRUB' and anio=2020 \n \".$where .\") sub2 \n left outer join \n ( select t_c.id_conjunto,t_p.anio,t_c.id_periodo,t_c.ua,t_e.id_materia\n from en_conjunto t_e,conjunto t_c, mocovi_periodo_presupuestario t_p\n WHERE t_e.id_conjunto=t_c.id_conjunto and t_p.id_periodo=t_c.id_periodo_pres \n )sub3 on (sub3.ua=sub2.uni_acad and sub3.id_periodo=sub2.id_periodo and sub3.anio=sub2.anio and sub3.id_materia=sub2.id_materia)\n left outer join (select t_e.id_conjunto,t_e.id_materia,t_m.desc_materia,t_m.cod_siu,t_p.cod_carrera,t_p.uni_acad,t_p.ordenanza\n from en_conjunto t_e,materia t_m ,plan_estudio t_p\n where t_e.id_materia=t_m.id_materia\n and t_p.id_plan=t_m.id_plan)sub4 on sub4.id_conjunto=sub3.id_conjunto\n\n\n\n )sub5\n LEFT OUTER JOIN docente d ON d.id_docente=sub5.id_docente\n LEFT OUTER JOIN periodo p ON p.id_periodo=sub5.id_periodo\n LEFT OUTER JOIN modulo t_mo ON sub5.modulo=t_mo.id_modulo\n LEFT OUTER JOIN materia m ON m.id_materia=sub5.id_materia\n LEFT OUTER JOIN plan_estudio pl ON pl.id_plan=m.id_plan\n )sub6)sub\n $where2\n order by id_conjunto,materia,docente_nombre\";\n return toba::db('designa')->consultar($sql);\n }", "public function mMantenimientos()\n {\n return $this->hasMany('App\\Models\\MMantenimiento', 'subequipo_id', 'id');\n }", "public function getMedicos()\n {\n return $this->hasMany(Medicos::className(), ['id_especialidade' => 'id']);\n }", "public function ObtenerListaMediosDePagos(){\r\n return MedioDePago::all();\r\n }", "public function index()\n {\n //\n $materias = materiap::all();\n return view('mostrarmateria', ['materias' =>$materias]);\n }", "public function getAll() {\n $sql = \"select * from infos_contributeur\";\n $result = $this->db->fetchAll($sql);\n\n return $result;\n }", "function get_all_modelo_medidor()\n {\n $modelo_medidor = $this->db->query(\"\n SELECT\n *\n FROM\n `modelo_medidor`\n WHERE\n 1 = 1\n \")->result_array();\n\n return $modelo_medidor;\n }", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM material';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "function ultimos_materiales() {\n\t\n\t\t\n\t\t$query = \"SELECT materiales.*, licencias.*\n\t\tFROM materiales, licencias\n\t\tWHERE materiales.material_licencia=licencias.id_licencia\n\t\tORDER BY materiales.fecha_alta desc\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "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}", "public static function medicamentosApi()\n {\n $medicamentos = \\DB::select('SELECT id_medicamento, nombre_comercial, nombre_compuesto, solucion_tableta, tipo_contenido, dosis \n FROM tb_medicamentos');\n\n return $medicamentos;\n }", "function buscar_materiales_limit($registrado,$texto_buscar,$licencia,$sql,$inicial,$cantidad) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_visibles=\"AND material_estado=1\";\n\t\t}\n\t\t\n\t\tif ($texto_buscar !='') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (material_titulo LIKE '%$texto_buscar%' \n\t\t\tOR material_descripcion LIKE '%$texto_buscar%' \n\t\t\tOR material_objetivos LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t\n\t\t}\n\t\t\n\t\t$query = \"SELECT * FROM materiales\n\t\tWHERE material_licencia = '$licencia'\n\t\t$sql\n\t\t$sql_texto\n\t\t$mostrar_visibles\n\t\tORDER BY fecha_alta desc\n\t\tLIMIT $inicial,$cantidad\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function getMedicos()\n {\n return $this->hasMany(Profile::className(), ['id' => 'id_medico'])->viaTable('medico_especialidade', ['id_especialidade' => 'id']);\n }", "function buscar_materiales($registrado,$texto_buscar,$licencia,$sql) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_visibles=\"AND material_estado=1\";\n\t\t}\n\t\t\n\t\tif ($texto_buscar !='') {\n\t\t\t\n\t\t\t$sql_texto=\"AND (material_titulo LIKE '%$texto_buscar%' \n\t\t\tOR material_descripcion LIKE '%$texto_buscar%' \n\t\t\tOR material_objetivos LIKE '%$texto_buscar%') \n\t\t\t\";\n\t\t\n\t\t}\n\t\t\n\t\t$query = \"SELECT COUNT(*) FROM materiales\n\t\tWHERE material_licencia = '$licencia'\n\t\t$sql\n\t\t$sql_texto\n\t\t$mostrar_visibles\n\t\tORDER BY fecha_alta desc\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows[0] == 0) {\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\treturn $numrows[0];\n\t\t}\n\t}", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM contenidos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "function listaMaterial(){\n //Construimos la consulta\n $sql=\"SELECT * from material_entregado\";\n //Realizamos la consulta\n $resultado=$this->realizarConsulta($sql);\n if($resultado!=null){\n //Montamos la tabla de resultados\n $tabla=[];\n while($fila=$resultado->fetch_assoc()){\n $tabla[]=$fila;\n }\n return $tabla;\n }else{\n return null;\n }\n }", "public function getMarcacaoConsultas()\n {\n return $this->hasMany(MarcacaoConsulta::className(), ['id_especialidade' => 'id']);\n }", "public function getCampi()\n {\n return $this->hasMany(Campo::class, ['id' => 'campo_id'])->viaTable('internato_campo', ['internato_id' => 'id'])\n ->orderBy(['data_arrivo' => SORT_DESC]);;\n }", "public function dameMantenimientosAnteriores($inicio, $fin){\n\n $consulta = $this->getQueryBuilder();\n \n $consulta->select('d.id','d.direccion','c.id as cliente',\n 'd.telefono', 'd.sCliente',\n 'd.observaciones',\n 'dist.distrito',\n 'c.nombre', 'p.modelo', 'f.familia', 'p.fechaNuevoMantenimiento','p.periodicidad','t.tipoContrato', 'p.planificada')\n ->leftJoin('d.cliente', 'c')\n ->leftJoin('d.producto', 'p')\n ->leftJoin('p.familia', 'f')\n ->leftJoin('p.contrato', 't')\n ->leftJoin('d.distrito', 'dist')\n ->Where('p.fechaNuevoMantenimiento BETWEEN :inicio AND :fin') \n ->andWhere('p.planificada IS NULL')\n ->setParameter('inicio', $inicio) \n ->setParameter('fin', $fin);\n $consulta->orderby('d.distrito', 'ASC')\n ->addOrderBy('p.fechaNuevoMantenimiento', 'DESC')\n ->getQuery();\n \n\n $lista= $consulta->getQuery()->getResult();\n\n return $lista;\n }", "public function index()\n\t{\n\t\t$marcas = $this->marca->all();\n\t\treturn $marcas;\n\t}", "public function getMetaSeguimientos()\n {\n return $this->hasMany(MetaSeguimiento::className(), ['mind_id' => 'mind_id']);\n }", "public function getMateria(){\n\t\treturn $this->materia;\n }", "public function getMaquinas() {\n\n\t\t $command = \\Yii::$app->db_mysql;\n\t\t $sql=\"\n\t\t\tSELECT *\n\t\t\tFROM pdp_maquina\n\t\t\t \n\t\t \";\n\t\t $result =$command->createCommand($sql)\n\t\t\t\t\t\t\t->queryAll();\n\t\t \n\t\treturn $result;\n\t\t\n\t}", "public static function all() {\n\t\t$material_helper = new Material();\n\t\treturn $material_helper->get_all();\n\t}", "public static function get():array{\n $consulta=\"SELECT a.id AS idAccion, a.codigo AS codigoAcc, a.nombre AS nombreAcc,m.* \n\t\t\t\t\tFROM acciones a \n\t\t\t\t\t\tINNER JOIN modulos_acciones md ON a.id=md.idAccion\n\t\t\t\t\t RIGHT JOIN modulos m ON idModulo= m.id\"; //preparar la consulta\n return DB::selectAll($consulta,'Modulo');\n }", "function listarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_sel';\n\t\t$this->transaccion='SNX_MAQ_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_maquinaria','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('potencia','numeric');\n\t\t$this->captura('peso','numeric');\t\t\n\t\t$this->captura('maquinaria','varchar');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('valor','numeric');\n\t\t$this->captura('valormat','numeric');\n\t\t$this->captura('id_factorindexacion','int4');\n\t\t$this->captura('desc_factorindexacion','varchar');\n\t\t$this->captura('id_tipopreciomaquinaria','int4');\n\t\t$this->captura('tipopreciomaquinaria','varchar');\n\t\t$this->captura('id_ambitoprecio','int4');\n\t\t$this->captura('ambitoprecio','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function index()\n {\n $marcas = Modelo::with(['marca'])->orderBy('descripcion', 'asc')->get();\n return $marcas;\n }", "function GetAll()\n {\n $this->abrir_conexion();\n $sql = \"SELECT * FROM metas order by meta_id\";\n $resultado = mysqli_query($this->db, $sql);\n\n while ($row = mysqli_fetch_assoc($resultado)) {\n $datos[] = $row;\n }\n\n return $datos;\n $this->cerrar_conexion();\n }", "function AllPartenaires(){\n return $this->db->get($this->partenaires)->result();\n }", "public function getAllMaterialsByDisciplina($identificadorDisciplina)\n { \n $query = \"\n SELECT M.link, M.assunto, M.titulo, M.dteregistro, M.tipoMaterial, P.desnome \n FROM tb_materiais \n M, tb_disciplinas D , tb_pessoas P\n WHERE D.iddisciplina = M.iddisciplina AND d.identificador = '{$identificadorDisciplina}' AND D.idpessoa = P.idpessoa;\" ;\n return parent::_manualQuery($query);\n }", "public static function showRows($INICIO,$CANTIDAD){\n $model=new AsignacionTemaRequisitoModel();\n $lista=$model->listarAsignacionTemasRequisitos($INICIO, $CANTIDAD);\n return $lista;\n }", "public function listRead_m() {\n //\n return view('perfils.maestro.maestro_mensajes_leidos');\n }", "public function getInformacionMujeres() {\n $arraymujeres = Mujer::all();\n \n if(Auth::check() ) {\n $usuario = Auth::user();\n } else {\n $usuario = \"anonimo\";\n }\n\n return view('imprimir.mujeres', compact(\"usuario\", \"arraymujeres\"));\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM turma_disciplina';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function ministerios(){\n \treturn $this->hasMany(Ministerio::class, 'id_ministerio', 'id_ministerio')->where('bo_activo', true)->where('bo_estado', 1);//->orderBy('email');\n }", "public function all() {return $this->requete(\"SELECT * FROM \" . $this->table . \" ORDER BY marque\");}", "public function index()\n {\n\n $materias = \\App\\Materia::all();\n return view('/admin/materias/index', compact('materias'));\n }", "public static function getListado(){\n return Dispositivo::model()->findAll();\n }", "public function califica($id_docente){\n\n\n $alumnos = DB::table('materias as mat')\n ->join('docente as dc', 'mat.id_docente', '=','dc.id')\n ->join('alumnos as al','mat.id_grado','=','al.grado')\n ->join('users as usr','usr.dni','=','al.dni_alumno')\n ->join('grados as gr','gr.id','=','mat.id_grado')\n ->select('al.dni_alumno','usr.nombre','usr.apellidos','mat.clave_materia','mat.materia','mat.id_grado','dc.dni_docente','gr.grado','mat.id as id_materia')\n ->where('dc.dni_docente','=',$id_docente)\n ->get();\n ;\n\n $materias = DB::table('materias as mat')\n ->join('docente as dc', 'mat.id_docente', '=','dc.id')\n ->join('grados as gr','gr.id','=','mat.id_grado')\n ->select('mat.materia','gr.grado','mat.id_docente')\n ->where('dc.dni_docente','=',$id_docente)\n ->get();\n\n return response()->json(['alumnos'=>$alumnos,'matgr'=>$materias]);\n\n }", "public function index()\n {\n $grado = Grado::all();\n return view('admin.materias.index', compact('grado'));\n }", "public function vistaMateriaModel($tabla){\r\n\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT id, id_maestro, nombre, horas, creditos, id_grupo FROM $tabla\");\t\r\n\t\t$stmt->execute();\r\n\r\n\t\t#fetchAll(): Obtiene todas las filas de un conjunto de resultados asociado al objeto PDOStatement. \r\n\t\treturn $stmt->fetchAll();\r\n\r\n\t\t$stmt->close();\r\n\r\n\t}", "public function ajaxmaterias() { //Se le agrego idalumnocarrera\n $idCarrera = $_POST['carrera'];\n $idAlumno = $_POST['alumno'];\n $idAlumnoCarrera = $_POST['idalumnocarrera'];\n $dataIdModo = htmlentities($_POST['modo'], ENT_COMPAT | ENT_QUOTES, \"UTF-8\");\n $db = & $this->POROTO->DB;\n $db->dbConnect(\"matriculacion/ajaxmaterias/\" . $idCarrera . \"/\" . $idAlumno . \"/\" . $dataIdModo);\n\n include($this->POROTO->ControllerPath . '/correlativas.php');\n $claseCorrelativas = new correlativas($this->POROTO);\n\n if ($dataIdModo == 3) { //solo inscriptas (estadomateria=2)\n $sql = \"select m.idmateria, m.anio, m.materiacompleta as nombre,c.nombre as comision \";\n $sql .= \" from alumnomateria am inner join viewmaterias m on (am.idmateria=m.idmateria and m.idcarrera=\" . $idCarrera . \")\";\n $sql .= \" left join comisiones c on am.idcomision=c.idcomision \";\n $sql .= \" where am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursando'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_libre'] . \") \";\n $sql .= \" and am.idpersona=\" . $idAlumno;\n $sql .= \" and am.idalumnocarrera=\" . $idAlumnoCarrera;\n $sql .= \" order by m.orden\";\n $arrMateriasOk = $db->getSQLArray($sql);\n }\n if ($dataIdModo == 1 || $dataIdModo == 2) { //1 Alumno 2 Administrativo.\t\t\t\t\t\t\t\t\t\t\n //levanto el listado de materias de la carrera. por un left join me \n //fijo si ya fue cursada (puede haber mas de un registro)\n //Si materia cursada aprobada o libre => solo_cursada>=1 y \n //la considero como ya cursada\n //si tuvo un estado 3,4 (aprobada,aprobada por equiv) => aprobada>1 y la considero como materia aprobada\n //elimino las materias que tienen estado CURSANDO (inscriptas) y las libres al menos una vez.\n $sql = \"select m.idmateria,m.anio,m.materiacompleta as nombre,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursadaaprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_libre'] . \") then 1 else 0 end) solo_cursada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_aprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_aprobadaxequiv'] . \",\" . $this->POROTO->Config['estado_alumnomateria_cursadaaprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_nivelacion'] . \") then 1 else 0 end) cursada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_aprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_aprobadaxequiv'] . \",\" . $this->POROTO->Config['estado_alumnomateria_nivelacion'];\n $sql .= \") then 1 else 0 end) aprobada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursando'] . \") then 1 else 0 end) inscripta \";\n $sql .= \" from viewmaterias m \";\n $sql .= \" left join alumnomateria am on am.idmateria=m.idmateria and am.idpersona=\" . $db->dbEscape($idAlumno);\n $sql .= \" and am.idalumnocarrera=\" . $db->dbEscape($idAlumnoCarrera);\n $sql .= \" where m.idcarrera=\" . $db->dbEscape($idCarrera);\n $sql .= \" and m.estado=1\";\n $sql .= \" group by m.idmateria\";\n $sql .= \" order by m.orden\";\n $arrMaterias = $db->getSQLArray($sql);\n\n $arrMateriasOk = array();\n\n foreach ($arrMaterias as $row) {\n if ($row['solo_cursada'] == \"0\") { //Solo traigo las que no estoy cursando aun o libre.\n //Busco las correlativas para este alumno.\n $resultados = $claseCorrelativas->getCorrelativasAlumno($idCarrera, $row['idmateria'], 0, $idAlumno, $idAlumnoCarrera);\n if ($dataIdModo == 1) { //Si es alumno, solo traigo materias sin correlativas\n $valida = true;\n foreach ($resultados as $regla) {\n if ($regla[\"idregla\"] != 6 && $regla[\"estado\"] == false)\n $valida = false;\n }\n if ($valida)\n $arrMateriasOk[] = array(\"idmateria\" => $row['idmateria'], \"nombre\" => $row['nombre'], \"anio\" => $row['anio'], \"correlativas\" => $resultados);\n }else { //Traigo todas, cumplan o no las correlatividades.\n $arrMateriasOk[] = array(\"idmateria\" => $row['idmateria'], \"nombre\" => $row['nombre'], \"anio\" => $row['anio'], \"correlativas\" => $resultados);\n }\n }\n }\n\n //busco en arrMateriasOk, las materia que tienen inscriptas>0\n foreach ($arrMateriasOk as $k => $item)\n foreach ($arrMaterias as $materia)\n if ($materia['idmateria'] == $item['idmateria'])\n if ($materia['inscripta'] > 0 || $materia['aprobada'] > 0)\n unset($arrMateriasOk[$k]);\n } // if ($dataIdModo == 1 || $dataIdModo == 2 {\n $db->dbDisconnect();\n echo json_encode($arrMateriasOk);\n }", "public function getAll(){\n \n // 1. Establece la conexion con la base de datos y trae todos los generos\n $query = $this->getDb()->prepare(\" SELECT * FROM genero\");\n $query-> execute(); \n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "public function getAllMesas(){\n\n\t\treturn $this->conn->get('lista_allmesa');\n\t}", "public function listar_marcas(){\n\t\t$this->db->order_by('desmarca','ASC'); \n\n\t\t// vamos informar a tabela e trazer o resultado \n\t\treturn $this->db->get('marca')->result(); \n\n\t}", "public function index()\n {\n\n return $this->facilitie->all();\n\n }", "function AllMembres(){\n return $this->db->get($this->membre)->result();\n }", "public function mostrarTodosMaquinas() {\n \n //FUNCION CON LA CONSULTA A REALIZAR\n $sql = \"SELECT M.*, A.*, E.* FROM MAQUINA M INNER JOIN area_maquina A ON M.AREAMAQCODIGO=A.AREAMAQCODIGO INNER JOIN ESTADO E ON M.ESTCODIGO=E.ESTCODIGO WHERE E.ESTCODIGO != 11 ORDER BY M.MAQUINOMBRE\";\n $this->_conexion->ejecutar_sentencia($sql);\n return $this->_conexion->retorna_select();\n \n }", "public function getMedicaments(){\n\t\t$req = \"select * from medicament order by MED_NOMCOMMERCIAL\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetchAll();\n\t\treturn $ligne;\n\t}", "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM alojamientos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function indexTablaMateriales($id){\n return view('backend.bodega3.verificacion.materiales.index', compact('id'));\n }", "public static function getAll2(){\n\t\t$sql = \"select * from prueba\";\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new TemparioData());\n\t}", "public function getInternatoCampi()\n {\n return $this->hasMany(InternatoCampo::class, ['internato_id' => 'id']);\n }", "public function getComercios(){\n\t\t$sql = \"SELECT ID_comercio, nombre, correo, telefono, responsable, FK_ID_estado_comercio FROM comercio ORDER BY nombre\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}", "private function getMClist()\n {\n return DB::table('absence')->join('teacher', 'absence.short_name', '=', 'teacher.short_name')\n ->get();\n// return Teacher::whereIn('short_name',Absence::where('date','=',new DateTime('today'))->lists('short_name'))->has('absence')->get();\n }", "public function canalesAdquisicion()\n {\n return $this->belongsToMany('App\\CanalAdquisicion', 'clientes_canales_adquisicion', 'id_cliente', 'id_canal_adquisicion');\n }", "public static function resultado()\n\t{\n\t\t// Arreglo que va a contener todos los tipos de roles\n\t\t$lista_medios = [];\n\n\n\t\t// Crear una instancia de la conexion\n\t\t$conexion = new Conexion;\n\n\t\t// Variable que contiene la sentencia sql, uniendo si se uso la funcion donde y tambien ordenar\n\t\t$sql = static::$consultaSelect . static::$consultasDonde . static::$consultaOrdenar . static::$consultaLimite;\n\n\n\t\t// Consulta para la base de datos y despues lo guarda en la variable\n\t\t$resultado = $conexion->conn->query($sql);\n\n\n\t\t// Recorrer todos los tipos de roles que llegaron de la bd\n\t\twhile ( $medio = $resultado->fetch_assoc() ) {\n\n\t\t\t// Crear un tipo de rol temporal en cada vuelta\n\t\t\t$medioTemporal = new MedioPago;\n\n\t\t\t// Añadir los campos al tipo de rol\n\t\t\t$medioTemporal->id \t = ( isset($medio['id']) ? $medio['id'] : '');\n\t\t\t$medioTemporal->medio \t = ( isset($medio['medio']) ? $medio['medio'] : '');\n\n\n\t\t\t// Guarda el objeto tipo de rol en el arreglo\n\t\t\t$lista_medios[] = $medioTemporal;\n\t\t}\n\n\t\t// Restaurar las variables estaticas\n\t\tstatic::$consultasDonde = '';\n\t\tstatic::$numeroConsultasDonde = 0;\n\t\tstatic::$consultaSelect = 'SELECT * FROM medios_pago ';\n\t\tstatic::$consultaOrdenar = '';\n\t\tstatic::$consultaLimite = '';\n\n\n\t\t// Devolver todos los tipos de roles\n\t\treturn $lista_medios;\n\n\t}", "public function get_all() {\n $this->db->select('id, regimen, descripcion, tipo');\n $this->db->from('regimenes_fiscales');\n $this->db->where('status', 1);\n $result = $this->db->get();\n return $result->result_array();\n }", "function listarSolicitudModalidades()\r\n {\r\n $this->procedimiento = 'adq.f_solicitud_modalidades_sel';\r\n $this->transaccion = 'ADQ_SOLMODAL_SEL';\r\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\r\n\r\n\r\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\r\n $this->setParametro('tipo_interfaz', 'tipo_interfaz', 'varchar');\r\n $this->setParametro('historico', 'historico', 'varchar');\r\n\r\n\r\n //Definicion de la lista del resultado del query\r\n $this->captura('id_solicitud', 'int4');\r\n $this->captura('estado_reg', 'varchar');\r\n $this->captura('id_solicitud_ext', 'int4');\r\n $this->captura('presu_revertido', 'varchar');\r\n $this->captura('fecha_apro', 'date');\r\n $this->captura('estado', 'varchar');\r\n $this->captura('id_funcionario_aprobador', 'int4');\r\n $this->captura('id_moneda', 'int4');\r\n $this->captura('id_gestion', 'int4');\r\n $this->captura('tipo', 'varchar');\r\n $this->captura('num_tramite', 'varchar');\r\n $this->captura('justificacion', 'text');\r\n $this->captura('id_depto', 'int4');\r\n $this->captura('lugar_entrega', 'varchar');\r\n $this->captura('extendida', 'varchar');\r\n\r\n $this->captura('posibles_proveedores', 'text');\r\n $this->captura('id_proceso_wf', 'int4');\r\n $this->captura('comite_calificacion', 'text');\r\n $this->captura('id_categoria_compra', 'int4');\r\n $this->captura('id_funcionario', 'int4');\r\n $this->captura('id_estado_wf', 'int4');\r\n $this->captura('fecha_soli', 'date');\r\n $this->captura('fecha_reg', 'timestamp');\r\n $this->captura('id_usuario_reg', 'int4');\r\n $this->captura('fecha_mod', 'timestamp');\r\n $this->captura('id_usuario_mod', 'int4');\r\n $this->captura('usr_reg', 'varchar');\r\n $this->captura('usr_mod', 'varchar');\r\n\r\n $this->captura('id_uo', 'integer');\r\n\r\n $this->captura('desc_funcionario', 'text');\r\n $this->captura('desc_funcionario_apro', 'text');\r\n $this->captura('desc_uo', 'text');\r\n $this->captura('desc_gestion', 'integer');\r\n $this->captura('desc_moneda', 'varchar');\r\n $this->captura('desc_depto', 'varchar');\r\n $this->captura('desc_proceso_macro', 'varchar');\r\n $this->captura('desc_categoria_compra', 'varchar');\r\n $this->captura('id_proceso_macro', 'integer');\r\n $this->captura('numero', 'varchar');\r\n $this->captura('desc_funcionario_rpc', 'text');\r\n $this->captura('obs', 'text');\r\n $this->captura('instruc_rpc', 'varchar');\r\n $this->captura('desc_proveedor', 'varchar');\r\n $this->captura('id_proveedor', 'integer');\r\n $this->captura('id_funcionario_supervisor', 'integer');\r\n $this->captura('desc_funcionario_supervisor', 'text');\r\n $this->captura('ai_habilitado', 'varchar');\r\n $this->captura('id_cargo_rpc', 'integer');\r\n $this->captura('id_cargo_rpc_ai', 'integer');\r\n $this->captura('tipo_concepto', 'varchar');\r\n $this->captura('revisado_asistente', 'varchar');\r\n $this->captura('fecha_inicio', 'date');\r\n $this->captura('dias_plazo_entrega', 'integer');\r\n $this->captura('obs_presupuestos', 'varchar');\r\n $this->captura('precontrato', 'varchar');\r\n $this->captura('update_enable', 'varchar');\r\n $this->captura('codigo_poa', 'varchar');\r\n $this->captura('obs_poa', 'varchar');\r\n $this->captura('contador_estados', 'bigint');\r\n\r\n $this->captura('nro_po', 'varchar');\r\n $this->captura('fecha_po', 'date');\r\n\r\n $this->captura('importe_total', 'numeric');\r\n $this->captura('prioridad', 'varchar');\r\n $this->captura('id_prioridad', 'integer');\r\n $this->captura('list_proceso', 'integer[]');\r\n\r\n $this->captura('cuce', 'varchar');\r\n $this->captura('fecha_conclusion', 'date');\r\n $this->captura('presupuesto_aprobado', 'varchar');\r\n\r\n $this->captura('tipo_modalidad', 'varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n //echo($this->consulta);exit;\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "public function getMarcacaos()\n {\n return $this->hasMany(Marcacao::className(), ['id_especialidade' => 'id']);\n }", "public function getSabores(){\n $sabores = TcSabor::where('id_estado','=',1)->get();\n return $sabores;\n }", "function get_all(){\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM evs_database.evs_set_form_attitude\";\n $query = $this->db->query($sql);\n\t\treturn $query;\n\n\t}", "public function SelecionaTudo() {\n try {\n //Monta a Query\n $query = Doctrine_Query::create()\n ->select(\"ws.*, MONTHNAME(ws.data) mes, YEAR(ws.data) ano\")\n ->from($this->table_alias)\n ->orderBy(\"ws.data DESC\")\n ->offset(1)\n ->limit(6)\n ->execute()\n ->toArray();\n\n return $query;\n } catch (Doctrine_Exception $e) {\n echo $e->getMessage();\n }\n }", "public function readProductosMarca()\n {\n $sql = 'SELECT nombre, id_producto, imagen_producto, producto, descripcion, precio\n FROM producto INNER JOIN marca USING(id_marca)\n WHERE id_marca = ? \n ORDER BY producto';\n $params = array($this->nombre);\n return Database::getRows($sql, $params);\n }", "public function getMedics()\n {\n $search['q'] = request('q');\n $search['clinic'] = request('clinic');\n \n \n $medics = $this->medicRepo->findAllWithoutPaginate($search);\n\n \n \n return $medics;\n \n }", "public function index()\n {\n $user = \\Auth::user();\n if ($user->role === Roles::BRICOLEUR) {\n $annonces = [];\n foreach ($user->metiers as $metier) {\n //$annonces[$metier->name] = $metier->annonces;\n foreach ($metier->annonces as $annonce) {\n $c = AnnonceUser::where('annonce_id', $annonce->id)->where('user_id', \\Auth::id())->count();\n if ($c == 0) {\n $annonces[$metier->name][] = $annonce;\n }\n }\n }\n } else {\n $annonces = Annonce::with('metiers')->where('user_id', \\Auth::id())->orderBy('created_at', 'titre')->get();\n }\n return $annonces;\n }", "public function readProductosMarcas()\n {\n $sql = 'SELECT nombre, id_producto, imagen_producto,producto, descripcion, precio\n FROM producto INNER JOIN marca USING(id_marca)\n WHERE id_marca = ? \n ORDER BY producto';\n $params = array($this->nombre);\n return Database::getRows($sql, $params);\n }", "public function listarbiofinCE(){\n $stmt = $this->objPDO->prepare(\"SELECT b.id_biopsia,b.num_biopsia,b.fecha_ingreso,db.fecha_informe,(e.emp_nombres||' '||e.emp_appaterno||' '||e.emp_apmaterno) as medico,\n list(m.descr_muestra)as muestras from sisanatom.biopsia b \n inner join sisanatom.detalle_bioce db on b.id_biopsia=db.id_biopsia\n inner join sisanatom.muestras_biopsia mb on b.id_biopsia=mb.id_biopsia inner join empleados e on b.patologo_responsable=e.emp_id\n inner join sisanatom.muestra m on m.id_muestra=mb.id_muestrarem\n where b.estado_biopsia=3 and b.condicion_biopsia='A'\n group by b.id_biopsia,b.num_biopsia,b.fecha_ingreso,db.fecha_informe,medico\");\n $stmt->execute();\n $pacientes = $stmt->fetchAll(PDO::FETCH_OBJ);\n return $pacientes;\n }", "public function getMedicoEspecialidades()\n {\n return $this->hasMany(MedicoEspecialidade::className(), ['id_especialidade' => 'id']);\n }", "public function getInformeCMI()\n {\n $objetivo = array();\n\n $c = new Criteria();\n $c->add(IndicadorPeer::OBJETIVO_ID, $this->getId());\n $c->add(IndicadorPeer::PROCESO, null, Criteria::ISNULL);\n $c->add(IndicadorPeer::BORRADOR, 0, Criteria::EQUAL);\n $indicadores = IndicadorPeer::doSelect($c);\n\n foreach ($indicadores as $indicador)\n {\n $objetivo[] = array (\n $this->getNombre(),\n $indicador->getIndicador(),\n $indicador->getCategoria(),\n $indicador->getFormulaTextual(),\n $indicador->getUmbralRojo(),\n $indicador->getUmbralAmarillo(),\n $indicador->getUmbralVerde(),\n $indicador->getValorActual(),\n $indicador->getMeta(),\n $indicador->getIniciativa(),\n );\n }\n return $objetivo;\n }" ]
[ "0.7839121", "0.76870126", "0.7656564", "0.73006904", "0.72118795", "0.7060298", "0.69762385", "0.6856569", "0.6846783", "0.6801343", "0.6721525", "0.66849434", "0.667229", "0.6524922", "0.65207636", "0.6433648", "0.6423848", "0.638597", "0.6350774", "0.63171893", "0.6277354", "0.6258898", "0.625881", "0.62479675", "0.62090385", "0.6191972", "0.61828434", "0.61814684", "0.6166806", "0.61596054", "0.6122965", "0.6117459", "0.61158305", "0.6103918", "0.6096206", "0.6092048", "0.60776824", "0.6076639", "0.60753226", "0.6075213", "0.6074899", "0.6061854", "0.60357535", "0.60281616", "0.6017815", "0.6015243", "0.60101193", "0.5993534", "0.5989798", "0.5973", "0.5970165", "0.59642625", "0.5957219", "0.59563875", "0.5941008", "0.5932703", "0.5929846", "0.59257704", "0.59152526", "0.5910109", "0.5908052", "0.5903097", "0.5899454", "0.58974135", "0.5888067", "0.588621", "0.588246", "0.5882203", "0.58795583", "0.5862311", "0.5858549", "0.5849288", "0.5845603", "0.58433735", "0.58417296", "0.5838856", "0.5831038", "0.5830655", "0.5815422", "0.5812993", "0.58113784", "0.5809821", "0.58089453", "0.5805408", "0.5791373", "0.5782765", "0.57772183", "0.5777133", "0.5774837", "0.5756407", "0.575489", "0.5752618", "0.5750219", "0.57476085", "0.57453454", "0.57440984", "0.57427204", "0.5741708", "0.57392967", "0.57352746" ]
0.6987783
6
funcion comprobar si una persona ya esta registrada en un curso
public function check_inscripcion($id_persona,$id_curso){ return $this->db->get_where('inscripcion_materia',array('id_persona'=>$id_persona,'id_curso'=>$id_curso))->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n }\n\t\t\n\t\t// Crear la cuenta de usuarios nuevos\n // if (!DBHelper::is_user_registered($this->user)){\n // if (!(int)$this->data->mobile || \n // (int)($this->data->client_app_version) < AU_NEW_USER_MIN_VERSION_CODE){\n // // Force update\n // $this->url = Url::Parse(\"http://\". HTTP_HOST .\"/__www/new_user_update_required.php\");\n // }else{\n // DBHelper::createNewAccount($this->user, DIAS_PRUEBA);\n // }\n // }\n \n // No crear cuenta. En su lugar mostrar una pagina notificando\n // E:\\XAMPP\\htdocs\\__www\\no_registration_allowed.html\n \n if (!DBHelper::is_user_registered($this->user)){\n DBHelper::storeMailAddress($this->user);\n $this->url = Url::Parse(\"http://auroraml.com/__www/no_registration_allowed.html\");\n }\n }", "function registrarSesion () {\n\n if (!empty($this->id_usuario)) {\n $this->salvar(['ultima_session' => 'current_timestamp',\n 'activo' => 1\n ]);\n Helpers\\Sesion::sessionLogin();\n }\n else return false;\n\n }", "public function isRegistered() {\n //1ero. es un registro completo o 2do es un\n //registro incompleto.\n if (is_file(\"/etc/elastix.key\")) { \n if($this->columnExists(\"has_account\")) {\n $result = $this->_DB->getFirstRowQuery(\"select has_account from register;\", true);\n if (is_array($result) && count($result)>0){\n return ($result['has_account']==\"yes\")?\"yes-all\":\"yes-inc\";\n }\n else return \"yes-inc\";\n }\n else {\n //intento crear la columna \n if(!$this->addColumnTableRegister(\"has_account char(3) default 'no'\")) {\n $this->errMsg = \"The column 'has_account' does not exist and could not be created\";\n return \"yes-inc\";\n }\n\n //Actualizo el valor de la columna\n //con la info desde webservice\n $dataWebService = $this->getDataServerRegistration();\n if(!(is_array($dataWebService) && count($dataWebService)>0)) // no se puedo conectar al webservice\n return \"yes-inc\";\n \n if($this->updateHasAccount(1,$dataWebService['has_account']))\n return ($dataWebService['has_account']==\"yes\")?\"yes-all\":\"yes-inc\";\n else return \"yes-inc\";\n }\n }\n else return \"no\";\n }", "function existenNotasRegistradas($matricula){\n return false;\n }", "public function isEuRegistered();", "function Register(){\n\n\t\t$sql = \"select * from USUARIOS where login = '\".$this->login.\"'\";\n\n\t\t$result = $this->mysqli->query($sql);\n\t\tif ($result->num_rows == 1){ // existe el usuario\n\t\t\t\treturn 'El usuario ya existe';\n\t\t\t}\n\t\telse{\n\t \t\treturn true; //TEST : El usuario no existe\n\n\t}\n}", "function registrar(){\n\n\t\t\t\n\t\t$sql = \"INSERT INTO USUARIOS (\n\t\t\tlogin,\n\t\t\tpassword,\n\t\t\tnombre,\n\t\t\tapellidos,\n\t\t\temail,\n\t\t\tDNI,\n\t\t\ttelefono,\n\t\t\tFechaNacimiento,\n\t\t\tfotopersonal,\n\t\t\tsexo\n\t\t\t) \n\t\t\t\tVALUES (\n\t\t\t\t\t'\".$this->login.\"',\n\t\t\t\t\t'\".$this->password.\"',\n\t\t\t\t\t'\".$this->nombre.\"',\n\t\t\t\t\t'\".$this->apellidos.\"',\n\t\t\t\t\t'\".$this->email.\"',\n\t\t\t\t\t'\".$this->DNI.\"',\n\t\t\t\t\t'\".$this->telefono.\"',\n\t\t\t\t\t'\".$this->FechaNacimiento.\"',\n\t\t\t\t\t'\".$this->fotopersonal.\"',\n\t\t\t\t\t'\".$this->sexo.\"'\n\n\t\t\t\t\t)\";\n\t\t\t\t\t\t\t\t\n\t\tif (!$this->mysqli->query($sql)) { //Si la sentencia sql no devuelve información\n\t\t\treturn 'Error de gestor de base de datos';\n\t\t}\n\t\telse{\n\t\t\treturn 'Inserción realizada con éxito'; //si es correcta\n\t\t}\t\t\n\t}", "function RegisterPerson()\n {\n if(!isset($_POST['submitted']))\n {\n return false;\n }\n // Maak een Array\n $formvars = array();\n \n $this->CollectRegistrationSubmissionPerson($formvars);\n \n \n if(!$this->SaveToDatabasePerson($formvars))\n {\n return false;\n }\n \n return true;\n }", "public function registrar($conexion,$nombre,$apellido,$edad,$telefono,$direccion){ \r\n //PROCEDIMIENTO ALMACENADO\r\n $query=\"call registrar_acudiente('$nombre','$apellido',$edad,'$telefono','$direccion')\"; \r\n $consulta=mysqli_query($conexion,$query);\r\n if ($consulta){\r\n $respuesta=\"Acudiente Registrado\";\r\n }else{\r\n $respuesta=\"Problema al registrar \".mysqli_error($conexion);\r\n }\r\n return $respuesta;\r\n }", "public function is_registered($name)\n {\n }", "function reg_Empleado($ife, $name, $apellido, $dir, $tel, $ciudad) {\n\t\t\t$bit = false;\n\t\t\t$existe = $this->query_Registro('empleados', 'ife', $ife);\n\t\t\tif ($existe) {\n\t\t\t\techo \"<script>alert('La clave para el Empleado ya se encuentra registrada, intente de nuevo.');</script>\";\n\t\t\t}else{\n\t\t\t\t$sql_Reg = 'INSERT INTO empleados (IFE, nombre, apellido, direccion, telefono, ciudad)' .\n\t\t\t\t\t\t\t'VALUES (\"'.$ife.'\", \"'.$name.'\", \"'.$apellido.'\", \"'.$dir.'\", \"'.$tel.'\", \"'.$ciudad.'\")';\n\t\t\t\t$sql_Res = $this->conn->query($sql_Reg);\n\t\t\t\tif ($sql_Res) {\n\t\t\t\t\t$bit = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $bit;\n\t\t\t$this->conn->close();\n\t\t}", "public function registrarPersona($row, $ot, $itemf, $noValid)\n {\n $this->load->model('persona_db', 'per');\n $personas = $this->per->getBy(\"identificacion\", $row['C'], \"persona\");\n $row['A'] = '';\n if($personas->num_rows() < 1){\n $obj = new stdClass();\n $obj->identificacion = str_replace( array(',','.') , array('',''), $row['C']);\n $obj->nombre_completo = $row['D'];\n $obj->fecha_registro = date('Y-m-d');\n $this->per->addObj($obj);\n $row['A'] = 'Agregada persona - ';\n }\n if( $row['K'] != 'propio' && $row['K'] != 'externo') {\n $row['A'] = 'No se ha especificado correctamente si es propio o externo (minusculas)';\n }elseif( $this->per->existePersona( $row['C'] ) ){\n $recursos = $this->per->getRecursoOT($row[\"C\"], $ot->idOT, $itemf->iditemf, $row['J']);\n if ($recursos->num_rows() < 1) { //si no existe el recurso add\n $this->load->model('recurso_db','recurso');\n $propietario_recurso = $row['K']=='propio'?true:false;\n $id = $this->recurso->add($row['H'], date('Y-m-d'), $row[\"F\"], $row['E'], $row['I'], $row['C'], 'persona');\n $this->recurso->addRecursoOT($id, $ot, $itemf, TRUE, TRUE, 'persona', NULL, NULL, $propietario_recurso, $row['J']);\n $row['A'] = $row['A'].'Agregado Recurso';\n }else{\n $row['A'] = 'Registro ya existente';\n }\n }\n return $row;\n }", "public function registrarConsulta(){\n\t\tConexion::getConexion();\n\t\t$con = Conexion::$conexion;\n\t\t$ins = $con->prepare(\"INSERT INTO consulta(idconsulta, idpaciente, fechaconsulta, consulta) VALUES (:idconsulta,:idpaciente,:fechaconsulta,:consulta)\");\n\t\t$ins->execute(array(\n\t\t\t\":idconsulta\" => 0,\n\t\t\t\":idpaciente\" => $this->getIdPaciente(),\n\t\t\t\":fechaconsulta\" => $this->getFechaConsulta(),\n\t\t\t\":consulta\" => $this->getConsultaCadena()\n\t\t\t));\n\t\tConexion::killConexion();\n\t\tif ($ins) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "function registrar_usuario($identificacion,$nombre,$apellidos,$correo,$password)\n\t{\n\t\t$respuesta= array();\n\t\t$usuario = new Usuario();\n\t\t$existe_usuario = $usuario->consultar_usuario($correo);\n\t\tif (empty($existe_usuario)) {\n\t\t\t$usuario_nuevo = $usuario->registrar_usuario($identificacion,$nombre,$apellidos,$correo,$password);\n\t\t\t$respuesta[\"usuario_nuevo\"]=$usuario_nuevo;\n\t\t\tif ($usuario_nuevo) {\n\t\t\t\t$respuesta[\"valor\"]=1; \n\t\t\t} else{\n\t\t\t\t$respuesta[\"valor\"]=0; \n\t\t\t}\n\t\t} else{\n\t\t\t$respuesta[\"valor\"]=2; \n\t\t}\n\t\techo json_encode($respuesta);\n\n\t}", "function registrar_usuario($nombre, $apellido, $usuario, $email, $clave){\n\n\t$nombre = escapar($nombre);\n\t$apellido = escapar($apellido);\n\t$usuario = escapar($usuario);\n\t$email = escapar($email);\n\t$clave = escapar($clave);\n\n if(email_existe($email)){\n\n \treturn false;\n }else if (usuario_existe($usuario)){\n\n return false;\n } else{\n\n \t$clave = md5($clave);\n\n \t$validacion = MD5($usuario . microtime()); //en este caso para concatenar en vez de un \".\" tb se puede usar \"+\"\n\n $sql = \"INSERT INTO usuarios(nombre, apellido, usuario, email, clave, validacion, activar) \n VALUES('$nombre','$apellido', '$usuario', '$email', '$clave','$validacion', 0)\";\n \n $resultado = query($sql);\n \n\n $sujeto = \"Activar cuenta\";\n\n $msj = \"Por favor haz click en el link para activar tu cuenta\n http://localhost/login/activate.php?email=$email&codigo=$validacion\n \";\n\n $headers= \"From: [email protected]\";\n\n enviar_email($email,$sujeto, $msj, $headers);\n\n return true;\n\n } \n\n\n}", "function registrar_usuario($datos = array()){\n if(empty($datos)||!($datos['perfil']!=''&&$datos['email']!=''&&$datos['contrasena']!='')){return false;}\n $sql = sprintf(\"INSERT INTO `login` (`cloud`,`perfil`,`nombres`,`apellidos`,`email`,`telefono`,`contrasena`) SELECT * FROM (SELECT %s,%s,%s,%s,%s,%s,%s) AS `tmp` WHERE NOT EXISTS (SELECT `email` FROM `login` WHERE `email` = %s AND `cloud` = %s)\",varSQL(__sistema),varSQL($datos['perfil']),varSQL((!isset($datos['nombres']))?'':$datos['nombres']),varSQL((!isset($datos['apellidos']))?'':$datos['apellidos']),varSQL($datos['email']),varSQL((!array_key_exists('telefono',$datos))?'':$datos['telefono']),varSQL(md5($datos['contrasena'])),varSQL($datos['email']),varSQL(__sistema));\n return consulta($sql);\n}", "function registrar(){\r\n\r\n include('config.php');\r\n\r\n date_default_timezone_set('America/Cuiaba');\r\n $pdo = new PDO('mysql:host='.HOST.';dbname='.DATABASE, USUARIO, SENHA);\r\n\r\n $cursos = array('Engenharia da Computação', 'Engenharia de Controle e Automação', 'Engenharia de Minas', 'Engenharia de Trasportes', 'Engenharia Quimica');\r\n \r\n $nome = $_POST['nome'];\r\n $email = $_POST['email'];\r\n $rga = $_POST['rga'];\r\n $semestre = $_POST['semestre']; \r\n $data = date('Y-m-d H:i:s');\r\n $senha = $_POST['senha'];\r\n $confirmaSenha = $_POST['confirmaSenha'];\r\n $curso = '';\r\n \r\n for($i = 1; $i <= 5; $i++){ //verificando qual o curso pelo rga\r\n\r\n if($rga['9'] == $i)\r\n $curso = $cursos[$i];\r\n \r\n \r\n }\r\n \r\n\r\n $sql = $pdo->prepare(\"INSERT INTO `tabela_estudantes` VALUES (null,?,?,?,?,?,?,?)\"); //inserirndo na tabela vendas\r\n\r\n $sql->execute(array($nome, $senha, $data, $email, $curso, $semestre, $rga));\r\n\r\n echo '<h6 style=\"color: rgb(255, 255, 255);\">Usuario registrado com sucesso!</h6>';\r\n\r\n }", "function is_registered($name) {\n if ($this->registered_objects[$name] == true)\n return true;\n return false;\n }", "public function registrar()\r\n\t{\r\n\t\t//Se debe agregar el checkbox de terminos y condiciones y debe ser un enlace tipo _blank\r\n\t\tView::template('default');\r\n\t\tif(Input::hasPost('correo')){\r\n\t\t\tif((New Proveedor)->registrar()){\r\n\t\t\t\tFlash::valid('Registro exitoso, ya puede iniciar sesión con su cuenta, lo estamos redirigiendo al inicio de sesión');\r\n \t\tInput::delete();\r\n \t\tRedirect::to('', '5');\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tFlash::error('No se pudo registrar, intente más tarde o comuniquese con soporte');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function checkRegistered(){\n $registered_user=User::find('all',array('conditions' => array('email=? and active=1',$this->email)));\n $registered_user_id='';\n if(!empty($registered_user)){\n foreach($registered_user as $user){\n $registered_user_id=$user->id;\n }\n $this->user_id=$registered_user_id;\n }\n return null;\n }", "public function isRegistered(){\n return isset($this->data['id']);\n }", "function usuario_existe($usuario){\n\t$sql = \"SELECT id FROM usuarios WHERE usuario = '$usuario'\";\n\n\t$resultado = query($sql);\n\n\tif(contar_filas($resultado) == 1){\n\n\t\treturn true;\n\t} else{\n\t\treturn false;\n\t}\n\n}", "function registrarUsuario(){\n\n\t require(\"Conexion.php\");\t\n\t \n if(isset($_POST['insertar'])){\n\t\n\t $nombre=$_POST[\"nombre\"];\n $apellido=$_POST[\"apellido\"];\n\t $correo=$_POST[\"correo\"];\n\t $direccion=$_POST[\"direccion\"];\n\t $username=$_POST[\"nombre\"];\n\t $password=$_POST[\"password\"];\n\n\t $db=new Conexion();\n\t\n\t\t /* evitar duplicaciones*/\t\t\n $sql = \"select count(*) from datos_usuario where nombre ='$nombre'\";\n\t\t\n if ($resultado = $db->connect()-> query($sql)) {\n\n /* Comprobar el número de filas que coinciden con la sentencia SELECT */\n if ($resultado->fetchColumn() > 0) {\n\n /* Ejecutar la sentencia SELECT para mostrar el nombre duplicado*/\n $sql = \"select nombre from datos_usuario where nombre = '$nombre'\";\n foreach ($db->connect()->query($sql) as $fila) {\n \n\t\t $duplicado=$nombre;\n }\t\n\n\t echo '<script language=\"javascript\">alert(\"Usuario duplicado: '.$duplicado.' ya esta en uso.\");</script>';\n\n echo \"<script>\n setTimeout(function() {\n location.href = '../vista/registro_user.php';\n }, 0001);\n </script>\";\t\t\t \n }\n \n /* No coincide ningua fila inserta */\n else {\t\t\n\t\t\t/*no hay duplicaciones insertamos*/\n\t\n $query=$db->connect()->prepare(\"insert into datos_usuario (nombre, apellido, correo, direccion)\n\t values (:nombre, :apellido, :correo,:direccion)\");\t\t\t \n $query->execute(array(\":nombre\"=>$nombre, \":apellido\"=>$apellido,\":correo\"=>$correo,\"direccion\"=>$direccion));\n\t\n\t/*----------------segunda tabla-----------------------------*/\n\t $db=new Conexion();\n\t \n\t $sql2=\"insert into usuarios(username, password, rol_id) values (:username, :password, :rol_id)\";\n\t $query=$db->connect()->prepare($sql2);\n\t\t\t \n $query->execute(array(\":username\"=>$nombre, \":password\"=>$password, \":rol_id\"=>2));\n\t\n\t\t echo'<script type=\"text/javascript\">\n alert(\"Usuario registrado\");\n </script>';\n\t\n\t \n\t echo \"<script>\n setTimeout(function() {\n location.href = '../vista/login.php';\n }, 0001);\n </script>\";\t\n\t\t } \t\n }\n }\n }", "function registrati()\n{\n global $connection;\n if (isset($_POST['registrati'])) {\n $name = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['name']);\n $cognome = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['cognome']);\n $email = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['email']);\n $citta = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['citta']);\n $telefono = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['telefono']);\n $username = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['username']);\n $password = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['password']);\n\n $select_username = \"SELECT * FROM users WHERE user_username='$username'\";\n $result_select = mysqli_query($connection, $select_username);\n\n if (mysqli_num_rows($result_select) == 0) {\n $registrati_dati_user = \"INSERT INTO users (user_name,user_surname,user_username,user_password,user_email,user_phone,user_city,user_livel) VALUES ('$name','$cognome','$username','$password','$email','$telefono','$citta',1)\";\n\n $result_registrati = mysqli_query($connection, $registrati_dati_user);\n\n if ($result_registrati) {\n echo \"<script>\n alert('I datti sono stati registrati');\n window.location.href='loginPage.php';\n </script>\";\n }\n } else {\n echo \"<script>\n alert('Non puoi usare questo username');\n window.location.href='registrati.php';\n </script>\";\n }\n }\n}", "public function firstRegistration():bool\n {\n // SQL request\n $sql = \" SELECT COUNT(*) AS user FROM user\";\n\n // Preparing the sql query\n $requete = $this->DB->prepare($sql);\n\n // Execute the sql query\n $requete->execute();\n\n // Retrieves information\n $reponse = $requete->fetch();\n\n // If there is a record, we return true\n if ((int)$reponse['user'] === 0) {\n return true;\n }\n // else\n return false;\n }", "function Boolean_Existencia_Usuario($username,$email)\n{\n\t$query = consultar(sprintf(\"SELECT email_usuario,usuario FROM tb_usuarios WHERE email_usuario='%s' or usuario='%s'\",escape($username),escape($email)));\n\tif(Int_consultaVacia($query)>0)\n\t{\n\t\treturn array(false,'El usuario o el email ya existen, intenta nuevamente.');\n\t}else\n\t{\n\t\treturn array(true,'');\t\n\t}\n\n}", "public static function informaRegistroExistente($tab){\r\n\t\tutilitario::msgAlerta(false, '--------------------------------------------');\r\n\t\tutilitario::msgAlerta(false, 'Não foi possivel inserir registros na tabelas \"'.$tab.'\"');\r\n\t\tvalidadaDados::registroExitente(false);\r\n\t}", "public function registrar(){\n\n\t\t$nombre = $this->input->post(\"nombre\");\n\n\t\t$primerApellido = $this->input->post(\"primerApellido\");\n\t\t\n\t\t$segundoApellido = $this->input->post(\"segundoApellido\");\n\t\t\n\t\t$telefono = $this->input->post(\"telefono\");\n\t\t\n\t\t$correo = $this->input->post(\"correo\");\n\t\t\n\t\t$direccion = $this->input->post(\"direccion\");\n\t\t\n\t\t$nombreUsuario = $this->input->post(\"nombreUsuario\");\n\t\t\n $contrasenna = $this->input->post(\"contrasenna\");\n \n $verificarNombreExiste = $this->RegistroModel->verificarExistenciaNombreUsuario($nombreUsuario);\n\n\t\tif($verificarNombreExiste == 0){\n\t\t$info = $this->RegistroModel->guardar($nombre,$primerApellido,$segundoApellido,$telefono,$correo,$direccion,$nombreUsuario,$contrasenna);\n\n\t\tif($info){\n\t\techo '<script type=\"text/javascript\">alert(\"Sus datos se han registrado exitosamente\")</script>';\n\n\t\t// redirect(site_url(\"Login\"));\n\t\t$this->load->view(\"Login\");\n\t\t}\n\t}\n\telse{\n\t\techo '<script type=\"text/javascript\">alert(\"Registro fallido, este nombre de usuario ya se encuentra en uso\")</script>';\n\n\t\t$this->load->view(\"Registro\");\n }\n\n\t}", "function existeGrupo($entrada) {\n $grupo = trim(filter_var($entrada, FILTER_SANITIZE_STRING));\n $con = crearConexion();\n\n $query = \"SELECT `nombre` FROM `grupo` WHERE nombre = '$grupo'\";\n $result = mysqli_query($con, $query);\n\n cerrarConexion($con);\n return mysqli_num_rows($result) > 0;\n}", "function isUserRegistered()\r\n{\r\n $statusFlag = FALSE;\r\n \r\n // if user has previously registered, return true;\r\n if( isset($_COOKIE[\"user_email\"] ))\r\n $statusFlag = TRUE;\r\n\t \r\nreturn $statusFlag;\r\n\r\n}", "public function ouvrir()\n {\n // On enregistre l'ouverture\n if ($this->set('mission_statut', 1)) {\n return true;\n } else {\n return false;\n }\n }", "function NeedToRegister(){\n \t$HTML = '';\n\n \t$HTML .= _JNEWS_REGISTER_REQUIRED . '<br />';\n\n\t\t $text = _NO_ACCOUNT.\" \";\n\t\t if ( isset( $GLOBALS[JNEWS.'cb_integration'] ) && $GLOBALS[JNEWS.'cb_integration'] ) {\n\t\t\t $linkme = 'option=com_comprofiler&task=registers';\n\t\t } else {\n\t\t \tif( version_compare(JVERSION,'1.6.0','>=') ){ //j16\n\t\t \t\t$linkme = 'option=com_users&view=registration';\n\t\t \t} else {\n\t\t \t\t$linkme = 'option=com_user&task=register';\n\t\t \t}\n\t\t }\n\n\t\t $linkme = jNews_Tools::completeLink($linkme,false);\n\n\t\t $text .= '<a href=\"'. $linkme.'\">';\n\t\t $text .= _CREATE_ACCOUNT.\"</a>\";\n\t\t $HTML .= jnews::printLine( $this->linear, $text );\n\n \treturn $HTML;\n }", "function is_course_registered($course_id) {\n $course = new CourseTbl($course_id);\n $course->Get() or error(\"Course not found\");\n global $logged;\n global $login_uid;\n if (!$logged)\n error(\"Please login first\");\n $couresReg = new CourseRegTbl();\n $courseReg = new CourseRegTbl();\n $arr = array(\"course_id\" => $course_id, \"uid\" => $login_uid);\n return $courseReg->GetByFields($arr);\n}", "function register()\n\t\t{\n\n\t\t if(!empty($_POST['email']) && !empty($_POST['password'])&& !empty($_POST['nombre'])){\n\n\t\t $email=filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\n\t\t $password=filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n\t\t $name=filter_input(INPUT_POST, 'nombre', FILTER_SANITIZE_STRING);\n\t\t $new_user=$this->model->register($email,$password,$name);\n\n\t\t if ($new_user == TRUE){ \n\t\t // cap a la pàgina principal\n\t\t header('Location:'.APP_W.'home');\n\t\t }\n\t\t else{\n\t\t // no hi és l'usuari, cal registrar\n\t\t header('Location:'.APP_W.'register');\n\t\t }\n\t\t \t\t}\n\t\t}", "function register()\n{\n if (isset($_POST['submitregister'])) {\n global $connection;\n\n $Nome = $_POST['Nome'];\n $Cognome = $_POST['Cognome'];\n $Email = $_POST['Email'];\n $Telefono = $_POST['Telefono'];\n $Password = $_POST['Password'];\n $Cita = $_POST['Cita'];\n\n $query_count = \"SELECT COUNT(*) AS TotalUsers from users WHERE user_username='$Email'\";\n $result_count = mysqli_query($connection, $query_count);\n $row_count = mysqli_fetch_assoc($result_count);\n if ($row_count['TotalUsers'] < 1) {\n $queryinstert = \"INSERT INTO users(user_name,user_surname,user_username,user_email,user_city,user_livel,user_phone,user_password) VALUES ('$Nome','$Cognome','$Email','$Email','$Cita','1','$Telefono','$Password')\";\n $result_insert = mysqli_query($connection, $queryinstert);\n if ($result_insert) {\n return header('Location: index.php');\n }\n } else {\n echo '<script>alert(\"Attenzione! Con questo email esiste gia un accaunt creato.\")</script>';\n }\n }\n}", "public function sellerCanRegister()\n {\n $input = [\n 'username' => 'iniusername' . Str::random(3),\n 'fullname' => 'ini nama ' . Str::random(4),\n 'email' => 'ini_email' . Str::random(4) . '@gmail.com',\n 'password' => 'P@sswr0d!',\n 'sex' => 0\n ];\n $response = $this->post('/api/seller/register', $input);\n $response->assertStatus(200);\n }", "function is_registered($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 null;\n\t\t}\n\n\t\t//check if user exists\n\t\t$sql = \"SELECT id FROM user WHERE REPLACE(email, \\\".\\\", \\\"\\\") = REPLACE(:email, \\\".\\\", \\\"\\\")\";\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\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "function alumno_registra_entrada($codigo_curso,$codigo_alumno,$entrada){\r\n\t\t$cn = $this->conexion();\r\n \r\n if($cn!=\"no_conexion\"){\r\n \t\r\n \t$sql=\"update $this->nombre_tabla_blog set eliminable=0 where codigo_curso='$codigo_curso' and codigo_alumno='$codigo_alumno'\";\r\n \t\r\n \t$rs = mysql_query($sql,$cn);\r\n \t\r\n\t \t$sql=\"insert into $this->nombre_tabla_blog (codigo_curso,codigo_alumno,entrada,persona_responde,fecha,hora) values ('$codigo_curso','$codigo_alumno','$entrada','A',curdate(),curtime() )\";\r\n\t\t\t\r\n\t $rs = mysql_query($sql,$cn);\r\n \r\n\t\t\tmysql_close($cn);\r\n\r\n\t\t\treturn \"mysql_si\";\r\n\t\t}else{\r\n\t\treturn \"mysql_no\";\r\n\t\t}\r\n\t}", "public function register_user()\n {\n \n return true;\n \n }", "public static function checkOwnerExisting()\n {\n global $mainframe;\n $db = JFactory::getDbo();\n $db->setQuery(\"Select count(id) from #__osrs_agents where agent_type <> '0' and published = '1'\");\n $count = $db->loadResult();\n if ($count > 0) {\n return true;\n } else {\n return false;\n }\n }", "private function existeusuario2($usuario)\n {\n $stmt = $this->con->prepare(\"SELECT id_conductor FROM `descuento` WHERE id_conductor = ?\");\n $stmt->bind_param(\"s\", $usuario);\n $stmt->execute(); \n $stmt->store_result();\n return $stmt->num_rows > 0;\n }", "public function registradoAction()\n {\n //Vacio\n }", "public function ulogiraj_registiraj()\r\n\t{\r\n\t\tif(isset($_POST['ulogiraj']))\r\n\t\t{\r\n\t\t\t$this->registry->template->title = 'Login';\r\n\t\t\t$this->registry->template->show( 'login' );\r\n\t\t}\r\n\t\tif(isset($_POST['registriraj']))\r\n\t\t{\r\n\t\t\t$this->registry->template->title = 'Registriraj se';\r\n\t\t\t$this->registry->template->show( 'register' );\r\n\t\t}\r\n\r\n\t}", "function is_user_registered() {\n global $my_database;\n \n $query_string = \"SELECT * FROM `xdr_user` WHERE `email` = '\" . $_POST['email'] . \"'\";\n $my_result = $my_database->send_query($query_string);\n $my_database->close_connection();\n \n if ($my_result->num_rows == 0)\n launch_error(\"This mail is already present in our database.\");\n}", "function buscar() //funcion para ver si el registro existe \n\t{\n\t$sql=\"select * from slc_unid_medida where nomenc_unid_medida= '$this->abr' and desc_unid_medida= '$this->des'\"; \n\t $result=mysql_query($sql,$this->conexion);\n\t $n=mysql_num_rows($result);\n\t if($n==0)\n\t\t\t return 'false';\n\t\t\telse\n\t\t\t return 'true';\n\t}", "function verificarComprobante($fecha)\n {\n global $db;\n $sql = \" select count(dateReception) as total from almacen_reception\n where tipoTrans = 'A' and tipoComprobante = 'A';\n and dateReception >= '$fecha' \";\n echo $sql;\n $db->SetFetchMode(ADODB_FETCH_ASSOC);\n \t$info = $db->execute($sql);\n if ($info->fields(\"total\") == 0)\n {\n return 1; // positivo, puede registrar\n }\n else if ($info->fields(\"total\") > 0)\n {\n return 0; // existe ajustes, no puede registrar\n }\n }", "public function registrar($obj) {\n $model = new JornadaLaboral();\n $model = $obj;\n $query = \"\n INSERT jornadas_laborales\n (\n id_adelanto,\n dia_total,\n dia_nosubsidiado,\n ordinario_hora,\n ordinario_min,\n sobretiempo_hora,\n sobretiempo_min)\n VALUES (\n ?,\n ?,\n ?,\n ?,\n ?,\n ?,\n ?); \n \";\n\n $stm = $this->pdo->prepare($query);\n $stm->bindValue(1, $model->getId_adelanto());\n $stm->bindValue(2, $model->getDia_total());\n $stm->bindValue(3, $model->getDia_nosubsidiado()); \n $stm->bindValue(4, $model->getOrdinario_hora());\n $stm->bindValue(5, $model->getOrdinario_min());\n $stm->bindValue(6, $model->getSobretiempo_hora());\n $stm->bindValue(7, $model->getSobretiempo_min());\n\n $stm->execute();\n //$lista = $stm->fetchAll();\n $stm = null;\n return true;\n }", "function is_user_registered($cellphone)\n {\n \n $query=$this->db->query(\"SELECT * FROM xl_account WHERE cellphone='{$cellphone}' AND register_user=0\");\n\n if ($query->num_rows()>0) {\n #if exist return true\n return TRUE;\n }\n\n return FALSE; \n }", "public function registrar_objeto_controlador(){\n\t\t\t$Nombre=mainModelo::limpiar_cadena($_POST['objeto-txt']);\n\t\t\t$Marca=mainModelo::limpiar_cadena($_POST['marcaobjeto-txt']);\n\t\t\t$Modelo=mainModelo::limpiar_cadena($_POST['modeloobjeto-txt']);\n\t\t\t$Cantidad=mainModelo::limpiar_cadena($_POST['cantidadobjeto-txt']);\n\t\t\t$Tipo=mainModelo::limpiar_cadena($_POST['tipoobjeto-txt']);\n\t\t\t$Propietario=mainModelo::limpiar_cadena($_POST['docpropietario-txt']); \n\t\t\t$codigo= objetoModelo::codigo_auto();\n\t\t\t$codigo= ($codigo->rowCount()+1);\n\t\t\t\n\t\t\t$dataobjeto=[\n\t\t \"Codigo\"=>$codigo,\n\t\t\t\t\"Nombre\"=>$Nombre,\n\t\t\t\t\"Marca\"=>$Marca,\n\t\t\t\t\"Modelo\"=>$Modelo,\n\t\t\t\t\"Cantidad\"=>$Cantidad,\n\t\t\t\t\"Tipo\"=>$Tipo,\n\t\t\t\t\"Estado\"=>'A',\n\t\t\t\t\"Propietario\"=>$Propietario\n\t\t\t];\n\t\t\t\n\t\t\t$guardarObjeto=ObjetoModelo::registrar_objeto_modelo($dataobjeto);\n\n\t\t\tif ($guardarObjeto->rowCount()==1) {\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"limpiar\",\n\t\t\t\t\t\"Titulo\"=>\"Objeto registrado\",\n\t\t\t\t\t\"Texto\"=>\"Registro exitoso!\",\n\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t ];\n\t\t }else{\n\t\t\t\t\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"No se ha podido registrar el objeto!\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t }\n\t\t\treturn mainModelo::sweet_alert($alerta);\n\t\t}", "function registrarUsuario($nombre,$apellidos,$email,$edad,$puntos,$passW)\n {\n $consulta =\"INSERT INTO usuario (nombre,apellidos,email,edad,puntos,password) VALUES ('$nombre','$apellidos','$email',$edad,$puntos,'$passW')\";\n if($this->conexion->query($consulta))\n {\n \n }else{ \n echo \"Falló la creación de la tabla: (\" . $this->conexion->errno . \")// \" . $this->conexion->error.\"<br>\";\n }\n }", "function test_aj_user ($user_id,$me,$token){\n\t$query = ('SELECT count( * ) AS coco FROM fb_automate_user WHERE uid ='.$user_id.'');\n\t$res = mysql_query($query) or die(mysql_error());\n\t\n\twhile ($row = mysql_fetch_array($res)){\n\t\tif ($row['coco'] > 0){\n\t\t\techo 'existe ! nb :'.$row['coco'];\n\t\t\t\n\t\t}else {\n\t\t\techo 'existe PAS ! nb : '.$row['coco'].'<br/>';\n\t\t\t// INSERTION NEW CLIENT\n\t\t\t$query = \"INSERT INTO fb_automate_user SET uid = '\".$user_id.\"', lastname='\".mysql_real_escape_string($me['last_name']).\"', firstname='\".mysql_real_escape_string($me['first_name']).\"', token_access = '\".mysql_real_escape_string($token).\"', created_at = NOW(), last_login=NOW() ON DUPLICATE KEY UPDATE last_login = NOW()\";\n\t\t\t$res = mysql_query($query) or die(mysql_error());\n\t\t}\n\t}\n}", "function RegisterPraktijk()\n {\n if(!isset($_POST['submitted']))\n {\n return false;\n }\n // Maak een Array\n $formvars = array();\n \n $this->CollectRegistrationSubmissionPraktijk($formvars);\n \n if(!$this->SaveToDatabasePraktijk($formvars))\n {\n return false;\n }\n return true;\n }", "public function existeUser($acc){\n\t\tUtilidades::_log(\"existeUser($acc)\");\n\t\t$db=DB::conectar();\n\t\t$select=$db->prepare('SELECT * FROM user WHERE account=:account');\n\t\t$select->bindValue('account',$acc);\n\t\t$select->execute();\n\t\t$registro=$select->fetch();\n\t\tif(null != registro['id']){\n\t\t\t$usado=False;\n\t\t}else{\n\t\t\t$usado=True;\n\t\t}\t\n\t\treturn $usado;\n\t}", "private function existeusuario($usuario)\n {\n $stmt = $this->con->prepare(\"SELECT id_conductor FROM `carga` WHERE id_conductor = ?\");\n $stmt->bind_param(\"s\", $usuario);\n $stmt->execute(); \n $stmt->store_result();\n\n return $stmt->num_rows > 0;\n }", "public function esisteUtente($cf)\n {\n //inserisco nella variabile data il valore della variabile database impostato in precedenza\n $data=$this->database;\n // chiamata alla funzione di connessione\n $data->connetti();\n // interrogazione della tabella\n $auth = $data->query(\"SELECT nome FROM utente WHERE codice_fiscale='$cf'\");\n\n // controllo sul risultato dell'interrogazione\n if(mysql_num_rows($auth)==0)\n {\n //utente non esiste \n return false;\n //disconnetto la connessione al database\n $data->disconnetti();\n }\n else\n {\n //l'utente esiste\n return true;\n //disconnetto la connessione al database\n $data->disconnetti();\n }\n }", "function regUser($uname, $disname, $pass, $email) {\n\tglobal $pdo;\n\t\n\t$salt = genSalt();\n\t$phash = hashPass($pass, $salt);\n\t$stmt = $pdo->prepare(\"SELECT * FROM `users` WHERE `display` = :name OR `uname` = :uname OR `email` = :email\");\n\t\n\t$civid = getCiv($disname);\n\tif(!$civid) $civid = createCiv($disname);\n\t\n\t$stmt->bindParam(\":name\", $disname);\n\t$stmt->bindParam(\":uname\", $uname);\n\t$stmt->bindParam(\":email\", $email);\n\t$stmt->execute();\n\tif($stmt->rowCount()) {\n\t\t$user = $stmt->fetch();\n\t\tif($user['uname'] == $uname) return 1;\n\t\tif($user['display'] == $disname) return 2;\n\t\tif($user['email'] == $email) return 3;\n\t}\n\t$stmt->closeCursor();\n\t$stmt = $pdo->prepare(\"INSERT INTO `users` (`citid`, `RegiDate`, `LastLogin`, `uname`, `display`, `phash`, `salt`, `ip`, `email`, `plevel`) VALUES (:civid, NOW(), NOW(), :uname, :disname, :phash, :psalt, '$_SERVER[REMOTE_ADDR]', :email, '[\\\"none\\\"]')\");\n\t$stmt->bindParam(\":civid\", $civid['id']);\n\t$stmt->bindParam(\":uname\", $uname);\n\t$stmt->bindParam(\":disname\", $disname);\n\t$stmt->bindParam(\":phash\", $phash);\n\t$stmt->bindParam(\":psalt\", $salt);\n\t$stmt->bindParam(\":email\", $email);\n\t$stmt->execute();\n\tif($stmt->rowCount()) return false;\n\treturn 4;\n}", "public function checkExistRegiune($nume){\n $sql = \"SELECT nume from regiune WHERE nume = :nume\";\n $stmt = $this->db->pdo->prepare($sql);\n $stmt->bindValue(':nume', $nume);\n $stmt->execute();\n if ($stmt->rowCount()> 0) {\n return true;\n }else{\n return false;\n }\n }", "function existen_registros($tabla, $filtro = '') {\n if (!empty($filtro))\n $sql = \"select count(*) from \" . trim($tabla) . \" where {$filtro}\";\n else\n $sql = \"select count(*) from \" . trim($tabla);\n // print_r($sql);exit;\n $bd = new conector_bd();\n $query = $bd->consultar($sql);\n $row = pg_fetch_row($query);\n if ($row[0] > 0)\n return true;\n else\n return false;\n }", "public function registrar(){\n if ($this->input->is_ajax_request()){\n echo $this->compra->registrar();\n }else{\n show_404();\n }\n }", "public function existeLugar(){\n $modelSearch = new LugarSearch();\n $resultado = $modelSearch->busquedadGeneral($this->attributes);\n if($resultado->getTotalCount()){ \n foreach ($resultado->models as $modeloEncontrado){\n $modeloEncontrado = $modeloEncontrado->toArray();\n $lugar[\"id\"]=$modeloEncontrado['id']; \n #borramos el id, ya que el modelo a registrar aun no tiene id\n $modeloEncontrado['id']=\"\";\n \n //si $this viene con id cargado, nunca va a encontrar el parecido\n if($this->attributes==$modeloEncontrado){\n $this->addError(\"notificacion\", \"El lugar a registrar ya existe!\");\n $this->addError(\"lugarEncontrado\", $lugar);\n }\n }\n }\n }", "public function registrar($Reclamo_ingresado)\n\t\t{\n\n\t\t\t$nombre\t\t\t=$Reclamo_ingresado[\"nombre\"];\n\t\t\t$apellido\t\t=$Reclamo_ingresado[\"apellido\"];\n\t\t\t$dni\t\t\t=$Reclamo_ingresado[\"dni\"];\n\t\t\t$email\t\t\t=$Reclamo_ingresado[\"email\"];\n\t\t\t$Celular\t\t=$Reclamo_ingresado[\"Celular\"];\n\t\t\t$fecha_nacimiento=date(\"y/m/d\");//$Reclamo_ingresado[\"fecha_nacimiento\"];\n\t\t\t$Telefono_fijo\t=$Reclamo_ingresado[\"Telefono_fijo\"];\n\t\t\t$pass\t\t\t=$Reclamo_ingresado[\"pass\"];\n\t\t\t$direccion\t\t=$Reclamo_ingresado[\"direccion\"];\n\t\t\t$fecha_registro\t=date(\"y/m/d\");\n\n\n\n\t\t\t//insertar persona\n\t\t\t/*\t\tINSERT INTO PERSONA( nombre,\n\t\t\t\t\t apellido,\n\t\t\t\t\t dni_persona,\n\t\t\t\t\t fecha_nacimiento,\n\t\t\t\t\t direccion,\n\t\t\t\t\t celular,\n\t\t\t\t\t Telefono_fijo, \n\t\t\t\t\t email, \n\t\t\t\t\t password,\n\t\t\t\t\t fecha_registro\n\t\t\t\t\t )\n\t\t\t\t\tVALUES( 'Franco',\n\t\t\t\t\t\t\t 'Aller', \n\t\t\t\t\t\t\t 37198,\n\t\t\t\t\t\t\t '2001/07/22',\n\t\t\t \t\t\t\t '4 de Abril',\n\t\t\t \t\t\t\t 2284588180,\n\t\t\t \t\t\t\t '',\n\t\t\t \t\t\t\t '[email protected]',\n\t\t\t \t\t\t\t 'fran',\n\t\t\t \t\t\t\t '2020/07/22'\n\t\t\t \t\t\t);\n\t\n\t\t\t\t*/\n\n\t\t\t// El id_persona debe incrementarse solo\n\t\t\t$sql = \"INSERT INTO PERSONA(\n\t\t\t\t\t nombre\t\t\t\t,\n\t\t\t\t\t apellido\t\t\t,\n\t\t\t\t\t dni_persona\t\t,\n\t\t\t\t\t fecha_nacimiento\t,\n\t\t\t\t\t direccion\t\t\t,\n\t\t\t\t\t celular\t\t\t,\n\t\t\t\t\t Telefono_fijo\t\t, \n\t\t\t\t\t email\t\t\t\t, \n\t\t\t\t\t password\t\t\t,\n\t\t\t\t\t fecha_registro\n\t\t\t\t\t )\n\t\t\tVALUES( \n\t\t\t\t\t:nombre\t\t\t\t, \n\t\t\t\t\t:apellido\t\t\t,\t\t\t\t\n\t\t\t\t\t:dni_persona\t\t,\n\t\t\t\t\t:fecha_nacimiento\t,\n\t\t\t \t\t:direccion\t\t\t, \n\t\t\t \t\t:celular\t\t\t,\n\t\t\t \t\t:Telefono_fijo\t\t, \n\t\t\t \t\t:email\t\t\t\t, \n\t\t\t \t\t:password\t\t\t,\n\t\t\t \t\t:fecha_registro\n\t\t\t \t )\";\n\n\n\t\t\t$q=$this->connection(); \n\t\t\t$preparado=$q->prepare($sql);\n\n\t\t\t$preparado->execute(\n\t\t\t\t\t\t\t\tarray\n\t\t\t\t\t\t\t\t\t(\n\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':nombre'\t\t\t\t=>$nombre\t\t\t\t, \n\t\t\t\t\t\t\t\t\t\t':apellido'\t\t\t\t=>$apellido\t\t\t\t,\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t':dni_persona'\t\t\t=>$dni\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t\t':fecha_nacimiento'\t\t=>$fecha_nacimiento\t\t,\n\t\t\t\t\t\t\t\t \t\t':direccion'\t\t\t=>$direccion\t\t\t, \n\t\t\t\t\t\t\t\t \t\t':celular'\t\t\t\t=>$Celular\t\t\t\t,\n\t\t\t\t\t\t\t\t \t\t':Telefono_fijo'\t\t=>$Telefono_fijo\t\t, \n\t\t\t\t\t\t\t\t \t\t':email'\t\t\t\t=>$email\t\t\t\t, \n\t\t\t\t\t\t\t\t \t\t':password'\t\t\t\t=>$pass\t\t\t\t\t,\n\t\t\t\t\t\t\t\t \t\t':fecha_registro'\t\t=>$fecha_registro\n\t\t\t\t\t \t\t\t\t )\n\t\t\t\t\t\t\t\t);\n\n\n\t\t}", "public function register($db,$pseudo,$nom,$prenom,$mdp,$mdpVerif,$email){\n\n $requete = $db->prepare(\"SELECT idClient FROM client WHERE emailClient = :email\");\n $requete->bindParam('email', $_POST['email'], PDO::PARAM_STR_CHAR);\n $requete->execute();\n\n $existingEmail = $requete->fetchObject();\n\n if ($mdp == $mdpVerif && $existingEmail == null) {\n\n //hashage du mot de passe\n $hashMdp = password_hash($_POST['mdp'], PASSWORD_DEFAULT);\n\n $pseudo = htmlentities($pseudo);\n $nom = htmlentities($nom);\n $prenom = htmlentities($prenom);\n $email = htmlentities($email);\n\n $requete = $db->prepare(\"INSERT INTO client (nickNameClient,nameClient,firstNameClient,pwdClient,emailClient) VALUES (:pseudo,:nom,:prenom,:mdp,:email)\");\n $requete->bindParam(':pseudo',$pseudo);\n $requete->bindParam(':nom',$nom);\n $requete->bindParam(':prenom',$prenom);\n $requete->bindParam(':mdp',$hashMdp);\n $requete->bindParam(':email',$email);\n\n $requete->execute();\n\n $connexion = $this->login($db, $_POST['email'], $_POST['mdp']);\n header(\"Location:.\");\n return $connexion;\n }\n return false;\n }", "function ins_permisos($DBcon, $idusuario, $tipousuario)\n {\n\n $query = $this->set_profile($tipousuario,$idusuario);\n\n $stmt = $DBcon->prepare($query);\n\n // check for successfull registration\n if ( $stmt->execute() ) {\n $response['status'] = 'success';\n $response['message'] = '&nbsp; Registro exitoso, Gracias!';\n\n } else {\n $response['status'] = 'error'; // could not register\n $response['message'] = '&nbsp; No se pudo registrar, intente nuevamente más tarde';\n }\n\n return $response;\n }", "private function registrarLocalmente()\n\t{\n\t\t$conexionBd = new ConectorBaseDatos();\n\t\t$conexionBd->Sentencia = sprintf(\"INSERT UsuarioFacebook (IdFacebook, DatosFacebook, ValidadoPor, FbAccessToken) VALUES (%s, %s, NULL, %s)\",\n\t\t$conexionBd->Escapar($this->IdFacebook),\n\t\t$conexionBd->Escapar(addslashes(serialize($this->DatosFacebook))),\n\t\t$conexionBd->Escapar($this->accessToken)\n\t\t);\n\t\t$conexionBd->EjecutarComando();\n\t\t$conexionBd->Desconectar();\n\t}", "function isAccountExist($db, $user_email) {\n $TEST_ACCOUNT_EXIST = \"SELECT user_id FROM user WHERE user_email = ?\";\n $accountExist = false; //Par defaut, le compte n'existe pas\n\n if (!is_null($user_email)) {\n $resultats = $db->prepare($TEST_ACCOUNT_EXIST);\n $resultats->execute(array($user_email));\n\n //Le compte existe\n if ($resultats->rowCount() == 1) {\n $accountExist = true;\n }\n $resultats->closeCursor();\n }\n\n return $accountExist;\n}", "public function registrar_usuario($nombre,$apellido,$genero,$fecha_nacimiento,$correo,$imagen,$contraseña, $type){\n \n \n $nodo_usuario = new Usuario();\n $mysql = new Conexion();\n\n $nodo_usuario->nombre = $nombre;\n $nodo_usuario->apellido = $apellido; \n $nodo_usuario->genero = $genero;\n $nodo_usuario->fecha_nacimiento = $fecha_nacimiento;\n $nodo_usuario->correo = $correo; \n $nodo_usuario->imagen = $imagen; \n $nodo_usuario->contraseña = $contraseña;\n $nodo_usuario->type = $type;\n \n /* aun no esta funcionando esto\n\t $nodo_usuario->nick = $nik;\n\t $nodo_usuario->ciudad_origen = $orig;\n\t $nodo_usuario->lugar_recidencia = $reci; \n\t $nodo_usuario->sitio_web = $web; \n\t $nodo_usuario->facebook = $face;\n\t $nodo_usuario->twitter = $twit;\n\t $nodo_usuario->youtube = $you;\n */ \n \n ModelUsuarios::crearNodoUsuario($nodo_usuario); //crea el nodo del Usuario \n\n $idneo4j = $nodo_usuario->id; //obtengo el id del nodo creado\n \n\n /*\n * Registro de usuario en Mysql\n * \"la url de facebook es importante y no se esta capturando\"\n */\n \n $sql = \"INSERT INTO usuario (\n email,\n idfacebook,\n idneo4j,\n password\n )VALUES(\n '\".$correo.\"',\n '12345678',\n '\".$idneo4j.\"',\n '\".$contraseña.\"'\n );\";\n \n return $mysql->ejecutar_query($sql); \n \n \n \n \n }", "function register()\n\t{\t\n\t\t//echo 'Registering...';\n\t\tif($this->validate())\n\t\t{\n\t\t\t//echo 'Validating...';\n\t\t\tif(!$this->isEmpty())\n\t\t\t{\n\t\t\t\tif(!$this->exists())\n\t\t\t\t{\n\t\t\t\t\t$sql = 'INSERT INTO barcodes\n\t\t\t\t\t\t\tSET barcode = \"'.$this->code.'\",\n\t\t\t\t\t\t\tdate = \"'.NOW_DATE.'\",\n\t\t\t\t\t\t\ttime = \"'.NOW_TIME.'\",\n\t\t\t\t\t\t\tvolunteer = \"'.$_SESSION['ucinetid'].'\"';\n\t\t\t\t\t$this->DB->execute($sql);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$this->error = 'The barcode <strong>'.$this->code.'</strong> is already registered';\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->error = 'There is no Barcode';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "function IfExists($natregno) {\r\n $conn = conn();\r\n $sql = \"SELECT * FROM users WHERE national_id='$natregno'\";\r\n $stmt = $conn->prepare($sql);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll();\r\n if (!empty($result)) {\r\n return 1;\r\n }\r\n return 0;\r\n $conn = NULL;\r\n }", "function verificalogin(){\n if(!isset($this->session->datosusu)){\n return true;\n }\n }", "public\n function registrar_persona_curso($data, $curso_id, $turno_id, $aula_id, $nota, $docente_id, $fechaInicio, $fechaFin, $subtotal, $descuento, $total, $cantidad_hora)\n {\n $this->db->trans_start();\n\n for ($index = 0; $index < $data['contador']; $index++) {\n $data_curso['Cursoid'] = $curso_id;\n $data_curso['turno_id'] = $turno_id;\n $data_curso['aula_id'] = $aula_id;\n $data_curso['DocenteId'] = $docente_id;\n $data_curso['nota'] = $nota;\n $data_curso['Personaid'] = $data['estudiante_id'][$index];\n $data_curso['estado'] = 1;\n $data_curso['fechaRegistro'] = date('Y-m-d H:i:s');\n $data_curso['fechaInicio'] = $fechaInicio;\n $data_curso['fechaFin'] = $fechaFin;\n $data_curso['Subtotal'] = $subtotal;\n $data_curso['Descuento'] = $descuento;\n $data_curso['Total'] = $total;\n $data_curso['CantidadHora'] = $cantidad_hora;\n $data_curso['usuario_id'] = get_user_id_in_session();\n $this->db->insert('PersonaCurso', $data_curso);\n\n }\n\n }", "function regusuario(){\n\t\n\t\n\t$buscarUsuario = \"SELECT * FROM users WHERE email = '$_POST[email]' \";\n\t\n\t$result = mysql_query($buscarUsuario);\n\t\n\t \n\t\n\t$count = mysql_num_rows($result);\n\t\n\tif ($count == 1) {\n\t\techo \"<br />\". \"El email ya a sido tomado.\" . \"<br />\";\n\t\n\t\techo \"<a href='registro.php'>Por favor escoja otro Email</a>\";\n\t}\n\telse{\n\t\n\t\t$query = \"INSERT INTO users (`password`, `name`, `countryCode`, `email`)\n\t\tVALUES (md5('$_POST[password]'),'$_POST[username]','$_POST[pais]','$_POST[email]' )\";\n\t\n\t\tif ( mysql_query($query) === TRUE) {\n\t\n\t\t\techo \"<br />\" . \"<h2>\" . \"Usuario Creado Exitosamente!\" . \"</h2>\";\n\t\t\techo \"<h4>\" . \"Bienvenido: \" . $_POST['username'] . \"</h4>\" . \"\\n\\n\";\n\t\t\techo \"<h5>\" . \"Ingresar al sitio: \" . \"<a href='index.php'>Login</a>\" . \"</h5>\";\n\t\t}\n\t\n\t\n}\n}", "function userExists($username, $name, $email) {\n $dbo =& JFactory::getDBO();\n $query = 'SELECT id FROM #__users ' .\n 'WHERE username = ' . $dbo->quote($username) . ' ' .\n 'AND name = ' . $dbo->quote($name) . ' ' .\n 'AND email = ' . $dbo->quote($email);\n \n $dbo->setQuery($query);\n // Checking subscription existence\n if ($user_info = $dbo->loadObjectList()) {\n if (! empty ($user_info)) {\n $user = $user_info[0];\n return $user->id;\n }\n }\n return false;\n }", "function existeUsuario($usuario){\n\tif (hasKey(BUCKET_USUARIOS,$usuario))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "function reg_Auto($mtl, $mar, $mod, $col, $ant, $pot, $vel, $pre) {\n\t\t\t$bit = false;\n\t\t\t$existe = $this->query_Registro('autos','matricula',$mtl);\n\t\t\tif ($existe) {\n\t\t\t\techo \"<script>alert('La clave para el Empleado ya se encuentra registrada, intente de nuevo.');</script>\";\n\t\t\t}else{\n\t\t\t\t$sql_add = \"INSERT INTO autos (matricula, marca, modelo, color, antiguedad, potencia, velocidad, precio)\" .\n\t\t\t\t\t\t\t\"VALUES ('\".$mtl.\"', '\".$mar.\"', '\".$mod.\"', '\".$col.\"', '\".$ant.\"', '\".$pot.\"', '\".$vel.\"', '\".$pre.\"')\";\n\t\t\t\t$res_add = $this->conn->query($sql_add);\t\t\n\t\t\t\tif ($res_add) {\n\t\t\t\t\t$bit = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $bit;\n\t\t\t$this->conn->close();\n\t\t}", "function autenticado(){\n\tif(isset($_SESSION['DNI'])){//Si existe, existe\n\t\treturn true;\n\t}else{//Si no existe, no existe\n\t\treturn false;\n\t}\n}", "public function guest_completed_registration_form_Successfully_registered_and_checked_in_DB()\n {\n $this->visit('/register')\n ->seePageIs('/register')\n ->type($this->user->name, 'name')\n ->type($this->user->email, 'email')\n ->type($this->user->password, 'password')\n ->type($this->user->password, 'password_confirmation')\n ->press('Register');\n\n\n $this->seeInDatabase('users', ['name' => $this->user->name]);\n }", "function email_existe($email){\n\t$sql = \"SELECT id FROM usuarios WHERE email = '$email'\";\n\n\t$resultado = query($sql);\n\n\tif(contar_filas($resultado) == 1){\n\n\t\treturn true;\n\t} else{\n\t\treturn false;\n\t}\n\n}", "public function registrar($obj) {\n //echo \"\\n\\n\";\n $model = new DiaNoSubsidiado();\n $model = $obj;\n $query = \"\n INSERT INTO dias_nosubsidiados\n (\n id_trabajador_pdeclaracion,\n cantidad_dia,\n cod_tipo_suspen_relacion_laboral,\n estado,\n fecha_inicio,\n fecha_fin)\n VALUES (\n ?,\n ?,\n ?,\n ?,\n ?,\n ?); \n \";\n\n $stm = $this->pdo->prepare($query);\n $stm->bindValue(1, $model->getId_trabajador_pdeclaracion());\n $stm->bindValue(2, $model->getCantidad_dia());\n $stm->bindValue(3, $model->getCod_tipo_suspen_relacion_laboral());\n $stm->bindValue(4, $model->getEstado());\n $stm->bindValue(5, $model->getFecha_inicio());\n $stm->bindValue(6, $model->getFecha_fin());\n\n $stm->execute();\n //$lista = $stm->fetchAll();\n $stm = null;\n return true;\n }", "function activationVerife($jeton) {\n\t\t$resultat = Bdd::connectBdd()->prepare(SELECT.ALL.JETONMAIL.JETONACTIVATION);\n\t\t$resultat -> bindParam(':jeton', $jeton);\n\t\t$resultat -> execute();\n\t\tif($resultat -> rowCount() === 1) {\n\t\t\t$donnee = $resultat -> fetch(PDO::FETCH_ASSOC);\n\t\t\tActivation::activationAuto($donnee['login']);\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "function check_register($pseudo, $password, $confirmpassword, $firstname, $surname, $mail, $areaname)\n{\n\t$field_empty = 0;\n\t$pseudo_exists = 0;\t\n\t$mail_exists = 0;\n\t$password_not_same = 0;\n\t\n\t// Checking empty fields\t \n\tif((empty($pseudo)) || (empty($password)) || (empty($confirmpassword))|| (empty($firstname)) || (empty($surname)) || (empty($mail)) || (empty($areaname)) )\n\t{\n\t\t$field_empty = 1;\n\t}\n\t// Checking pseudo or mail if already existing\n\t\n\t$query = 'SELECT pseudo, mail FROM users';\n\t$result = call_db($query);\n\t\t\n\twhile($donnees = mysql_fetch_array($result))\n\t{\n\t\tif\t(($donnees['pseudo']) == $pseudo || ($donnees['mail']==$mail))\n\t\t{\t\n\t\t\t$pseudo_exists = 1;\t\n\t\t}\n\t\tif\t(($donnees['mail']==$mail))\n\t\t{\t\n\t\t\t$mail_exists = 1;\t\n\t\t}\n\t}\n\t\n\tmysql_free_result($result);\n\tmysql_close();\n\t\n\t// Checking if field password and confirmpassword are same\n\tif($password != $confirmpassword)\n\t{\n\t\t$password_not_same = 1;\n\t}\n\t\t\n\tif($field_empty == 0 && $pseudo_exists == 0 && $mail_exists == 0 && $password_not_same == 0)\n\t{\n\t\tinclude('modeles/valid_register.php');\n\t\tvalid_register($pseudo,$password,$surname,$firstname,$mail,$areaname);\n?>\n\t\t<script language=\"Javascript\">\n\t\t\tdocument.location.replace(\"index.php?page=validation\");\n\t\t</script>\n\t\t<?php\n\t}\n\t\n\techo\"<div id='box2'>\";\n\t\n\tif($field_empty == 1)\n\t{\n\t\techo'<br> Un ou plusieurs champ(s) sont vide(s)<br>';\n\t}\n\tif($pseudo_exists == 1)\n\t{\n\t\techo'<br>Ce pseudo est déja existant ! Merci d\\'en choisir un autre. <br>';\n\t}\n\tif($mail_exists == 1)\n\t{\n\t\techo'<br>Cette adresse e-mail est déja existante !<br>';\n\t}\n\tif($password_not_same == 1)\n\t{\n\t\techo'<br>Les deux mots de passe ne correspondent pas !';\n\t}\n\techo\"</div>\";\n}", "public function verificarLoteExistente()\r\n {\r\n $datos = $_SESSION['idLote'];\r\n $anoImpositivo = $datos[0]->ano_impositivo;\r\n $rangoInicial = $datos[0]->rango_inicial;\r\n $rangoFinal = $datos[0]->rango_final;\r\n \r\n \r\n $busquedaLote = Calcomania::find()\r\n \r\n\r\n ->select('*')\r\n \r\n ->where('nro_calcomania between '. $rangoInicial .' and '.$rangoFinal)\r\n ->andWhere('estatus =:estatus' , [':estatus' => 0])\r\n ->andWhere('ano_impositivo =:ano_impositivo' , [':ano_impositivo' => $anoImpositivo])\r\n ->all();\r\n\r\n\r\n if ($busquedaLote == true){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "function is_user_register($cellphone)\n {\n \n $query=$this->db->query(\"SELECT * FROM xl_account WHERE cellphone='{$cellphone}' AND register_user=1\");\n\n if ($query->num_rows()>0) {\n #if exist return true\n return TRUE;\n }\n\n return FALSE; \n }", "function registerToken()\n {\n $query = \"select fnc_registro_token_diario(?, ?, ?, ?)\";\n\n $umail = $this->_object->getEmail();\n $token = token_gen();\n $from = quote_content($_SERVER['REMOTE_ADDR']);\n $itok = __INTERNAL_TOKEN_HASH__;\n\n $q = $this->_con->prepare($query);\n $q->bindParam(1, $umail);\n $q->bindParam(2, $token);\n $q->bindParam(3, $from);\n $q->bindParam(4, $itok);\n\n if($q->execute()){\n $r = $q->fetch(PDO::FETCH_NUM);\n\n $this->_object->setToken($r[0]);\n\n if(__SEND_TOKENS__ && $this->_object->getToken() == $token):\n if(!$this->_object->sendToken()){\n error_log(\"New token sent.\");\n return 2;\n }\n endif;\n\n return $this->_object;\n }\n return false;\n }", "private function _exists() {\n // taky typ uz existuje ?\n $id = $this->equipment->getID();\n if ($id > 0) {\n $this->flash(\"Také vybavenie už existuje.<br/>Presmerované na jeho editáciu.\", \"error\");\n $this->redirect(\"ape/equipment/edit/$id\");\n }\n }", "function is_cuit_empresa_available($cuit) {\n\t\t$this -> db -> select('1', FALSE);\n\t\t$this -> db -> where('LOWER(cuit)=', strtolower($cuit));\n\n\t\t$query = $this -> db -> get('empresas');\n\t\treturn $query -> num_rows() == 0;\n\t}", "private function valUserExisting(){\n if($this->_personDB->getActive()){\n if($this->logIn()){\n $this->addUserHttpSession();\n $this->_response = 'ok';\n }\n }else{\n $this->_response = '104';\n }\n }", "function is_user_registered_with($service){\n\tglobal $gianism, $wpdb;\n\tswitch($service){\n\t\tcase 'facebook':\n\t\t\t$user_id = get_user_id_on_fangate();\n\t\t\t$sql = <<<EOS\n\t\t\t\tSELECT user_id FROM {$wpdb->usermeta}\n\t\t\t\tWHERE meta_key = 'wpg_facebook_id' AND meta_value = %s\nEOS;\n\t\t\treturn $wpdb->get_var($wpdb->prepare($sql, $signed['user_id']));\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn false;\n\t\t\tbreak;\n\t}\n}", "function userConnecte(){\n\tif(isset($_SESSION['membre'])){\n\t\treturn TRUE;\n\t}\n\telse{\n\t\treturn FALSE;\n\t}\n}", "function revisar_usuario() {\n return isset($_SESSION['nombre']); //valida que exista un nombre en session\n}", "public function EnviarCorreo($guardo, $requisitos)\n {\n $email = $_SESSION['datosContribuyente']['email'];\n\n $solicitud = 'Cambio de Número Catastral';\n\n $nro_solicitud = $guardo;\n\n $enviarEmail = new PlantillaEmail();\n \n if ($enviarEmail->plantillaEmailSolicitud($email, $solicitud, $nro_solicitud, $requisitos)){\n\n return true; \n } else { \n\n return false; \n }\n\n\n }", "public function existeCorreo(){\n $this -> Conexion -> abrir();\n $this -> Conexion -> ejecutar( $this -> ClienteDAO -> existeCorreo());\n $this -> Conexion -> cerrar();\n return $this -> Conexion -> numFilas();\n }", "function mvalidarRegistro() {\n\t\t$conexion = conexionbasedatos();\n\n\t\t$nombre = $_POST[\"nombre\"];\n\t\t$email = $_POST[\"email\"];\n\t\t$contraseña = $_POST[\"password\"];\n\t\t$nickname = $_POST[\"nickname\"];\n\t\t$apellido1 = $_POST[\"apellido1\"];\n\t\t$sexo = $_POST[\"sexo\"];\n\n\t\t//echo \"SEXO: \".$sexo;\n\t\t\n\t\t$contraseña = md5($contraseña);\n\n\t\t$consulta = \"select * \n\t\t\t\t\tfrom final_usuario \n\t\t\t\t\twhere nickname = '$nickname'; \";\n\n\t\tif ($resultado = $conexion->query($consulta)) {\n\t\t\tif ($datos = $resultado->fetch_assoc()) {\n\t\t\t\treturn -2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$consulta = \"insert into final_USUARIO (nickname, nombre, apellido, correo, contraseña, sexo) values ('$nickname', '$nombre', '$apellido1', '$email', '$contraseña', '$sexo');\";\n\n\t\t\t\tif ($resultado = $conexion->query($consulta)) {\n\t\t\t\t\t$_SESSION[\"nickname\"] = $nickname;\n\t\t\t\t\treturn 1;\n\t\t\t\t} else {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "function alreadyExistsPasswordRequestFor($cognome, $nome, $email) {\n if ($this->connectToMySqlWithParams('localhost:3307', 'root', 'myzconun')) {\n //RECUPERA l'id_utente\n $query = sprintf(\"SELECT id_utente FROM scuola.utenti_scuola\" .\n \" WHERE cognome = upper('%s') AND nome = upper('%s') AND email = '%s'\", $cognome, $nome, $email);\n\n $result = mysql_query($query);\n if (mysql_numrows($result) != 1) {\n setcookie('message', mysql_error());\n $this->closeConnection();\n return FALSE;\n } else {\n $row = mysql_fetch_row($result);\n $id_utente = $row[0];\n //Registra la richiesta\n $query = sprintf(\"SELECT * FROM scuola.change_password_request\"\n . \" WHERE from_user = %s AND pending = 1\", $id_utente);\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n $this->closeConnection();\n return FALSE;\n } else {\n if (mysql_num_rows($result) > 0) {\n $this->closeConnection();\n return TRUE;\n }\n $this->closeConnection();\n return FALSE;\n }\n }\n }\n return FALSE;\n }", "function registrarGrupo($nombre, $descripcion, $codgru, $materia, $auxiliar, $fecha_inicio, $fecha_fin, $conn, $docente, $codoc, $codaux,$aula){\n\t\t$sql = \"INSERT INTO grupo (COD_GRUPO, ID_MATERIA, ID_USUARIO, COD_AUXILIAR, DOC_ID_USUARIO, COD_DOCENTE, NOMBRE_GRUPO, FECHA_INI, FECHA_FIN, ID_LABORATORIO) \n\t\tVALUES('$codgru', $materia, $auxiliar, '$codaux', '$docente', '$codoc','$nombre', '$fecha_inicio', '$fecha_fin',$aula)\";\n\t\tmysqli_query($conn, $sql);\n\n\t\t\n\t\t//mysqli_query($conn, $sql);\n\t}", "function alias_existente($alias) {\r\n $db = new MySQL();\r\n $existencia = $db->sql_query(\"SELECT * FROM `usuarios_usuarios` WHERE `alias`='\" . $alias . \"' ;\");\r\n $existe = $db->sql_numrows($existencia);\r\n $db->sql_close();\r\n if ($existe == 0) {\r\n return(false);\r\n } else {\r\n return(true);\r\n }\r\n }", "function aggiungiCliente($username, $password, $nome){\n$query = mysql_query(\"SELECT * FROM utente WHERE username = '\".$username.\"' \");\n\n\n//se non esiste lo aggiungo\nif(mysql_num_rows($query)==0){\n$ins = mysql_query(\"INSERT INTO utente (username,password,nome) values('\".$username.\"', '\".$password.\"', '\".$nome.\"' )\") ;\n\nif($ins){\nreturn true;\n}\n\nelse {\nreturn false;//username non esiste ma l'inserimento non è andato a buon fine\n}\n}\nelse{\nreturn false; //username esiste\n}\n\n\n}", "public function hasPressedRegister(){\n if(isset($_POST[self::$RegisterID])){\n return true;\n }\n return null;\n }", "function is_contest_registered($cid) {\n global $login_uid;\n global $logged;\n if (!$logged)\n return false;\n $reg = new ContestRegistrationTbl();\n return $reg->GetByFields(array('uid' => $login_uid, 'cid' => $cid));\n}", "private function checkUserExistence() {\n\t\t\t\t$query = \"select count(email) as count from register where email='$this->email'\";\n\t\t\t\t$resource = returnQueryResult($query);\n\t\t\t\t$result = mysql_fetch_assoc($resource);\n\t\t\t\tif($result['count'] > 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}", "private static function utenteLoggato(){\n return true;\n }", "function setUsuario($usuario, $contraseña, $nombre, $apellidos, $telefono, $movil){\n\t\t\n\t\t$resultado = conectar()->query( \"SELECT * FROM usuarios WHERE usuario LIKE '$usuario'\");\n\t\tif($resultado->num_rows == 0){\n\t\t\tconectar()->query(\"INSERT INTO usuarios (usuario, contrasenia, nombre, apellidos, telefono, movil) VALUES ('\" . $usuario . \"','\" . $contraseña . \"','\" . $nombre . \"','\" . $apellidos .\"','\" . $telefono . \"','\" . $movil .\"')\");\n\t\t\techo \"<script>alert('Te has registrado correctamente!');document.location.reload();\";\t\n\t\t}else{\n\t\t\techo \"<script>alert('Ya existe ese nombre de usuario!');</script>\";\n\t\t}\n\t}" ]
[ "0.67057556", "0.66372776", "0.64720047", "0.6411881", "0.63014436", "0.6282712", "0.624605", "0.6223444", "0.62157756", "0.61793464", "0.6137691", "0.61083454", "0.6105603", "0.61025655", "0.6067474", "0.6047072", "0.6042757", "0.59967166", "0.59879535", "0.5975312", "0.59739465", "0.5967521", "0.59259194", "0.5909258", "0.58999264", "0.5898489", "0.58901453", "0.5866481", "0.5865334", "0.58626544", "0.58610207", "0.585953", "0.5851432", "0.5845121", "0.58429116", "0.5820909", "0.5818777", "0.5811717", "0.58024275", "0.580213", "0.5798581", "0.5789299", "0.578926", "0.5775901", "0.5771163", "0.5767634", "0.5741491", "0.5739949", "0.57377076", "0.5736777", "0.5731015", "0.5729189", "0.5698063", "0.5695433", "0.56951976", "0.56882465", "0.5685189", "0.5682358", "0.5674196", "0.5668503", "0.5667705", "0.5665746", "0.56632566", "0.56517404", "0.5646424", "0.5646029", "0.5640731", "0.5637934", "0.56297594", "0.5627878", "0.5627036", "0.5621275", "0.5621125", "0.56191415", "0.56142193", "0.56078947", "0.5606091", "0.5605717", "0.5605148", "0.5603111", "0.5602816", "0.56012326", "0.55921745", "0.5591899", "0.55809486", "0.5576623", "0.5573848", "0.5573381", "0.557091", "0.556774", "0.55640084", "0.5563137", "0.55618435", "0.55614525", "0.55614275", "0.55600053", "0.55591476", "0.55569", "0.5556584", "0.5556016", "0.5555355" ]
0.0
-1
comprobar estado de aprobacion de una materia equivalente sea distinto de 1(desaprobado) o 4(libre)
public function check_estado($id_persona,$id_materia){ $this->db->where(array('id_persona'=>$id_persona,'id_materia'=>$id_materia)); $this->db->where_not_in('inscripcion_materia.id_estado_final',array(1,4)); return $this->db->get('inscripcion_materia')->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function promedio_general($vector){ \n $promedio=0;\n foreach ($vector as $key => $value) {\n foreach ($value as $c => $n) {\n $promedio=$promedio+$n;\n }\n }\n return ($promedio/10);\n }", "function calcular_promedio($materias) {\n $sum_notas_uv = 0;\n $sum_uv = 0;\n $resultado = 0;\n\n foreach($materias as $clave => $valor) {\n for ($i=0; $i < count($valor); $i++) { \n $nota = $valor[1];\n $uv = $valor[2];\n\n $sum_notas_uv += $nota * $uv;\n $sum_uv += $uv;\n }\n }\n\n // validar que $sum_uv != 0\n\n $resultado = $sum_notas_uv / $sum_uv;\n return round($resultado, 0);\n}", "function mejor_promedio($vector){\n echo \"<hr> ############# Mejor promedio #############\";\n $promedio=0;\n $cadena;\n foreach ($vector as $key => $value) {\n foreach ($value as $c => $n) {\n if($n>$promedio){\n $promedio=$n;\n $cadena = \"<br>\".$c.\" -->Promedio: \".$n;\n }\n }\n }\n echo $cadena;\n }", "function promedios_por_materia($vector){\n echo \"<hr> ############# Promedios por materia #############\";\n $calificacion1=0;\n $calificacion2=0;\n $calificacion3=0;\n $calificacion4=0;\n $calificacion5=0;\n $calificacion6=0;\n foreach ($vector as $key => $value) {\n $calificacion1=$calificacion1+$vector[$key][0];\n $calificacion2=$calificacion2+$vector[$key][1];\n $calificacion3=$calificacion3+$vector[$key][2];\n $calificacion4=$calificacion4+$vector[$key][3];\n $calificacion5=$calificacion5+$vector[$key][4];\n $calificacion6=$calificacion6+$vector[$key][5];\n }\n $prom=$calificacion1/10;\n echo \"<br> Promedio materia 1: \".$prom;\n $prom=$calificacion2/10;\n echo \"<br> Promedio materia 2: \".$prom;\n $prom=$calificacion3/10;\n echo \"<br> Promedio materia 3: \".$prom;\n $prom=$calificacion4/10;\n echo \"<br> Promedio materia 4: \".$prom;\n $prom=$calificacion5/10;\n echo \"<br> Promedio materia 5: \".$prom;\n $prom=$calificacion6/10;\n echo \"<br> Promedio materia 6: \".$prom;\n }", "public function rgveda_verse_modern($gra) {\n $data = [\n [1,191,1,1,191],\n [192,234,2,1,43],\n [235,295,3,1,62],\n [297,354,4,1,58],\n [355,441,5,1,87],\n [442,516,6,1,75],\n [517,620,7,1,104],\n [621,668,8,1,48],\n [1018,1028,8,59,59], //Vālakhilya hymns 1—11\n [669,712,8,60,103],\n [713,826,9,1,114],\n [827,1017,10,1,191]\n ];\n for($i=0;$i<count($data);$i++) {\n list($gra1,$gra2,$mandala,$hymn1,$hymn2) = $data[$i];\n if (($gra1 <= $gra) && ($gra<=$gra2)) {\n $hymn = $hymn1 + ($gra - $gra1);\n $x = \"$mandala.$hymn\";\n return $x;\n }\n }\n return \"?\"; // algorithm failed\n}", "public function intensidad(){\n if($this->PP03F < 35 && $this->PP03G == 1 && $this->PP03H == 1)\n {\n return 1;\n }\n if($this->caracteristicas->CH06 >= 10 && $this->PP03G == 1 && $this->PP01E == 5)\n {\n return 2;\n }\n if( $this->PP03F > 40)\n {\n return 3;\n }\n if($this->PP01E == 5)\n {\n return 4;\n }\n}", "function f_obj($individu){\n\t\t$cluster = count($individu); //menghitung jumlah cluster berdasarkan individu\n\t\t$target = 10;\n\t\t$hasil = 0;\n\t\tfor ($i=0; $i < $cluster; $i++) { \n\t\t\t$hasil += $individu[$i];\n\t\t}\n\n\t\t$evaluasi = abs($hasil - $target);\n\t\treturn $evaluasi; //nilai fitness masih 0-10\n\t}", "public function getAvancement()\n {\n\n $usecases = $this->getUseCases();\n $diviseur = 0;\n $val = 0;\n foreach ($usecases as $usecase) {\n $diviseur = $diviseur + $usecase->poids;\n $val = $val + ($usecase->poids * $usecase->avancement);\n }\n $resultat = $val / $diviseur;\n\n return $resultat;\n }", "public function adtest() {\n $critical = 1.092; // Corresponds to alpha = 0.01\n $nd = new \\webd\\stats\\NormalDistribution();\n $sorted = $this->sort();\n $n = $this->length();\n $A2 = -$n;\n for ($i = 1; $i <= $n; $i++) {\n $A2 += -(2 * $i - 1) / $n * ( log($nd->cumulativeProbability($sorted->value[$i - 1])) + log(1 - $nd->cumulativeProbability($sorted->value[$n - $i])) );\n }\n $A2_star = $A2 * (1 + 4 / $n - 25 / ($n * $n));\n if ($A2_star > $critical) {\n return FALSE;\n } else {\n // Data seems to follow a normal law\n return TRUE;\n }\n }", "function alumnos_mayores_al_promedio_general($promedio,$vector){\n echo \"<hr> ############# Promedios mayores al promedio general #############\";\n $cont=0;\n foreach ($vector as $key => $value) {\n foreach ($value as $c => $n) {\n if($n>$promedio){\n $cont=$cont+1;\n echo \"<br>\".$c.\" -->Promedio: \".$n;\n }\n }\n }\n echo \"<br> Total: \".$cont;\n\n }", "function promedio_por_alumno($vector){\n $promedios_alumnos=array();\n foreach ($vector as $key => $value) {\n $promedio=0;\n foreach ($value as $c) {\n $promedio=$promedio+$c;\n }\n $promedio=$promedio/6;\n $alumno=array($key=>$promedio);\n array_push($promedios_alumnos,$alumno);\n }\n return $promedios_alumnos;\n }", "public function similarity($id_lbb_aktif = 3) // $id_lbb_aktif adalah lbb yang sedang dilihat dan dicari nilai kemiripan terhapat lbb lain\n {\n $tabel_tf_idf_balik = $this->tabel_tf_idf_balik();\n $rata_term = $this->rata_term();\n $similarity = [];\n\n\n foreach ($tabel_tf_idf_balik as $id_lbb => $row){\n $sim_atas = 0;\n $bawah1 = 0;\n $bawah2 = 0;\n $sim_bawah = 0;\n\n if ($id_lbb == $id_lbb_aktif){ // $id_lbb_aktif adalah LBB yang dicari kemiripannya dengan LBB lain\n continue;\n }\n\n foreach ($row as $term_aktivitas => $tf_idf){\n//\n if ($tf_idf == 0 || $tabel_tf_idf_balik[$id_lbb_aktif][$term_aktivitas] == 0){\n continue;\n }\n\n $sim_atas = $sim_atas + (($tf_idf-$rata_term[$term_aktivitas])*($tabel_tf_idf_balik[$id_lbb_aktif][$term_aktivitas]-$rata_term[$term_aktivitas]));\n $bawah1 = $bawah1 + (pow($tf_idf-$rata_term[$term_aktivitas],2));\n $bawah2 = $bawah2 + (pow($tabel_tf_idf_balik[$id_lbb_aktif][$term_aktivitas]-$rata_term[$term_aktivitas], 2));\n $sim_bawah = sqrt($bawah1)*sqrt($bawah2);\n }\n////\n if ($sim_bawah == 0){ //similarity bawah bernilai 0 terjadi karena tidak ada bisa dicari nilai kemiripan lbb aktif dengan lbb n lainnya\n continue;\n }\n\n $similarity [$id_lbb] = $sim_atas / $sim_bawah;\n }\n// arsort($similarity);\n return $similarity;\n }", "function normalisasi(){\n\n\t\tglobal $ruan;\n\t\tglobal $test;\n\t\tglobal $target;\n\t\tglobal $minR;\n\t\tglobal $maxR;\n\t\tglobal $minT;\n\t\tglobal $maxT;\n\t\tglobal $ruanNorm;\n\t\tglobal $testNorm;\n\t\tglobal $targetNorm;\n\t\t\n\t\tfor ($x=0; $x < count($ruan); $x++) { \n\t\t\t\n\t\t\t$ruanNorm[$x] = ($ruan[$x]-$minR)/($maxR-$minR); //rumus normalisasi rata2 uan\n\t\t\t$testNorm[$x] = ($test[$x]-$minT)/($maxT-$minT);\n\n\t\t\techo $ruanNorm[$x].\"</br>\";\n\t\t\techo $testNorm[$x].\"</br>\";\n\t\t\t\n\t\t\tif ($target[$x] == \"IPA\") {\n\t\t\t\t$targetNorm[$x][0] = 1;\n\t\t\t\t$targetNorm[$x][1] = 0;\n\t\t\t} else if( $target[$x] == \"IPS\"){\n\t\t\t\t$targetNorm[$x][0] = 0;\n\t\t\t\t$targetNorm[$x][1] = 1;\n\t\t\t}\n\n\t\t\t////////////////////////\n\t\t\t// tampilkan normalisasi\n\t\t\t////////////////////////\n\t\t\t\n\t\t\tfor ($i=0; $i < 2; $i++) { \n\t\t\t\techo $targetNorm[$x][$i];\n\t\t\t\tif ($i == 1) {\n\t\t\t\t\techo \"</br></br>\";\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\n\t\t}\n\n\t}", "public function estado(){\n if($this->entrev_realiz == 2)\n {\n return 0;\n }\n if($this->PP01A == 1 || $this->PP01B == 1)\n {\n return 1;\n }\n if($this->PP02B == 1)\n {\n return 2;\n }\n if($this->PP01E == 1 || $this->PP01E == 2 || $this->PP02F == 2)\n {\n return 3;\n }\n if($this->caracteristicas->CH06 < 10){\n return 4;\n }\n\n }", "private function setResult() {\n $result = 0;\n foreach ($this->process AS $key => $value) {\n $total = $value['pivot'] * $value['adj']['result'];\n if($key == 0) {\n $result = $result + $total;\n }\n elseif($key == 1) {\n $result = $result - $total;\n }\n else {\n if($key % 2 == 0) {\n $result = $result + $total;\n }\n else {\n $result = $result - $total;\n }\n }\n }\n unset($key, $value, $total);\n return $result;\n }", "function convmonedaabono($porpagar, $porpagarconv, $abono, $abonoconv){\n\t$abonoconv = ($porpagar*$abono) / $porpagarconv;\n\treturn $abonoconv;\n}", "public function prevision ($value){\n\n for ($i = 0; $i < count($value); $i++){\n for ($j = 0; $j < count($value[0]); $j++){\n $input[$i][$j] = ($value[$i][$j] - $this->min) / ($this->max - $this->min);\n }\n }\n\n $result = 0;\n $net = array();\n $netOut = 0;\n\n $p = -1;\n for ($i = 0; $i < count($input); $i++) {\n for ($h = 0; $h < $this->hiddenNeurons; $h++) {\n for ($j = 0; $j < count($input[0]); $j++) {\n $p++;\n $net[$h] = $this->gBest[$p] * $input[$i][$j];\n }\n }\n for ($g = 0; $g < count($net); $g++) {\n $p++;\n $net[$g] += $this->gBest[$p];\n $net[$g] = $this->sigmoid($net[$g]);\n }\n for ($y = 0; $y < count($net); $y++) {\n $p++;\n $netOut = $this->gBest[$p] * $net[$y];\n }\n $netOut += $this->gBest[$p + 1];\n\n $result = round($this->denormalize($netOut),3);\n\n $netOut = 0;\n $p = -1;\n\n for ($j = 0; $j < count($net); $j++){\n $net[$j] = 0;\n }\n }\n\n // echo $s;\n\n return $result;\n }", "function en_rojo($anio){\n $ar=array();\n $ar['anio']=$anio;\n $sql=\"select sigla,descripcion from unidad_acad \";\n $sql = toba::perfil_de_datos()->filtrar($sql);\n $resul=toba::db('designa')->consultar($sql);\n $ar['uni_acad']=$resul[0]['sigla'];\n $res=$this->get_totales($ar);//monto1+monto2=gastado\n $band=false;\n $i=0;\n $long=count($res);\n while(!$band && $i<$long){\n \n if(($res[$i]['credito']-($res[$i]['monto1']+$res[$i]['monto2']))<-50){//if($gaste>$resul[$i]['cred']){\n $band=true;\n }\n \n $i++;\n }\n return $band;\n \n }", "function conversion($monto, $tasa, $moneda_transaccion, $moneda_proveedor)\n{\n\n if ($moneda_transaccion != $moneda_proveedor) {\n if ($moneda_proveedor == 'Dólares' && $moneda_transaccion == 'Bolívares') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Dólares' && $moneda_transaccion == 'Pesos') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Bolívares' && $moneda_transaccion == 'Dólares') {\n $monto_pago = $monto / $tasa;\n }\n\n if ($moneda_proveedor == 'Bolívares' && $moneda_transaccion == 'Pesos') {\n $monto_pago = $monto * $tasa;\n }\n\n if ($moneda_proveedor == 'Pesos' && $moneda_transaccion == 'Bolívares') {\n $monto_pago = $monto / $tasa;\n }\n\n if ($moneda_proveedor == 'Pesos' && $moneda_transaccion == 'Dólares') {\n $monto_pago = $monto / $tasa;\n }\n } else {\n $monto_pago = $monto;\n }\n\n return $monto_pago;\n}", "function proline($seq1){\n\t$score=0;\n if(preg_match(\"/PP/\",$seq1)) $score = 2.0;\n if(preg_match(\"/PPP/\",$seq1)) $score = 4.0;\n if(preg_match(\"/PPPP/\",$seq1)) $score = 6.0;\n\treturn $score;\n}", "function gl_dijagonala_sve_jedinice($matrica)\n{\n\t// echo ( napravi_tabelu( $matrica ) );\n\t/*\t\n\tif($matrica[$r][$r] != 1)\n\t{\n\t\t$x = $matrica[$r][$r];\n\t\t// print_r($matrica[$r][$r]); echo \", \";\n\t\t// exit();\n\t\t\n\t\tfor($k = 0; $k < count($matrica) + 1; $k++)\n\t\t{\n\t\t\tif($matrica[$r][$k] != 0)\n\t\t\t{\n\t\t\t\t$matrica[$r][$k] = $matrica[$r][$k] / $x;\n\t\t\t}\n\t\t}\n\t}*/\n\t\n\t\n\tfor($r = 0; $r < count($matrica); $r++)\n\t{\n\t\tif($matrica[$r][$r] != 1)\n\t\t{\n\t\t\t$x = $matrica[$r][$r];\n\t\t\t// print_r($matrica[$r][$r]); echo \", \";\n\t\t\t// exit();\n\n\t\t\t// podela citavog reda matrice sa vrednoscu njegove glavne idjagonale\n\t\t\tfor($k = 0; $k < count($matrica) + 1; $k++)\n\t\t\t{\n\t\t\t\tif($matrica[$r][$k] != 0)\n\t\t\t\t{\n\t\t\t\t\t$matrica[$r][$k] = $matrica[$r][$k] / $x;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $matrica;\n}", "function adivinarSexo($array_A){\n $datos=new ManejoDatos();\n $arrayBD =$datos->getEstiloSexoPromedioRecinto();\n if($array_A[0]=='DIVERGENTE'){\n $estilo=4;\n }\n if($array_A[0]=='CONVERGENTE'){\n $estilo=3;\n }\n if($array_A[0]=='ACOMODADOR'){\n $estilo=2;\n }\n if($array_A[0]=='ASIMILADOR'){\n $estilo=1;\n }\n $arrayA = array( $estilo, $array_A[1],($array_A[2] == \"Paraiso\" ? 1 : 2));\n foreach ($arrayBD as $elemento) {\n if($elemento['Estilo']=='DIVERGENTE'){\n $estiloBD=4;\n }\n if($elemento['Estilo']=='CONVERGENTE'){\n $estiloBD=3;\n }\n if($elemento['Estilo']=='ACOMODADOR'){\n $estiloBD=2;\n }\n if($elemento['Estilo']=='ASIMILADOR'){\n $estiloBD=1;\n }\n $arrayB = array($estiloBD, $elemento['Promedio'], $elemento['Recinto'] == \"Paraiso\" ? 1 : 2);\n $temporal = $this->distanciaEuclidiana($arrayA, $arrayB);\n if ($temporal < $this->distancia) {\n $this->distancia = $temporal;\n $this->temporal = $elemento['Sexo'];\n }\n }\n if($this->temporal=='M'){\n $this->temporal=\"Masculino\";\n return $this->temporal;\n }\n if($this->temporal=='F'){\n $this->temporal=\"Femenino\";\n return $this->temporal;\n }\n }", "public function luas_Persegi()\n {\n $hitung = $this->lebar * $this->panjang;\n return $hitung;\n }", "private function calcolaValutazione()\n {\n\n $media=0;\n $i=0;\n foreach ($this->valutazioni as &$value){\n $media=$media+$value->getvoto();\n $i++;}\n $this->valutazione=$media/$i;\n\n }", "function precio($precioUnidad, $cantidad, $descuento = 0 ){ // las variables que tenemos son arbitrarias, por lo cual hay que mirar bien si ponerlas en () de la funcion\n\n\n\n$multiplicar = $precioUnidad * $cantidad;\n\n// $descuento es un porcentaje\n\n// $restar = $multiplicar - $descuento; // este descuento debe ir en % por lo cual no es lo mismo que un entero, por lo cual lo colocaremos en entero\n\n\n// si esto fuera un porcentaje entonces seria $multiplicar = $precioUnidad * $cantidad; // $porcentaje = $multiplicar - $descuento; // $solucion = $multiplicar - $porcentaje; lo cual es lo que haremos\n\n$porcentaje = $multiplicar * $descuento;\n\n$solucion = $multiplicar - $porcentaje;\nreturn $solucion;\n// si colocamos todos los datos en solo sitio o una sola linea, sin especificar es e novatos, porque hay que haber un orden\n\n}", "public function ruta_critica()\n {\n $this->tpi_mas_dij();\n $this->tp_j();\n $this->ttj_menos_dij();\n $this->tt_i();\n\n // Identificaión de las actividades de la ruta crítica\n $this->identificacion();\n // TT¡ (2) = TP¡ (0)\n // TTj (3) = TPj (1)\n // TTj (3) - TT¡ (2) = TPj (1) - TP¡ (0) = d¡j\n $ruta_critica = [[]];\n $num_act = -1;\n $this->tablero->imprimir(false);\n for ($m = 0; $m < $this->d->_m; $m++) {\n for ($n = 0; $n < $this->d->_n; $n++) {\n if ($this->d->_datos[$m][$n] >= 0 && $n < $this->d->_n) {\n $num_act++;\n $ruta_critica[$num_act][0] = 0;\n if ($this->tablero->_datos[$num_act][3] !== $this->tablero->_datos[$num_act][1]) continue;\n if ($this->tablero->_datos[$num_act][4] !== $this->tablero->_datos[$num_act][2]) continue;\n if ($this->tablero->_datos[$num_act][4] - $this->tablero->_datos[$num_act][3] !== $this->d->_datos[$m][$n]) continue;\n if ($this->tablero->_datos[$num_act][2] - $this->tablero->_datos[$num_act][1] !== $this->d->_datos[$m][$n]) continue;\n //echo \"num: $num_act: \" . $this->tablero->_datos[$num_act][0] . ' ' . $this->tablero->_datos[$num_act][1] . ' '. $this->tablero->_datos[$num_act][2] . ' ' . $this->tablero->_datos[$num_act][3] . '<br>';\n //echo \"num: $num_act<br>\" ;\n $ruta_critica[$num_act][0] = 1;\n }\n }\n }\n $tablero_index = new Matriz([\n ['ACT','TPi', 'TPj', 'TTi', 'TTj', 'dij', 'ITij', 'FPij', 'HTij', 'HLij']\n ]);\n $RC = new Matriz($ruta_critica);\n $RC->imprimir(true);\n $tablero_index->imprimir(true);\n\n }", "function rp($nominal) {\n //mengupdate nominal menjadi string, takutnya yang dimasukkan bertipe data int (angka)\n //mengeset string kosong buat penampung nanti, dan counter $c = 0\n $nominal = strval($nominal); $r = ''; $c = 0;\n $nominal = explode('.', $nominal); //memisah jika terdapat titik, takutnya ada titik seperti 4000.00\n $nominal = $nominal[0]; //mengambil data index pertama sebelum titik, berarti mengambil 4000-nya\n $nominal = explode('-', $nominal); //jika ada tanda minus di depan, maka akan dipecah lagi berdasarkan tanda minus tsb\n if (sizeof($nominal)>1) { //jika ternyata array yang dihasilkan oleh pemecahan tanda minus berjumlah lebih dari 1, berarti angka tersebut memang minus\n $min = '-'; $nominal = $nominal[1]; //dilakukan pemisahan dengan index 0 nin dan nominalnya di array index 1\n } else {\n $min = ''; $nominal = $nominal[0]; //jika tidak, maka memang bukan angka minus dan $min diset string kosong agar tidak berpengaruh saat direturn\n }\n for ($x=strlen($nominal)-1; $x>=0; $x--) { //diulang sebanyak string tapi dari belakang\n $r = $nominal[$x].$r; $c++; //menambah string kosong $r dengan index nominal dari belakang sambil menambah counter ($c)\n //jika counter kelipatan 3, maka saatnya ditambahkan dengan titik\n //misalnya 10000000, maka tiap perulangan 3x dari belakang akan ditambah titik, sehingga menjadi 10.000.000\n if ($c%3==0 & $x>0) $r = \".\".$r;\n }\n //mereturn hasil tadi, dengan tanda minusnya, tetapi jika tidak minus makan tidak akan mengganggu, karena variabel $min diisi string kosong di atas\n //return ditambahkan dengan ,00 dibelakang dan tanda Rp di depan sehingga berformat Rp ##.###,00\n return 'Rp '.$min.$r.',00';\n}", "function grade_vendamensal($con, $codestabelec, $codproduto){\r\n\t/*\r\n\t * Tratamento feito para o Mihara (gambiarra)\r\n\t * Apagar em breve.\r\n\t * Murilo Feres (13/08/2017)\r\n\t */\r\n\tif(param(\"SISTEMA\", \"CODIGOCW\", $con) == \"1238\"){\r\n\t\t$query = \"SELECT * FROM(SELECT ano, mes, SUM(quantidade) AS quantidade \";\r\n\t\t$query .= \"FROM consvendames \";\r\n\t\t$query .= \"WHERE codproduto = \".$codproduto.\" \";\r\n\t\t$query .= \" AND ((ano = \".(date(\"Y\") - 1).\" AND mes >= \".date(\"m\").\") OR (ano = \".date(\"Y\").\" AND mes <= \".date(\"m\").\")) \";\r\n\t\tif(strlen($codestabelec) > 0){\r\n\t\t\tif(in_array((int) $codestabelec, array(4, 5))){\r\n\t\t\t\t$codestabelec = \"4, 5\";\r\n\t\t\t\t$query .= \" AND (codestabelec != 4 OR (mes < 8 AND ano = 2017) OR ano < 2017) \";\r\n\t\t\t}\r\n\t\t\tif(in_array((int) $codestabelec, array(3, 8))){\r\n\t\t\t\t$codestabelec = \"3, 8\";\r\n\t\t\t\t$query .= \" AND (codestabelec != 3 OR (mes < 6 AND ano = 2018) OR ano < 2018) \";\r\n\t\t\t}\r\n\t\t\t$query .= \" AND codestabelec IN (\".$codestabelec.\") \";\r\n\t\t}\r\n\t\t$query .= \"GROUP BY ano, mes \";\r\n\t\t$query .= \"ORDER BY ano, mes) AS tmp ORDER BY ano ASC, mes ASC \";\r\n\t}else{\r\n\t\t$query = \"SELECT * FROM(SELECT ano, mes, SUM(quantidade) AS quantidade \";\r\n\t\t$query .= \"FROM consvendames \";\r\n\t\t$query .= \"WHERE codproduto = \".$codproduto.\" \";\r\n\t\t$query .= \" AND ((ano = \".(date(\"Y\") - 1).\" AND mes >= \".date(\"m\").\") OR (ano = \".date(\"Y\").\" AND mes <= \".date(\"m\").\")) \";\r\n\t\tif(strlen($codestabelec) > 0){\r\n\t\t\t$query .= \" AND codestabelec IN (\".$codestabelec.\") \";\r\n\t\t}\r\n\t\t$query .= \"GROUP BY ano, mes \";\r\n\t\t$query .= \"ORDER BY ano, mes) AS tmp ORDER BY ano ASC, mes ASC \";\r\n\t}\r\n\t$res = $con->query($query);\r\n\t$arr = $res->fetchAll(2);\r\n\t$ano = date(\"Y\");\r\n\t$mes = date(\"m\");\r\n\t$html = \"<table style=\\\"font-size:11px; height:100%\\\">\";\r\n\tfor($i = 12; $i > -1; $i--){\r\n\t\t$quantidade = 0;\r\n\t\tforeach($arr as $row){\r\n\t\t\tif($row[\"ano\"] == $ano && $row[\"mes\"] == $mes){\r\n\t\t\t\t$quantidade = $row[\"quantidade\"];\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$html .= \"<tr><td style=\\\"background-color:\".($i % 2 == 0 ? \"#DDD\" : \"#EEE\").\"; width:60%\\\">\".$ano.\" \".month_description($mes, FALSE).\"</td>\";\r\n\t\t$html .= \"<td style=\\\"background-color:\".($i % 2 == 0 ? \"#EEE\" : \"#FFF\").\"; text-align:right\\\">\".number_format($quantidade, 2, \",\", \".\").\"</td></tr>\";\r\n\t\t$mes--;\r\n\t\tif($mes == 0){\r\n\t\t\t$mes = 12;\r\n\t\t\t$ano--;\r\n\t\t}\r\n\t}\r\n\t$html .= \"</table>\";\r\n\treturn $html;\r\n}", "public function cesta_con_iva(){\r\n\t\t\t$total = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo){\r\n\t\t\t\t$precio = $elArticulo->oferta_iva>0?$elArticulo->oferta_iva:$elArticulo->precio_iva;\r\n\t\t\t\t$total+= round($elArticulo->unidades*$precio,2);\r\n\t\t\t}\r\n\t\t\treturn $total;\r\n\t\t}", "public function promotional();", "public function totalq1($modalite)\r\n\t{\r\n\t$conge = new Default_Model_Conge();\r\n\t$debut_mois = $this->getAnnee_reference().'-01-01';\r\n\t$fin_mois = $this->getAnnee_reference().'-12-31'; // il faut la remplacer par l'annee de reference\r\n\t\r\n\t\r\n\t$jours_ouvres_de_annee_ref = $conge->joursOuvresDuMois($debut_mois,$fin_mois);\r\n\t$nbr_heurs_ouvrees_annee = ($jours_ouvres_de_annee_ref -14) *7.4;\r\n\t$personne = new Default_Model_Personne();\r\n\t$id_entite =1; // MBA : pourquoi entite 1 pour personne? \r\n\t$personne = $personne->fetchall('id_entite ='.$id_entite. '&&'. 'id ='.$this->getPersonne()->getId());\r\n\t//var_dump($personne);\r\n\tif (null!==$personne)\r\n\t\r\n\t{\r\n\t\tif ($modalite == 4)\r\n\t\t{\r\n\t\t\t$nbr_heurs_ouvrees_annee = ($jours_ouvres_de_annee_ref -14) *7.4;\r\n\t\t\tif($nbr_heurs_ouvrees_annee >1607)\r\n\t\t\t{\r\n\t\t\t\treturn 0.5;\r\n\t\t\t}\r\n\t\t\telseif($nbr_heurs_ouvrees_annee <1607.5)\r\n\t\t\t{\r\n\t\t\t\treturn 1.0;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telseif ($modalite == 5 ||$modalite == 6 )\r\n\t\t{\r\n\t\t\t$nbr_jours_ouvrees_annee = $jours_ouvres_de_annee_ref-243;\r\n\t\t\tif($nbr_jours_ouvrees_annee < 10)\r\n\t\t\t{\r\n\t\t\t\treturn 10.0;\r\n\t\t\t}\r\n\t\t\telseif($nbr_jours_ouvrees_annee >10)\r\n\t\t\t{\r\n\t\t\t\treturn $nbr_jours_ouvrees_annee;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\telseif ($modalite == 1 ||$modalite == 2 ||$modalite == 3)\r\n\t\t{\r\n\t\t\t\treturn 10.0;\r\n\t\t}\r\n\t\r\n\t}\r\n\t\r\n\telse return 0;\r\n\t\r\n\t}", "public function valorpasaje();", "function hitung_fitness($individu){\n\t\t$fitness = 1/(1+f_obj($individu)); //agar nilai fitness menjadi 0-10\n\t\treturn $fitness;\n\t}", "function sim_distance($prefs, $p1, $p2){\r\n\t//returns the distance based on the similarity between the persons\r\n\t$sharedItems = array();\r\n\t$sum_sq = 0;\r\n\t//get the movie list for person 2\r\n\t$keys = array_keys($prefs[$p2]);\r\n\t//print_r($keys);\r\n\r\n\t//get the list of common things between the two\r\n\tforeach($prefs[$p1] as $k => $v){\r\n\t\tif(in_array($k, $keys)){\r\n\t\t\t$sharedItems[] = $k;\r\n\t\t\t//calculating the diiference in rating\r\n\t\t\t$diff = $prefs[$p2][$k] - $prefs[$p1][$k];\r\n\t\t\t$sum_sq += pow($diff, 2); \r\n\t\t}\r\n\t}\r\n\t//echoing everything\r\n\t//print_r($sharedItems);\r\n\r\n\t//if there is no similarity return the zero\r\n\tif($sum_sq === 0){\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t//calculating the distance\r\n\t$dist = pow($sum_sq, 1/2);\r\n\treturn 1 / (1 + $dist);\r\n}", "public function Redutor_De_Ordem_Chio(Array $matriz, int $coeficiente_final) {\n \n echo \"Antes da redução de ordem:\";\n\n echo \"<br>\";\n echo \"<br>\"; \n\n $m = $matriz; \n \n $linha = 0;\n $coluna = 0;\n \n \n if($m['ordem'] == 1) {\n\n /**\n * o coeficiente_final será usado para multiplicar o resultado da\n * última iteração da regra de chio\n */ \n\n $resultado = $m['matriz'][0][0] * $coeficiente_final;\n\n echo \"Coeficiente final: \" . $coeficiente_final;\n\n echo \"<br>\";\n\n echo \"O resultado do Determinante é: \" . $resultado;\n\n return $resultado;\n \n }else{\n \n \n $determinante = $m['matriz'];\n\n print_r($determinante);\n\n echo \"<br>\";\n echo \"<br>\"; \n\n //ira força o número 1 em um elemento da primeira linha\n\n $soma_de_elementos = 0;\n\n for ($i=0; $i < $m['ordem']; $i++) { \n\n \n \n if($determinante[0][$i] != 0) {\n\n $coeficiente = $determinante[0][$i];\n\n $linha = 0;\n $coluna = $i;\n\n\n break;\n \n\n }\n \n // Se a primeira linha só apresentar elementos igual a 0 então a matriz 1x1 resultado da reduções por chió será um elemento nulo\n // poís o determinante tem que ser zero pois a primeira linha é nula\n // logo se todos os elementos são zero a soma de todos os elemento tem que ser zero\n\n $soma_de_elementos += $determinante[0][$i];\n\n \n\n } \n\n if($soma_de_elementos == 0 ) {\n\n $resultado = 0;\n\n echo \"Coeficiente final: \" . $coeficiente_final;\n\n echo \"<br>\";\n \n echo \"O resultado do Determinante é: \" . $resultado;\n \n return $resultado;\n\n }else{\n\n\n\n\n /**\n * A regra de Chió só ser aplicado no elemento que está primeira linha e na primeira coluna cujo valor é igual a 1.\n * Como nem todos o determinante vão satisfazer essa condição, será nesse inverter algumas fileiras (linha ou coluna)\n * e também dividir as fileiras para forçar que o primeiro elemento do determinante tenha valor igual a 1.\n * \n * Logo serão usados as propriedades do determinante:\n * Uma fileira (linha ou coluna) nula resulta em um determinante de valor igual a zero;\n * Para cada inversão de fileiro inverte-se o sinal do valor do determinante;\n * Multiplicar uma fileira por valor faz com o resultado do determinante seja multiplicado pelo mesmo valor\n */\n\n \n \n \n \n\n /**\n * o coeficiente_final será usado para multiplicar o resultado da\n * última iteração da regra de chio\n * \n */ \n\n\n /**\n * Inversão de fileira.\n * Só a primeira linha será válidada, pois se todos os elementos dela forem nulos então o \n * determinante será nulo.\n * Caso o primeiro seja zero e os outros diferente de zero então será necessário uma inversão\n * que matematicamente signica multiplicar o valor do determinante pelo valor -1\n * \n */\n\n $fileira = $linha + $coluna;\n\n $inverte_fileira = ( $fileira == 0 ) ? 1 : -1;\n \n \n $coeficiente_final *= $inverte_fileira * $coeficiente; \n \n \n \n echo \"Coeficiente: \" . $coeficiente; \n echo \"<br>\";\n echo \"Coeficiente final: \" . $coeficiente_final; \n echo \"<br>\";\n echo \"Linha: \" . $linha;\n echo \"<br>\"; \n echo \"Coluna: \" . $coluna;\n\n echo \"<br>\";\n echo \"<br>\";\n\n\n \n\n \n \n\n for ($i=0; $i < $m['ordem']; $i++) { \n \n // analisando as colunas\n \n $determinante[0][$i] = $m['matriz'][0][$i] / $coeficiente; \n\n \n }\n\n\n \n\n\n echo \"Analisando o determinante parte 1\";\n\n echo \"<br>\";\n echo \"<br>\";\n\n\n print_r($determinante);\n\n echo \"<br>\";\n echo \"<br>\";\n echo \"<br>\";\n echo \"<br>\";\n\n \n \n \n // ---------------- daqui pra cima esta certo ---------------------\n \n \n \n // aplicando a regra de Chió\n\n \n\n $chio = array();\n\n for ($i=0; $i < $m['ordem']; $i++) {\n \n for ($j=0; $j < $m['ordem'] ; $j++) { \n\n \n if($i != $linha && $j != $coluna) {\n \n\n $det[] = $determinante[$i][$j];\n \n\n $chio[] = $determinante[$i][$j] -( $determinante[$linha][$j] * $determinante[$i][$coluna] );\n\n \n\n }\n \n\n }\n \n }\n\n\n // Vai permitir a usar recursividade pois deixará o array no formato certo\n\n $chio = $this->mostra_Matriz($chio);\n\n\n\n // Debug \n\n\n echo \"Depois da redução de ordem:\";\n\n echo \"<br>\";\n echo \"<br>\";\n\n \n\n echo \"Para Debug: Matriz em processo de redução de ordem: \";\n echo \"<br>\";\n print_r($det);\n \n echo \"<br>\";\n echo \"<br>\";\n\n echo \"Redução de Chió Completa: \";\n echo \"<br>\"; \n\n print_r($chio);\n\n\n echo \"<br>\";\n echo \"<br>\";\n\n echo \"---------------------------------------------------------\";\n\n echo \"<br>\";\n\n echo \"Nova redução de ordem do Determinante\";\n\n echo \"<br>\";\n\n echo \"---------------------------------------------------------\";\n\n\n echo \"<br>\";\n echo \"<br>\";\n\n\n \n\n\n\n\n\n // ---------------- daqui pra cima esta certo ---------------------\n\n // Usando a recursidade para chegar na matriz de ordem 1\n\n \n\n $this->Redutor_De_Ordem_Chio($chio, $coeficiente_final);\n\n\n }\n\n \n\n\n }\n\n\n \n \n\n\n }", "function Motvalide($chaine ) {\n\n$lettres=array('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');\n$lettresM=array('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');\n$v=CompterNombreElement($lettres);\n$t=false;\n$nbr=CompteNombreCaractere($chaine);\nif ($nbr>20) {\n\t$t=false;\n}\n else {\n for ($i=0; $i <$nbr; $i++) \n { \n \t for ($j=0; $j <$v ; $j++) \n \t { \n \t if ($chaine[$i]==$lettres[$j] or $chaine[$i]==$lettresM[$j]) \n\t \t {\n\t \t\t $t=true;\n\t \t\t break;\n\t \t }\t \n\t \t if ($j==$v-1) {\n\t \t \t$t=false;\n\t \t \tbreak;\n\t \t }\n\n \t }\n \t if ($t==false) \n\t \t {\n\t \t break;\n \t } \n }\t\n }\n \nreturn $t;\n}", "public function getSumas() {\n $aVot = $this->votos;\n $aCoe = $this->coeficientes;\n \n $asis = 0; $vots = 0; $votn = 0; $pres = 0;\n $opc1 = 0; $opc2 = 0; $opc3 = 0; $opc4 = 0;\n $urb1 = 0; $urb2 = 0; $urb3 = 0; $urb4 = 0;\n $fas1 = 0; $fas2 = 0; $fas3 = 0; $fas4 = 0;\n $blo1 = 0; $blo2 = 0; $blo3 = 0; $blo4 = 0;\n \n foreach ($aVot as $apa => $aDat) {\n $asis += ($aDat[0] == 'S') ? 1 : 0;\n $vots += ($aDat[1] == 'S') ? 1 : 0;\n $votn += ($aDat[1] == 'S') ? 0 : 1;\n $pres += ($aDat[2] == 'S') ? 1 : 0;\n \n $opc1 += ($aDat[3] == 'S') ? 1 : 0;\n $opc2 += ($aDat[4] == 'S') ? 1 : 0;\n $opc3 += ($aDat[5] == 'S') ? 1 : 0;\n $opc4 += ($aDat[6] == 'S') ? 1 : 0;\n \n $urb1 += ($aDat[3] == 'S') ? $aCoe[$apa][0] : 0;\n $urb2 += ($aDat[4] == 'S') ? $aCoe[$apa][0] : 0;\n $urb3 += ($aDat[5] == 'S') ? $aCoe[$apa][0] : 0;\n $urb4 += ($aDat[6] == 'S') ? $aCoe[$apa][0] : 0;\n \n $fas1 += ($aDat[3] == 'S') ? $aCoe[$apa][1] : 0;\n $fas2 += ($aDat[4] == 'S') ? $aCoe[$apa][1] : 0;\n $fas3 += ($aDat[5] == 'S') ? $aCoe[$apa][1] : 0;\n $fas4 += ($aDat[6] == 'S') ? $aCoe[$apa][1] : 0;\n \n $blo1 += ($aDat[3] == 'S') ? $aCoe[$apa][2] : 0;\n $blo2 += ($aDat[4] == 'S') ? $aCoe[$apa][2] : 0;\n $blo3 += ($aDat[5] == 'S') ? $aCoe[$apa][2] : 0;\n $blo4 += ($aDat[6] == 'S') ? $aCoe[$apa][2] : 0;\n }\n $aSumas['asis'] = array($asis, $vots, $votn, $pres);\n $aSumas['opci'] = array($opc1, $opc2, $opc3, $opc4);\n $aSumas['urba'] = array($urb1, $urb2, $urb3, $urb4);\n $aSumas['fase'] = array($fas1, $fas2, $fas3, $fas4);\n $aSumas['bloq'] = array($blo1, $blo2, $blo3, $blo4);\n \n return $aSumas;\n }", "function similitudes_sale($origen, $destino) {\n\t\t// Devuelve el string si tiene un 70% de coincidencia o mas sino devuelve false\n\t\t// Bajado a un 65%\n\n $sim = similar_text(strtoupper($origen), strtoupper($destino), $perc);\n if ($perc > 65) {\n return $origen;\n } else {\n return false;\n }\n }", "function getResult($resultUser1, $resultUser2, $resultAdmin1, $resultAdmin2, $result)\n{\n $scoreTotal = 0;\n global $puntaje_resultado;\n global $puntaje_empate;\n global $puntaje_ganar;\n global $puntaje_perder;\n\n //verificamos si es el resultado exacto\n if ($resultUser1 == $resultAdmin1 && $resultUser2 == $resultAdmin2)\n $scoreTotal += $puntaje_resultado;\n //verificamos si hay empate\n if ($resultUser1 == $resultUser2 && $resultAdmin1 == $resultAdmin2)\n $scoreTotal += $puntaje_empate;\n //verificamos si gano el equipo uno gano o perdio\n $scoreTotal += ($resultUser1 > $resultUser2 && $resultAdmin1 > $resultAdmin2) ? $puntaje_ganar : $puntaje_perder;;\n //verificamos si gano el equipo dos gano o perdio\n $scoreTotal += ($resultUser1 < $resultUser2 && $resultAdmin1 < $resultAdmin2) ? $puntaje_ganar : $puntaje_perder;\n\n if ($result == \"C\" || $result == \"S\")\n $scoreTotal = 0;\n\n return $scoreTotal;\n}", "function matricularVehiculo(){\r\n $matricula _aleatoria = rand();\r\n\r\n $encontrado = false;\r\n for ($i=0; $i< count ($this->vehiculos) && ($encontrado==false); $i++) {\r\n if ($this->vehiculos[$i] != null) {\r\n if($this->vehiculos[$i]->getMatricula() =='') {}\r\n $this->vehiculos[$i]->getMatricula($matricula_aleatoria);\r\n $encontrado = true;\r\n $pos = $i;\r\n }\r\n }\r\n }", "public function cesta_sin_iva(){\r\n\t\t\t$total = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo){\r\n\t\t\t\t$precio = $elArticulo->oferta>0?$elArticulo->oferta:$elArticulo->precio;\r\n\t\t\t\t$total+= round($elArticulo->unidades*$precio,2);\t\t\t\t\r\n\t\t\t}\r\n\t\t\treturn $total;\r\n\t\t}", "function kalorinormal($g, $tb){\n\tif($g == \"Pria\"){\n\t\t$kb = beratbadanideal($tb, $g) * 30;\n\t}else if($g == \"Wanita\"){\n\t\t$kb = beratbadanideal($tb, $g) * 25;\n\t}\nreturn $kb;\n}", "public function categoriaInactivos(){\n if($this->nolaboral->V21_M >= 1)\n {\n return 1;\n }\n if($this->nolaboral->V8_M == 1 && $this->nolaboral->V9_M == 1 && $this->nolaboral->V10_M == 1)\n {\n return 2;\n }\n if($this->caracteristicas->CH10 == 1 && $this->PP01E == 2)\n {\n return 3;\n }\n if($this->PP01E == 2)\n {\n return 4;\n }\n if($this->caracteristicas->CH06 < 6)\n {\n return 5;\n }\n if($this->discapacidad())\n {\n return 6;\n }\n\n}", "public function calculAc() {\n\n return $this->va * (1 + ($this->nbta - $this->nbad) / $this->nbta);\n }", "function valore_costo_trasporto_ordine_amico($id_ordine,$id_user,$id_amico){\r\n $valore_globale_attuale_netto_qarr = valore_totale_ordine_qarr($id_ordine);\r\n $valore_personale_attuale_netto_qarr = valore_netto_singolo_amico($id_ordine,$id_user,$id_amico);\r\n $percentuale_mio_ordine = ($valore_personale_attuale_netto_qarr / $valore_globale_attuale_netto_qarr) *100;\r\n $costo_globale_trasporto = valore_trasporto($id_ordine,100);\r\n $costo_trasporto = ($costo_globale_trasporto / 100) * $percentuale_mio_ordine;\r\n return (float)$costo_trasporto;\r\n}", "function similitudes_palabras($arrayDatos, $arrayConQuienComparar) {\n\t\t// Devuelve un array con las similitudes\n\t\t// Necesita la funcion privada similitudes_sale\n\t\t// Pensado para ciudades y barrios de ahi los nombres de las variables\n\n\t\t// Primero el array de vuelta vacia\n $returnArray = array();\n\n\t\t// Recorremos el array\n foreach($arrayDatos as $rowCiudadesBusqueda) {\n\t\t\t// Siempre observamos si esta vacio o no, que nunca se sabe\n if ($rowCiudadesBusqueda != '') {\n\t\t\t\t// Para cada uno de ellos\n foreach($arrayConQuienComparar as $rowCiudadesArray) {\n\t\t\t\t\t// Hacemos la comparacion de Levenshtein a traves de nuestra otra funcion privada\n $resulttmp = $this -> similitudes_sale($rowCiudadesArray, $rowCiudadesBusqueda);\n\t\t\t\t\t// Por si escupe blanco (esto se puede hacer en origen y asi deberia ser)\n if ($resulttmp !='') {\n\t\t\t\t\t\t// Lo metemos en los resultados\n array_push($returnArray, [$rowCiudadesBusqueda => $this -> similitudes_sale($rowCiudadesArray, $rowCiudadesBusqueda)]);\n }\n }\n }\n }\n\n\t\t// Retorno (esto se podria mejorar ya que el else sobra y con devolver por defecto el false valdria)\n\t\tif (empty($returnArray) == false) {\n\t\t\t// Si hay datos\n\t\t\treturn $returnArray;\n\t\t} else {\n\t\t\t// Si no\n\t\t\treturn false;\n\t\t}\n }", "public function calculVa() {\n\n return ($this->cp + $this->cb) / $this->nbta;\n }", "function apply_condition_bonus(){\r\n\t$Bonus_Rand = mt_rand(75,150) * 1000;\r\n\r\n\tif($this->Eq['A']['exp'] < 0){\r\n\t\t$i = (10000+$this->Eq['A']['exp'])/10000;\r\n\t\t$this->Eq['A']['atk'] = floor($this->Eq['A']['atk'] * $i);\r\n\t\t$i = 1 + abs($this->Eq['A']['exp'])/10000;\r\n\t}else\t$i = 1 - $this->Eq['A']['exp']/$Bonus_Rand;\r\n\t$this->Eq['A']['enc'] = floor($this->Eq['A']['enc'] * $i);\r\n\r\n\tif($this->Eq['D']['exp'] < 0)\t$i = ($this->Eq['D']['exp'])/-5000;\r\n\telse\t\t\t\t$i = 1 - $this->Eq['D']['exp']/$Bonus_Rand;\r\n\t$this->Eq['D']['enc'] = floor($this->Eq['D']['enc'] * $i);\r\n\r\n\tif($this->Eq['E']['exp'] < 0)\t$i = ($this->Eq['E']['exp'])/-5000;\r\n\telse\t\t\t\t$i = 1 - $this->Eq['E']['exp']/$Bonus_Rand;\r\n\t$this->Eq['E']['enc'] = floor($this->Eq['E']['enc'] * $i);\r\n\r\n}", "public function run()\n {\n\n\n $C1 = [\"2\" => 1, \"3\" => 1,\n \"4\" => 1, \"5\" => 1, \"7\" => 1, \"8\" => 1,\n \"6\" => 1, \"10\" => 1, \n \"11\" => 1, \"12\" => 1, \n \"17\" => 1, \"13\" => 1, \n \"15\" => 1 ,\"14\" => 1, \"16\" => 1];\n\n\n $sdeC = [ \"1\" => 3, \"5\" => 3, \"6\" => 2, \n \"10\" => 5, \"11\" => 4, \n \"12\" => 2, \"17\" => 1, \n \"13\" => 1, \"15\" => 1] ;\n\n $seconde_A1 = [ \"1\" => 4, \"5\" => 3, \"6\" => 3, \n \"10\" => 3, \"11\" => 2,\n \"12\" => 2, \n \"17\" => 1, \"13\" => 1, \n \"15\" => 1] ;\t\n\n\n $seconde_A2 = [\"1\" => 4, \"5\" => 3, \"6\" => 3, \n \"10\" => 3, \"11\" => 2, \"7\" => 3, \"8\" => 3,\n \"12\" => 2, \n \"17\" => 1, \"13\" => 1, \n \"15\" => 1 ,\"14\" => 1] ;\n \n\n\n $prD = [ \"1\" => 3, \"5\" => 2, \"6\" => 2, \n \"10\" => 4, \"11\" => 4, \"12\" => 4, \n \"17\" => 1, \"13\" => 1, \n \"15\" => 1, \"9\" => 2] ;\n\n $prC = [\"1\" => 3, \"5\" => 2, \"9\" => 2, \"6\" => 2, \n \"10\" => 5, \"11\" => 5, \"12\" => 2, \n \"17\" => 1, \"13\" => 1, \n \"15\" => 1] ;\n\n\n\n $premiere_A1 = [\"1\" =>4, \"5\" => 4, \"9\" => 3, \"6\" => 3, \n \"7\" => 3, \"8\" => 3, \"10\" => 2, \n \"11\" => 1, \"12\" => 1, \n \"17\" => 1, \"13\" => 1, \n \"15\" => 1, \"14\" => 1] ;\n\n \n\n $premiere_A2 = [\"1\" => 4, \"5\" => 4, \"9\" => 3, \"6\" => 3, \n \"7\" => 1, \"8\" => 1, \"10\" => 3, \n \"11\" => 2, \"12\" => 1, \n \"17\" => 1, \"13\" => 1, \n \"15\" => 1, \"14\" => 1] ;\n\n\n $tleA1 = [\"1\" => 4, \"5\" => 4, \"9\" => 5, \"6\" => 3, \n \"7\" => 3, \"8\" => 3, \"10\" => 2, \n \"12\" => 2, \n \"17\" => 1, \"13\" => 1, \n \"15\" => 1, \"14\" => 1] ;\n\n\n $tleA2 = [\"1\" => 4, \"5\" => 4 , \"9\" => 5 , \"6\" => 3, \n \"7\" => 3, \"8\" => 3, \"10\" => 2, \n \"12\" => 2, \n \"17\" => 1, \"13\" => 1, \n \"15\" => 1, \"14\" => 1] ;\n\n\n\n $tleC = [\"1\" =>3, \"5\" => 1, \"9\" => 2, \"6\" => 2, \n \"10\" => 5, \"11\" => 5, \"12\" => 2, \n \"17\" => 1, \"13\" => 1, \n \"15\" => 1, \"14\" => 1] ;\n\n\n $tleD = [\"1\" => 3, \"5\" => 1, \"9\" => 2, \"6\" => 2, \n \"10\" => 4, \"11\" => 4, \"12\" => 4, \n \"17\" => 1, \"13\" => 1, \n \"15\" => 1, \"14\" => 1] ;\n\n\n $classes_cycle_1 = [\n \"6ème\" => $C1, \"5ème\" => $C1, \"4ème\" => $C1, \"3ème\" => $C1,\n ]; \n\n\n foreach ($classes_cycle_1 as $cls => $coeff) {\n foreach ($coeff as $key => $value) {\n CourseCoefficient::create([\n 'cycle_classe' => $cls,\n 'course_child_id' => $key,\n 'serie' => '-',\n 'coefficient' => $value\n ]);\n }\n }\n\n\n $classes_cycle_2 = [\n \"sda1\" => ['cycle_classe' => '2ndeA', 'serie' => 'A1', 'coef_courses' => $seconde_A1],\n \"sda2\" => ['cycle_classe' => '2ndeA', 'serie' => 'A2', 'coef_courses' => $seconde_A2],\n \"sdc\" => ['cycle_classe' => '2ndeC', 'serie' => 'C', 'coef_courses' => $sdeC],\n \"prea1\" => ['cycle_classe' => '1èreA', 'serie' => 'A1', 'coef_courses' => $premiere_A1],\n \"prea2\" => ['cycle_classe' => '1èreA', 'serie' => 'A2', 'coef_courses' => $premiere_A2],\n \"prec\" => ['cycle_classe' => '1èreC', 'serie' => 'C', 'coef_courses' => $prC],\n \"pred\" => ['cycle_classe' => '1èreD', 'serie' => 'D', 'coef_courses' => $prD],\n \"tlea1\" => ['cycle_classe' => 'TleA', 'serie' => 'A1', 'coef_courses' => $tleA1],\n \"tlea2\" => ['cycle_classe' => 'TleA', 'serie' => 'A2', 'coef_courses' => $tleA2],\n \"tlec\" => ['cycle_classe' => 'TleC', 'serie' => 'C', 'coef_courses' => $tleC],\n \"tled\" => ['cycle_classe' => 'TleD', 'serie' => 'D', 'coef_courses' => $tleD]\n ]; \n\n\n\n foreach ($classes_cycle_2 as $item) {\n\n foreach ($item['coef_courses'] as $key => $value) {\n CourseCoefficient::create([ \n 'cycle_classe' => $item['cycle_classe'], \n 'serie' => $item['serie'],\n 'course_child_id' => $key,\n 'coefficient' => $value\n ]);\n }\n }\n\n }", "public function testSaldoFinalDeParceriasAApropriarDoAtivoIgualAosControlesAComprovarEAAprovar() {\n $filterAtivo = function (array $line): bool {\n if (str_starts_with($line['conta_contabil'], '1.1.9.8.1.01') && $line['escrituracao'] === 'S') {\n return true;\n }\n return false;\n };\n $saldoDevedorAtivo = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filterAtivo);\n $saldoCredorAtivo = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filterAtivo);\n\n $filterAComprovar = function (array $line): bool {\n if (str_starts_with($line['conta_contabil'], '8.1.2.2.1.01.02') && $line['escrituracao'] === 'S') {\n return true;\n }\n return false;\n };\n $saldoDevedorAComprovar = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filterAComprovar);\n $saldoCredorAComprovar = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filterAComprovar);\n\n $filterAAprovar = function (array $line): bool {\n if (str_starts_with($line['conta_contabil'], '8.1.2.2.1.01.03') && $line['escrituracao'] === 'S') {\n return true;\n }\n return false;\n };\n $saldoDevedorAAprovar = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filterAAprovar);\n $saldoCredorAAprovar = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filterAAprovar);\n\n $this->comparar(($saldoDevedorAtivo - $saldoCredorAtivo), (($saldoCredorAComprovar - $saldoDevedorAComprovar) + ($saldoCredorAAprovar - $saldoDevedorAAprovar)));\n\n $this->saldoVerificado(__METHOD__, '1.1.9.8.1.01', '8.1.22.1.01.02', '8.1.2.2.1.01.03');\n }", "public function luas()\n {\n return $this->panjang * $this->lebar;\n }", "function adivinarEstilo($array_A){\n $datos=new ManejoDatos();\n $arrayBD =$datos->getEstiloSexoPromedioRecinto();\n \n $arrayA = array($array_A[2] == \"Masculino\" ? 1 : 2, $array_A[1],($array_A[0] == \"Paraiso\" ? 1 : 2)); \n \n foreach ($arrayBD as $elemento) {\n \n $arrayB = array($elemento['Sexo'] == \"M\" ? 1 : 2, $elemento['Promedio'], $elemento['Recinto'] == \"Paraiso\" ? 1 : 2);\n $temporal = $this->distanciaEuclidiana($arrayA, $arrayB);\n if ($temporal < $this->distancia) {\n $this->distancia = $temporal;\n $this->temporal = $elemento['Estilo'];\n }\n }\n \n return $this->temporal;\n \n }", "function toigian_ps()\n {\n $uscln = $this->USCLN($this->tuso, $this->mauso);\n $this->tuso = $this->tuso/$uscln;\n $this->mauso = $this->mauso/$uscln;\n }", "public function getAnchoPaneles()\r\n\t{\r\n\t\t$getPisosAletaVen = $this->getPisosAletaVen();\r\n\t\t$getPisosAletaAdicional7 = $this->getPisosAletaAdicional7();\r\n\t\t$getPisosAletaFlu = $this->getPisosAletaFlu();\r\n\t\t$getCantidadChapaIntermedia = $this->getCantidadChapaIntermedia();\r\n\t\t$getCantidadChapaPiso = $this->getCantidadChapaPiso();\r\n\t\t$getCantidadChapaAdicional = $this->getCantidadChapaAdicional();\r\n\t\t\r\n\t\t\t\t$anchoP1 = $getPisosAletaVen['pisosAletaVenP1'] * $this->getEspesorAletaVen() + $getPisosAletaAdicional7['pisosP1Aleta7'] * $this->espesorAire7Flu + \r\n\t\t\t\t$getPisosAletaFlu['pisosP1AletaFlu'] * $this->getEspesorAletaFlu() + $getCantidadChapaIntermedia['cantidadP1ChapaIntermedia'] * $this->getEspesorChapaIntermedia() +\r\n\t\t\t\t$getCantidadChapaPiso['cantP1Piso'] * $this->getEspesorChapaPiso() + $getCantidadChapaAdicional['cantP1PisoAd'] * $this->getEspesorChapaAdicional();\r\n\t\t\t\t\r\n\t\t\t\t$anchoP2 = $getPisosAletaVen['pisosAletaVenP2'] * $this->getEspesorAletaVen() + $getPisosAletaAdicional7['pisosP2Aleta7'] * $this->espesorAire7Flu + \r\n\t\t\t\t$getPisosAletaFlu['pisosP2AletaFlu'] * $this->getEspesorAletaFlu() + $getCantidadChapaIntermedia['cantidadP2ChapaIntermedia'] * $this->getEspesorChapaIntermedia() +\r\n\t\t\t\t$getCantidadChapaPiso['cantP2Piso'] * $this->getEspesorChapaPiso() + $getCantidadChapaAdicional['cantP2PisoAd'] * $this->getEspesorChapaAdicional();\r\n\t\t\t\t\r\n\t\t\t\t$anchoP3 = $getPisosAletaVen['pisosAletaVenP3'] * $this->getEspesorAletaVen() + $getPisosAletaAdicional7['pisosP3Aleta7'] * $this->espesorAire7Flu + \r\n\t\t\t\t$getPisosAletaFlu['pisosP3AletaFlu'] * $this->getEspesorAletaFlu() + $getCantidadChapaIntermedia['cantidadP3ChapaIntermedia'] * $this->getEspesorChapaIntermedia() +\r\n\t\t\t\t$getCantidadChapaPiso['cantP3Piso'] * $this->getEspesorChapaPiso() + $getCantidadChapaAdicional['cantP3PisoAd'] * $this->getEspesorChapaAdicional();\r\n\t\t\t\t\r\n\t\t\t\t$anchoP4 = $getPisosAletaVen['pisosAletaVenP4'] * $this->getEspesorAletaVen() + $getPisosAletaAdicional7['pisosP4Aleta7'] * $this->espesorAire7Flu + \r\n\t\t\t\t$getPisosAletaFlu['pisosP4AletaFlu'] * $this->getEspesorAletaFlu() + $getCantidadChapaIntermedia['cantidadP4ChapaIntermedia'] * $this->getEspesorChapaIntermedia() +\r\n\t\t\t\t$getCantidadChapaPiso['cantP4Piso'] * $this->getEspesorChapaPiso() + $getCantidadChapaAdicional['cantP4PisoAd'] * $this->getEspesorChapaAdicional();\r\n\t\t\t\t\n\t\t\t\t$res = array(\r\n\t\t\t\t\t'anchoTotal' => $anchoP1 + $anchoP2 + $anchoP3 + $anchoP4,\r\n\t\t\t\t\t'anchoP1' => $anchoP1,\r\n\t\t\t\t\t'anchoP2' => $anchoP2,\r\n\t\t\t\t\t'anchoP3' => $anchoP3,\r\n\t\t\t\t\t'anchoP4' => $anchoP4,\r\n\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\treturn $res;\t\t\r\n\t}", "function similarity($rep, $guessrep) {\r\n//usleep(15);\r\n if (stripos($rep, ';')) {\r\n $repExplodArray = explode(';', $rep);\r\n } elseif (stripos($rep, ',')) {\r\n $repExplodArray = explode(',', $rep);\r\n } else {\r\n $repExplodArray = array($rep);\r\n }\r\n if (stripos($guessrep, ';')) {\r\n $gpExplodArray = explode(';', $guessrep);\r\n } elseif (stripos($guessrep, ',')) {\r\n $gpExplodArray = explode(',', $guessrep);\r\n } else {\r\n $gpExplodArray = array($guessrep);\r\n }\r\n $rep_part_count = count($repExplodArray);\r\n $matchcount = 0;\r\n foreach ($repExplodArray as $key => $value) {\r\n $value = trim($value);\r\n for ($j = 0; $j < count($gpExplodArray); $j++) {\r\n $gpExplodArray[$j] = trim($gpExplodArray[$j]);\r\n if ($value === $gpExplodArray[$j]) {\r\n $matchcount = $matchcount + 1;\r\n }\r\n }\r\n }\r\n $similarityRatio = $matchcount / $rep_part_count;\r\n $percentage=($similarityRatio*100).'%';\r\n\t\r\n//\t//Something to write to txt log\r\n//\t$log = \"date: \".date(\"F j, Y, g:i a\").PHP_EOL.\r\n// \"Guessrep: \". $guessrep.PHP_EOL.\r\n// \"rep: \". $rep.PHP_EOL.\t\t\r\n// \"-------------------------\".PHP_EOL;\r\n////Save string to log, use FILE_APPEND to append.\r\n//\tfile_put_contents('./log_'.date(\"j.n.Y\").'.txt', $log, FILE_APPEND);\r\n\r\n return $percentage;\r\n}", "function defiva($subt,$saldoi,$pago){\n $pagoiva;\n $resto = $saldoi -$subt;\n if($resto >0){\n // queda iva por aplicar\n if($resto>$pago){$pagoiva=$pago;}else{$pagoiva=$resto;}\n }else{\n //todo a capital\n $pagoiva = 0;\n }\n return $pagoiva;\n}", "function calcularVariables($espaciosVistos,$reglamentoEstudiante,$matriculas,$semestre_ingreso,$notaAprobatoria){\r\n \r\n $num_pruebas_academicas = $this->contarPruebasAcademicas($reglamentoEstudiante);\r\n $cantidad_matriculas = count($matriculas);\r\n $num_semestres_transcurridos = $this->contarSemestresTranscurridos($semestre_ingreso);\r\n $semestre_espacio_mas_atrasado = $this->calcularSemestreEspacioMasAtrasado();\r\n $edad_ingreso = $this->calcularEdadIngreso($semestre_ingreso);\r\n $num_semestres_despues_grado = $this->contarSemestresDespuesDeGrado($semestre_ingreso);\r\n \r\n if($this->datosEstudiante['IND_CRED']=='N'){\r\n $num_aprobados = count($this->espaciosAprobados);\r\n $num_reprobados = count($this->espaciosReprobados);\r\n $num_cursados = count($espaciosVistos);\r\n $num_adelantados = $this->contarEspaciosAdelantados($cantidad_matriculas,$notaAprobatoria,$this->espaciosCursados);\r\n $num_nivelado = $this->contarEspaciosNivelados($cantidad_matriculas);\r\n }elseif($this->datosEstudiante['IND_CRED']=='S'){\r\n $num_aprobados = $this->contarCreditos($this->espaciosAprobados);\r\n $num_reprobados = $this->contarCreditos($this->espaciosReprobados);\r\n $num_cursados = $this->contarCreditos($espaciosVistos);\r\n $num_adelantados = $this->contarEspaciosAdelantados($cantidad_matriculas,$notaAprobatoria,$this->espaciosCursados);\r\n $num_nivelado = $this->contarEspaciosNivelados($cantidad_matriculas);//creditos nivelados\r\n }\r\n \r\n $variables = array(\r\n 'cantidad_aprobados' => $num_aprobados, \r\n 'cantidad_reprobados' => $num_reprobados, \r\n 'cantidad_espacios_vistos' => $num_cursados,\r\n 'cantidad_pruebas_academicas' => $num_pruebas_academicas,\r\n 'promedio_acumulado' => (isset($this->datosEstudiante['PROMEDIO'])?$this->datosEstudiante['PROMEDIO']:''),\r\n 'cantidad_matriculas' => $cantidad_matriculas,\r\n 'cantidad_semestres'=>$num_semestres_transcurridos,\r\n 'cantidad_espacios_adelantados' => $num_adelantados,\r\n 'cantidad_espacios_nivelado' => $num_nivelado,\r\n 'semestre_espacio_mas_atrasado' => $semestre_espacio_mas_atrasado,\r\n 'edad_ingreso'=> $edad_ingreso,\r\n 'cantidad_semestres_despues_grado' => $num_semestres_despues_grado\r\n );\r\n\r\n return $variables;\r\n \r\n }", "function calcularPonderacion($instanciaActual=\"\",$instanciaPonderar)\n\t{\n\t\t$personajesutil = new personajepar($this->BG->con);\n\t\t$personajesutil->setronda($instanciaActual);\n\t\t$personajesutil = $personajesutil->read(true,1,array(\"ronda\"));\n\t\t\n\t\t$batallutil = new batalla($this->BG->con);\n\t\t$batallutil->setronda($instanciaPonderar);\n\t\t$batallutil = $batallutil->read(true,1,array(\"ronda\"));\n\t\t\n\t\t$totalponderacion=0;\n\t\tfor($i=0;$i<count($batallutil);$i++)\n\t\t{\n\t\t\t$pos[0] = 1500;\n\t\t\t$pos[1] = 600;\n\t\t\t$pos[2] = 400;\n\t\t\t$pos[3] = 300;\n\t\t\t$pos[4] = 200;\n\t\t\t$pos[5] = 100;\n\t\t\t$pos[6] = 100;\n\t\t\t$pos[7] = 20;\n\t\t\t$peleapersonaje = new pelea($this->BG->con);\n\t\t\t$peleapersonaje->setidbatalla($batallutil[$i]->getid());\n\t\t\t$peleapersonaje = $peleapersonaje->read(true,1,array(\"idbatalla\"),1,array(\"votos\",\"DESC\"));\n\t\t\t$k=0;\n\t\t\t$calponderacion = 0;\n\t\t\tfor($j=0;$j<count($peleapersonaje);$j++)\n\t\t\t{\n\t\t\t\tif(comprobararray($personajesutil,\"id\",$peleapersonaje[$j]->getidpersonaje()))\n\t\t\t\t{\n\t\t\t\t\tif($j>0 && $peleapersonaje[$j]->getvotos() == $peleapersonaje[$j-1]->getvotos())\n\t\t\t\t\t{}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif(count($pos)<=$j)\n\t\t\t\t\t\t\t$calponderacion = $pos[count($pos)-1];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$calponderacion = $pos[$j];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t$calponderacion += $peleapersonaje[$j]->getvotos();\n\t\t\t\t\t}\t\t\n\t\t\t\t\t$totalponderacion+=$calponderacion;\n\t\t\t\t\t$personajemod = arrayobjeto($personajesutil,\"id\",$peleapersonaje[$j]->getidpersonaje());\n\t\t\t\t\t$personajemod->setponderacion($calponderacion);\n\t\t\t\t\t$personajemod->update(1,array(\"ponderacion\"),1,array(\"id\"));\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t$torneoActual = new torneo($this->BG->con);\n\t\t$torneoActual->setactivo(1);\n\t\t$torneoActual = $torneoActual->read(false,1,array(\"activo\"));\n\t\t$torneoActual->setponderacionprom(round($totalponderacion/count($personajesutil)));\n\t\t$torneoActual->update(1,array(\"ponderacionprom\"),1,array(\"id\"));\n\t}", "function gain($l_column,$other_column,$res){\r\n\t$res_gain = array();\r\n\r\n\t$information = information_for_each_column($other_column,$res);\r\n\t$entropy_lastColumn = entropy($l_column);\r\n\t\r\n\tfor ($i = 0; $i < count($information); $i++){\r\n\t\t$temp = $entropy_lastColumn - $information[$i];\r\n\t\tarray_push($res_gain, $temp);\r\n\t}\r\n\treturn $res_gain;\r\n}", "public function testPrimeDirecteur4(){\n $directeurATester = new Directeur();\n $dateTemoin = \"12/07/2018\";\n $montantPrime = 5850;\n $salaireTemoin = 45000;\n \n $directeurATester->setSalaire($salaireTemoin);\n $directeurATester->setDateEmbauche($dateTemoin);\n $this->assertEquals($montantPrime,$directeurATester->calculerPrime());\n }", "public function iaqScore();", "function gaus_jordan_metoda_eliminacije_pokusaj_2($niz_cvorovi, $tacke_x) // $matrica, \n{\n\t// ------------------------------------- Priprema matrice -----------------------------------//\n\n\t// FORMIRANJE MATRICE NA OSNOVU CVOROVA\n\t// $niz_cvorovi = niz_cvorovi($cvorovi);\n // $niz_tacke = niz_tacke($tacke_x);\n $niz_tacke = $tacke_x;\n // sortirani cvorovi po x vrednosti u rastucem poretku radi formiranja intervala\n $niz_cvorovi = sortiranje_cvorova_po_intervalu($niz_cvorovi);\n\n $niz_intervali = niz_intervali($niz_cvorovi);\n // var_dump($niz_intervali);\n $matrica = formiranje_matrice($niz_cvorovi, $niz_intervali);\n\n // -----------------------------------------------------------------------------------------//\n\n\n\t//---------------------------------- RESAVANJE SISTEMA JEDNACINA(matrice) ------------------//\n\n\t$matrica = sort_gl_dijagonala($matrica);\n\t// echo ( napravi_tabelu( $matrica ) );\n\t// exit();\n\n\t// echo ( napravi_tabelu( zaokruzi_koeficijente_za_prikaz ($matrica) ) );\n\t// exit();\n\n\t$matrica = gauss_nuliranje_matrice($matrica);\n\n\t$matrica = jordan_nuliranje_matrice($matrica);\n\n\n\t// -----------------------------------------------------------------------------------------//\n\n\n\t//------------------------ Formiranje konacnih formula za odgovarajuce intervale -----------//\n\n\t$niz_koeficijenata_sa_vrednostima = niz_koeficijenata_sa_vrednostima($matrica);\n\t$abc_grupe = abc_grupe($niz_koeficijenata_sa_vrednostima);\n\t// var_dump($abc_grupe);\n\t// var_dump($niz_koeficijenata_sa_vrednostima);\n\t$formule = formiraj_string_formula_sa_intervalima($niz_koeficijenata_sa_vrednostima);\n\n\t// ispisi formule\n\tfor($form = 1; $form <= count($formule); $form++)\n\t{\n\t\t$formula_str = $formule[$form];\n\t\t$interval_levi = $niz_intervali[$form - 1][0];\n\t\t$interval_desni = $niz_intervali[$form - 1][1];\n\t\techo \"Interval {$form}. je [{$interval_levi}, {$interval_desni}], a formula: {$formula_str} \" . \"<br>\";\n\t}\n\techo \"<br>\";\n\t// -----------------------------------------------------------------------------------------//\n\n\n\t// ------------------------------------Interpolacija----------------------------------------//\n\t$niz_interpoliranih_tacaka = array();\n\tif(!empty($niz_tacke))\n\t{\n\t\tfor($x = 0; $x < count($niz_tacke); $x++)\n\t\t{\n\t\t\t// kriva\n\t\t\t$kr = u_kom_intervalu_je_input($niz_intervali, $niz_tacke[$x]) + 1; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n\t\t\t// Pn(x)\t=\t\t\t x * x * An + x * Bn + Cn \n\t\t\t$vrednost_y = ( $niz_tacke[$x] * $niz_tacke[$x] * $abc_grupe[$kr][0] ) + ( $niz_tacke[$x] * $abc_grupe[$kr][1] ) + $abc_grupe[$kr][2];\n\t\t\t$niz_interpoliranih_tacaka[] = array($niz_tacke[$x], $vrednost_y);\n\n\t\t\t// $prvi = $niz_intervali[$u_kom_intervalu_je_input][0];\n\t\t\t// $drugi = $niz_intervali[$u_kom_intervalu_je_input][1];\n\t\t\t// $t = $niz_tacke[$x];\n\t\t\t// echo \"{$x}. tacka - {$t} - je u intervalu: {$prvi}, {$drugi}\" . \"<br>\";\n\t\t}\n\t}\n\n\t// -----------------------------------------------------------------------------------------//\n\n\treturn array($matrica, $niz_interpoliranih_tacaka);\n\t\n}", "function estcalc85equiv($width,$length) {\n $one=floor($width/8.5)*floor($length/11);\n $two=floor($length/8.5)*floor($width/11);\n if (!$one&&!$two) { //if sheet is < 8.5x11\n $small=1;\n $one=floor(8.5/$width)*floor(11/$length);\n $two=floor(8.5/$length)*floor(11/$width);\n };\n if ($two>$one) $two=$one;\n if ($small) $one=1/$one;\n return $one;\n }", "public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }", "public function vocScore();", "public function calculateValuation(): bool\n {\n return 0;\n }", "function evclid($name1, $name2, $film1, $film2, $t)\n{\n $res = sqrt( \n\tpow($t->$name1->$film1 - $t->$name2->$film1,2 )\n\t+ pow ($t->$name1->$film2 - $t->$name2->$film2,2)\n );\n\n #return 1/(1+$res);\n return $res;\n}", "function Resumen() {\r\n\t\t/*RGB begin*/\r\n\t\tglobal $variables;\r\n\t\tif (!$variables)\r\n\t\t{\r\n\t\t\tchangeVariables();\r\n\t\t\t$variables = 1;\r\n\t\t}\r\n\t\t/*RGB end*/\r\n\t\r\n\t\tglobal $mis_puntos, $wcag1, $lst_A, $lst_AA, $lst_AAA, $resultados, $lang;\r\n\t\t$resultados = array();\r\n\t\t$letras = array('A' => 'lst_A', 'AA' => 'lst_AA', 'AAA' => 'lst_AAA');\r\n\r\n\t\tforeach ($letras as $p => $arr) {\r\n\t\t\tforeach ($$arr as $k => $v) {\r\n\t\t\t\tif (array_key_exists($v, $wcag1)) {\r\n\t\t\t\t\t$x = $p.$mis_puntos[$v];\r\n\t\t\t\t}\r\n\t\t\t\t/*RGB begin*/\r\n\t\t\t\tif($_SESSION['emag'] == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($v != 53 && $v != 56 && $v != 92 && $v != 72)\r\n\t\t\t\t\t\t$resultados[$x]++;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t$resultados[$x]++;\r\n\t\t\t\t/*RGB end*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->t_duda = $resultados['Aduda'] + $resultados['AAduda'] + $resultados['AAAduda'];\r\n\t\t$this->t_mal = $resultados['Amal'] + $resultados['AAmal'] + $resultados['AAAmal'];\r\n\t\t$this->t_parcial = $resultados['Aparcial'] + $resultados['AAparcial'] + $resultados['AAAparcial'];\r\n\t\t$this->t_nose = $resultados['Anose'] + $resultados['AAnose'] + $resultados['AAAnose'];\r\n\r\n\t\tif ($resultados['Aduda'] + $resultados['Anose'] + $resultados['Aparcial'] + $resultados['Amal'] == 0) {\r\n\t\t\tif ($resultados['AAduda'] + $resultados['AAnose'] + $resultados['AAparcial'] + $resultados['AAmal'] == 0) {\r\n\t\t\t\tif ($resultados['AAAduda'] + $resultados['AAAnose'] + $resultados['AAAparcial'] + $resultados['AAAmal'] == 0) {\r\n\t\t\t\t\t$ico_acc = 'AAA';\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$ico_acc = 'AA';\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$ico_acc = 'A';\r\n\t\t\t}\r\n\t\t\t$this->accesibilidad = ' <img src=\"img/her_'.$ico_acc.'.gif\" alt=\"'.sprintf($lang['ico_hera_acc'], $ico_acc).'\" width=\"90\" height=\"30\" style=\"float:right\" />';\r\n\t\t}\r\n\t\t\r\n\t\t$this->myresults = $resultados;\r\n\r\n\t}", "function fu_determinization(&$states, &$rules, &$f_states, $i_state, $alphabet)\n{\n\tfu_eps($states, $rules, $f_states); // odstranim epsilon prechody\n\t\n\t$states_new = array($i_state); // stavy pro algoritmus obsahujici zezacaktu pouze pocatecni\n\t$rules_det = array(); // nove pravidla\n\t$states_det = array(); // nove stavy\n\t$f_states_det = array(); // nove finalni stavy\n\t\n\t$meta = array(); // pole pro ukladani stavu ze kterych jsou slozene nove vznikle stavy\n\t\n\tdo\n\t{\n\t\t$c_state = array_pop($states_new); // aktualni stav\n\t\t\n\t\tarray_push($states_det,$c_state); // pridam do stavu\n\t\t\n\t\tforeach($alphabet as $a) // pro kazdy znak z abecedy\n\t\t{\n\t\t\t$combined_states = array(); // stavy ze kterych vznikne novy stav\n\t\t\t$combined_state; // promenna pro novy stav\n\t\t\t\n\t\t\tif(array_key_exists($c_state,$meta)) // kontrola klice, zda stav neni nove vznikly mezistav\n\t\t\t{\n\t\t\t\tforeach($meta[$c_state] as $next_state)\n\t\t\t\t{\n\t\t\t\t\tforeach($rules as $rule)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($next_state == $rule->from && $a == $rule->symbol)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tadd_state($combined_states,$rule->to);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse // pokud se jedna o puvodni stav\n\t\t\t{\n\t\t\t\tforeach($rules as $rule)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($c_state == $rule->from && $a == $rule->symbol)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tadd_state($combined_states,$rule->to);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(count($combined_states)) // pokud byl nalezen alespon jeden stav\n\t\t\t{\n\t\t\t\t$first = true;\n\t\t\t\t$new_rule = new rule();\n\t\t\t\tasort($combined_states); // serazeni stavu, pro lexikograficke spojeni\n\t\t\t\t\n\t\t\t\tforeach ($combined_states as $c_s) // jednotlive stavy spojim a pridam \"_\"\n\t\t\t\t{\n\t\t\t\t\tif($first)\n\t\t\t\t\t{\n\t\t\t\t\t\t$combined_state = $c_s;\n\t\t\t\t\t\t$first = false;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$combined_state .= \"_\";\n\t\t\t\t\t$combined_state .= $c_s;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$new_rule->from = $c_state;\n\t\t\t\t$new_rule->symbol = $a;\n\t\t\t\t$new_rule->to = $combined_state;\n\t\t\t\t\n\t\t\t\tadd_rule($rules_det,$new_rule); // pridani noveho pravidla obsahujici nove vznikly stav\n\t\t\t}\n\t\t\t\n\t\t\tif($combined_state) // pri existenci stavu\n\t\t\t{\n\t\t\t\t$found = false;\n\t\t\t\t\n\t\t\t\tforeach($states_det as $state_det) // kontrola zda-li jiz neexistuje\n\t\t\t\t{\n\t\t\t\t\tif($state_det == $combined_state)\n\t\t\t\t\t{\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$found && count($combined_states)) // pokud se jedna o nove vznikly mezistav\n\t\t\t\t{\n\t\t\t\t\tadd_state($states_new,$combined_state); // pridam jej\n\t\t\t\t\t$meta[$combined_state] = $combined_states; // do pole ulozim stavy ze kterych vznikl a samotny stav pouziji jako klic\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tforeach($f_states as $f_state) // pridani finalniho stavu\n\t\t{\n\t\t\tif(array_key_exists($c_state,$meta)) // v pripade noveho mezistavu\n\t\t\t{\n\t\t\t\tforeach($meta[$c_state] as $next_state) // kontrola vsech stavu ze kterych vznikl\n\t\t\t\t{\n\t\t\t\t\tif($next_state == $f_state)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tadd_state($f_states_det,$c_state);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($c_state == $f_state)\n\t\t\t{\n\t\t\t\tadd_state($f_states_det,$c_state);\n\t\t\t}\n\t\t}\n\t\t\n\t}while(count($states_new));\n\t\n\t// prepsani starych stavu\n\t\n\t$states = $states_det;\n\t$f_states = $f_states_det;\n\t$rules = $rules_det;\n}", "function formulaires_abosympa_verifier_dist(){\n\t$erreurs = array();\n\n\t// recuperation des valeurs du formulaire\n\t$nom = _request('nom');\n\t$email = _request('email');\n\t$listes = _request('listes', true);\n\t$abonnement = _request('abonnement');\n\t$desabonnement = _request('desabonnement');\n\n\t// Faire une fonction de verif sur le mail pour validite\n\n\tif($email == ''){\n\t\t$erreurs['erreur_email'] = _T(\"soapsympa:email_oublie\");\n\t}\n\telse{\n\t\tinclude_spip('inc/filtres'); # pour email_valide()\n\t\tif (!email_valide($email)){\n\t\t\t$erreurs['email'] = _T(\"form_email_non_valide\");\n\t\t}\n\t\telse{\n\t\t\tspip_log(\"Email = $email;\",\"soapsympa\");\n\t\t\t\n\t\t}\n\t}\n\n\tif(empty($listes)){\n\t\t$erreurs['listes'] = _T(\"soapsympa:choisir_liste\");\n\t}\n\n //message d'erreur generalise\n if (count($erreurs)) {\n $erreurs['message_erreur'] .= _T('soapsympa:verifier_formulaire');\n }\n\n return $erreurs; // si c'est vide, traiter sera appele, sinon le formulaire sera ressoumis\n}", "static function esCedulaValida($numero) {\r\n if (strlen($numero) == 0) {\r\n return FALSE;\r\n }\r\n $resultado = \"\";\r\n $suma = 0;\r\n $residuo = 0;\r\n $pri = false;\r\n $pub = false;\r\n $nat = false;\r\n $numeroProvincias = 22;\r\n $modulo = 11;\r\n\r\n /* Aqui almacenamos los digitos de la cedula en variables. */\r\n $d1 = substr($numero, 0, 1);\r\n $d2 = substr($numero, 1, 1);\r\n $d3 = substr($numero, 2, 1);\r\n $d4 = substr($numero, 3, 1);\r\n $d5 = substr($numero, 4, 1);\r\n $d6 = substr($numero, 5, 1);\r\n $d7 = substr($numero, 6, 1);\r\n $d8 = substr($numero, 7, 1);\r\n $d9 = substr($numero, 8, 1);\r\n $d10 = substr($numero, 9, 1);\r\n\r\n $p1 = 0;\r\n $p2 = 0;\r\n $p3 = 0;\r\n $p4 = 0;\r\n $p5 = 0;\r\n $p6 = 0;\r\n $p7 = 0;\r\n $p8 = 0;\r\n $p9 = 0;\r\n\r\n /* El tercer digito es: */\r\n /* 9 para sociedades privadas y extranjeros */\r\n /* 6 para sociedades publicas */\r\n /* menor que 6 (0,1,2,3,4,5) para personas naturales */\r\n\r\n if ($d3 == 7 || $d3 == 8) {\r\n $resultado = '0';\r\n }\r\n\r\n /* Solo para personas naturales (modulo 10) */\r\n if ($d3 < 6) {\r\n $nat = true;\r\n $p1 = $d1 * 2;\r\n if ($p1 >= 10)\r\n $p1 -= 9;\r\n $p2 = $d2 * 1;\r\n if ($p2 >= 10)\r\n $p2 -= 9;\r\n $p3 = $d3 * 2;\r\n if ($p3 >= 10)\r\n $p3 -= 9;\r\n $p4 = $d4 * 1;\r\n if ($p4 >= 10)\r\n $p4 -= 9;\r\n $p5 = $d5 * 2;\r\n if ($p5 >= 10)\r\n $p5 -= 9;\r\n $p6 = $d6 * 1;\r\n if ($p6 >= 10)\r\n $p6 -= 9;\r\n $p7 = $d7 * 2;\r\n if ($p7 >= 10)\r\n $p7 -= 9;\r\n $p8 = $d8 * 1;\r\n if ($p8 >= 10)\r\n $p8 -= 9;\r\n $p9 = $d9 * 2;\r\n if ($p9 >= 10)\r\n $p9 -= 9;\r\n $modulo = 10;\r\n }\r\n\r\n /* Solo para sociedades publicas (modulo 11) */\r\n /* Aqui el digito verficador esta en la posicion 9, en las otras 2 en la pos. 10 */\r\n else {\r\n if ($d3 == 6) {\r\n $pub = true;\r\n $p1 = $d1 * 3;\r\n $p2 = $d2 * 2;\r\n $p3 = $d3 * 7;\r\n $p4 = $d4 * 6;\r\n $p5 = $d5 * 5;\r\n $p6 = $d6 * 4;\r\n $p7 = $d7 * 3;\r\n $p8 = $d8 * 2;\r\n $p9 = 0;\r\n } else {\r\n /* Solo para entidades privadas (modulo 11) */\r\n if ($d3 == 9) {\r\n $pri = true;\r\n $p1 = $d1 * 4;\r\n $p2 = $d2 * 3;\r\n $p3 = $d3 * 2;\r\n $p4 = $d4 * 7;\r\n $p5 = $d5 * 6;\r\n $p6 = $d6 * 5;\r\n $p7 = $d7 * 4;\r\n $p8 = $d8 * 3;\r\n $p9 = $d9 * 2;\r\n }\r\n }\r\n }\r\n $suma = $p1 + $p2 + $p3 + $p4 + $p5 + $p6 + $p7 + $p8 + $p9;\r\n $residuo = $suma % $modulo;\r\n\r\n /* Si residuo=0, dig.ver.=0, caso contrario 10 - residuo */\r\n if ($residuo == 0)\r\n $digitoVerificador = 0;\r\n else\r\n $digitoVerificador = $modulo - $residuo;\r\n\r\n /* ahora comparamos el elemento de la posicion 10 con el dig. ver. */\r\n if ($pub == true) {\r\n if ($digitoVerificador != $d9) {\r\n $resultado = '0';\r\n }\r\n /* El ruc de las empresas del sector publico terminan con 0001 */\r\n if (substr($numero, 9, 4) != '0001') {\r\n $resultado = '0';\r\n }\r\n } else {\r\n if ($pri == true) {\r\n if ($digitoVerificador != $d10) {\r\n $resultado = '0';\r\n }\r\n if (substr($numero, 10, 3) != '001') {\r\n $resultado = '0';\r\n }\r\n } else {\r\n if ($nat == true) {\r\n if ($digitoVerificador != $d10) {\r\n $resultado = '0';\r\n }\r\n if (strlen($numero) > 10 && substr($numero, 10, 3) != '001') {\r\n $resultado = '0';\r\n }\r\n }\r\n }\r\n }\r\n if ($resultado == \"\") {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "function contabilizar($notas) {\r\n\t$total = 0;\r\n\t\r\n\tforeach ($notas as $valor => $quantidade) {\r\n\t\t$total += ($valor * $quantidade);\r\n\t}\r\n\r\n\treturn $total;\r\n}", "public function contAlumNormal($anio)\n { \n //$gradosMatTercerCiclo=[];$gradosVespertino=[];$gradosCompleto=[];\n //para contar alumnas en periodo normal\n //hay q filtrar por turnos Matutino,Vespertino y Completo\n $match=['anios_id'=>$anio,'turnos_id'=>1];\n $gradosMatutino=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n //$countMat=count($gradosMatutino);\n $arreglo_grados_inscritos_matutino=[];\n for($i=0;$i<count($gradosMatutino);$i++){\n $gradoId=$gradosMatutino[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosMatutino[$i]['grado'].$gradosMatutino[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosMatutino[$i]['categoria'],\n \"capacidad\"=>$gradosMatutino[$i]['capacidad'],\n \"turno\"=>\"matutino\",\n ];\n array_push($arreglo_grados_inscritos_matutino,$aux);\n }\n\n \n $match=['anios_id'=>$anio,'turnos_id'=>2];\n $gradosVespertino=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n $arreglo_grados_inscritos_vespertino=[];\n for($i=0;$i<count($gradosVespertino);$i++){\n $gradoId=$gradosVespertino[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosVespertino[$i]['grado'].$gradosVespertino[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosVespertino[$i]['categoria'],\n \"capacidad\"=>$gradosVespertino[$i]['capacidad'],\n \"turno\"=>\"Vespertino\", \n ];\n array_push($arreglo_grados_inscritos_vespertino,$aux);\n }\n\n //$countVesp=count($gradosVespertino);\n $match=['anios_id'=>$anio,'turnos_id'=>3];\n $gradosCompleto=grado::where($match)->select('categoria','grado','seccion','capacidad','turnos_id','id')->orderBy('grado')->orderBy('seccion')->get()->toArray();\n\n $arreglo_grados_inscritos_completo=[];\n for($i=0;$i<count($gradosCompleto);$i++){\n $gradoId=$gradosCompleto[$i]['id'];\n $busqueda=matricula::where('grados_id',$gradoId)->get();\n $cont=$busqueda->count();\n $gradoSeccion=$gradosCompleto[$i]['grado'].$gradosCompleto[$i]['seccion'];\n $aux=[\"gradoSeccion\"=>$gradoSeccion,\n \"cantidad\"=>$cont,\n \"categoria\"=>$gradosCompleto[$i]['categoria'],\n \"capacidad\"=>$gradosCompleto[$i]['capacidad'],\n \"turno\"=>\"completo\",\n ];\n array_push($arreglo_grados_inscritos_completo,$aux);\n }\n\n //$countComp=count($gradosCompleto);\n //dd($gradosCompleto);\n $arreglo_de_grados=[\"gradosMatutino\"=>$arreglo_grados_inscritos_matutino,\n \"gradosVespertino\"=>$arreglo_grados_inscritos_vespertino,\n \"gradosCompleto\"=>$arreglo_grados_inscritos_completo,\n \n ];\n //dd($arreglo_de_grados);\n //dd($arreglo_grados_inscritos_matutino);\n return $arreglo_de_grados;\n //$match=[''=>];\n //$nomMat=matricula::\n\n }", "private function score_physical_activity(){\r\n\t\t$data = $this->data['physical_activity'];\r\n\t\t$q24 = $this->scoreValue(array(0,3,6,12,24),$data['q24']);\r\n\t\t$q25 = $this->scoreValue(array(0,3,6,12,24),$data['q25']);\r\n\t\t$q26 = $this->scoreValue(array(0,3,6,12,24),$data['q26']);\r\n\t\t$w = ($q24 + $q25 + $q26) / 3;\r\n\r\n\t\tif ($w > 12) $raw = 5;\r\n\t\telse if ($w > 9) $raw = 4;\r\n\t\telse if ($w > 6) $raw = 3;\r\n\t\telse if ($w > 3) $raw = 2;\r\n\t\telse $raw = 1;\r\n\t\t$ob = new stdClass();\r\n\t\t$ob->total = $raw;\r\n\t\t$ob->data = array('q24-26' => array($raw,1,$raw));\r\n\t\treturn $ob;\r\n\t}", "function hitung_confidence($supp_xuy, $min_support, $min_confidence, $atribut1, $atribut2, $atribut3, $id_process, $dataTransaksi, $jumlah_transaksi) {\n\n\t\t//hitung nilai support $nilai_support_x seperti di itemset2\n\t\t$jml_itemset2=$this->jumlah_itemset2($dataTransaksi, $atribut1, $atribut2);\n\t\t$nilai_support_x=($jml_itemset2/$jumlah_transaksi) * 100;\n\n\t\t$kombinasi1=$atribut1.\" , \".$atribut2;\n\t\t$kombinasi2=$atribut3;\n\t\t$supp_x=$nilai_support_x; //$row1_['support'];\n\t\t$conf=($supp_xuy/$supp_x)*100;\n\t\t//lolos seleksi min confidence itemset3\n\t\t$lolos=($conf >=$min_confidence)? 1: 0;\n\n\t\t//hitung korelasi lift\n\t\t$jumlah_kemunculanAB=$this->jumlah_itemset3($dataTransaksi, $atribut1, $atribut2, $atribut3);\n\t\t$PAUB=$jumlah_kemunculanAB/$jumlah_transaksi;\n\n\t\t$jumlah_kemunculanA=$this->jumlah_itemset2($dataTransaksi, $atribut1, $atribut2);\n\t\t$jumlah_kemunculanB=$this->jumlah_itemset1($dataTransaksi, $atribut3);\n\n\t\t//$nilai_uji_lift = $PAUB / $jumlah_kemunculanA * $jumlah_kemunculanB;\n\t\t$nilai_uji_lift=$PAUB / (($jumlah_kemunculanA/$jumlah_transaksi) * ($jumlah_kemunculanB/$jumlah_transaksi));\n\t\t$korelasi_rule=($nilai_uji_lift<1)?\"korelasi negatif\": \"korelasi positif\";\n\n\t\tif($nilai_uji_lift==1) {\n\t\t\t$korelasi_rule=\"tidak ada korelasi\";\n\t\t}\n\n\t\t//masukkan ke table confidence\n\t\t$data=array(\"kombinasi1\"=> $kombinasi1,\n\t\t\t\"kombinasi2\"=> $kombinasi2,\n\t\t\t\"support_xUy\"=> $supp_xuy,\n\t\t\t\"support_x\"=> $supp_x,\n\t\t\t\"confidence\"=> $conf,\n\t\t\t\"lolos\"=> $lolos,\n\t\t\t\"min_support\"=> $min_support,\n\t\t\t\"min_confidence\"=> $min_confidence,\n\t\t\t\"nilai_uji_lift\"=> $nilai_uji_lift,\n\t\t\t\"korelasi_rule\"=> $korelasi_rule,\n\t\t\t\"id_process\"=> $id_process,\n\t\t\t\"jumlah_a\"=> $jumlah_kemunculanA,\n\t\t\t\"jumlah_b\"=> $jumlah_kemunculanB,\n\t\t\t\"jumlah_ab\"=> $jumlah_kemunculanAB,\n\t\t\t\"px\"=> ($jumlah_kemunculanA/$jumlah_transaksi),\n\t\t\t\"py\"=> ($jumlah_kemunculanB/$jumlah_transaksi),\n\t\t\t\"pxuy\"=> $PAUB,\n\t\t\t\"from_itemset\"=>3);\n\t\t$this->db->insert('confidence', $data);\n\n\t}", "function returnOutcome($precipProbability){\n $outcome = \"\";\n if($precipProbability < 0.05) {\n $outcome = \"Yes! 😎\";\n } else if($precipProbability >= 0.05 && $precipProbability < 0.1){\n $outcome = \"Maybe 🤔\";\n } else {\n $outcome = \"Nope 😔\";\n }\n\n return $outcome;\n}", "public function calculaPrimaMensual($plan,$odontoIn,$odontoF,$IntQuiru,$rentaMen){\n \n $planUF=0;$odontoInUF=0;$odontoFUF=0;$IntQuiruUF=0;$rentaMenUF=0; \n \n if($plan==1){$planUF=0.2140;}elseif($plan==2){$planUF=0.2560;}elseif($plan==3){$planUF=0.2990;}\n \n if($odontoIn==0){$odontoInUF=0;}elseif($odontoIn==1){$odontoInUF=0.149;}\n \n if($odontoF==0){$odontoFUF=0;}elseif($odontoF==1){$odontoFUF=0.295;}\n \n if($IntQuiru==0){$IntQuiruUF=0;}elseif($IntQuiru==1){$IntQuiruUF=0.097;}elseif($IntQuiru==2){$IntQuiruUF=0.181;}elseif($IntQuiru==3){$IntQuiruUF=0.278;}\n \n if($rentaMen==0){$rentaMenUF=0;}elseif($rentaMen==1){$rentaMenUF=0.067;}elseif($rentaMen==2){$rentaMenUF=0.099;}elseif($rentaMen==3){$rentaMenUF=0.131;}\n \n \n $primaMensual=$planUF+$odontoInUF+$odontoFUF+$IntQuiruUF+$rentaMenUF;\n return $primaMensual;\n }", "private function calculation($valor)\r\n\t{\r\n\t\t$count = count($this->settings['PROMOTIONS']);\r\n\t\tfor($x=0; $x <= $count; $x++)\r\n\t\t{\r\n\t\t\tif($valor >= $this->settings['PROMOTIONS'][$x][0] and $valor <= $this->settings['PROMOTIONS'][$x][1])\r\n\t\t\t{\r\n\t\t\t\treturn $this->settings['PROMOTIONS'][$x][2];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\t\r\n\t}", "public static function computeRatingPrediction(){\n $itemRatingPredictionArray = array();\n $sim_Rating_product =self::$sim_Rating_product;\n $simSummation= self::$simSummation;\n foreach ($sim_Rating_product as $key => $value) {\n if($simSummation[$key] != 0){\n $itemRatingPredictionArray[$key]= to2Decimal($value/$simSummation[$key]);\n }\n\n }\n arsort($itemRatingPredictionArray);\n RootMeanSquareEstimation::computeRootMeanSqEst($itemRatingPredictionArray);\n return $itemRatingPredictionArray;\n }", "function pagoMonedas($precio){\n $pago = 0;\n \n $monedas = array_fill(0,6,0); // ind 0: 1€; ind 1: 0,50€; ind 2: 0,20€; ind 3: 0,10€; ind 4: 0,05€; ind 5: 0,01€;\n \n $vueltas = 0;\n \n while($precio != $pago){\n $vueltas ++;\n echo sprintf(\"vuelta %d - pago %f<br>\",$vueltas, $pago);\n echo sprintf(\"diferencia: %f<br>\",$precio - $pago);\n if($precio - $pago >= 1){\n $monedas[0]++;\n $pago++;\n }\n elseif($precio - $pago >= 0.5){\n $monedas[1]++;\n $pago += 0.5;\n }\n elseif($precio - $pago >= 0.2){\n $monedas[2]++;\n $pago += 0.2;\n }\n elseif($precio - $pago >= 0.1){\n $monedas[3]++;\n $pago += 0.1;\n }\n elseif($precio - $pago >= 0.05){\n $monedas[4]++;\n $pago += 0.05;\n }\n elseif($precio - $pago >= 0.01){\n $monedas[5]++;\n $pago += 0.01;\n }\n else{\n echo 'Precio no válido<br>';\n break;\n }\n \n }\n return $monedas;\n}", "function hitung_confidence1($supp_xuy, $min_support, $min_confidence, $atribut1, $atribut2, $atribut3, $id_process, $dataTransaksi, $jumlah_transaksi) {\n\n\t\t//hitung nilai support seperti itemset1\n\t\t$jml_itemset1=$this->jumlah_itemset1($dataTransaksi, $atribut1);\n\t\t$nilai_support_x=($jml_itemset1/$jumlah_transaksi) * 100;\n\n\t\t$kombinasi1=$atribut1;\n\t\t$kombinasi2=$atribut2.\" , \".$atribut3;\n\t\t$supp_x=$nilai_support_x; //$row4_['support'];\n\t\t$conf=($supp_xuy/$supp_x)*100;\n\t\t//lolos seleksi min confidence itemset3\n\t\t$lolos=($conf >=$min_confidence)? 1: 0;\n\n\t\t//hitung korelasi lift\n\t\t$jumlah_kemunculanAB=$this->jumlah_itemset3($dataTransaksi, $atribut1, $atribut2, $atribut3);\n\t\t$PAUB=$jumlah_kemunculanAB/$jumlah_transaksi;\n\n\t\t$jumlah_kemunculanA=$this->jumlah_itemset1($dataTransaksi, $atribut1);\n\t\t$jumlah_kemunculanB=$this->jumlah_itemset2($dataTransaksi, $atribut2, $atribut3);\n\n\t\t$nilai_uji_lift=$PAUB / (($jumlah_kemunculanA/$jumlah_transaksi) * ($jumlah_kemunculanB/$jumlah_transaksi));\n\t\t$korelasi_rule=($nilai_uji_lift<1)?\"korelasi negatif\": \"korelasi positif\";\n\n\t\tif($nilai_uji_lift==1) {\n\t\t\t$korelasi_rule=\"tidak ada korelasi\";\n\t\t}\n\n\n\t\t//masukkan ke table confidence\n\t\t$data=array(\"kombinasi1\"=> $kombinasi1,\n\t\t\t\"kombinasi2\"=> $kombinasi2,\n\t\t\t\"support_xUy\"=> $supp_xuy,\n\t\t\t\"support_x\"=> $supp_x,\n\t\t\t\"confidence\"=> $conf,\n\t\t\t\"lolos\"=> $lolos,\n\t\t\t\"min_support\"=> $min_support,\n\t\t\t\"min_confidence\"=> $min_confidence,\n\t\t\t\"nilai_uji_lift\"=> $nilai_uji_lift,\n\t\t\t\"korelasi_rule\"=> $korelasi_rule,\n\t\t\t\"id_process\"=> $id_process,\n\t\t\t\"jumlah_a\"=> $jumlah_kemunculanA,\n\t\t\t\"jumlah_b\"=> $jumlah_kemunculanB,\n\t\t\t\"jumlah_ab\"=> $jumlah_kemunculanAB,\n\t\t\t\"px\"=> ($jumlah_kemunculanA/$jumlah_transaksi),\n\t\t\t\"py\"=> ($jumlah_kemunculanB/$jumlah_transaksi),\n\t\t\t\"pxuy\"=> $PAUB,\n\t\t\t\"from_itemset\"=>3);\n\t\t$this->db->insert('confidence', $data);\n\t}", "private function choixEffectuer()\n {\n $valider = false;//on mets le forrmulaire a faux\n $valeur = $this->recupValeur($this->position['valeur']);//on recupêre la valeur a comparer\n\n if($this->position['egal'])\n {\n \n if($this->choix == $valeur)\n {\n $valider = true;\n }\n }\n else if($this->position['different'])\n {\n \n if($this->choix != $valeur)\n {\n $valider = true;\n }\n }\n else\n {\n Erreur::declarer_dev(27);\n }\n\n return $valider;\n\n }", "public function getPotencia()\n {\n return 2.0;\n }", "function niveles($area){\n\t\tif ($area->cveentidad2=='0') return 1;\n\t\tif ($area->cveentidad3=='0') return 2;\n\t\tif ($area->cveentidad4=='0') return 3;\n\t\tif ($area->cveentidad5=='0') return 4;\n\t\tif ($area->cveentidad6=='0') return 5;\n\t\tif ($area->cveentidad7=='0') return 6;\n\t}", "function arreglasecu(){\n\t\t$mSQL='UPDATE sinv SET precio2=precio1, base2=base1, margen2=margen1 WHERE margen2>margen1';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t\t$mSQL='UPDATE sinv SET precio3=precio2, base3=base2, margen3=margen2 WHERE margen3>margen2';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t\t$mSQL='UPDATE sinv SET precio4=ROUND(ultimo*100/(100-(margen3-0.5))*(1+(iva/100)),2), base4=ROUND(ultimo*100/(100-(margen3-0.5)),2), margen4=margen3-.5 WHERE margen4>=margen3';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t}", "function arreglamargneg(){\n\t\t$mSQL='UPDATE sinv SET precio2=precio1, base2=base1, margen2=margen1 WHERE margen2<=0';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t\t$mSQL='UPDATE sinv SET precio3=precio2, base3=base2, margen3=margen2 WHERE margen3<=0';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t\t$mSQL='UPDATE sinv SET precio4=ROUND(ultimo*100/(100-(margen3*0.90))*(1+(iva/100)),2), base4=ROUND(ultimo*100/(100-(margen3*0.9)),2), margen4=margen3*.9 WHERE margen4<=0';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t}", "function suapvalint_iki_sitmecio ($metai) {\r\n if ($metai%100 == 0) {\r\n $simtmetis = $metai/100;\r\n return $simtmetis. \" osom\";\r\n }\r\n\r\n else {\r\n $simtmetis = round($metai/100,0);\r\n return $simtmetis. \" reikejo apvalint\";\r\n }\r\n}", "public static function inferensi($nilaiIPK, $nilaiPenghasilan, $nilaiJarak, $nilaiTanggungan, $nilaiRumah, $nilaiMotor, $nilaiMobil, $nilaiListrik, $nilaiAir) {\n\n echo \"Rule yang digunakan : \\n\";\n $x = 0;\n $kondisi = [];\n\n for ($ip = 0; $ip < count($nilaiIPK); $ip++) {\n for ($pn = 0; $pn < count($nilaiPenghasilan); $pn++) {\n for ($jr = 0; $jr < count($nilaiJarak); $jr++) {\n for ($tg = 0; $tg < count($nilaiTanggungan); $tg++) {\n for ($rm = 0; $rm < count($nilaiRumah); $rm++) {\n for ($mt = 0; $mt < count($nilaiMotor); $mt++) {\n for ($mb = 0; $mb < count($nilaiMobil); $mb++) {\n for ($ls = 0; $ls < count($nilaiListrik); $ls++) {\n for ($ai = 0; $ai < count($nilaiAir); $ai++) {\n if (($nilaiIPK[$ip] > 0) && ($nilaiPenghasilan[$pn] > 0) && ($nilaiJarak[$jr] > 0) && ($nilaiTanggungan[$tg] > 0) && ($nilaiRumah[$rm] > 0) && ($nilaiMotor[$mt] > 0) && ($nilaiMobil[$mb] > 0) && ($nilaiListrik[$ls] > 0) && ($nilaiAir[$ai] > 0)) {\n $alpha[$x] = min($nilaiIPK[$ip], $nilaiPenghasilan[$pn], $nilaiJarak[$jr], $nilaiTanggungan[$tg], $nilaiRumah[$rm], $nilaiMotor[$mt], $nilaiMobil[$mb], $nilaiListrik[$ls], $nilaiAir[$ai]);\n if ($ip == 2 && $jr == 2 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 2 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 1 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 1 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 1 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 0 && $tg == 2 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else if ($ip == 2 && $jr == 0 && $pn == 0 && $tg == 1 && $ai == 0 && $rm == 0 && $mt == 0 && $mb == 0 && $ls == 0) {\n $z[$x] = self::z_dapat($alpha, $x);\n $kondisi[$x] = \"dapat\";\n } else {\n $z[$x] = self::z_tidakDapat($alpha, $x);\n $kondisi[$x] = \"tidak dapat\";\n }\n echo \"IF IPK = {$nilaiIPK[$ip]} AND Penghasilan = {$nilaiPenghasilan[$pn]} AND Jarak = {$nilaiJarak[$jr]} AND Tanggungan = {$nilaiTanggungan[$tg]} AND Rumah = {$nilaiRumah[$rm]} AND Motor = {$nilaiMotor[$mt]} AND Mobil = {$nilaiMobil[$mb]} AND Listrik = {$nilaiListrik[$ls]} AND Air = {$nilaiAir[$ai]} THEN a_predikat = {$alpha[$x]} z = {$z[$x]} kondisi = {$kondisi[$x]} \\n\";\n $x++;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n self::defuzzifikasi($alpha, $z);\n }", "function calc_dream_mp_score_a($db, $dreamid, $personid) {\n global $pwpdo;\n $query = \"select pw_vote.vote as mpvote, pw_dyn_dreamvote.vote as dreamvote from\n pw_vote, pw_dyn_dreamvote, pw_division, pw_mp where\n pw_vote.division_id = pw_division.division_id and\n pw_dyn_dreamvote.division_number = pw_division.division_number and\n pw_dyn_dreamvote.division_date = pw_division.division_date\n and pw_vote.mp_id = pw_mp.mp_id\n and pw_mp.person = ? and pw_dyn_dreamvote.dream_id = ?\";\n\n $qrowarray=$pwpdo->fetch_all_rows($query,array($personid,$dreamid));\n $t = 0.0;\n $c = 0.0;\n foreach ($qrowarray as $qrow)\n {\n $weight = 1;\n $mpvote = $qrow['mpvote'];\n $mpvote = str_replace(\"tell\", \"\", $mpvote);\n $dreamvote = $qrow['dreamvote'];\n if ($dreamvote == \"aye3\" or $dreamvote == \"no3\") {\n $dreamvote = str_replace(\"3\", \"\", $dreamvote);\n $weight = 3;\n }\n $t += $weight;\n\n if ($mpvote == $dreamvote)\n $c += $weight;\n elseif ($mpvote == \"both\" or $dreamvote == \"both\")\n $c = $c + ($weight / 2);\n }\n\n return array($c, $t);\n}", "function adivinarRecinto($array_A){\n $datos=new ManejoDatos();\n $arrayBD =$datos->getEstiloSexoPromedioRecinto();\n if($array_A[0]=='DIVERGENTE'){\n $estilo=4;\n }\n if($array_A[0]=='CONVERGENTE'){\n $estilo=3;\n }\n if($array_A[0]=='ACOMODADOR'){\n $estilo=2;\n }\n if($array_A[0]=='ASIMILADOR'){\n $estilo=1;\n }\n $arrayA = array( $estilo, $array_A[1],($array_A[2] == \"Masculino\" ? 1 : 2));\n foreach ($arrayBD as $elemento) {\n if($elemento['Estilo']=='DIVERGENTE'){\n $estiloBD=4;\n }\n if($elemento['Estilo']=='CONVERGENTE'){\n $estiloBD=3;\n }\n if($elemento['Estilo']=='ACOMODADOR'){\n $estiloBD=2;\n }\n if($elemento['Estilo']=='ASIMILADOR'){\n $estiloBD=1;\n }\n $arrayB = array($estiloBD, $elemento['Promedio'], $elemento['Sexo'] == \"M\" ? 1 : 2);\n $temporal = $this->distanciaEuclidiana($arrayA, $arrayB);\n if ($temporal < $this->distancia) {\n $this->distancia = $temporal;\n $this->temporal = $elemento['Recinto'];\n }\n }\n return $this->temporal;\n }", "function vidurkis(...$skaiciai)\n {\n _pr($skaiciai);\n\n $sudetis = 0;\n foreach ($skaiciai as $val)\n {\n $sudetis += $val;\n }\n $vidurkis = $sudetis / count($skaiciai);\n return $vidurkis;\n }", "private function setVerhoging()\n {\n if($this->verkoopprijs <= 49.99 ){\n return ($this->verkoopprijs + 0.50);\n }\n if($this->verkoopprijs > 49.99 && $this->verkoopprijs <= 499.99){\n return ($this->verkoopprijs + 1.00);\n }\n if($this->verkoopprijs > 499.99 && $this->verkoopprijs <= 999.99){\n return ($this->verkoopprijs + 5.00);\n }\n if($this->verkoopprijs > 999.99){\n return ($this->verkoopprijs + 50.00);\n }\n }", "public function berekenInkoopWaarde() {\n //var_dump(['aantal'=>$this->aantal, 'waarde'=>$this->artikel->verkoopprijs]);\n return $this->aantal * $this->artikel->inkoopprijs;\n }", "function hitung_confidence2($supp_xuy, $min_support, $min_confidence,$atribut1, $atribut2, $id_process, $dataTransaksi, $jumlah_transaksi) {\n\t\t$jml_itemset1=$this->jumlah_itemset1($dataTransaksi, $atribut1);\n\t\t$nilai_support_x=($jml_itemset1/$jumlah_transaksi) * 100;\n\n\t\t$kombinasi1=$atribut1;\n\t\t$kombinasi2=$atribut2;\n\t\t$supp_x=$nilai_support_x; //$row1_['support'];\n\t\t$conf=($supp_xuy/$supp_x)*100;\n\t\t//lolos seleksi min confidence itemset3\n\t\t$lolos=($conf >=$min_confidence)? 1: 0;\n\n\t\t//hitung korelasi lift\n\t\t$jumlah_kemunculanAB=$this->jumlah_itemset2($dataTransaksi, $atribut1, $atribut2);\n\t\t$PAUB=$jumlah_kemunculanAB/$jumlah_transaksi;\n\n\t\t$jumlah_kemunculanA=$this->jumlah_itemset1($dataTransaksi, $atribut1);\n\t\t$jumlah_kemunculanB=$this->jumlah_itemset1($dataTransaksi, $atribut2);\n\n\t\t$nilai_uji_lift=$PAUB / (($jumlah_kemunculanA/$jumlah_transaksi) * ($jumlah_kemunculanB/$jumlah_transaksi));\n\t\t$korelasi_rule=($nilai_uji_lift<1)?\"korelasi negatif\": \"korelasi positif\";\n\n\t\tif($nilai_uji_lift==1) {\n\t\t\t$korelasi_rule=\"tidak ada korelasi\";\n\t\t}\n\n //masukkan ke table confidence\n $data=array(\"kombinasi1\"=> $kombinasi1,\n\t\t\t\t\"kombinasi2\"=> $kombinasi2,\n\t\t\t\t\"support_xUy\"=> $supp_xuy,\n\t\t\t\t\"support_x\"=> $supp_x,\n\t\t\t\t\"confidence\"=> $conf,\n\t\t\t\t\"lolos\"=> $lolos,\n\t\t\t\t\"min_support\"=> $min_support,\n\t\t\t\t\"min_confidence\"=> $min_confidence,\n\t\t\t\t\"nilai_uji_lift\"=> $nilai_uji_lift,\n\t\t\t\t\"korelasi_rule\"=> $korelasi_rule,\n\t\t\t\t\"id_process\"=> $id_process,\n\t\t\t\t\"jumlah_a\"=> $jumlah_kemunculanA,\n\t\t\t\t\"jumlah_b\"=> $jumlah_kemunculanB,\n\t\t\t\t\"jumlah_ab\"=> $jumlah_kemunculanAB,\n\t\t\t\t\"px\"=> ($jumlah_kemunculanA/$jumlah_transaksi),\n\t\t\t\t\"py\"=> ($jumlah_kemunculanB/$jumlah_transaksi),\n\t\t\t\t\"pxuy\"=> $PAUB,\n \"from_itemset\"=>2);\n $this->db->insert('confidence', $data);\n\n\t}", "public function prime()\n {\n return $this->primeSalaire() + $this->primeAnciennete(); // on retourne le montant de la prime annuelle\n }", "public function berekenVerkoopWaarde() {\n return $this->aantal * $this->artikel->verkoopprijs;\n }", "function calcularPrecioPedido($tipoPizza,$tamanoPizza,$masaPizza,$extrasPizza,$numeroPizzas){\r\n $precio = 0.0;\r\n //TIPO PIZZA\r\n switch ($tipoPizza) {\r\n case 'margarita':\r\n $precio = $precio + 4;\r\n break;\r\n case 'barbacoa':\r\n $precio = $precio + 4.5;\r\n break;\r\n case '4estaciones':\r\n $precio = $precio + 5;\r\n break;\r\n case '4quesos':\r\n $precio = $precio + 3.75;\r\n break;\r\n case 'carbonara':\r\n $precio = $precio + 4;\r\n break;\r\n case 'romana':\r\n $precio = $precio + 5;\r\n break;\r\n case 'mediterranea':\r\n $precio = $precio + 4.25;\r\n break;\r\n }\r\n //TAMAÑO PIZZA\r\n switch ($tamanoPizza) {\r\n case 'normal':\r\n $precio = $precio + 4;\r\n break;\r\n case 'grande':\r\n $precio = $precio + 5;\r\n break;\r\n case 'familiar':\r\n $precio = $precio + 6.5;\r\n break;\r\n }\r\n //MASA PIZZA\r\n switch ($masaPizza) {\r\n case 'fina':\r\n $precio = $precio + 2;\r\n break;\r\n case 'familiar':\r\n $precio = $precio + 2.5;\r\n break;\r\n }\r\n //EXTRAS PIZZA\r\n foreach ($extrasPizza as $key => $extras) {\r\n switch ($extras) {\r\n case 'queso':\r\n $precio += 1;\r\n break;\r\n case 'pimiento':\r\n $precio += 1;\r\n break;\r\n case 'cebolla':\r\n $precio += 1;\r\n break;\r\n case 'jamon':\r\n $precio += 1;\r\n break;\r\n case 'pollo':\r\n $precio += 1;\r\n break;\r\n }\r\n }\r\n $resultado = $precio*$numeroPizzas;\r\n return $resultado;\r\n}", "function verificarReprobados($notas_estudiante){\n $reprobados = 0;\n if(count($notas_estudiante)>0){\n foreach ($notas_estudiante as $key => $estudiantes) {\n if ((isset($estudiantes['NOTA'])?$estudiantes['NOTA']:0)<30 || $estudiantes['OBSERVACION']==20 || $estudiantes['OBSERVACION']==23 || $estudiantes['OBSERVACION']==25){\n $reprobados=1;\n break;\n }\n }\n }\n return $reprobados;\n }", "function valore_costo_gestione_ordine_amico($id_ordine,$id_user,$id_amico){\r\n $valore_globale_attuale_netto_qarr = valore_totale_ordine_qarr($id_ordine);\r\n $valore_personale_attuale_netto_qarr = valore_netto_singolo_amico($id_ordine,$id_user,$id_amico);\r\n $percentuale_mio_ordine = ($valore_personale_attuale_netto_qarr / $valore_globale_attuale_netto_qarr) *100;\r\n $costo_globale_gestione = valore_gestione($id_ordine,100);\r\n $costo_gestione = ($costo_globale_gestione / 100) * $percentuale_mio_ordine;\r\n return (float)$costo_gestione;\r\n}", "function contarReprobados($espacios_por_cursar){\n $cantidad=0;\n if(count($espacios_por_cursar)>0){\n foreach ($espacios_por_cursar as $key => $espacio) {\n if($espacio['REPROBADO']==1){\n $cantidad++;\n \t }\n }\n }\n return $cantidad; \n }", "function arreglaprecios(){\n\t\t$mSQL='UPDATE sinv SET precio2=precio1, base2=base1, margen2=margen1 WHERE precio2=0 OR precio2 IS NULL';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t\t$mSQL='UPDATE sinv SET precio3=precio2, base3=base2, margen3=margen2 WHERE precio3=0 OR precio3 IS NULL';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t\t$mSQL='UPDATE sinv SET precio4=ROUND(ultimo*100/(100-(margen3-0.5))*(1+(iva/100)),2), base4=ROUND(ultimo*100/(100-(margen3-0.5)),2), margen4=margen3-.5 WHERE precio4=0 OR precio4 IS NULL';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t}" ]
[ "0.64066863", "0.6341018", "0.6146967", "0.6099634", "0.6065809", "0.6024595", "0.5991373", "0.590928", "0.5864849", "0.5855896", "0.57625264", "0.5716372", "0.5714763", "0.56612647", "0.56468326", "0.563365", "0.56256473", "0.5603025", "0.55947447", "0.5593635", "0.5575605", "0.5555962", "0.5548926", "0.55423236", "0.55061734", "0.5490512", "0.54662544", "0.545603", "0.5449229", "0.5442542", "0.5434194", "0.5432664", "0.5422322", "0.5399654", "0.5391469", "0.5390522", "0.5388454", "0.53717566", "0.53615826", "0.53524584", "0.53378606", "0.53330135", "0.5328534", "0.5320253", "0.53167033", "0.52885544", "0.52826494", "0.5281505", "0.5272383", "0.5269227", "0.5262735", "0.52515846", "0.5249566", "0.5247003", "0.5242944", "0.5235685", "0.5230252", "0.52190924", "0.5210646", "0.5206854", "0.52043647", "0.5204221", "0.52015626", "0.51957715", "0.51957655", "0.518245", "0.5178612", "0.5174487", "0.5172365", "0.5168416", "0.5161118", "0.5149113", "0.51481956", "0.5145526", "0.5145401", "0.5140359", "0.51333433", "0.5133303", "0.5133254", "0.5123831", "0.51213247", "0.51148015", "0.5111645", "0.5101585", "0.5100064", "0.509633", "0.50942016", "0.5087997", "0.5087037", "0.5079429", "0.50746363", "0.5072156", "0.5069257", "0.50660586", "0.50621873", "0.50613105", "0.5060827", "0.5059704", "0.50585145", "0.50488144", "0.50473744" ]
0.0
-1
/ function to add new inscripcion_materia
function add_inscripcion_materia($params) { $this->db->insert('inscripcion_materia',$params); return $this->db->insert_id(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addmateria(materia $object)\n {\n $this->materias[] = $object;\n }", "function add_materia($params)\n {\n $this->db->insert('materia',$params);\n return $this->db->insert_id();\n }", "function delete_inscripcion_materia($id)\r\n {\r\n return $this->db->delete('inscripcion_materia',array('id'=>$id));\r\n }", "function alta_material(){\n\t\t$u= new Material_producto();\n\t\t$related = $u->from_array($_POST);\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\n\t\t// save with the related objects\n\t\tif($u->save($related)) {\n\t\t\techo \"<html> <script>alert(\\\"Se han registrado los datos del Material del Productos.\\\"); window.location='\".base_url().\"index.php/almacen/productos_c/formulario/list_materiales';</script></html>\";\n\t\t} else\n\t\t\tshow_error(\"\".$u->error->string);\n\t}", "public function alta_materia(Request $request)\n {\n //Utilizaremos eloquent para la insercion de datos en la BD.\n //Guardamos en varibales lo que viene de nuestro HMTL.\n $nombre = $request->nombre;\n $clave = $request->clave;\n $semestre = $request->semestre;\n $aprobados = $request->aprobados;\n $reprobados = $request->reprobados;\n\n //Ocupando al Modelo.\n MateriaModel::create([\n 'nombre' => $nombre,\n 'clave' => $clave,\n 'semestre' => $semestre,\n 'aprobados' => $aprobados,\n 'reprobados'=>$reprobados]);\n\n return redirect()->to('/Sistema/registrarMateria');\n\n }", "public function addMannequinAction(Request $request, $id)\n {\n \n $mannequin = new Mannequin();\n $em = $this->getDoctrine()->getManager();\n $produit_1 = $em->getRepository('KountacBundle:Produits_1')->find($id);\n $form = $this->createForm('Kountac\\KountacBundle\\Form\\MannequinType', $mannequin);\n $user = $this->getUser();\n $form->handleRequest($request);\n $mannequin->setMarque($user);\n $mannequin->setDateUpdate(new \\DateTime('now'));\n $mannequin->setDateAjout(new \\DateTime('now'));\n $em->persist($mannequin);\n $em->flush();\n \n $this->get('session')->getFlashBag()->add('success','Nouveau mannequin ajouté avec succès');\n return $this->redirectToRoute('adminProduits_new2', array('id' => $produit_1->getId()));\n }", "function addFormation($bdd, $notheme, $nosalle, $libelle, $datedeb, $heuredeb, $datefin, $heurefin, $intervention, $objectif, $prerequis, $contenu, $prixrepas, $nbreplaces)\n\t\t{\n\t\tif($objectif!=\"\"){\n\t\t\ttry{\n\t\t\t//ENVOI DE LA REQUETE A LA BDD\n\t\t\t$req = $bdd->prepare('INSERT INTO formation(NO_THEME, NO_SALLE, LIBELLE, DATE_DEB, HEURE_DEB, DATE_FIN, HEURE_FIN, INTERVENTION, OBJECTIF, PREREQUIS, CONTENU, PRIX_REPAS, NOMBRE_PLACE) VALUES(:NO_THEME, :NO_SALLE, :LIBELLE, :DATE_DEB, :HEURE_DEB, :DATE_FIN, :HEURE_FIN, :INTERVENTION, :OBJECTIF, :PREREQUIS, :CONTENU, :PRIX_REPAS, :NOMBRE_PLACE)');\n\t\t\t\t\t\t$req->execute(array(\n\t\t\t\t\t\t\t'NO_THEME'=>$notheme,\n\t\t\t\t\t\t\t'NO_SALLE'=>$nosalle,\n\t\t\t\t\t\t\t'LIBELLE'=>$libelle,\n\t\t\t\t\t\t\t'DATE_DEB'=>$datedeb,\n\t\t\t\t\t\t\t'HEURE_DEB'=>$heuredeb,\n\t\t\t\t\t\t\t'DATE_FIN'=>$datefin,\n\t\t\t\t\t\t\t'HEURE_FIN'=>$heurefin,\n\t\t\t\t\t\t\t'INTERVENTION'=>$intervention,\n\t\t\t\t\t\t\t'OBJECTIF'=>$objectif,\n\t\t\t\t\t\t\t'PREREQUIS'=>$prerequis,\n\t\t\t\t\t\t\t'CONTENU'=>$contenu,\n\t\t\t\t\t\t\t'PRIX_REPAS'=>$prixrepas,\n\t\t\t\t\t\t\t'NOMBRE_PLACE'=>$nbreplaces\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t \n\t\t\t\t\t\techo \"<div id='principal' class='container_12'>La formation a bien été ajouté. cliquez <a href='./accueil.php'>ici</a> pour retourner a la page d'accueil.</div>\";\n\n\t\t\t}catch(Exception $e){echo \"<div id='principal' class='container_12'>Une erreur lié aux données saisie empéche l'ajout du membre.<a href='http://localhost/ppec/accueil.php?content=creerFormation'>ici</a> pour retourner remplir le formulaire.</div>\";}\n\t\t}else{echo \"<div id='principal' class='container_12'>Le formulaire est vide. cliquez <a href='./accueil.php?content=creerFormation'>ici</a> pour retourner remplir le formulaire.</div>\";}\n\t\t\n\t\t\n\t\t\n\t}", "public function insert($maeMedico);", "public function actionCreate()\n\t{\n\t\t$model=new Materia;\n\n\t\tif(isset($_POST['Materia']))\n\t\t{\n\t\t\t\n\t\t\t$model->attributes=$_POST['Materia'];\n\t\t\t$r = Materia::model()->find(\"cod_materia='\".$model->cod_materia.\"'\");\n\t\t\t\n\t\t\tif ($model->cod_materia == null)\t{ //Si el codigo de la materia es nulo \n\t\t\t\tYii::app()->user->setFlash('error', \"El código de la asignatura es obligatorio \");\n\t\t\t}\n\t\t\telse{\n\t\t\t\n\t\t\t if($r){ // Valida si el codigo ya fue usado por otra materia\n\t\t\t\t\tYii::app()->user->setFlash('error', \"Ya existe una Asignatura con el codigo \".$model->cod_materia);\n\t\t\t//\t\terror_log('codigo de materia repetido ');\t\n\t\t\t }else{\t\t\t\n\t\t\t\t\t$cod_p = false; // El codigo padre viene vacio \n\t\t\t\n\t\t\t\t\tif ($model->cod_materia_padre != null){\n\t\t\t\t\t\t$cod_p = true;\n\t\t\t\t\t\t$var = $model->cod_materia_padre;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$x = Materia::model()->find(\"cod_materia='\".$model->cod_materia_padre.\"'\");\n\t\t\t\t//\t\terror_log('el codigo padre viene con valor');\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!$x && $cod_p == true){ //Viene un codigo y el codigo no existe \n\t\t\t\t\t\t\tYii::app()->user->setFlash('error', \"El código de la Asignatura a relacionar no existe.\");\n\t\t\t\n\t\t\t\t\t\t}else if ($cod_p && $x) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($model->save()){\n\t\t\t\t\t//\t\t\terror_log('GUARDO LA MATERIA');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} // Si el codigo a relacionar viene nulo debe guardar \n\t\t\t\t\t\t\t\terror_log('agregar hijos');\n\t\t\t\t\t\t\t\t$cli = new MiCliente();\n\t\t\t\t\t\t\t\t$res = $cli->padres_materia($var);\n\t\t\t\t\t\t//\t\terror_log('codigo a buscar '.$var);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\terror_log($res);\n\t\t\t\t\t\t\t\tif($res){\n\t\t\t\t\t\t\t\t\t$res_js=json_decode($res);\n\t\t\t\t\t\t\t\t\tforeach( $res_js as $itb){\n\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$sql = Yii::app()->db->createCommand()->insert('relacion_materia',array('id_materia_hija'=>$model->id_materia,'id_materia_padre'=>$itb->id_materia_padre));\t\t\t\n\t\t\t\t\t\t\t\t\t\t$sql = Yii::app()->db->createCommand()->insert('relacion_materia',array('id_materia_hija'=>$model->id_materia,'id_materia_padre'=>$itb->id_materia_hija));\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//\t\terror_log('SALI del for');\n\t\t\t\t\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$sql = Yii::app()->db->createCommand()->insert('relacion_materia',array('id_materia_hija'=>$model->id_materia,'id_materia_padre'=>$x->id_materia));\n\t\t\t\t\t\t\t\t//\terror_log('No trajo informacion');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//error_log('ahora guardar materia');\n\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$this->redirect(array('view','id'=>$model->id_materia));\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif($model->save()) // Si el codigo a relacionar viene nulo debe guardar \n\t\t\t\t\t\t\t\t\t$this->redirect(array('view','id'=>$model->id_materia));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t}// fin del segundo else. El codigo de la materia ya esta siendo usado \t\n\t\t} // fin del primer else \n\t} //fin del isset\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "public function store(MatriculacionRequest $request)\n {\n\n\n $date = Carbon::now();\n\n $matricular = new Matriculacion;\n $matricular->inscripcion_id = $request->inscripcion_id;\n $matricular->cedula = $request->cedula;\n $matricular->nombres = $request->nombres;\n $matricular->apellidos = $request->apellidos;\n $matricular->curso = $request->curso;\n $matricular->especialidad = $request->especialidad;\n $matricular->paralelo = $request->paralelo;\n $matricular->cedula_r = $request->cedula_r;\n $matricular->razon_social = $request->razon_social;\n $matricular->direccion_factura = $request->direccion_factura;\n $matricular->telefono_factura = $request->telefono_factura;\n $matricular->codigo = $request->codigo;\n $matricular->tipo_estudiante = $request->tipo_estudiante;\n $matricular->fecha_creacion = $date->format('Y-m-d');\n $matricular->save();\n return redirect()->route('matricular.index')->with('info', 'Se ha matriculado correctamente al estudiante');\n\n\n }", "public function Nuevo(){\n\t\tDB::table(\"materia\")->insertGetId(array(\n\t\t\t\"periodo_idperiodo\" => $_POST[\"periodo\"],\n\t\t\t\"carrera_idcarrera\" => $_POST[\"carrera\"],\n\t\t\t\"nombre\" =>$_POST[\"nombre\"]));\n\t\t\n\t\treturn Redirect::to(\"/inicio\");\n\t}", "public function addMaquinaAction(Request $request,$id)\n {\n \n $sublinia_repo = $this->getDoctrine()->getRepository('AppBundle:Sublinia');\n $Sublinia = $sublinia_repo->findById($id);\n\n\n $form = $this->createForm(new MaquinaToSubliniaType(), $Sublinia);\n\n\n // comprovem si el formulari ja ha sigut enviat\n // -----------------------------------------------------------\n $form->handleRequest($request);\n\n if ($form->isValid()) { \n // si el formulari es vàlid el guardem a la base de dades\n\n $em = $this->getDoctrine()->getManager();\n $em->persist($Sublinia);\n $em->flush();\n\n }\n return $this->render(\n \t'AppBundle:content:add_Maquina.html.twig',\n \tarray(\n 'form' => $form->createView(), \n ));\n }", "public function addMedallaParticipante($id_exist, $nuevaMedallaCompetitor)\n\t{\n\t\t$current_user = wp_get_current_user();\n\t\t$medallas_participante = get_user_meta($current_user->ID, 'medallas', true);\n\t\tif ($medallas_participante == '') $medallas_participante = [];\n\n\t\t$medallas_participante[$id_exist]['count'] = isset($medallas_participante[$id_exist]) ? $medallas_participante[$id_exist]['count'] + 1 : 1;\n\t\t$medallas_participante[$id_exist]['fecha_ultima_cargada'] = date('Y-m-d');\n\t\t$medallas_participante[$id_exist]['codigo'] = 1;\n\n\t\tupdate_user_meta($current_user->ID, 'medallas', $medallas_participante);\n\n\t\tif ( date('Y-m-d H:i:s') < '2017-01-05 14:00:00' ) {\n\t\t\t$this->saveTotalMedallasPArticipante($current_user->ID, count($medallas_participante));\n\t\t}\n\n\n\t}", "function insertar(){\n $conexion = mysqli_connect(\"localhost\",\"root\",\"\",'dynasoft');\n $query= \"INSERT INTO Material (Id_Material,NOMBRE_MATERIAL,UNIDAD_MEDIDA,CANTIDAD_MATERIAL,DESCRIPCION,Fecha_Vencido)\n VALUES ('$this->id_material','$this->nombre','$this->unidad','$this->cantidad','$this->descripcion','$this->fecha_vencido')\";\n $resultado = mysqli_query($conexion,$query);\n\n mysqli_close($conexion);\n }", "function get_inscripcion_materia($id)\r\n {\r\n return $this->db->get_where('inscripcion_materia',array('id'=>$id))->row_array();\r\n }", "public function create(Request $request)\n {\n $dd = new Demandeur();\n $materiel = new Materiel();\n $listdd = $dd->all();\n $imMat = $request->select_mat;\n //récupération des infos du matos\n $materiel = $materiel->where('numImmat',$imMat)\n ->orWhere('codeProduit',$imMat)\n ->first();\n $idMat = $materiel->id;\n return view('pagesGermac.Exploitation.createExp',compact('imMat','listdd','idMat'));\n }", "function setNombre_materia($nombre_materia){\n\t\t\n\t\t$this->nombre_materia = $nombre_materia;\n\t\t$this->cambios = true;\n\t}", "public function store(CreateMateria_PrimaRequest $request)\n {\n $input = $request->all();\n\n $input['nombre'] = strtoupper($input['nombre']);\n $input['unidad_medida'] = strtoupper($input['unidad_medida']);\n $materiaPrima = $this->materiaPrima->create($input);\n $materiaPrima->terceros()->attach($input['tercero_id']);\n Log::info('Materia_Prima, store, Se almaceno la materia prima: ' . $materiaPrima->id . ', con el tercero: ' . $input['tercero_id'], [$input]);\n\n Flash::success('Materia_Prima saved successfully.');\n\n return redirect(route('materiaPrima.show', [$materiaPrima->id]));\n }", "public function add_itens_nota($id_nota) {\n\t\t$controle = $this->notas_model->add_item($id_nota);\n\t\tif ($controle === FALSE) {\n\t\t# Bloco de auditoria\n\t\t\t$auditoria = array(\n\t\t\t\t\t'auditoria' => \"Tentativa de incluir novo item na nota fiscal ID n° $id_nota\",\n\t\t\t\t\t'idmilitar' => $this->session->userdata['id_militar'], #Checar quem está acessando e permissões\n\t\t\t\t\t'idmodulo' => $this->session->userdata['sistema']\n\t\t\t);\n\t\t\t$this->clog_model->audita($auditoria, 'inserir');\n\t\t# .Bloco de auditoria\n\t\t\t$this->session->set_flashdata('mensagem', array('type' => 'alert-danger', 'msg' => 'Erro ao adicionar o item a nota, por favor, verifique se o preenchimento do formulário está correto!'));\n\t\t}\n\t\telse {\n\t\t\t# Bloco de auditoria\n\t\t\t$info_nota = $this->notas_model->dados_notas($id_nota);\n\t\t\t$auditoria = array(\n\t\t\t\t\t'auditoria' => \"Incluiu novo item($controle->modelo) na nota fiscal de n° $info_nota->numero, expedida pela $info_nota->empresa\",\n\t\t\t\t\t'idmilitar' => $this->session->userdata['id_militar'], #Checar quem está acessando e permissões\n\t\t\t\t\t'idmodulo' => $this->session->userdata['sistema']\n\t\t\t);\n\t\t\t$this->clog_model->audita($auditoria, 'inserir');\n\t\t\t# .Bloco de auditoria\n\t\t\t$this->session->set_flashdata('mensagem', array('type' => 'alert-success', 'msg' => 'Item adicionado com sucesso!'));\n\t\t}\n\t\tredirect(\"clog/notas/itens_nota/$id_nota\");\n\t}", "function agregarMarca()\r\n\t{\r\n\t\t$mkNombre= $_POST['mkNombre'];\r\n\t\t$link = conectar();\r\n\t\t// EDITOR DE TEXTO al seleccionar $mkNombre y click en ' encierra entre '' idem click en \" al pulsarla\r\n\t\t// No puedo dejar así una variable dentro de las comillas (aunque funcione) PERO ademas debe tener el SQL\r\n\t\t// las comillas que encierren el string\r\n\t\t$sql = \"INSERT INTO marcas (mkNombre) VALUE ('\" . $mkNombre . \"')\"; \r\n\t\t$resultado = mysqli_query ($link, $sql)\r\n\t\t\t\t\t\tor die(mysqli_error($link));\r\n\t\treturn $resultado; \t// true si insertó, false si falló\r\n\r\n\t\t/* si quisiera id y otras cosas las meto en un array para el return y uso el array AFUERA\r\n\t\tif ($resultado){\r\n\t\t\t$id = mysql_insert_id($link);\r\n\t\t\t$salida = [$resultado, $id, $ mkNombre];\r\n\t\t}\r\n\t\treturn $salida; \r\n\t\t*/\r\n\t}", "public function store(Request $request)\n {\n // dd($request->all());\n $this->validate($request, [\n 'matiere_id' => 'required',\n 'professeur_id'=>'required',\n 'school_id' => 'required',\n //'professeur_id'=>'required'\n ]);\n\n\n $professeur = User::findOrFail($request->professeur_id);\n\n $matiere = Matiere::findOrFail($request->matiere_id);\n\n $professeur->matieres()->attach($matiere->id);\n \n flash('success')->success();\n\n return redirect()->route('professeursMatieres.index');\n\n\n }", "function setMateria($materia){\n\t\t\n\t\t$this->materia = $materia;\n\t\t$this->cambios = true;\n\t}", "public function procesarmateria()\n\t{\n\t\t$valido = true;\n\t\t$id_usuario = $this->session->userdata('id_usuario');\n\t\t\n\t\t/////////////////////////// Captura de datos /////////////////////////////\n\t\t$id_profesor = $this->input->post('id_profesor');\n\t\t$id_materia = $this->input->post('materia_agregar');\n\t\t\n\t\t/////////////////////////// Validacion de datos //////////////////////////\n\t\tif ($this->Profesor_Materia_model->existe_relacion_profesor_materia($id_profesor, $id_materia))\n\t\t{\n\t\t\t$valido = false;\n\t\t\t$this->session->set_userdata('resultado_operacion','error');\n\t\t\t$this->session->set_userdata('mensaje_operacion','Profesor ya tiene asignada esa materia');\n\t\t}\n\t\t\n\t\t/////////////////////////// Ejecucion de logica //////////////////////////\n\t\tif ($valido)\n\t\t{\n\t\t\t$this->Profesor_Materia_model->insertar_detalle_materia_profesor($id_profesor, $id_materia);\n\t\t\t$this->session->set_userdata('resultado_operacion','exito');\n\t\t\t$this->session->set_userdata('mensaje_operacion','Se le ha asignado la materia al profesor exitosamente');\n\t\t}\n\t\t\n\t\tredirect('/editarprofesor/index/' . $id_profesor);\n\t}", "function insertarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_ime';\n\t\t$this->transaccion='SNX_MAQ_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('potencia','potencia','numeric');\n\t\t$this->setParametro('peso','peso','numeric');\n\t\t$this->setParametro('maquinaria','maquinaria','varchar');\n\t\t$this->setParametro('id_factorindexacion','id_factorindexacion','int4');\t\t\n\t\t$this->setParametro('id_tipopreciomaquinaria','id_tipopreciomaquinaria','int4');\n\t\t$this->setParametro('id_ambitoprecio','id_ambitoprecio','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function imprimirMatricula($cedulaEstudiante) {\n $this->view->anio = $this->model->anio();\n $this->view->director = $this->model->director();\n $this->view->consultaDatosEstudiante = $this->model->consultaDatosEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de las enfermedades del Estudiante */\n $this->view->enfermedadEstudiante = $this->model->enfermedadEstudiante($cedulaEstudiante);\n \n /* Cargo informacion de la adecuacio del Estudiante */\n $this->view->adecuacionEstudiante = $this->model->adecuacionEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de Becas */\n $this->view->becasEstudiante = $this->model->becasEstudiante($cedulaEstudiante);\n\n /* Cargo informacion del encargado Legal del Estudiante */\n $this->view->encargadoLegal = $this->model->encargadoLegal($cedulaEstudiante);\n\n /* Cargo informacion de la Madre del Estudiante */\n $this->view->madreEstudiante = $this->model->madreEstudiante($cedulaEstudiante);\n\n /* Cargo informacion del Padre del Estudiante */\n $this->view->padreEstudiante = $this->model->padreEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de la Persona en caso de Emergencia del Estudiante */\n $this->view->personaEmergenciaEstudiante = $this->model->personaEmergenciaEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de la poliza del Estudiante */\n $this->view->polizaEstudiante = $this->model->polizaEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de la Condicion de Matricula */\n $this->view->infoCondicionMatricula = $this->model->infoCondicionMatricula($cedulaEstudiante);\n\n /* Cargo informacion de la especialidad del Estudiante */\n $this->view->especialidadEstudiante = $this->model->especialidadEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de Adelanto/Arrastre */\n $this->view->infoAdelanta = $this->model->infoAdelanta($cedulaEstudiante);\n \n $this->view->render('matricula/imprimirMatricula');\n }", "public function create()\n {\n return view('solicitacao_material_itens.create');\n }", "public function create()\n {\n $materia = materia::all();\n $curso = curso::all();\n return view('materia.create', compact('materia'),compact('curso'));\n }", "public function saveProfessorMaterias(){\n \tif (!isset(Request::all()['data'])) {\n \t\t$materias = [];\n \t}else{\n \t\t$materias = Request::all()['data']; \t\t\n \t}\n \t\n \t$oldMaterias = MateriasProfessor::where('professor_id', Auth::user()->professor->id)->get();\n\n \t//Check if as any materia to delete \t\n \t$this->checkMateriaToDelete($oldMaterias, $materias);\n\t\t\n\t\t//add new materias;\n \t$this->addNewMaterias($oldMaterias, $materias);\n\n \treturn 'true';\n }", "#[IsGranted('ROLE_SEPULTURE_ADMIN')]\n #[Route(path: '/new', name: 'materiaux_new', methods: ['GET', 'POST'])]\n public function new(Request $request): Response\n {\n $entity = new Materiaux();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->managerRegistry->getManager();\n $em->persist($entity);\n $em->flush();\n $this->addFlash('success', 'Le matériaux a bien été ajouté');\n\n return $this->redirectToRoute('materiaux');\n }\n\n return $this->render(\n '@Sepulture/materiaux/new.html.twig',\n [\n 'entity' => $entity,\n 'form' => $form->createView(),\n ]\n );\n }", "function editarMaterial($empleados, $pentalon,$fecha, $talla,$cantidad){\n //realizamos la consuta y la guardamos en $sql\n $sql=\"INSERT INTO material_entregado(id, empleado,materiales,fecha_entrega,talla,cantidad) VALUES (null, \".$empleados.\",'\".$pentalon.\"','\".$fecha.\"','\".$talla.\"', '\".$cantidad.\"')\";\n //Realizamos la consulta utilizando la funcion creada en db.php\n $resultado=$this->realizarConsulta($sql);\n if($resultado!=false){\n return true;\n }else{\n return null;\n }\n\n }", "public function insert($kelasMateri);", "public function crear_campos_dinamicos($modulo,$id_registro=null,$col_lab=4,$col_cam=10){\n if(!class_exists('Template')){\n import(\"clases.interfaz.Template\");\n }\n \n $ut_tool = new ut_Tool();\n $html = '';\n \n $columnas_fam=$this->cargar_parametros_familias();//cargar datos de familias\n \n $desc_valores_params = $valores_params = array();\n if ($id_registro!= null){\n //echo \"id registro: \".$id_registro;\n $sql = \"SELECT item_f.id id_item,item_f.descripcion descripcion_item FROM mos_requisitos_item as item INNER JOIN mos_requisitos_items_familias as item_f ON item.id_item=item_f.id WHERE id_requisitos = $id_registro\";\n //echo $sql;\n $data_params = $this->dbl->query($sql, array());\n foreach ($data_params as $value_data_params) {\n $valores_params[$value_data_params[id_item]] = $value_data_params[id_item];\n $desc_valores_params[$value_data_params[id_item]] = $value_data_params[descripcion_item];\n } \n }\n \n $js = $html = $nombre_campos = \"\";\n $html .= '<div class=\"form-group\">'\n . '<label class=\"col-md-4 control-label\" control-label\">FAMILIAS:</label></div>';\n $cont=0;\n foreach ($columnas_fam as $value) {\n $condicion=\"\";\n $primera_opc=' <option selected=\"\" value=\"\">-- Seleccione --</option>';\n if($id_registro!= null && isset($data_params[$cont][id_item])){//para editar\n $primera_opc= '<option selected=\"\" value=\"'.$data_params[$cont][id_item].'\">'.$data_params[$cont][descripcion_item].'</option>';\n $condicion=\"and id<>\".$data_params[$cont][id_item];\n }\n if($id_registro== null){// un nuevo*/\n $primera_opc=' <option selected=\"\" value=\"\">-- Seleccione --</option>';\n $condicion=\"\";\n }\n $nombre_campos .= \"campo_\".$value[id].\",\";\n//construir los select dinamicos para el formulario de requisitos\n $html .= '<div class=\"form-group\">'\n . '<label for=\"campo-'.$value[id].'\" class=\"col-md-4 control-label\">' . ucwords(strtolower($value[descripcion] )). '</label>'; \n $html .= '<div class=\"col-md-10\"> \n <select class=\"form-control\" name=\"campo_' . $value[id] . '\" id=\"campo_' . $value[id] . '\" data-validation=\"required\">';\n $html.=$primera_opc;// si es editar muestra de primera opcion el que tiene y si es nuevo. muestra opcion seleccione\n //echo \"SELECT id, descripcion from mos_requisitos_items_familias where id_familia=\".$value[id].\" \".$condicion.\"\";\n $html .= $ut_tool->OptionsCombo(\"SELECT id, descripcion from mos_requisitos_items_familias where id_familia=\".$value[id].\" \".$condicion.\"\"\n , 'id'\n , 'descripcion', $valores_params[$value[id]]);\n $cont++;\n $html .= '</select></div>';\n $html .= '</div>';\n\n \n \n }\n $array[nombre_campos] = $nombre_campos;\n $array[html] = $html;\n return $array;\n }", "public function creaInsegnamentoDaCodice($codice) {\n \n \n $query = \"select \n insegnamenti.id insegnamenti_id,\n insegnamenti.titolo insegnamenti_titolo,\n insegnamenti.cfu insegnamenti_cfu,\n insegnamenti.codice insegnamenti_codice,\n\n docenti.id docenti_id,\n docenti.nome docenti_nome,\n docenti.cognome docenti_cognome,\n docenti.email docenti_email,\n docenti.citta docenti_citta,\n docenti.cap docenti_cap,\n docenti.via docenti_via,\n docenti.provincia docenti_provincia,\n docenti.numero_civico docenti_numero_civico,\n docenti.ricevimento docenti_ricevimento,\n docenti.username docenti_username,\n docenti.password docenti_password,\n dipartimenti.id dipartimenti_id,\n dipartimenti.nome dipartimenti_nome,\n CdL.id CdL_id,\n CdL.nome CdL_nome,\n CdL.codice CdL_codice\n from insegnamenti\n join docenti on insegnamenti.docente_id = docenti.id \n join dipartimenti on docenti.dipartimento_id = dipartimenti.id \n join CdL on insegnamenti.cdl_id = CdL.id\n where insegnamenti.codice = ?\";\n $mysqli = Db::getInstance()->connectDb();\n if (!isset($mysqli)) {\n error_log(\"[creaInsegnamentoDaCodice] impossibile inizializzare il database\");\n $mysqli->close();\n return $insegnamenti;\n }\n \n $stmt = $mysqli->stmt_init();\n $stmt->prepare($query);\n if (!$stmt) {\n error_log(\"[creaInsegnamentoDaCodice] impossibile\" .\n \" inizializzare il prepared statement\");\n $mysqli->close();\n return null;\n }\n\n if (!$stmt->bind_param('s', $codice)) {\n error_log(\"[creaInsegnamentoDaCodice] impossibile\" .\n \" effettuare il binding in input\");\n $mysqli->close();\n return null;\n }\n\n $insegnamenti = self::caricaInsegnamentiDaStmt($stmt);\n if(count($insegnamenti) > 0){\n $mysqli->close();\n return $insegnamenti[0];\n }else{\n $mysqli->close();\n return null;\n }\n }", "public function add_familiar(){\n\t\t$this->autenticate();//verifica si el usuario este ingresado al sistema\n\t\t$nombre = \"'\".$_POST['nombre'].\"'\";\n\t\t$localizar_emergencia = \"'\".$_POST['localizar_emergencia'].\"'\";\n\t\t$prioridad_localizar = $_POST['prioridad_localizar'];\n\t\t$parentesco = \"'\".$_POST['parentesco'].\"'\";\n\t\t$fecha_nacimiento = \"'\".$_POST['fecha_nacimiento'].\"'\";\n\t\t$telefono = \"'\".$_POST['telefono'].\"'\";\n\t\t$correo = \"'\".$_POST['correo'].\"'\";\n\t\t$administrativo_id = $_POST['administrativo_id'];\n\t\trequire_once(\"../app/models/administrativo.php\");//conexion entre los controladores\n\t\t$administrativo=new Administrativo();\n\t\t$administrativo->new_familiar($nombre,$localizar_emergencia,$prioridad_localizar,$parentesco,$fecha_nacimiento,$telefono,$correo,$administrativo_id);//ingresa los datos a la base de datos\n\t\t$administrativo_id = strval($administrativo_id);//convierte el administrativo_id de entero a string\n\t\theader(\"Location: http://localhost:8000/administrativos/show/$administrativo_id\");\n\t\texit;\n\t\t$this->view('administrativos/index', []);\n\t}", "public function newAction(Request $request) {\n $materiel = new Materiel();\n $form = $this->createForm('SPORT\\LocationBundle\\Form\\MaterielType', $materiel);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n\n\n $em = $this->getDoctrine()->getManager();\n\n\n $em->persist($materiel);\n $em->flush();\n \n $session = $request->getSession();\n \n $session->getFlashBag()->add('notification', \"le matériel \".$materiel->getMaterielNom().\" a été créée avec succès\");\n\n\n return $this->redirectToRoute('materieladmin_show', array('id' => $materiel->getId()));\n }\n\n return $this->render('SPORTLocationBundle:materieladmin:new.html.twig', array(\n 'materiel' => $materiel,\n 'form' => $form->createView(),\n ));\n }", "public function store(Request $request)\n {\n //Para guardar la matricula tengo que recibir:\n //id del estudiante,\n //id del grado,\n //fecha de la matricula (cuando se creo)\n //el nombre de la matricula (iniciales del nombre+anio de matricula)\n //la descripcion , creo q esta es opcional\n\n //$matriculas = matricula::create($request->all());\n $idUsuario=auth()->id();\n //$data=$request->all();\n //dd(gettype((int)$request->input(\"gradoId\")));\n //dd($request);\n $gradosId=(int)$request->input(\"gradoIde\");\n \n //contar cuantos registros con el id del grado hay \n //esto se creo para que cuando alcanse la capacidad maxima el grado , no se puedan inscribir mas alumnas en el \n $match=['grados_id'=>$gradosId];\n $registros=Matricula::where($match)->select('id')->get();\n $contRegistros=$registros->count();\n $capacidad=grado::where('id',$gradosId)->select('capacidad')->get()->toArray();\n //dd($capacidad[0]['capacidad']);\n if($contRegistros==$capacidad[0]['capacidad']){\n Session::flash('info_message', 'No se puede inscribir , el grado ya esta lleno');\n return redirect()->route('matriculas.index');\n }else{\n $matriculas = Matricula::create(['nombre'=>$request->input(\"nombreMat\"),\n 'descripcion'=>$request->input(\"descripcion\"),\n 'fecha_matricula'=>$request->input(\"fecha\"),\n 'users_id'=>$idUsuario,\n 'estudiantes_id'=>(int)$request->input(\"estudianteId\"),\n 'grados_id'=>$gradosId,\n 'tipoMatricula'=>$request->input(\"tipoMatricula\"),\n ]);\n //dd($matriculas);\n $matriculas->save();\n Session::flash('success_message', 'Materia guardada con éxito');\n\n return redirect()->route('matriculas.index', compact('matriculas'));\n }\n\n \n //->with('info', 'Matrícula guardada con éxito');\n }", "public function store(AddReserva $request)\n { \n if($request['accion'])//Si es guardar\n {\n $Arreglo=$request['lista'];\n //Agregamos a la tabla reservacion\n $reservacion=Reservacion::create([\n 'Cedula_Cliente'=>$request['Cedula_Cliente'], \n 'Nombre_Contacto'=> $request['Nombre_Contacto'],\n 'Direccion_Local'=>$request['Direccion_Local'],\n 'iva'=>$Arreglo[count($Arreglo)-1][1],\n 'rowfac'=>$Arreglo[count($Arreglo)-1][3],\n 'Fecha_Inicio'=>$request['Fecha_Inicio'],\n 'Fecha_Fin'=>$request['Fecha_Fin'],\n ]);\n //Hacemos un recorrido en el arreglo que posee toda la descripcion de la factura para poder agregar cada unda de las descripciones\n for($i=0;$i<(count($Arreglo)-1);$i++)//restamos 1 porque la ultima fila es especial\n {\n $des=Descripcion::create([\n 'Cantidad'=> $Arreglo[$i][1],\n 'Nombre'=>$Arreglo[$i][0].\" - dias(\".$Arreglo[$i][3].\")\",\n 'P_Unitario'=>$Arreglo[$i][2],\n 'Total'=>$Arreglo[$i][4],\n ]);\n DesRe::create([\n 'idReservacion'=>$reservacion[\"ID_Reservacion\"],\n 'idDescripcion'=>$des['IdDescripcion'],\n ]);\n if(substr($Arreglo[$i][5], -4)==\"Arti\")\n {\n invenDes::create([\n 'ID_Objeto' => substr($Arreglo[$i][5],0,-4),\n 'ID_Descripcion' => $des['IdDescripcion']\n ]); \n }\n else\n {\n menudes::create([\n 'id_menu' => substr($Arreglo[$i][5],0,-4),\n 'id_descripcion' => $des['IdDescripcion']\n ]); \n }\n //Else y se almancena en la tabla puente entre descripcion y menu\n }\n return 1;\n }\n else\n {\n $x=explode(\",\", $request[\"lista\"]);//Guardamos como arreglo unidimencional\n $i=0;\n $Arreglo=[];\n $fila=[];\n $CC=$request['Cedula_Cliente'];\n $NC= $request['Nombre_Contacto'];\n $DL=$request['Direccion_Local'];\n $FI=$request['Fecha_Inicio'];\n $FF=$request['Fecha_Fin'];\n $facactual=$request['facactual'];\n foreach($x as $elemento)//Recorremos el arreglo\n {\n if($i==6)//hacemos la agregacion de fila cada 6 elementos\n {\n array_push($Arreglo,$fila);\n $fila=[];//inicializamos\n $i=0;\n }\n if($i!=5)//No almacenamos el id\n array_push($fila,$elemento);//Arreglo de cada fila\n $i++;\n }\n array_push($Arreglo,$fila);//agregamos la ultima fila que posee 3 elementos\n $pdf=PDF::loadView('reservacion.fac', compact('CC', 'NC', 'DL','FI', 'FF','Arreglo','facactual'));//cargamos la vista\n $now = new \\DateTime();\n return $pdf->stream('factura'.$now->format('Y-m-d_H_i_s').'.pdf');//definimos el nombre por defecto del archivo\n }\n\n }", "function insertarSolicitudCompletaMenor()\r\n {\r\n $cone = new conexion();\r\n $link = $cone->conectarpdo();\r\n $copiado = false;\r\n try {\r\n $link->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n $link->beginTransaction();\r\n\r\n /////////////////////////\r\n // inserta cabecera de la solicitud de compra\r\n ///////////////////////\r\n\r\n //Definicion de variables para ejecucion del procedimiento\r\n $this->procedimiento = 'adq.f_solicitud_modalidades_ime';\r\n $this->transaccion = 'ADQ_SOLMODAL_INS';\r\n $this->tipo_procedimiento = 'IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('estado_reg', 'estado_reg', 'varchar');\r\n $this->setParametro('id_solicitud_ext', 'id_solicitud_ext', 'int4');\r\n $this->setParametro('presu_revertido', 'presu_revertido', 'varchar');\r\n $this->setParametro('fecha_apro', 'fecha_apro', 'date');\r\n $this->setParametro('estado', 'estado', 'varchar');\r\n $this->setParametro('id_moneda', 'id_moneda', 'int4');\r\n $this->setParametro('id_gestion', 'id_gestion', 'int4');\r\n $this->setParametro('tipo', 'tipo', 'varchar');\r\n $this->setParametro('num_tramite', 'num_tramite', 'varchar');\r\n $this->setParametro('justificacion', 'justificacion', 'text');\r\n $this->setParametro('id_depto', 'id_depto', 'int4');\r\n $this->setParametro('lugar_entrega', 'lugar_entrega', 'varchar');\r\n $this->setParametro('extendida', 'extendida', 'varchar');\r\n $this->setParametro('numero', 'numero', 'varchar');\r\n $this->setParametro('posibles_proveedores', 'posibles_proveedores', 'text');\r\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\r\n $this->setParametro('comite_calificacion', 'comite_calificacion', 'text');\r\n $this->setParametro('id_categoria_compra', 'id_categoria_compra', 'int4');\r\n $this->setParametro('id_funcionario', 'id_funcionario', 'int4');\r\n $this->setParametro('id_estado_wf', 'id_estado_wf', 'int4');\r\n $this->setParametro('fecha_soli', 'fecha_soli', 'date');\r\n $this->setParametro('id_proceso_macro', 'id_proceso_macro', 'int4');\r\n $this->setParametro('id_proveedor', 'id_proveedor', 'int4');\r\n $this->setParametro('tipo_concepto', 'tipo_concepto', 'varchar');\r\n $this->setParametro('fecha_inicio', 'fecha_inicio', 'date');\r\n $this->setParametro('dias_plazo_entrega', 'dias_plazo_entrega', 'integer');\r\n $this->setParametro('precontrato', 'precontrato', 'varchar');\r\n $this->setParametro('correo_proveedor', 'correo_proveedor', 'varchar');\r\n\r\n $this->setParametro('nro_po', 'nro_po', 'varchar');\r\n $this->setParametro('fecha_po', 'fecha_po', 'date');\r\n\r\n $this->setParametro('prioridad', 'prioridad', 'integer');\r\n\r\n $this->setParametro('tipo_modalidad', 'tipo_modalidad', 'varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $stmt = $link->prepare($this->consulta);\r\n $stmt->execute();\r\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\r\n\r\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\r\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\r\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\r\n throw new Exception(\"Error al ejecutar en la bd\", 3);\r\n }\r\n\r\n $respuesta = $resp_procedimiento['datos'];\r\n\r\n $id_solicitud = $respuesta['id_solicitud'];\r\n\r\n //////////////////////////////////////////////\r\n //inserta detalle de la solicitud de compra\r\n /////////////////////////////////////////////\r\n\r\n\r\n //decodifica JSON de detalles\r\n $json_detalle = $this->aParam->_json_decode($this->aParam->getParametro('json_new_records'));\r\n\r\n //var_dump($json_detalle)\t;\r\n foreach ($json_detalle as $f) {\r\n\r\n $this->resetParametros();\r\n //Definicion de variables para ejecucion del procedimiento\r\n $this->procedimiento = 'adq.f_solicitud_det_ime';\r\n $this->transaccion = 'ADQ_SOLD_INS';\r\n $this->tipo_procedimiento = 'IME';\r\n //modifica los valores de las variables que mandaremos\r\n $this->arreglo['id_centro_costo'] = $f['id_centro_costo'];\r\n $this->arreglo['descripcion'] = $f['descripcion'];\r\n $this->arreglo['precio_unitario'] = $f['precio_unitario'];\r\n $this->arreglo['id_solicitud'] = $id_solicitud;\r\n $this->arreglo['id_orden_trabajo'] = $f['id_orden_trabajo'];\r\n $this->arreglo['id_concepto_ingas'] = $f['id_concepto_ingas'];\r\n $this->arreglo['precio_total'] = $f['precio_total'];\r\n $this->arreglo['cantidad_sol'] = $f['cantidad_sol'];\r\n $this->arreglo['precio_ga'] = $f['precio_ga'];\r\n $this->arreglo['precio_sg'] = $f['precio_sg'];\r\n\r\n $this->arreglo['id_activo_fijo'] = $f['id_activo_fijo'];\r\n $this->arreglo['codigo_act'] = $f['codigo_act'];\r\n $this->arreglo['fecha_ini_act'] = $f['fecha_ini_act'];\r\n $this->arreglo['fecha_fin_act'] = $f['fecha_fin_act'];\r\n\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_centro_costo', 'id_centro_costo', 'int4');\r\n $this->setParametro('descripcion', 'descripcion', 'text');\r\n $this->setParametro('precio_unitario', 'precio_unitario', 'numeric');\r\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\r\n $this->setParametro('id_orden_trabajo', 'id_orden_trabajo', 'int4');\r\n $this->setParametro('id_concepto_ingas', 'id_concepto_ingas', 'int4');\r\n $this->setParametro('precio_total', 'precio_total', 'numeric');\r\n $this->setParametro('cantidad_sol', 'cantidad_sol', 'int4');\r\n $this->setParametro('precio_ga', 'precio_ga', 'numeric');\r\n $this->setParametro('precio_sg', 'precio_sg', 'numeric');\r\n\r\n $this->setParametro('id_activo_fijo', 'id_activo_fijo', 'varchar');\r\n $this->setParametro('codigo_act', 'codigo_act', 'varchar');\r\n $this->setParametro('fecha_ini_act', 'fecha_ini_act', 'date');\r\n $this->setParametro('fecha_fin_act', 'fecha_fin_act', 'date');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $stmt = $link->prepare($this->consulta);\r\n $stmt->execute();\r\n $result = $stmt->fetch(PDO::FETCH_ASSOC);\r\n\r\n //recupera parametros devuelto depues de insertar ... (id_solicitud)\r\n $resp_procedimiento = $this->divRespuesta($result['f_intermediario_ime']);\r\n if ($resp_procedimiento['tipo_respuesta'] == 'ERROR') {\r\n throw new Exception(\"Error al insertar detalle en la bd\", 3);\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n //si todo va bien confirmamos y regresamos el resultado\r\n $link->commit();\r\n $this->respuesta = new Mensaje();\r\n $this->respuesta->setMensaje($resp_procedimiento['tipo_respuesta'], $this->nombre_archivo, $resp_procedimiento['mensaje'], $resp_procedimiento['mensaje_tec'], 'base', $this->procedimiento, $this->transaccion, $this->tipo_procedimiento, $this->consulta);\r\n $this->respuesta->setDatos($respuesta);\r\n } catch (Exception $e) {\r\n $link->rollBack();\r\n $this->respuesta = new Mensaje();\r\n if ($e->getCode() == 3) {//es un error de un procedimiento almacenado de pxp\r\n $this->respuesta->setMensaje($resp_procedimiento['tipo_respuesta'], $this->nombre_archivo, $resp_procedimiento['mensaje'], $resp_procedimiento['mensaje_tec'], 'base', $this->procedimiento, $this->transaccion, $this->tipo_procedimiento, $this->consulta);\r\n } else if ($e->getCode() == 2) {//es un error en bd de una consulta\r\n $this->respuesta->setMensaje('ERROR', $this->nombre_archivo, $e->getMessage(), $e->getMessage(), 'modelo', '', '', '', '');\r\n } else {//es un error lanzado con throw exception\r\n throw new Exception($e->getMessage(), 2);\r\n }\r\n\r\n }\r\n\r\n return $this->respuesta;\r\n }", "public static function createMatiere($libelleMatiere)\n {\n $dbh = SPDO::getInstance();\n $stmt = $dbh->prepare(\"INSERT INTO Matiere (libelleMatiere) VALUES (:libelleMatiere)\");\n $stmt->bindParam(':libelleMatiere', $libelleMatiere);\n $stmt->execute();\n $stmt->closeCursor();\n return new Matiere($dbh->lastInsertId());\n }", "public function create()\n {\n $materiaPrimaId = MateriaPrima::select('nombre')->orderBy('id')->get();\n foreach ($materiaPrimaId as $materiaPrima) {\n $idMat[] = $materiaPrima->nombre;\n }\n return view('compras.create', ['firstM'=> 0, 'materiasPrimas'=>$idMat]);\n }", "function ajouter_modificateur(){\n\t\t$requete\t= sprintf(\"SELECT modificateur FROM articles WHERE id='%s'\",\n\t\t\t\t\t\t\t\tmysql_real_escape_string(htmlspecialchars($_GET['id'])));\n\t\t$donnee\t\t= connexion($requete);\n\t\t$cellule\t= mysql_fetch_assoc($donnee);\n\t\t\n\t\t$date = date(\"d-m-Y\");\n\t\t\n\t\t$temp = \"\";\n\t\tif(strlen($cellule['modificateur']) == 0){ // si c'est le premier modificateur\n\t\t\t$temp = \"{$_SESSION['id']}-{$date}\";\n\t\t}else{\n\t\t\t$old = deja_modifier($cellule['modificateur']);\n\t\t\tif(strlen($old) == 0){\n\t\t\t\t$temp = \"{$_SESSION['id']}-{$date}\";\n\t\t\t}else{\n\t\t\t\t$temp = \"{$_SESSION['id']}-{$date}|{$old}\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$requete1\t= sprintf(\"UPDATE articles SET modificateur ='{$temp}' WHERE id ='%s'\",\n\t\t\t\t\t\t\t\tmysql_real_escape_string(htmlspecialchars($_GET['id'])));\n\t\tconnexion($requete1);\n\t}", "function CreaAssistito($nome, $cognome, $telefono, $codiceFisc, $indirizzo, $comune, $email, $descrzione, $categoria){\n\t\t$query = \"INSERT INTO assistiti (Nome, Cognome, Telefono, CodiceFiscale, Indirizzo, Comune, Email, Descrizione, Categoria) VALUES('$nome', '$cognome', '$telefono', '$codiceFisc', '$indirizzo', '$comune', '$email' , '$descrizione', $categoria)\";\n\t\tif(!$mysqli -> query($query)){\n\t\t\tdie($mysqli->error);\n\t\t}\n\t}", "function maquetacioItemsAgendaHoudini($model, $columna, $nomCaixa, $tipusCaixa, $ordre, $estilCaixa, $estilLlistat, $estilElement, $id_registre, $id_newsletter, $registre, $pathEditora)\n{\n global $CONFIG_URLBASE , $CONFIG_URLUPLOADIM; \n $parametres = '<input type=\"hidden\" name=\"newsletter['.htmlspecialchars($model).']['.htmlspecialchars($columna).']['.htmlspecialchars($nomCaixa).']['.htmlspecialchars($tipusCaixa).'][]['.htmlspecialchars($estilCaixa).']['.htmlspecialchars($estilLlistat).']['.htmlspecialchars($estilElement).']\" value=\"'.htmlspecialchars($id_registre).'\" />';\n \n $registre['ORIGEN'] = '<h4><a href=\"'.$CONFIG_URLBASE . $pathEditora . $registre['ID'] . '/' . $registre['URL_TITOL'] . '\" rel=\"external\" style=\"text-decoration:none;\">'.$registre['TITOL'].'</a></h4>';\n $imatge = $registre['IMATGE1'] != '' ? '<img src=\"' . $CONFIG_URLUPLOADIM . $registre['IMATGE1'] . '\" style=\"width: 159px;\" class=\"left\"/>' : '';\n \n return '<li id=\"ageh_reg' . $id_registre . '\" class=\"box removable stylable '.$estilElement.'\">\n\t\t\t'.$parametres.'\n\t\t\t<div class=\"spacer clearfix\">\n\t\t\t ' . $imatge . '\n\t\t\t\t'.$registre['ORIGEN'].'\n\t\t\t\t'.$registre['RESUM'].'\n\t\t\t</div>\n\t\t</li>';\n}", "public function ajaxmaterias() { //Se le agrego idalumnocarrera\n $idCarrera = $_POST['carrera'];\n $idAlumno = $_POST['alumno'];\n $idAlumnoCarrera = $_POST['idalumnocarrera'];\n $dataIdModo = htmlentities($_POST['modo'], ENT_COMPAT | ENT_QUOTES, \"UTF-8\");\n $db = & $this->POROTO->DB;\n $db->dbConnect(\"matriculacion/ajaxmaterias/\" . $idCarrera . \"/\" . $idAlumno . \"/\" . $dataIdModo);\n\n include($this->POROTO->ControllerPath . '/correlativas.php');\n $claseCorrelativas = new correlativas($this->POROTO);\n\n if ($dataIdModo == 3) { //solo inscriptas (estadomateria=2)\n $sql = \"select m.idmateria, m.anio, m.materiacompleta as nombre,c.nombre as comision \";\n $sql .= \" from alumnomateria am inner join viewmaterias m on (am.idmateria=m.idmateria and m.idcarrera=\" . $idCarrera . \")\";\n $sql .= \" left join comisiones c on am.idcomision=c.idcomision \";\n $sql .= \" where am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursando'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_libre'] . \") \";\n $sql .= \" and am.idpersona=\" . $idAlumno;\n $sql .= \" and am.idalumnocarrera=\" . $idAlumnoCarrera;\n $sql .= \" order by m.orden\";\n $arrMateriasOk = $db->getSQLArray($sql);\n }\n if ($dataIdModo == 1 || $dataIdModo == 2) { //1 Alumno 2 Administrativo.\t\t\t\t\t\t\t\t\t\t\n //levanto el listado de materias de la carrera. por un left join me \n //fijo si ya fue cursada (puede haber mas de un registro)\n //Si materia cursada aprobada o libre => solo_cursada>=1 y \n //la considero como ya cursada\n //si tuvo un estado 3,4 (aprobada,aprobada por equiv) => aprobada>1 y la considero como materia aprobada\n //elimino las materias que tienen estado CURSANDO (inscriptas) y las libres al menos una vez.\n $sql = \"select m.idmateria,m.anio,m.materiacompleta as nombre,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursadaaprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_libre'] . \") then 1 else 0 end) solo_cursada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_aprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_aprobadaxequiv'] . \",\" . $this->POROTO->Config['estado_alumnomateria_cursadaaprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_nivelacion'] . \") then 1 else 0 end) cursada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_aprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_aprobadaxequiv'] . \",\" . $this->POROTO->Config['estado_alumnomateria_nivelacion'];\n $sql .= \") then 1 else 0 end) aprobada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursando'] . \") then 1 else 0 end) inscripta \";\n $sql .= \" from viewmaterias m \";\n $sql .= \" left join alumnomateria am on am.idmateria=m.idmateria and am.idpersona=\" . $db->dbEscape($idAlumno);\n $sql .= \" and am.idalumnocarrera=\" . $db->dbEscape($idAlumnoCarrera);\n $sql .= \" where m.idcarrera=\" . $db->dbEscape($idCarrera);\n $sql .= \" and m.estado=1\";\n $sql .= \" group by m.idmateria\";\n $sql .= \" order by m.orden\";\n $arrMaterias = $db->getSQLArray($sql);\n\n $arrMateriasOk = array();\n\n foreach ($arrMaterias as $row) {\n if ($row['solo_cursada'] == \"0\") { //Solo traigo las que no estoy cursando aun o libre.\n //Busco las correlativas para este alumno.\n $resultados = $claseCorrelativas->getCorrelativasAlumno($idCarrera, $row['idmateria'], 0, $idAlumno, $idAlumnoCarrera);\n if ($dataIdModo == 1) { //Si es alumno, solo traigo materias sin correlativas\n $valida = true;\n foreach ($resultados as $regla) {\n if ($regla[\"idregla\"] != 6 && $regla[\"estado\"] == false)\n $valida = false;\n }\n if ($valida)\n $arrMateriasOk[] = array(\"idmateria\" => $row['idmateria'], \"nombre\" => $row['nombre'], \"anio\" => $row['anio'], \"correlativas\" => $resultados);\n }else { //Traigo todas, cumplan o no las correlatividades.\n $arrMateriasOk[] = array(\"idmateria\" => $row['idmateria'], \"nombre\" => $row['nombre'], \"anio\" => $row['anio'], \"correlativas\" => $resultados);\n }\n }\n }\n\n //busco en arrMateriasOk, las materia que tienen inscriptas>0\n foreach ($arrMateriasOk as $k => $item)\n foreach ($arrMaterias as $materia)\n if ($materia['idmateria'] == $item['idmateria'])\n if ($materia['inscripta'] > 0 || $materia['aprobada'] > 0)\n unset($arrMateriasOk[$k]);\n } // if ($dataIdModo == 1 || $dataIdModo == 2 {\n $db->dbDisconnect();\n echo json_encode($arrMateriasOk);\n }", "public function crear($codigo, $nombres, $fecha, $matricula, $personasCargo, $descripcion, $asignaturasPerdidas) {\n\n $data = array(\n 'codigoEstudiante' => $codigo,\n 'nombres' => $nombres,\n 'fechaInscripcion' => $fecha,\n 'matriculaValor' => $matricula,\n 'personasCargo' => $personasCargo,\n 'descripcion' => $descripcion,\n 'nroAsigPerdidas' => $asignaturasPerdidas\n );\n $this->insert($data);\n }", "public function postCreate()\n\t{\n\t\tif(Input::get('unidad')){\t\t\n\t\t\t$rules = array('nombre' => 'required');\n\t\t}else{\t\t\t\n\t\t\t$rules = array('unidad' => 'required');\n\t\t}\t\n\t\t// do the validation ----------------------------------\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\t// check if the validator failed -----------------------\n\t\tif ($validator->fails()) {\n\n\t\t\t\treturn Redirect::back()->withInput()->withErrors($validator);\n\t\t} else {\t\t\n\t\t\t\t\n\t\t\t$materias\t= new Materias;\t\t\n\t\t\t$materias->nombre \t\t\t= Input::get('nombre');\n\t\t\t$materias->unidad \t\t \t= Input::get('unidad');\n\t\t\t\n\t\t\tif($materias->save()){\n\t\t\t\n\t\t\treturn Redirect::to('dashboard/materias/index/')\n\t\t\t\t\t\t->with('msg', 'Materia Prima Agregada con éxito.')\n\t\t\t\t\t\t->with('class', 'success');\n\t\t\t \n\t\t\t}else {\n\t\t\t\t\t\n\t\t\t\treturn Redirect::back()->withInput()\n\t\t\t\t\t\t->with('msg', '¡Algo salió mal! Los datos no fueron guardados.')\n\t\t\t\t\t\t->with('class', 'error');\n\n\t\t\t}\n\t\t}\t\n\t}", "public function store(Request $request)\n {\n $this->validate($request,[\n \"materiaPrima\" => \"required|string\",\n \"cantidad\" => \"required|integer\",\n ]);\n\n $indexMat = $request->materiaPrima;\n\n $materiaPrimaId = MateriaPrima::select('nombre')->get();\n foreach ($materiaPrimaId as $materiaPrima) {\n $idMat[] = $materiaPrima->nombre;\n }\n\n $materiaFinal = MateriaPrima::where('nombre', $idMat[$indexMat])->first()->id;\n\n Compra::create([\"materiaPrima\"=>$materiaFinal, \"cantidad\"=>$request->cantidad]);\n\n $request->session()->flash(\"message\", \"Creado con exito\");\n return redirect()->route(\"compras.index\");\n }", "public function store(StoreUpdateEntradaFormRequest $request)\n {\n //estoque atual\n $estoque_atual = $this->materialRepository->findById($request->material_id);\n \n \n $user = auth()->user();\n \n \n if($request->preco):\n $request->preco = str_replace('.', '', $request->preco);\n $request->preco = str_replace(',', '.', $request->preco);\n else:\n $request->preco = '0.00';\n endif;\n \n \n //dd($request->all());\n \n //pega o id do material de acordo com a natureza\n $material_natureza_id = DB::table('material_natureza')\n ->where('material_id',$request->material_id)\n ->where('natureza_id',$request->natureza_id)\n ->first();\n \n \n DB::beginTransaction();\n \n $registraEntrada = DB::table('movimentos')->insert([\n \"tipo_movimento_id\" => $request->tipo_movimento_id,\n \"documento_id\" => $request->documento_id,\n \"numero_documento\" => $request->numero_documento,\n \"data_documento\" => $request->data_documento,\n \"conta_id\" => $request->conta_id,\n \"material_id\" => $request->material_id,\n \"natureza_id\" => $request->natureza_id,\n \"armazenagem_id\" => $request->armazenagem_id,\n \"quantidade\" => $request->quantidade,\n \"preco\" => $request->preco,\n \"user_id\" => $user->id,\n \"created_at\" => Carbon::now(),\n \n ]);\n \n if($material_natureza_id):\n $registraDadosEstoque = DB::table('material_natureza')\n ->where('id',$material_natureza_id->id)\n ->update([\n 'material_id' => $request->material_id,\n 'natureza_id' => $request->natureza_id,\n 'preco_atual' => $request->preco,\n 'estoque_atual' => $request->quantidade + $material_natureza_id->estoque_atual,\n 'created_at' => Carbon::now(),\n ]);\n else:\n $registraDadosEstoque = DB::table('material_natureza')\n ->insert([\n 'material_id' => $request->material_id,\n 'natureza_id' => $request->natureza_id,\n 'preco_atual' => $request->preco,\n 'estoque_atual' => $request->quantidade,\n 'created_at' => Carbon::now(),\n ]);\n endif;\n \n\n// $atualizaEstoque = DB::table('materiais')\n// ->where('id',$request->material_id)\n// ->update([\n// 'estoque_atual' => $request->quantidade + $estoque_atual->estoque_atual,\n// 'preco_atual' => $request->preco,\n// ]);\n \n if($registraEntrada && $registraDadosEstoque):\n DB::commit();\n \n return redirect()->route('entradas.index')\n ->withSuccess('Entrada registrada com sucesso!');\n \n else:\n DB::rollBack();\n \n return redirect()->back()->withErrors('Falha ao registrar entrada!');\n endif;\n }", "function modificarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_ime';\n\t\t$this->transaccion='SNX_MAQ_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_maquinaria','id_maquinaria','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('potencia','potencia','numeric');\n\t\t$this->setParametro('peso','peso','numeric');\n\t\t$this->setParametro('maquinaria','maquinaria','varchar');\n\t\t$this->setParametro('id_factorindexacion','id_factorindexacion','int4');\n\t\t$this->setParametro('id_tipopreciomaquinaria','id_tipopreciomaquinaria','int4');\n\t\t$this->setParametro('id_ambitoprecio','id_ambitoprecio','int4');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function sevenconcepts_pre_insertion($flux){\n if ($flux['args']['table']=='spip_auteurs'){\n include_spip('cextras_pipelines');\n $champs_extras=champs_extras_objet(table_objet_sql('auteur'));\n foreach($champs_extras as $value){\n $flux['data'][$value['options']['nom']]=_request($value['options']['nom']); \n }\n $flux['data']['name']=_request('nom_inscription'); \n }\nreturn $flux;\n}", "public function create(Request $request)\n {\n /*if(empty($request->get('id_categoria')))\n {\n $categoria = new \\App\\Categoria;\n $categoria->categoria = $request->get('categoria');\n $categoria->save();\n $id_categoria = $categoria->id_categoria;\n }\n else\n {\n $id_categoria = $request->get('id_categoria');\n }\n\n if(empty($request->get('id_marca')))\n {\n $marca = new \\App\\Marca;\n $marca->marca = $request->get('marca');\n $marca->id_categoria = $id_categoria;\n $marca->save();\n $id_marca = $marca->id_marca;\n\n\n }\n else\n {\n $id_marca = $request->get('id_marca');\n }\n\n $articulo = new Articulo;\n $articulo->create([\n\n 'codigo' => $request->get('codigo'),\n 'descripcion' => $request->get('descripcion'),\n 'iva_tipo' => $request->get('iva_tipo'),\n 'iva_valor' => $request->get('iva_valor'),\n 'costo' => $request->get('costo'),\n 'precio_minorista' => ($request->get('costo') * $request->get('coeficiente_ganancia_1')),\n 'precio_mayorista' => ($request->get('costo') * $request->get('coeficiente_ganancia_2')),\n 'coeficiente_ganancia_1' => $request->get('coeficiente_ganancia_1'),\n 'coeficiente_ganancia_2' => $request->get('coeficiente_ganancia_2'),\n 'stock_actual' => $request->get('stock_actual'),\n 'id_marca' => $id_marca\n ]);*/\n }", "public function createPartenaire(Request $request){\n //Contraintes de validation\n $validator = Validator::make($request->all(),[\n 'nom'=>'required',\n 'description'=>'required|max:40',\n ]);\n //Si l'une des contraintes n'est pas respectée on rédirige à nouveau vers la page du formulaire et on retourne les erreurs ainsi que l'ancien contenu des champs\n if($validator->fails()){\n return redirect('/admin/add/association-partenaire')->withErrors($validator)->withInput();\n }\n //Sinon on fait l'insert \n $parameters = $request->except(['_token']);\n \n //On appelle le modèle\n Partenaire::create($parameters);\n \n // On le rédirige vers la page d'accueil et on envoie un message flash de confirmation \n return redirect('/admin/associations-partenaires')->with('success', 'Nouvelle association partenaire enregistrée !');\n\n }", "public function insertar($nombreMiembro,$apellido1Miembro,$apellido2Miembro,$correo,$contrasenna,$rol){ \n $miembro = new Miembro();\n \n $miembro->nombreMiembro = $nombreMiembro;\n $miembro->apellido1Miembro = $apellido1Miembro;\n $miembro->apellido2Miembro = $apellido2Miembro;\n $miembro->correo = $correo;\n $miembro->contrasenna = $contrasenna;\n $miembro->rol = $rol;\n \n $miembro->save();\n }", "public function add() {\n\n if (isset($_POST['valider'])) {\n \n extract($_POST);\n $data['ok'] = 0;\n \n if (!empty($_POST)) {\n\n $clientM = new ClientMoral();\n $clientMoralRepository = new ClientMoralRepository();\n \n $clientM->setNom($_POST['nom']);\n $clientM->setRaisonSociale($_POST['raisonSociale']);\n $clientM->setAdresse($_POST['adresse']);\n $clientM->setTel($_POST['tel']);\n $clientM->setEmail($_POST['email']);\n $clientM->setNinea($_POST['ninea']);\n $clientM->setRegiscom($_POST['registreCommerce']);\n \n\n $data['ok'] = $clientMoralRepository->add($clientM);\n }\n return $this->view->load(\"clientMoral/ajout\", $data);\n }\n else {\n return $this->view->load(\"clientMoral/ajout\");\n }\n }", "public function forActualizaMateria($materia,$cid,$plectivo){\n $nivelMateria = DB::connection('sqlsrv_bdacademico')\n ->table('TB_PENSUM as A')\n ->leftJoin('TB_PENSUMATE as B','A.COD_PENSUM','=','B.COD_PENSUM')\n ->leftJoin('TB_MATERIA as C','B.COD_MATERIA','=','C.COD_MATERIA')\n ->where('A.COD_PLECTIVO', '=', $plectivo)\n ->where('C.COD_MATERIA', '=', $materia)\n ->orderBy('C.NOMBRE')\n ->select('C.NIVEL')->pluck('C.NIVEL')->toArray();\n /**/\n $array_response=[];\n $array_response['status']=200;\n $array_response['message']='Materia '.$materia.' modificada correctamente';\n\n $docente_materia = tb_docente_materia::find($cid);\n if (is_null($docente_materia)) {\n $array_response['status']=404;\n $array_response['message']='Registro no encontrado. No se pudo guardar los cambios ['.$materia.']';\n }\n else{\n $docente_materia->COD_MATERIA=$materia;\n $docente_materia->NIVEL=$nivelMateria[0];\n $docente_materia->RESPONSA2 = \\Auth::user()->name;\n $docente_materia->FECSYS2 = Utils::getDateSQL();\n $docente_materia->save();\n }\n return $array_response;\n }", "public function actionCreate()\n {\n $model = new EnfermedadesSintomas([\n 'enfermedad_id' => Yii::$app->request->post('list'),\n 'sintoma_id' => Yii::$app->request->post('item'),\n ]);\n //dd($model->validate());\n if (!$model->save()) {\n throw new \\Exception('No se ha ppodido agregar el sintoma a la enfermedad', 1);\n }\n }", "public function inscription(){\n // envoi de mail lors de l'inscription d'un produit ?\n $this->load->model('produit');\n\t\t\t\t$this->load->helper('form');\n\t\t\t\t$this->load->view('produit/inscription');\n $data=array(\n \"nomProduit\"=> htmlspecialchars($_GET['nomProduit']),\n \"descriptionProduit\"=> htmlspecialchars($_GET['descriptionProduit']),\n \"prixUnitaireProduit\" => htmlspecialchars($_GET['prixUnitaireProduit']),\n \"reducProduit\" => htmlspecialchars($_GET['reducProduit']),\n\t\t\t );\n \t\t $this->produit->insert($data);\n\t }", "public function create()\n {\n return view('admin/materias/nueva');\n }", "public function add_medicine($data){\n $medicine = [\n \"name\"=>$data[\"name\"],\n \"instruction\"=>$data[\"instruction\"],\n \"warning\"=>$data[\"warning\"],\n \"side_effects\"=>$data[\"side_effects\"],\n \"requires_prescription\"=>$data[\"requires_prescription\"],\n \"date_added\"=>date(Config::DATE_FORMAT)\n ];\n return $this->dao->add($medicine);\n }", "public function addRecordInDB($nome, $nome_icona, $nome_immagine, $quantita, $id_sede){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n //Escaping\r\n $nome = DB_Functions::esc($nome);\r\n $nome_icona = DB_Functions::esc($nome_icona);\r\n $nome_immagine = DB_Functions::esc($nome_immagine);\r\n $quantita = DB_Functions::esc($quantita);\r\n $id_sede = DB_Functions::esc($id_sede);\r\n\r\n //inserimento nuova ENTITA\r\n $query = \"INSERT INTO ENTITA (NOME, NOME_ICONA, NOME_IMMAGINE, QUANTITA, ID_SEDE)\r\n\t VALUES ($nome, $nome_icona, $nome_immagine, $id_sede)\";\r\n $resQuery1 = $db->executeQuery($query);\r\n\r\n // Se la query ha esito positivo\r\n if ($resQuery1[\"state\"]) {\r\n //Salva valore ID del record creato\r\n $query = \"SELECT max(ID_ENTITA) FROM ENTITA;\";\r\n $resQuery2 = $db->executeQuery($query);\r\n $this->id_entita = $resQuery2[\"response\"][0][0];\r\n $this->nome = $nome;\r\n $this->nome_icona = $nome_icona;\r\n $this->nome_immagine = $nome_immagine;\r\n $this->quantita = $quantita;\r\n $this->id_sede = $id_sede;\r\n }\r\n return $resQuery1;\r\n }", "private function crearContribuyente($modelInscripcion)\r\n {\r\n $result = false;\r\n $cancel = false;\r\n $idGenerado = 0;\r\n $idRif = 0;\r\n $tabla = ContribuyenteBase::tableName();\r\n\r\n // Se determina si el solicitante es la sede principal de la sucursal.\r\n if ( $this->getSedePrincipal() ) {\r\n $modelContribuyente = self::findDatosSedePrincipal($this->_model['id_contribuyente']);\r\n $findArregloContribuyente = $modelContribuyente->asArray()->one();\r\n\r\n if ( count($findArregloContribuyente) > 0 ) {\r\n // Verificar que el RIF o DNI de la sede principal coincidan con el de\r\n // la sucursal creada en la solicitud.\r\n if ( $modelInscripcion['naturaleza'] == $findArregloContribuyente['naturaleza'] &&\r\n $modelInscripcion['cedula'] == $findArregloContribuyente['cedula'] &&\r\n $modelInscripcion['tipo'] == $findArregloContribuyente['tipo'] ) {\r\n\r\n // Retorna atributos de la entidad \"contribuyentes\".\r\n $camposContribuyente = $findArregloContribuyente;\r\n\r\n $modelSucursal = New InscripcionSucursalForm();\r\n // Se obtienen los atributos particulares de las sucursales, que seran guardadas\r\n // al momento de crear el registro.\r\n $camposSucursal = $modelSucursal->getAtributoSucursal();\r\n\r\n foreach ( $camposSucursal as $campo ) {\r\n if ( array_key_exists($campo, $modelInscripcion->toArray()) ) {\r\n $camposContribuyente[$campo] = $modelInscripcion[$campo];\r\n } else {\r\n $cancel = true;\r\n self::setErrors(Yii::t('backend', 'Failed fields not match'));\r\n break;\r\n }\r\n }\r\n\r\n if ( !$cancel ) {\r\n // Se actualiza la fecha de inclusion de la suucrsal, se sustituye la colocada\r\n // de la sede principal por la actual.\r\n $camposContribuyente['fecha_inclusion'] = date('Y-m-d');\r\n\r\n // Se coloca el valor del identificador de la entidad en null, ya que este identificador\r\n // no es de este registro, sino de la sede principal.\r\n $camposContribuyente['id_contribuyente'] = null;\r\n\r\n // Se pasa a obtener el identificador de la sucursal.\r\n $idRif = $this->getIdentificadorSucursalNuevo($modelInscripcion['naturaleza'],\r\n $modelInscripcion['cedula'],\r\n $modelInscripcion['tipo']\r\n );\r\n\r\n if ( $idRif > 0 ) {\r\n $camposContribuyente['id_rif'] = $idRif;\r\n $result = $this->_conexion->guardarRegistro($this->_conn, $tabla, $camposContribuyente);\r\n if ( $result ) {\r\n $idGenerado = $this->_conn->getLastInsertID();\r\n }\r\n }\r\n }\r\n } else {\r\n // El RIF de la sede principal no coinciden con el de la solicitud.\r\n self::setErrors(Yii::t('backend', 'DNI do not match'));\r\n }\r\n }\r\n }\r\n return $idGenerado;\r\n\r\n }", "public function addData(Request $request, $id){\n\n\n $this->validate($request, [\n 'valorPD' => 'required',\n 'valorPS' => 'required',\n 'valorT' => 'required',\n ]);\n $input = array_merge($request->all(),array_merge(['ref' => 1], ['sistema_id' => $id]));\n // $input = array_merge($request->all(),['ref' => 1]);\n //$input = $request->all();\n //$sys = sistema::find($id);\n //$Sistema = new sistema($input);\n //$sys->save(array($Sistema));\n medicion::create($input);\n $datos = sistema::findOrFail($id)->medicions->first();\n $meas = sistema::findOrFail($id)->takens;\n $system = sistema::findOrFail($id);\n return view('taken.show', array_merge(['data' => $datos],['sis' => $system],['medidas' => $meas]));\n\n }", "public function create()\n {\n return view('panel.materiales.new');\n }", "private function ajoutauteur() {\n\t\t$this->_ctrlAuteur = new ControleurAuteur();\n\t\t$this->_ctrlAuteur->auteurAjoute();\n\t}", "public function store(Request $request)\n {\n $this->validate($request,array(\n 'criticidad'=>'required',\n 'capacidad'=>'required',\n 'materias_id'=>'required',\n 'productos_id'=>'required',\n )); \n $data = Auth::user()->industrias_id;\n $indus = Industrias::find($data);\n\n\n\n $solicitud = new Sol_Mat;\n $solicitud->industrias_id = $indus->id;\n $solicitud->materias_id = $request->materias_id;\n $solicitud->productos_id = $request->productos_id;\n $solicitud->criticidad_producto = $request->criticidad;\n $solicitud->capacidad = $request->capacidad;\n $solicitud->solicitud = $request->solicitud;\n $solicitud->save();\n\n Session::flash('success','Datos guardados satisfactoriamente');\n\n return redirect('/Solmats');\n\n }", "public function addUmpireAction() {\n\t\t// Création du formulaire\n\t\t$oUmpire = new Umpire;\n\t\t$oForm = $this->createForm(new UmpireType(), $oUmpire);\n\n\t\t// Traitement du formulaire\n\t\t$oFormHandler = new UmpireHandler($oForm, $this->get('request'), $this->getDoctrine()->getEntityManager());\n\t\tif ($oFormHandler->process()) {\n\t\t\treturn $this->redirect($this->generateUrl('Umpires'));\n\t\t}\n\n\t\treturn $this->render('YBTournamentBundle:Umpire:form_create.html.twig', array('form' => $oForm->createView()));\n\t}", "public function materias()\n {\n return $this->belongsToMany('DSIproject\\Materia', 'grado_materia')\n ->withPivot('grado_id')\n ->withTimestamps();\n }", "function insertarPremios($premio,$aciertos) {\r\n$sql = \"insert into tbpremios(idpremio,premio,aciertos)\r\nvalues ('','\".($premio).\"',\".$aciertos.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function Add_medico($array = array()){\n \t\t $request['inp_document'];\n \t\t $request['inp_nomb'];\n \t\t $request['inp_apell'];\n \t\t $request['inp_tel'];\n \t\t $request['inp_cel'];\n \t\t $request['rdio_sex'];\n \t\t $request['slt_especia'];\t\n \t\t $request['inp_nick'];\n\t\t $person = new Persona();\n\t\t $respon = $person->crearPersona($array); // dentro de esta funcion debe insertar en la tabla persona, si es exitoso la insercion, debe pasar el if siguiente e insertar en la tabla medicos\n\t\t if(isset($respon['exito'])){\n\t\t $request['slt_especia'];\n\t\t $request['inp_document'];\t\n\t\t\n\n\t\t\t //insercion del packete\n\t\t }\n\t\t}", "private function getMateriais() {\n\n $oDaoMaterial = new cl_matmater();\n $sCampos = \" m60_codmater as codigo, m60_descr as descricao, m61_descr as unidade\";\n\n $sCamposGrupo = \" , 0 as codigogrupo \";\n if ($this->lAgruparGrupoSubgrupo) {\n $sCamposGrupo = \" , m65_sequencial as codigogrupo \";\n }\n $sCampos .= $sCamposGrupo;\n\n $aOrdem = array();\n $aWhere = array();\n $aWhere[] = \" instit = {$this->iInstituicao} \";\n\n $aOrdem[] = \" m60_descr \";\n\n if ($this->sDepartamentos) {\n $aWhere[] = \" m70_coddepto in ({$this->sDepartamentos}) \";\n }\n\n if ($this->sGrupoSubgrupo) {\n $aWhere[] = \" db121_sequencial in ({$this->sGrupoSubgrupo}) \";\n }\n\n $sCampoDepartamento = \", 0 as depto, '' as departamento\";\n if ($this->iQuebraPagina == RelatorioDeDistribuicao::QUEBRA_PAGINA_DEPARTAMENTO) {\n $sCampoDepartamento = \", m70_coddepto as depto, descrdepto as departamento \";\n }\n $sCampos .= $sCampoDepartamento;\n $sWhere = \" where \" . implode(\" and \", $aWhere);\n $sOrdem = \" order by \" . implode(\", \", $aOrdem);\n\n $sql = \" select distinct {$sCampos} \";\n $sql .= \" from matmater \";\n $sql .= \" inner join matunid on m60_codmatunid = m61_codmatunid \";\n $sql .= \" inner join matmatermaterialestoquegrupo on m60_codmater = m68_matmater \";\n $sql .= \" inner join materialestoquegrupo on m68_materialestoquegrupo = m65_sequencial \";\n $sql .= \" inner join db_estruturavalor on db121_sequencial = m65_db_estruturavalor \";\n $sql .= \" inner join matestoque on m60_codmater = m70_codmatmater \";\n $sql .= \" inner join db_depart on coddepto = m70_coddepto \";\n\n\n $sql .= \"{$sWhere} {$sOrdem} \";\n\n $rsMateriais = $oDaoMaterial->sql_record($sql);\n\n $aMateriais = array();\n for ($i = 0; $i < $oDaoMaterial->numrows; $i++) {\n\n $oMaterial = db_utils::fieldsMemory($rsMateriais, $i);\n $oMaterial->totalPeriodo = 0.0;\n $oMaterial->mediaPeriodo = 0.0;\n $aMateriais[] = $oMaterial;\n\n if (!isset($this->aDepartamentos[$oMaterial->depto])) {\n\n $oDeptartamento = new stdClass();\n $oDeptartamento->codigo = $oMaterial->depto;\n $oDeptartamento->descricao = $oMaterial->departamento;\n $oDeptartamento->itens = array();\n $this->aDepartamentos[$oDeptartamento->codigo] = $oDeptartamento;\n }\n }\n return $aMateriais;\n }", "public function actionCreate()\n {\n $model = new MaterialesServicios();\n //Desplegables\n $unidad_medida = UnidadMedida::find()->all();\n $presentacion = Presentacion::find()->all();\n //autocompletar\n $sub_especfica = PartidaSubEspecifica::find()\n ->select(['nombre as value', 'id as id'])\n ->asArray()\n ->all();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'sub_especfica' => $sub_especfica,\n 'unidad_medida' => $unidad_medida,\n 'presentacion' => $presentacion\n ]);\n }\n }", "function transaccion_registrar_alumno($alumno, $matricula_alumno, $antecentes_alumno, $familiares_padre, $familiares_madre, $antecentes_familiares, $jefe_hogar, $apoderado)\n {\n $mensaje = new stdClass();\n $this->db->trans_begin();\n $id_alumno = $this->ingresar_alumno($alumno);\n\n $matricula_alumno[\"TB_ALUMNO_ID\"] = $id_alumno;\n $this->ingresar_matricula_alumno($matricula_alumno);\n $antecentes_alumno[\"TB_ALUMNO_ID\"] = $id_alumno;\n $this->ingresar_antecedentes_alumno($antecentes_alumno);\n $antecentes_familiares[\"TB_ALUMNO_ID\"] = $id_alumno;\n $this->ingresar_antecedentes_familiares_alumno($antecentes_familiares);\n $apoderado[\"TB_ALUMNO_ID\"] = $id_alumno;\n $this->ingresar_apoderado($apoderado);\n // todo --> Datos Opcionales Que pueden venir vacios\n $familiares_padre[\"TB_ALUMNO_ID\"] = $id_alumno;\n $this->ingresar_datos_familiar_alumno($familiares_padre);\n $familiares_madre[\"TB_ALUMNO_ID\"] = $id_alumno;\n $this->ingresar_datos_familiar_alumno($familiares_madre);\n $jefe_hogar[\"TB_ALUMNO_ID\"] = $id_alumno;\n $this->ingresar_jefe_hogar($jefe_hogar);\n // todo --> ----------------------------------------\n if ($this->db->trans_status() === FALSE) {\n $this->db->trans_rollback();\n $mensaje->respuesta = \"N\";\n $mensaje->data = \" No se pudo procesar la transacci�n\";\n } else {\n $this->db->trans_commit();\n }\n return $mensaje;\n }", "public function ajouter() {\n $this->loadView('ajouter', 'content');\n $arr = $this->em->selectAll('client');\n $optionsClient = '';\n foreach ($arr as $entity) {\n $optionsClient .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNomFamille() . '</option>';\n }\n $this->loadHtml($optionsClient, 'clients');\n $arr = $this->em->selectAll('compteur');\n $optionsCompteur = '';\n foreach ($arr as $entity) {\n $optionsCompteur .= '<option value=\"' . $entity->getId() . '\">' . $entity->getNumero() . '</option>';\n }\n $this->loadHtml($optionsCompteur, 'compteurs');\n if(isset($this->post->numero)){\n $abonnement = new Abonnement($this->post);\n $this->em->save($abonnement);\n $this->handleStatus('Abonnement ajouté avec succès.');\n }\n }", "public function store(Request $request)\n {\n $materia = new \\App\\Materia();\n $materia->nombre = $request->nombre;\n $materia->acronimo = $request->acronimo;\n $materia->save();\n }", "public function addPartenaire(){\n \n return view('Admin.Partenaires.formAddPartenaire');\n\n }", "function add()\n {\n $this->form_validation->set_rules('id_materia','Materia','required|integer');\n $this->form_validation->set_rules('id_periodo','Periodo','required|integer');\n $this->form_validation->set_rules('dayWeek[]','Dias de semana','required');\n $this->form_validation->set_rules('diascursado','Json dias de cursado','required');\n $this->form_validation->set_rules('id_persona[]','Catedra','required');\n\n if($this->form_validation->run())\n {\n $params = array(\n 'id_materia' => $this->input->post('id_materia',TRUE),\n 'id_periodo' => $this->input->post('id_periodo',TRUE),\n 'diascursado' => $this->input->post('diascursado',TRUE),\n 'diassemana' => json_encode($this->input->post('dayWeek[]')),\n );\n\n $curso_id = $this->Curso_model->add_curso($params);\n\n if (isset($curso_id)) { //cargar catedra\n $catedra = $this->input->post('id_persona[]',TRUE);\n\n foreach ($catedra as $persona) {\n $params = array(\n 'id_curso' => $curso_id,\n 'id_persona' => $persona,\n );\n\n $this->Catedra_model->add_catedra($params);\n }\n }\n\n $this->session->set_flashdata('crear', 'Nuevo curso creado');\n redirect('curso/index');\n }\n\n else\n {\n $data['title'] = 'Nuevo Curso - ESMN';\n $data['page_title'] = 'Nuevo Curso';\n\n $data['all_materias'] = $this->Materia_model->get_all_materias();\n $data['all_periodos'] = $this->Periodo_model->get_all_periodo();\n $data['personas'] = $this->Persona_model->get_all_personas();\n\n $data['js'] = array('curso.js');\n $data['css'] = array('curso.css');\n\n $this->load->view('templates/header',$data);\n $this->load->view('curso/add',$data);\n $this->load->view('templates/footer');\n }\n }", "function ADD()\n {\n\t if ( ($this->user_login <> '') || ($this->pista_ID <> '')\n || ($this->horario_ID <> '') || ($this->fecha <> '')){ // si los atributos vienen vacios\n\t // construimos el sql para buscar esa clave en la tabla\n\t $sql = \"SELECT * FROM RESERVA\n WHERE (FECHA = '$this->fecha')\n AND (HORARIO_ID = '$this->horario_ID')\n AND (PISTA_ID = '$this->pista_ID')\";\n\t if (!$resultado = $this->mysqli->query($sql)){ //si da error la ejecución de la query\n\t return 'ERROR: No se ha podido conectar con la base de datos'; //error en la consulta (no se ha podido conectar con la bd). Devolvemos un mensaje que el controlador manejara\n\t }else { //si la ejecución de la query no da error\n $num_rows = mysqli_num_rows($resultado);\n if($num_rows == 0){\n $sql = \"INSERT INTO RESERVA(\n\t ID,\n\t USUARIO_LOGIN,\n\t PISTA_ID,\n\t FECHA,\n HORARIO_ID) VALUES(\n\t \t\t\t\t\tNULL,\n\t '$this->user_login',\n\t '$this->pista_ID',\n\t '$this->fecha',\n '$this->horario_ID'\n\t )\";\n\t if (!($resultado = $this->mysqli->query($sql))){ //ERROR en la consulta ADD\n\t\t $this->mensaje['mensaje'] = 'ERROR: Introduzca todos los valores de todos los campos';\n\t return $this->mensaje; // introduzca un valor para el usuario\n\t }\n\t else{\n $resultado = $this->mysqli->query(\"SELECT @@identity AS ID\"); //recoge el id de la ultima inserccion\n if ($row = mysqli_fetch_array($resultado)) {\n $this->mensaje['reserva_ID'] = $row[0];\n }\n \t $this->mensaje['mensaje'] = 'Reserva realizada correctamente';\n return $this->mensaje; // introduzca un valor para el usuario\n\t }\n }else{\n $this->mensaje['mensaje'] = 'ERROR: Ya existe una reserva en esa fecha y pista';\n return $this->mensaje; // introduzca un valor para el usuario\n }\n\t }\n }else{ //Si no se introduce un login\n $this->mensaje['mensaje'] = 'ERROR: Introduzca todos los valores de todos los campos'; // Itroduzca un valor para el usuario\n return $this->mensaje;\n }\n\n }", "public function addIti(Request $request){\n $id_cotizacion = Cotizacion::find($request->input('id'));\n $detallesCotizacion = new DetallesCotizacion();\n $detallesCotizacion->detalles= $request->input('detalles');\n $detallesCotizacion->equipaje = $request->input('equipaje');\n $detallesCotizacion->id_cotizacions = $request->input('id');\n $detallesCotizacion->save();\n return redirect()->route('cotizaciones.show', [$id_cotizacion])->with('success','Itinerario Agregado');\n // echo($cotizacion);\n }", "public function setClasseMatiere($classe,$matiere,$coefficient){//enregistrement des nouvelles classes\n $req = \"INSERT INTO `matiere-classe` (`idMatiere`,`idClasse`,`coefficient`) VALUES (:idMatiere,:idClasse,:coefficient)\";\n $params = array(\n \"idMatiere\" => htmlspecialchars($matiere),\n \"idClasse\" => htmlspecialchars($classe),\n \"coefficient\" => htmlspecialchars($coefficient),\n );\n return $this->insert($req,$params);\n }", "public function create()\n {\n session()->forget( [ 'checkProprietaire', 'addCartMandat' ] );\n $proprietaires = Proprietaire::all();\n $locals = Local::all();\n $categories = Category::pluck( 'namecat', 'id' )->toArray();\n $consistances = Consistance::pluck( 'name', 'id' )->toArray();\n return view( 'mandat.add', compact( 'proprietaires', 'locals', 'categories', 'consistances' ) );\n\n }", "public function crear() {\n\t\t$this->load->model('pais_model');\n\t\t$datos['body']['paises'] = $this->pais_model-> getAll($filtro=\"\");\n\t\t\n\t\tenmarcar($this, 'autor/crear', $datos);\n\t}", "static public function addNotasDebitoModel(\n $descripcionDebito,\n $cantidadDebito,\n $importeDebito,\n $nroCheque,\n $idCliente,\n $fechaDebito,\n $tabla){\n $totalDebito = $cantidadDebito * $importeDebito;\n\n $sql13 = Conexion::conectar()->prepare(\"SELECT nroCheque FROM pagos\n WHERE idCliente = :idCliente AND nroCheque=:nroCheque AND cheque=:totalDebito\");\n $sql13->bindParam(':idCliente', $idCliente);\n $sql13->bindParam(':nroCheque', $nroCheque);\n $sql13->bindParam(':totalDebito', $totalDebito);\n $sql13->execute();\n $resu= $sql13->fetch();\n $saldo = $resu['nroCheque'];\n\n $sql131 = Conexion::conectar()->prepare(\"SELECT nroCheque FROM notadebito\n WHERE idCliente = :idCliente AND nroCheque=:nroCheque \");\n $sql131->bindParam(':idCliente', $idCliente);\n $sql131->bindParam(':nroCheque', $nroCheque);\n $sql131->execute();\n $resu1= $sql131->fetch();\n $saldo1 = $resu1['nroCheque'];\n\n\n\n if($saldo <=0){\n return 'noSaldo';\n }if ($saldo1) {\n return 'noSaldo';\n }\n else{\n\n\n $sql = Conexion::conectar()->prepare(\"INSERT INTO $tabla (descripcionDebito, cantidadDebito, importeDebito, totalDebito ,nroCheque, idCliente , fechaDebito)\n VALUES(:descripcionDebito, :cantidadDebito , :importeDebito,:totalDebito,:nroCheque , :idCliente, :fechaDebito)\");\n $sql->bindParam(':descripcionDebito', $descripcionDebito);\n $sql->bindParam(':cantidadDebito', $cantidadDebito);\n $sql->bindParam(':importeDebito', $importeDebito);\n $sql->bindParam(':totalDebito', $totalDebito);\n $sql->bindParam(':nroCheque', $nroCheque);\n $sql->bindParam(':idCliente', $idCliente);\n $sql->bindParam(':fechaDebito', $fechaDebito);\n\n if ($sql->execute()) {\n\n $sql3 = Conexion::conectar()->prepare(\"UPDATE saldos SET saldoActual= saldoActual+ $totalDebito, saldoFinal= saldoFinal+ $totalDebito WHERE idCliente = :idCliente\");\n $sql3->bindParam(':idCliente', $idCliente);\n $sql3->execute();\n\n\n\n\n $sql41 = Conexion::conectar()->prepare(\"INSERT INTO cuentacorriente(comprobante,\n entrada, idCliente, fecha)\n VALUES(:comprobante, :entrada , :idCliente,:fecha)\");\n $hoy = $fechaDebito;\n $comprobante = 1;\n $sql41->bindParam(':comprobante', $comprobante );\n $sql41->bindParam(':entrada', $totalDebito);\n $sql41->bindParam(':idCliente', $idCliente);\n $sql41->bindParam(':fecha', $hoy);\n $sql41->execute();\n\n\n $sql13 = Conexion::conectar()->prepare(\"SELECT MAX(idCuentaCorriente)AS id FROM cuentacorriente\n WHERE idCliente = :idCliente\");\n $sql13->bindParam(':idCliente', $idCliente);\n $sql13->execute();\n $resu= $sql13->fetch();\n $id = $resu['id'];\n\n\n $sql11 = Conexion::conectar()->prepare(\"UPDATE cuentacorriente\n SET saldo= (SELECT saldoFinal FROM saldos WHERE idCliente=$idCliente)\n WHERE idCliente=:idCliente AND idCuentaCorriente = :id\" );\n $sql11->bindParam(':idCliente', $idCliente);\n $sql11->bindParam(':id', $id);\n $sql11->execute();\n\n $sql131 = Conexion::conectar()->prepare(\"SELECT MAX(idNotaDebito)AS idNotaDebito FROM notadebito\n WHERE idCliente = :idCliente\");\n $sql131->bindParam(':idCliente', $idCliente);\n $sql131->execute();\n $resu1= $sql131->fetch();\n $idNotaDebito = 'Nota de Débito' . ' ' . $resu1['idNotaDebito'];\n $nroNotaDebito=$resu1['idNotaDebito'];\n $sql111 = Conexion::conectar()->prepare(\"UPDATE cuentacorriente\n SET comprobante= :idNotaDebito , nroNotaDebito=:nroNotaDebito\n WHERE idCliente=:idCliente AND idCuentaCorriente = :id\");\n $sql111->bindParam(':idCliente', $idCliente);\n $sql111->bindParam(':idNotaDebito', $idNotaDebito);\n $sql111->bindParam(':nroNotaDebito', $nroNotaDebito);\n $sql111->bindParam(':id', $id);\n $sql111->execute();\n\n return 'success';\n }else{\n return 'errorers';\n }\n $sql->close();\n\n }\n\n }", "public function incluirMembrosnaCelulaDao($matricula,$celula){\r\n \r\n require_once (\"conexao.php\");\r\n \r\n $obj = Connection::getInstance();\r\n $objMembro = new objetoMembro();\r\n $objMembro->setMatricula(0); \r\n $ret=0;\r\n $script =\"INSERT INTO celulamembro (CodCelula,CodMembro)VALUES('$celula','$matricula')\";\r\n $result = mysql_query($script) or die (\"Falha ao adicionar\".mysql_error());\r\n \r\n if ($result)\r\n {\r\n $ret=1;\r\n $busca = mysql_query(\"Select Nome,Matricula from membros where Matricula = $matricula\") or die (\"Nao foi possivel realizar a busca\".mysql_error());\r\n $reg = mysql_fetch_assoc($busca);\r\n $objMembro->setMatricula($reg['Matricula']); $objMembro->setNome($reg['Nome']);\r\n mysql_free_result($busca);\r\n }else{\r\n $ret=2;\r\n }\r\n \r\n $obj->freebanco();\r\n return $objMembro;\r\n }", "public function create(Request $request, $idActividad, $idTutoradoADA){\n $inscAlumno = InscripcionAlumno::where([['idActividad',$idActividad], ['idInscripcionADA', $idTutoradoADA]])->first();\n $alumno = $inscAlumno->alumno;\n $actividad = Actividad::findOrFail($idActividad);\n $actPedagogia = ActPedagogia::where([['idActividad',$idActividad], ['idInscripcionAlumno', $inscAlumno->idInscripcionAlumno]])->first();\n $tutorTutorado = TutorTutorado::where([['idAlumno', $alumno->idAlumno], ['idDocente', Docente::where('idUser', $actividad->idUserResp)->value('idDocente')], ['anioSemestre', $actividad->anioSemestre], ['numeroSemestre', $actividad->numeroSemestre]])->first();\n\n return view('programador.actividad.actTutoria.create',['tutorado' => $alumno->user, 'actPedagogia' => $actPedagogia, 'idTutor' => $actividad->responsable->docente->idDocente, 'anioSemestre' => $actividad->anioSemestre, 'numeroSemestre' => $actividad->numeroSemestre, 'tutorTutorado' => $tutorTutorado]);\n }", "public function actionCreate()\n {\n\t\t$idFase \t= Yii::$app->request->get('idFase');\n\t\t\n\t\t$anio \t\t= Yii::$app->request->get('anio');\n\t\t$esDocente \t= Yii::$app->request->get('esDocente');\n\t\t\n\t\t$ciclos = new SemillerosTicCiclos();\n\t\t\n\t\t$dataResumen = [];\n\t\t\n\t\t/**\n\t\t * Estructura de datos\n\t\t * Aquí formo como están estructurados los datos para guardar\n\t\t *\n\t\t * Un diario de campo tiene muchos movimientos\n\t\t */\n\t\t$diarioCampo \t= null;\n\t\t$movimientos\t= [];\n\t\t/**/\n\t\t\n\t\t//Si hay un idFase, significa que se debe buscar los datos guardados\n\t\t//Se hace por que significa que el usuario cambio la fase en el select de la vista _form\n\t\tif( $idFase && !Yii::$app->request->post() )\n\t\t{\n\t\t\t//Consulto todas las Sesiones por ejecuciones de Fase\n\t\t\tswitch( $idFase )\n\t\t\t{\n\t\t\t\tcase 1: \n\t\t\t\t\t$idFaseFase = 14; \n\t\t\t\t\t$titulo=\"BITACORA FASE I\";\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 2: \n\t\t\t\t\t$idFaseFase = 15; \n\t\t\t\t\t$titulo=\"BITACORA FASE II\";\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 3: \n\t\t\t\t\t$idFaseFase = 16; \n\t\t\t\t\t$titulo=\"BITACORA FASE III\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$dataResumen = $this->actionOpcionesEjecucionDiarioCampo( $idFaseFase, $anio, 1, $idFase );\n\t\t\t$dataResumen['titulo'] = $titulo;\n\t\t\t\n\t\t\t\n\t\t\t//Busco diario de campo según los datos suministrados\n\t\t\t$diarioCampo \t= SemillerosTicDiarioDeCampoEstudiantes::findOne([\n\t\t\t\t\t\t\t\t\t\t'id_fase' \t=> $idFase,\n\t\t\t\t\t\t\t\t\t\t'anio' \t\t=> $anio,\n\t\t\t\t\t\t\t\t\t\t'estado' \t=> 1,\n\t\t\t\t\t\t\t\t\t]);\n\t\t\t\n\t\t\t//Si no encuentra significa que es un registro nuevo\n\t\t\tif( !$diarioCampo )\n\t\t\t{\n\t\t\t\t$diarioCampo \t= new SemillerosTicDiarioDeCampoEstudiantes();\n\t\t\t\t$diarioCampo->id_fase = $idFase;\n\t\t\t}\n\t\t\t\n\t\t\t//Consulto todas las Sesiones por ejecuciones de Fase\n\t\t\tswitch( $idFase )\n\t\t\t{\n\t\t\t\tcase 1: $tabla = \"i\"; break;\n\t\t\t\tcase 2: $tabla = \"ii\"; break;\n\t\t\t\tcase 3: $tabla = \"iii\"; break;\n\t\t\t}\n\t\t\t\n\t\t\t$datosSesiones\t= DatosSesiones::find()\n\t\t\t\t\t\t\t\t\t->alias('ds')\n\t\t\t\t\t\t\t\t\t->select( 'id_sesion' )\n\t\t\t\t\t\t\t\t\t->innerJoin( 'semilleros_tic.ejecucion_fase_'.$tabla.'_estudiantes ef', 'ef.id_datos_sesion=ds.id' )\n\t\t\t\t\t\t\t\t\t->where( 'ds.estado=1' )\n\t\t\t\t\t\t\t\t\t->andWhere( 'ef.estado=1' )\n\t\t\t\t\t\t\t\t\t->andWhere( 'ef.anio='.$anio )\n\t\t\t\t\t\t\t\t\t->andWhere( 'ef.id_fase='.$idFase )\n\t\t\t\t\t\t\t\t\t->groupby( 'id_sesion' )\n\t\t\t\t\t\t\t\t\t->all();\n\t\t\t\n\t\t\t$sesiones = [];\n\t\t\t\n\t\t\tforeach( $datosSesiones as $key => $value )\n\t\t\t{\n\t\t\t\t$sesiones[] = $value->id_sesion;\n\t\t\t\t\n\t\t\t\t$mov = SemillerosTicMovimientoDiarioCampoEstudiantes::findOne([\n\t\t\t\t\t\t\t\t\t\t\t'id_diario_de_campo_estudiantes' \t=> $diarioCampo->id,\n\t\t\t\t\t\t\t\t\t\t\t'id_sesion' \t\t\t\t\t\t=> $value->id_sesion,\n\t\t\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif( !$mov )\n\t\t\t\t{\n\t\t\t\t\t$mov = new SemillerosTicMovimientoDiarioCampoEstudiantes();\n\t\t\t\t\t$mov->id_sesion = $value->id_sesion;\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$movimientos[] = $mov;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Si existen datos post, signfica que se pretende guardar los datos ingresados por el usuario\n\t\tif( Yii::$app->request->post() )\n\t\t{\n\t\t\t//Si no existe un id Fase significa que se procede a guardar los datos\n\t\t\t//Busco diario de campo según los datos suministrados\n\t\t\t$diarioCampo \t= SemillerosTicDiarioDeCampoEstudiantes::findOne([\n\t\t\t\t\t\t\t\t\t\t'id_fase' \t=> Yii::$app->request->post('SemillerosTicDiarioDeCampoEstudiantes')['id_fase'],\n\t\t\t\t\t\t\t\t\t\t'anio' \t\t=> $anio,\n\t\t\t\t\t\t\t\t\t\t'estado'\t=> 1,\n\t\t\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t\t\t\n\t\t\tif( !$diarioCampo )\n\t\t\t{\n\t\t\t\t$diarioCampo \t= new SemillerosTicDiarioDeCampoEstudiantes();\n\t\t\t\t$diarioCampo->load(Yii::$app->request->post());\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$postMovimientos = Yii::$app->request->post('SemillerosTicMovimientoDiarioCampoEstudiantes');\n\t\t\t\n\t\t\tforeach( $postMovimientos as $key => $mov )\n\t\t\t{\n\t\t\t\t// echo \"<pre>\"; var_dump( $postMovimientos ); echo \"</pre>\";\n\t\t\t\t// var_dump( $mov ); exit();\n\t\t\t\t$modelMov = null;\n\t\t\t\t\n\t\t\t\tif( $mov['id'] )\n\t\t\t\t{\n\t\t\t\t\t$modelMov = SemillerosTicMovimientoDiarioCampoEstudiantes::findOne($mov['id']);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$modelMov = new SemillerosTicMovimientoDiarioCampoEstudiantes();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$modelMov->load( $mov, '' );\n\t\t\t\t\n\t\t\t\t$movimientos[] = $modelMov;\n\t\t\t}\n\t\t\t\n\t\t\t//Desde aquí se procede a guardar los datos\n\t\t\t\n\t\t\t$valido = true;\n\t\t\t\n\t\t\t$valido = $diarioCampo->validate([\n\t\t\t\t\t\t\t\t'id_fase',\n\t\t\t\t\t\t\t\t'anio',\n\t\t\t\t\t\t\t]) && $valido;\n\t\t\t\n\t\t\tforeach( $movimientos as $key => $mov )\n\t\t\t{\n\t\t\t\t$valido = $mov->validate([\n\t\t\t\t\t\t\t\t'descripcion',\n\t\t\t\t\t\t\t\t'hallazgos',\n\t\t\t\t\t\t\t\t'id_sesion',\n\t\t\t\t\t\t\t]) && $valido;\n\t\t\t}\n\t\t\t\n\t\t\t//Si todo esta bien se guarda los datos\n\t\t\tif( $valido )\n\t\t\t{\n\t\t\t\t$diarioCampo->estado = 1;\n\t\t\t\t$diarioCampo->save( false );\n\t\t\t\t\n\t\t\t\tforeach( $movimientos as $key => $mov )\n\t\t\t\t{\n\t\t\t\t\t$mov->id_diario_de_campo_estudiantes = $diarioCampo->id;\n\t\t\t\t\t$mov->anio \t\t\t\t\t\t\t = $anio;\n\t\t\t\t\t$mov->estado \t\t\t\t\t\t = 1;\n\t\t\t\t\t$mov->save(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $this->redirect(['index',\n\t\t\t\t\t\t\t\t\t'anio' \t\t=> $anio,\n\t\t\t\t\t\t\t\t\t'esDocente' => 0,\n\t\t\t\t\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( !$diarioCampo )\n\t\t{\n\t\t\t$diarioCampo \t= new SemillerosTicDiarioDeCampoEstudiantes();\n\t\t}\n\t\t\n\t\t//se crea una instancia del modelo fases\n\t\t$fasesModel \t\t \t= new Fases();\n\t\t//se traen los datos de fases\n\t\t$dataFases\t\t \t= $fasesModel->find()->orderby( 'id' )->all();\n\t\t//se guardan los datos en un array\n\t\t$fases\t \t \t \t= ArrayHelper::map( $dataFases, 'id', 'descripcion' );\n\t\t\n\t\t$anios\t= [ $anio => $anio ];\n\t\t\n\t\t$cicloslist = [];\n\t\t\n\t\treturn $this->renderAjax('create', [\n 'diarioCampo' \t=> $diarioCampo,\n 'movimientos' \t=> $movimientos,\n\t\t\t'fases' \t\t=> $fases,\n 'fasesModel'\t=> $fasesModel,\n\t\t\t'ciclos' \t\t=> $ciclos,\n 'cicloslist'\t=> $cicloslist,\n 'anios' \t\t=> $anios,\n 'anio' \t\t\t=> $anio,\n 'esDocente' \t=> $esDocente,\n 'dataResumen' \t=> $dataResumen,\n ]);\n }", "function ajoue_proprietaire($nom,$CA,$debut_contrat,$fin_contrat)\r\n{ $BDD=ouverture_BDD_Intranet_Admin();\r\n\r\n if(exist($BDD,\"proprietaire\",\"nom\",$nom)){echo \"nom deja pris\";return;}\r\n\r\n $SQL=\"INSERT INTO `proprietaire` (`ID`, `nom`, `CA`, `debut_contrat`, `fin_contrat`) VALUES (NULL, '\".$nom.\"', '\".$CA.\"', '\".$debut_contrat.\"', '\".$fin_contrat.\"')\";\r\n\r\n $result = $BDD->query ($SQL);\r\n\r\n if (!$result)\r\n {echo \"<br>SQL : \".$SQL.\"<br>\";\r\n die('<br>Requête invalide ajoue_equipe : ' . mysql_error());}\r\n}", "public static function addCraft()\n\t\t{\n\t\t\t$stageDBO = DatabaseObjectFactory::build('material');\n\t\t\t$arr = ['material_id','unit_price','name'];\n\t\t\t$stageDBO->SetJoin(['[><]item' => 'item_id']);\n\t\t\t$materials = $stageDBO->getRecords($arr);\n\t\t\tinclude('views/pages/addCraft.php');\n\t\t}", "function add()\n {\n if (isset($_SERVER['HTTP_REFERER'])) {\n\n $this->load->library('form_validation');\n\n $this->form_validation->set_rules('est_codigo', 'Estudiante', 'required');\n $this->form_validation->set_rules('mat_codigo', 'Materia', 'required');\n if ($this->form_validation->run()) {\n echo 'INSERCION';\n $params = array(\n 'mat_codigo' => $this->input->post('mat_codigo'),\n 'est_codigo' => $this->input->post('est_codigo'),\n );\n\n $mat_ap_x_est_id = $this->Mat_ap_x_est_model->add_mat_ap_x_est($params);\n redirect('mat_ap_x_est/index');\n } else {\n $this->load->model('Materia_model');\n $data['all_materias'] = $this->Materia_model->get_all_materias_();\n $this->load->model('Estudiante_model');\n $data['all_estudiantes'] = $this->Estudiante_model->get_all_estudiantes_();\n\n $this->load->view('templates/header');\n $this->load->view('mat_ap_x_est/add', $data);\n $this->load->view('templates/footer');\n }\n\n } else {\n\n\n $this->load->view('templates/header');\n $this->load->view('templates/forbidden');\n $this->load->view('templates/footer');\n\n }\n }", "function addpanier($user, $product, $quantite, $poids){\t// Fonction pour ajouter un produit au panier\n\n\t\tinclude(\"../../modele/modele.php\"); // Inclue la base de donnée + connexion.\n\t\t\n\t\t$actif = '1' ;\n\t\t$sql = 'INSERT INTO detailcommande(id_product, id_user, quantite, poids, actif) VALUES (:id_product , :id_user , :quantite , :poids, :actif) '; // Ajout d'une ligne dans la table detailCommande \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // suivant les informations entrer dans la fonction panier.\n\t\t$reponse = $bdd->prepare($sql);\t\t\t// Preparation de la requete SQL.\n\t\t$reponse -> bindParam(':id_product', $product);\n\t\t$reponse -> bindParam(':id_user', $user);\n\t\t$reponse -> bindParam(':quantite', $quantite);\n\t\t$reponse -> bindParam(':poids', $poids);\n\t\t$reponse -> bindParam(':actif', $actif );\n\t\t$reponse ->execute();\t\t\t\t\t// Execution de la requete SQL.\n\n\t\t$sql3 = 'SELECT * FROM detailcommande WHERE id_product = \"'.$product.'\" AND id_user = \"'.$user.'\" AND quantite = \"'.$quantite.'\" AND poids=\"'.$poids.'\" AND actif = 1 ';\n\t\t$reponse3 = $bdd->query($sql3);\n\t\twhile ($donnees = $reponse3 -> fetch())\t\t// Mise en forme de tableau.\n\t\t\t{\n\t\t\t\t$actif = '1' ;\n\t\t\t\t$id_detailCommande = $donnees['id'];\n\t\t\t\t$sql2 = 'INSERT INTO commande(id_user, id_detailCommande, date, actif) VALUES (:id_user, :id_detailCommande, CURDATE(), :actif)'; \t// Ajout d'une ligne dans la table commande\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// suivant les informations d'entrées\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Ajout date ???\n\t\t\t\t$reponse2 = $bdd->prepare($sql2);\n\t\t\t\t$reponse2 -> bindParam(':id_user', $user);\n\t\t\t\t$reponse2 -> bindParam(':id_detailCommande', $id_detailCommande);\n\t\t\t\t$reponse2 -> bindParam(':actif', $actif );\n\t\t\t\t$reponse2 ->execute();\n\t\t\t}\n\t}", "function createIngrediente($preco,$qtd_disponivel,$nome){\n if( $this->getIngredienteID($nome)){\n return false;\n }\n\n $query = \"INSERT INTO $this->ingrediente\n ($this->preco, $this->qtd_disponivel, $this->nome)\n values ('$preco', '$qtd_disponivel', '$nome')\";\n\n //Insert ingrediente into database\n if ( $this->dataBase->executeQuery($query) )\n //Fetch ingrediente id from tamanho\n $this->setingredienteID ($nome);\n else\n return false;\n\n return $this->id; // success\n }", "public function enregistrerMauvaisEssaiMDP() {\n\t\t\n\t\t$this->log->debug(\"Usager::enregistrerMauvaisEssaiMDP() Début\");\n\t\t\n\t\t// Incrémenter le compteur\n\t\t$nbEssais = $this->get(\"nb_mauvais_essais\");\n\t\t$nbEssais++;\n\t\t$this->set(\"nb_mauvais_essais\", $nbEssais);\n\t\t\n\t\t// Si plus du nombre d'essais maximum verrouiller le compte\n\t\tif ($nbEssais > SECURITE_NB_MAUVAIS_ESSAIS_VERROUILLAGE) {\n\t\t\t$this->set(\"statut\", 1);\t\n\t\t}\n\t\t\n\t\t// Enregistrer\n\t\t$this->enregistrer();\n\t\t\t\t\n\t\t$this->log->debug(\"Usager::enregistrerMauvaisEssaiMDP() Fin\");\n\t}", "function alta_unidad_m(){\n\t\t$u= new Unidad_medida();\n\t\t$u->fecha_alta=date(\"Y-m-d\");\n\t\t$u->estatus_general_id=1;\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\n\t\t$related = $u->from_array($_POST);\n\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han registrado los datos de la Unidad de Medida.\\\"); window.location='\".base_url().\"index.php/inicio/acceso/\".$GLOBALS['ruta'].\"/menu';</script></html>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tshow_error(\"\".$u->error->string);\n\t\t}\n\t}", "public function createMesaEntrada()\n {\n $ultLegajo = Interno ::max('legajo');\n $nuevoLegajo = $ultLegajo+1;\n $hoy = Carbon::now();\n $hoy = $hoy->format('Y-m-d');\n \n $motivoingresoprogramas = MotivoIngresoPrograma::all();\n $juzgados = JuzgadoEspecifico::all();\n $regimenes = Regimen::all();\n $empleados = Empleado::all();\n return view('mesaentrada.create',compact('motivoingresoprogramas','juzgados','regimenes','empleados'))->with('nuevoLegajo',$nuevoLegajo)->with('hoy',$hoy);\n }", "public function addMonumentAction(Request $request){\n if(($this->container->get('security.authorization_checker')->isGranted('ROLE_CLIENT'))){\n throw new AccessDeniedException('Access Denied!!!!!');\n }\n else{\n $monument = new Monument();\n $test = \"ajout\";\n $form = $this->createForm(MonumentType::class, $monument);\n $form = $form->handleRequest($request);\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($monument);\n $em->flush();\n return $this->redirectToRoute('museum_showMonumentspage');\n }\n return $this->render('@Museum/Monument/addMonument.html.twig', array('form' => $form->createView(), 'test' => $test));\n }}", "function evt__Agregar()\n\t{\n\t\t$this->tabla()->resetear();\n\t\t$this->set_pantalla('pant_edicion');\n\t}", "public function create()\n {\n //\n return view ('materia');\n }", "public function newconcitaAction()\r\n {\r\n //Metodo para consulta nueva con el id de cita\r\n $entity = new Consulta();\r\n \r\n $em = $this->getDoctrine()->getManager();\r\n \r\n //Recuperación del id\r\n $request = $this->getRequest();\r\n $cadena= $request->get('id');\r\n //$identidad= $request->get('identidad');\r\n //Obtener el id del parametro\r\n $idEntidad = substr($cadena, 1);\r\n $cita = $em->getRepository('DGPlusbelleBundle:Cita')->find($idEntidad);\r\n //var_dump($cadena);\r\n //var_dump($cita);\r\n $tratamiento = $cita->getTratamiento();\r\n \r\n $entity->setTratamiento($tratamiento);\r\n $idpaciente=$cita->getPaciente()->getId();\r\n \r\n //Busqueda del paciente\r\n $paciente = $em->getRepository('DGPlusbelleBundle:Paciente')->find($idpaciente);\r\n //Seteo del paciente en la entidad\r\n $entity->setPaciente($paciente);\r\n \r\n $form = $this->createCreateForm($entity,2,$cadena);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }", "public function store(UnidadeMedidaItemContratacaoRequest $request)\n {\n\n $this->unidadeMedidaItemContratacaoRepository->create($request->all());\n\n $html = $this->renderizarTabela();\n \n return response(['msg' => trans('alerts.registro.created'), 'status' => 'success', 'html'=> $html]); \n\n }", "function update_inscripcion_materia($id,$params)\r\n {\r\n $this->db->where('id',$id);\r\n return $this->db->update('inscripcion_materia',$params);\r\n }", "function maquetacioItemsNotHoudini($model, $columna, $nomCaixa, $tipusCaixa, $ordre, $estilCaixa, $estilLlistat, $estilElement, $id_registre, $id_newsletter, $registre, $pathEditora)\n{\n global $CONFIG_URLBASE, $CONFIG_URLUPLOADIM, $CONFIG_estilsElement;\n\n $parametres = '<input type=\"hidden\" name=\"newsletter['.htmlspecialchars($model).']['.htmlspecialchars($columna).']['.htmlspecialchars($nomCaixa).']['.htmlspecialchars($tipusCaixa).'][]['.htmlspecialchars($estilCaixa).']['.htmlspecialchars($estilLlistat).']['.htmlspecialchars($estilElement).']\" value=\"'.htmlspecialchars($id_registre).'\" />';\n\n $imatge = $registre['IMATGE1'] != '' ? '<img src=\"' . $CONFIG_URLUPLOADIM . $registre['IMATGE1'] . '\" style=\"width: 159px;\" class=\"left\"/>' : '';\n return '<li id=\"noth_reg' . $id_registre . '\" class=\"box removable stylable clearfix '.$estilElement.'\">\n\t\t\t'.$parametres.'\n\t\t\t<div class=\"spacer clearfix\">\n\t\t\t\t'. $imatge .'\n\t\t\t\t<h4><a href=\"'.$CONFIG_URLBASE . $pathEditora . '/' . $registre['ID'] . '/' . $registre['URL_TITOL'].'\" rel=\"external\">'.$registre['TITOL'].'</a></h4>\n\t\t\t\t<p>'.$registre['RESUM'].'</p>\n\t\t\t</div>\n\t\t</li>';\n}" ]
[ "0.6804768", "0.6535714", "0.61981285", "0.61285955", "0.6113647", "0.6075961", "0.59873056", "0.59225047", "0.5922358", "0.5894869", "0.58535343", "0.5846425", "0.58097756", "0.57601804", "0.57496643", "0.5739368", "0.5729696", "0.57204163", "0.56664705", "0.5662113", "0.56545645", "0.5650439", "0.5648045", "0.5629711", "0.5628783", "0.5626147", "0.5612104", "0.5604492", "0.5592786", "0.55825686", "0.5581375", "0.55786437", "0.5557197", "0.5541968", "0.5537284", "0.55311084", "0.55121535", "0.5483884", "0.54797995", "0.5477031", "0.5474719", "0.5459061", "0.5457947", "0.54574883", "0.54531586", "0.54486567", "0.54469836", "0.5446147", "0.54461426", "0.5444287", "0.54397327", "0.54388916", "0.54223216", "0.5420516", "0.54108906", "0.5394365", "0.53917867", "0.53909063", "0.53864443", "0.5386327", "0.5379149", "0.53756833", "0.537178", "0.5365107", "0.5364647", "0.53604263", "0.5359182", "0.53574586", "0.53572804", "0.53556174", "0.5353178", "0.53512937", "0.5350402", "0.5348303", "0.5347683", "0.5343946", "0.5337448", "0.53340566", "0.5333439", "0.53333735", "0.53259075", "0.5323073", "0.53199255", "0.53164077", "0.5312222", "0.5311641", "0.53043896", "0.53032756", "0.5303", "0.5298128", "0.52944505", "0.5292844", "0.52831185", "0.5278741", "0.52787083", "0.5274631", "0.5263957", "0.5261275", "0.52606344", "0.52590215" ]
0.72243047
0
/ function to update inscripcion_materia
function update_inscripcion_materia($id,$params) { $this->db->where('id',$id); return $this->db->update('inscripcion_materia',$params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_materia($materia_id,$params)\n {\n $this->db->where('materia_id',$materia_id);\n return $this->db->update('materia',$params);\n }", "function modificar_material($id_material,$titulo,$descripcion,$objetivos,$estado,$autores,$ac,$dirigido,$edad,$nivel,$saa,$tipo,$archivos,$id_licencia,$subac,$idiomas) {\n\t\n\t$UpdateRecords = \"UPDATE materiales \n\t\tSET material_titulo='$titulo', material_descripcion='$descripcion', material_objetivos='$objetivos',\n\t\tmaterial_estado='$estado',material_autor='$autores',material_area_curricular='$ac',\n\t\tmaterial_dirigido='$dirigido',material_edad='$edad',material_nivel='$nivel',\n\t\tmaterial_saa='$saa',material_tipo='$tipo',material_archivos='$archivos',\n\t\tmaterial_licencia='$id_licencia', material_subarea_curricular='$subac',\n\t\tmaterial_idiomas='$idiomas'\n\t\tWHERE id_material='$id_material'\";\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($UpdateRecords); \n\t\tmysql_close($connection);\n\t\n\t}", "function modificarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_ime';\n\t\t$this->transaccion='SNX_MAQ_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_maquinaria','id_maquinaria','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('potencia','potencia','numeric');\n\t\t$this->setParametro('peso','peso','numeric');\n\t\t$this->setParametro('maquinaria','maquinaria','varchar');\n\t\t$this->setParametro('id_factorindexacion','id_factorindexacion','int4');\n\t\t$this->setParametro('id_tipopreciomaquinaria','id_tipopreciomaquinaria','int4');\n\t\t$this->setParametro('id_ambitoprecio','id_ambitoprecio','int4');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function update($maeMedico);", "function editarMaterial($empleados, $pentalon,$fecha, $talla,$cantidad){\n //realizamos la consuta y la guardamos en $sql\n $sql=\"INSERT INTO material_entregado(id, empleado,materiales,fecha_entrega,talla,cantidad) VALUES (null, \".$empleados.\",'\".$pentalon.\"','\".$fecha.\"','\".$talla.\"', '\".$cantidad.\"')\";\n //Realizamos la consulta utilizando la funcion creada en db.php\n $resultado=$this->realizarConsulta($sql);\n if($resultado!=false){\n return true;\n }else{\n return null;\n }\n\n }", "public function forActualizaMateria($materia,$cid,$plectivo){\n $nivelMateria = DB::connection('sqlsrv_bdacademico')\n ->table('TB_PENSUM as A')\n ->leftJoin('TB_PENSUMATE as B','A.COD_PENSUM','=','B.COD_PENSUM')\n ->leftJoin('TB_MATERIA as C','B.COD_MATERIA','=','C.COD_MATERIA')\n ->where('A.COD_PLECTIVO', '=', $plectivo)\n ->where('C.COD_MATERIA', '=', $materia)\n ->orderBy('C.NOMBRE')\n ->select('C.NIVEL')->pluck('C.NIVEL')->toArray();\n /**/\n $array_response=[];\n $array_response['status']=200;\n $array_response['message']='Materia '.$materia.' modificada correctamente';\n\n $docente_materia = tb_docente_materia::find($cid);\n if (is_null($docente_materia)) {\n $array_response['status']=404;\n $array_response['message']='Registro no encontrado. No se pudo guardar los cambios ['.$materia.']';\n }\n else{\n $docente_materia->COD_MATERIA=$materia;\n $docente_materia->NIVEL=$nivelMateria[0];\n $docente_materia->RESPONSA2 = \\Auth::user()->name;\n $docente_materia->FECSYS2 = Utils::getDateSQL();\n $docente_materia->save();\n }\n return $array_response;\n }", "public function update_materias($id, Request $request)\n {\n \n if( auth()->user()->hasRole(['Estudiante']))\n {\n $user = User::findOrFail($id);\n \n \n\n //Definimos las reglas de validacion\n $validaciones = \\Validator::make($request->all(),\n [\n 'materias_aprobadas' => 'min:1|max:carreras,cantidad_materias|numeric',\n \n ]);\n\n \n //preguntamos si hay errores\n if ($validaciones->fails()) {\n //volvemos al formulario con los errorres cargados\n return redirect()\n ->back()\n ->withErrors($validaciones->errors())\n ->withInput(Input::all());\n\n }\n //Asignamos la persona del Usuario\n $persona = $user->persona;\n //Actualizamos a la Persona con los datos restantes del Request\n $persona->materias_aprobadas = $request->get('materias_aprobadas');\n\n $persona->save();\n \n \n\n //Finalizada la Creacion con el Request\n //volvemos al Index\n \n return redirect()->route('carrera.perfil');\n \n \n \n }\n abort(403);\n\n }", "function setNombre_materia($nombre_materia){\n\t\t\n\t\t$this->nombre_materia = $nombre_materia;\n\t\t$this->cambios = true;\n\t}", "public function updateMateriel(){\n \n // Vérifier que les informations envoyées par le formulaire sont correctes\n $validationAttributes = $this->validate();\n\n\n DemandeDps::find($this->editDps[\"id\"])->update($validationAttributes[\"editDps\"]);\n\n $this->dispatchBrowserEvent(\"showSuccessMessage\", [\"message\"=>\"dps mis à jour avec succès!\"]);\n }", "function admin_modificar_alumno($codigo_anterior,$codigo,$nombres,$apellido_p,$apellido_m,$edad,$password,$id_padre,$grado,$nivel,$seccion,$disponible,$repitente){ \r\n\t\t$cn = $this->conexion();\t\t\t\r\n\t\t\r\n\t\tif($cn!=\"no_conexion\"){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t$sql=\"select * from $this->nombre_tabla_alumnos where codigo='$codigo' and codigo<>'$codigo_anterior'\"; \r\n\t\t\t$rs = mysql_query($sql,$cn);\r\n\t\t\t\r\n\t\t\tif(mysql_num_rows($rs)==0){\r\n\t\t\t\t\r\n\r\n\t\t\t\r\n \t\t$sql=\"update $this->nombre_tabla_alumnos set \r\ncodigo='$codigo',nombres='$nombres',apellido_paterno='$apellido_p',apellido_materno='$apellido_m',edad='$edad',password='$password',id_padre='$id_padre',grado='$grado',nivel='$nivel',seccion='$seccion',disponible=$disponible,repitente='$repitente' where codigo='$codigo_anterior'\";\t\t\r\n\t\t\t $rs = mysql_query($sql,$cn);\r\n\t\t\t\r\n\t\t\t\tmysql_close($cn);\t\t \r\n\t\t\t\treturn \"mysql_si\";\r\n\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmysql_close($cn);\r\n\t\t\t\t\treturn \"existe\";\r\n\t\t\t\t\t}\r\n\t\t}else{\r\n\t\treturn \"mysql_no\";\r\n\t\t}\r\n\t\t\r\n\t}", "public function update_materias_show(){\n \n if( auth()->user()->hasRole(['Estudiante'])){\n \n return view('update.materias_edit');\n }\n abort(403); \n }", "public function atualizar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE MinisterioTemDiscipulo SET \t ministerioId= ? , funcaoId = ?\n WHERE discipuloId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->ministerioId );\n $stm->bindParam(2, $this->funcaoId );\n $stm->bindParam(3, $this->discipuloId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "public function atualizar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE MinisterioTemDiscipulo SET \t ministerioId= ? , funcaoId = ?\n WHERE discipuloId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->ministerioId );\n $stm->bindParam(2, $this->funcaoId );\n $stm->bindParam(3, $this->discipuloId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "function modificar(){\r\n\t\t\t$mysqli=$this->ConectarBD();\r\n\t\t\t\t$id=$_SESSION['idr'];\r\n\r\n\t\t\t$sql= \"UPDATE reservact SET FECHA ='\".$this->fecha.\"', DNI ='\".$this->dni.\"', COD_ACT='\".$this->codact.\"' WHERE COD_RES = '\".$id.\"'\";\r\n\r\n\r\n\r\n\t\t\t\tif (!($resultado = $mysqli->query($sql))){\r\n\t\t\t\treturn 'ERR_CONS_BD';\r\n\t\t\t\t}else{\r\n\t\t\t \treturn \"CONFIRM_EDIT_RESERVA\";\r\n\t\t\t\t}\r\n\r\n\t\t}", "public function update(Request $request, materia $materia,$id)\n {\n $materia = materia::find($id);\n $materia->name = $request->name;\n $materia->contenido = $request->contenido;\n $materia->descripcion = $request->descripcion;\n $materia->curso_id = $request->curso_id;\n $materia->save();\n return redirect()->route('materia.show', $materia);\n }", "function delete_inscripcion_materia($id)\r\n {\r\n return $this->db->delete('inscripcion_materia',array('id'=>$id));\r\n }", "static public function mdlEditarmunicipio($tabla, $datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET desc_municipio = :desc_municipio WHERE id_municipio = :id_municipio\");\n\n\t\t$stmt->bindParam(\":id_municipio\", $datos[\"id_municipio\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":desc_municipio\", $datos[\"desc_municipio\"], PDO::PARAM_STR);\n\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n\t}", "public function editarMateriaController(){\n $datosController = $_GET[\"idM\"];\n //Enviamos al modelo el id para hacer la consulta y obtener sus datos\n $respuesta = Datos::editarMateriaModel($datosController, \"materias\");\n //Recibimos respuesta del modelo e IMPRIMIMOS UNA FORM PARA EDITAR\n echo'\n <input type=\"hidden\" value=\"'.$respuesta[\"id\"].'\"\n name=\"idEditar\">\n <input type=\"text\" value =\"'.$respuesta[\"nombre\"].'\"\n name=\"nombrecarreraEditar\" required>\n <input type=\"text\" value =\"'.$respuesta[\"clave\"].'\"\n name=\"clavecarreraEditar\" required>';\n $respuesta2 = Datos::vistaCarreraModel(\"carreras\");\n echo '<select id=\"mi_select\" name=\"mi_select\">\n <option value=\"'.\">Seleccionar carrera</option>\";\n foreach($respuesta2 as $row => $item){\n echo '<option value=\"'.$item[\"id\"].'\">'.$item[\"nombre\"].'</option>';\n }\n echo '</select>\n <input type=\"submit\" value= \"Actualizar\">';\n }", "function setMateria($materia){\n\t\t\n\t\t$this->materia = $materia;\n\t\t$this->cambios = true;\n\t}", "public function editarMaterialesProyecto(Request $request){\n\n $regla = array(\n 'id' => 'required',\n 'identificador' => 'required|array',\n 'material' => 'required|array',\n 'precio' => 'required|array',\n 'cantidad' => 'required|array',\n );\n\n $validar = Validator::make($request->all(), $regla);\n\n if ($validar->fails()){return ['success' => 0];}\n\n // iniciar el try catch DB\n\n DB::beginTransaction();\n\n try {\n\n // editar ingreso_b3\n\n IngresosB2::where('id', $request->id)\n ->update(['id_equipo2' => $request->selectequipo,\n 'nota' => $request->nota,\n 'proveedorb2_id' => $request->proveedor\n ]);\n\n // recorrer cada material para actualizarlo\n for ($i = 0; $i < count($request->material); $i++) {\n\n IngresosDetalleB2::where('id', $request->identificador[$i])\n ->update(['nombre' => $request->material[$i],\n 'cantidad' => $request->cantidad[$i],\n 'preciounitario' => $request->precio[$i],\n 'codigo' => $request->codigo[$i]\n ]);\n }\n\n DB::commit();\n return ['success' => 1];\n\n }catch(\\Throwable $e){\n DB::rollback();\n\n return ['success' => 2];\n }\n }", "function add_inscripcion_materia($params)\r\n {\r\n $this->db->insert('inscripcion_materia',$params);\r\n return $this->db->insert_id();\r\n }", "function editar_marca($id_editar, $marca, $moneda){\r\n\r\n\t\t\r\n\t$sql_marca=\"SELECT marca FROM marcadeherramientas WHERE id=$id_editar \";\r\n\t$resultado_marca=mysql_query($sql_marca);\r\n\r\n\twhile($row_marca=mysql_fetch_array($resultado_marca)){\r\n\t\r\n\t$marca_anterior=$row_marca['marca'];\t\r\n\t\r\n\t}\r\n\tif($marca_anterior != $marca){\r\n\t\t// si cambia el nombre de la marca que tambien cambie el nombre de su tabla\r\n\t\t\t$sql_nombre_tabla=\"RENAME TABLE precio\".$marca_anterior.\" TO precio\".$marca.\"\";\r\n\t\t if(!$resultado = mysql_query($sql_nombre_tabla)) {\r\n\techo\"<script>alert('Error al editar nombre de la marca ')</script>\";\t\r\n\tdie();\r\n }\r\n\t\t}\r\n\r\n\r\n$sql_marca=\"UPDATE `marcadeherramientas` SET `marca` = '\".$marca.\"' WHERE id = '\".$id_editar.\"'\";\r\n if(!$resultado = mysql_query($sql_marca)) {\r\n\techo\"<script>alert('Error al editar nombre de la marca ')</script>\";\t\r\n\tdie();\r\n }\r\n\t$sql_marca=\"UPDATE `marcadeherramientas` SET `moneda` = '\".$moneda.\"' WHERE id = '\".$id_editar.\"'\";\r\n if(!$resultado = mysql_query($sql_marca)) {\r\n\techo\"<script>alert('Error al editar moneda de la marca ')</script>\";\t\r\n\tdie();\r\n } \r\n \r\n //Actualiza tabla Productos\r\n \r\n $sqlActualiza=\"UPDATE productos SET moneda='\".$moneda.\"' , marca='\".$marca.\"' \r\n WHERE IdMarca=\".$id_editar.\"\r\n \";\r\n \r\n\tif(!$resultado = mysql_query($sqlActualiza)) {\r\n\techo\"<script>alert('Error al editar tabla productos')</script>\";\t\r\n\tdie();\r\n } \r\n\t\t\r\n\t\t\r\necho\"<script>alert('Los registros fueron modificados')</script>\";\t\t\r\n\techo \"<meta http-equiv=\\\"refresh\\\" content=\\\"0;URL=../precios.php\\\">\"; \t\r\n\t\r\n\t\t}", "public function update(){\n $sql = \"update \".self::$tablename.\" set correlativo=\\\"$this->correlativo\\\",nombre_instalador=\\\"$this->nombre_instalador\\\",nombre_proyecto=\\\"$this->nombre_proyecto\\\",localizacion=\\\"$this->localizacion\\\",contrato_orden_trabajo=\\\"$this->contrato_orden_trabajo\\\",sector_trabajo=\\\"$this->sector_trabajo\\\",area_aceptada=\\\"$this->area_aceptada\\\",fecha_proyecto=\\\"$this->fecha_proyecto\\\" where id_usuario=$this->id_usuario\";\n Executor::doit($sql);\n }", "public function atualizarProdutos($idproduto, $idcategoria, $descricao, $referencia, $preco, $estoque, $habilitado){\n //$conexao = $c->conexao();\n\n $usuid = $_SESSION['usuid'];\n \n $preco = str_replace(\",\", \".\", $preco);\n\n if ($idcategoria == null || $descricao == \"\" || $referencia == \"\" || $preco == \"\" || $habilitado == \"\") {\n return 0;\n }else{\n\n $sql = \"UPDATE tbproduto SET referencia = '$referencia', idcategoria = '$idcategoria', preco = '$preco', descricao = '$descricao', habilitado = '$habilitado', estoque = '$estoque', modificado = NOW(), usuid = '$usuid' WHERE id = '$idproduto' \";\n\n echo $this->conexao->query($sql);\n }\n\n }", "public function ajaxmaterias() { //Se le agrego idalumnocarrera\n $idCarrera = $_POST['carrera'];\n $idAlumno = $_POST['alumno'];\n $idAlumnoCarrera = $_POST['idalumnocarrera'];\n $dataIdModo = htmlentities($_POST['modo'], ENT_COMPAT | ENT_QUOTES, \"UTF-8\");\n $db = & $this->POROTO->DB;\n $db->dbConnect(\"matriculacion/ajaxmaterias/\" . $idCarrera . \"/\" . $idAlumno . \"/\" . $dataIdModo);\n\n include($this->POROTO->ControllerPath . '/correlativas.php');\n $claseCorrelativas = new correlativas($this->POROTO);\n\n if ($dataIdModo == 3) { //solo inscriptas (estadomateria=2)\n $sql = \"select m.idmateria, m.anio, m.materiacompleta as nombre,c.nombre as comision \";\n $sql .= \" from alumnomateria am inner join viewmaterias m on (am.idmateria=m.idmateria and m.idcarrera=\" . $idCarrera . \")\";\n $sql .= \" left join comisiones c on am.idcomision=c.idcomision \";\n $sql .= \" where am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursando'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_libre'] . \") \";\n $sql .= \" and am.idpersona=\" . $idAlumno;\n $sql .= \" and am.idalumnocarrera=\" . $idAlumnoCarrera;\n $sql .= \" order by m.orden\";\n $arrMateriasOk = $db->getSQLArray($sql);\n }\n if ($dataIdModo == 1 || $dataIdModo == 2) { //1 Alumno 2 Administrativo.\t\t\t\t\t\t\t\t\t\t\n //levanto el listado de materias de la carrera. por un left join me \n //fijo si ya fue cursada (puede haber mas de un registro)\n //Si materia cursada aprobada o libre => solo_cursada>=1 y \n //la considero como ya cursada\n //si tuvo un estado 3,4 (aprobada,aprobada por equiv) => aprobada>1 y la considero como materia aprobada\n //elimino las materias que tienen estado CURSANDO (inscriptas) y las libres al menos una vez.\n $sql = \"select m.idmateria,m.anio,m.materiacompleta as nombre,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursadaaprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_libre'] . \") then 1 else 0 end) solo_cursada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_aprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_aprobadaxequiv'] . \",\" . $this->POROTO->Config['estado_alumnomateria_cursadaaprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_nivelacion'] . \") then 1 else 0 end) cursada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_aprobada'] . \",\";\n $sql .= $this->POROTO->Config['estado_alumnomateria_aprobadaxequiv'] . \",\" . $this->POROTO->Config['estado_alumnomateria_nivelacion'];\n $sql .= \") then 1 else 0 end) aprobada,\";\n $sql .= \" sum(case when am.idestadoalumnomateria in (\" . $this->POROTO->Config['estado_alumnomateria_cursando'] . \") then 1 else 0 end) inscripta \";\n $sql .= \" from viewmaterias m \";\n $sql .= \" left join alumnomateria am on am.idmateria=m.idmateria and am.idpersona=\" . $db->dbEscape($idAlumno);\n $sql .= \" and am.idalumnocarrera=\" . $db->dbEscape($idAlumnoCarrera);\n $sql .= \" where m.idcarrera=\" . $db->dbEscape($idCarrera);\n $sql .= \" and m.estado=1\";\n $sql .= \" group by m.idmateria\";\n $sql .= \" order by m.orden\";\n $arrMaterias = $db->getSQLArray($sql);\n\n $arrMateriasOk = array();\n\n foreach ($arrMaterias as $row) {\n if ($row['solo_cursada'] == \"0\") { //Solo traigo las que no estoy cursando aun o libre.\n //Busco las correlativas para este alumno.\n $resultados = $claseCorrelativas->getCorrelativasAlumno($idCarrera, $row['idmateria'], 0, $idAlumno, $idAlumnoCarrera);\n if ($dataIdModo == 1) { //Si es alumno, solo traigo materias sin correlativas\n $valida = true;\n foreach ($resultados as $regla) {\n if ($regla[\"idregla\"] != 6 && $regla[\"estado\"] == false)\n $valida = false;\n }\n if ($valida)\n $arrMateriasOk[] = array(\"idmateria\" => $row['idmateria'], \"nombre\" => $row['nombre'], \"anio\" => $row['anio'], \"correlativas\" => $resultados);\n }else { //Traigo todas, cumplan o no las correlatividades.\n $arrMateriasOk[] = array(\"idmateria\" => $row['idmateria'], \"nombre\" => $row['nombre'], \"anio\" => $row['anio'], \"correlativas\" => $resultados);\n }\n }\n }\n\n //busco en arrMateriasOk, las materia que tienen inscriptas>0\n foreach ($arrMateriasOk as $k => $item)\n foreach ($arrMaterias as $materia)\n if ($materia['idmateria'] == $item['idmateria'])\n if ($materia['inscripta'] > 0 || $materia['aprobada'] > 0)\n unset($arrMateriasOk[$k]);\n } // if ($dataIdModo == 1 || $dataIdModo == 2 {\n $db->dbDisconnect();\n echo json_encode($arrMateriasOk);\n }", "function evt__form_pase__modificacion($datos)\r\n\t{\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $datos['id_cargo']=$car['id_cargo'];\r\n \r\n \r\n //print_r($pase_nuevo);exit;\r\n if($this->dep('datos')->tabla('pase')->esta_cargada()){//es modificacion\r\n $pas=$this->dep('datos')->tabla('pase')->get();\r\n if($pas['tipo']<>$datos['tipo']){\r\n toba::notificacion()->agregar('no puede cambiar el tipo del pase', 'info'); \r\n }else{\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n }\r\n }else{//es alta de un pase nuevo\r\n $this->dep('datos')->tabla('pase')->set($datos);\r\n $this->dep('datos')->tabla('pase')->sincronizar();\r\n $pase_nuevo=$this->dep('datos')->tabla('pase')->get();\r\n $p['id_pase']=$pase_nuevo['id_pase'];\r\n $this->dep('datos')->tabla('pase')->cargar($p);//lo cargo para que se sigan viendo los datos en el formulario\r\n if($datos['tipo']=='T'){//si el pase es temporal\r\n //ingreso un cargo en la unidad destino\r\n //la ingresa con fecha de alta = desde\r\n $nuevo_cargo['id_persona']=$car['id_persona'];\r\n $nuevo_cargo['codc_carac']=$car['codc_carac'];\r\n $nuevo_cargo['codc_categ']=$car['codc_categ'];\r\n $nuevo_cargo['codc_agrup']=$car['codc_agrup'];\r\n $nuevo_cargo['chkstopliq']=$car['chkstopliq'];\r\n $nuevo_cargo['fec_alta']=$datos['desde'];\r\n $nuevo_cargo['pertenece_a']=$datos['destino'];\r\n $nuevo_cargo['generado_x_pase']=$pase_nuevo['id_pase']; \r\n $res=$this->controlador()->dep('datos')->tabla('cargo')->agregar_cargo($nuevo_cargo);\r\n if($res==1){\r\n toba::notificacion()->agregar('Se ha creado un nuevo cargo en el destino del pase', 'info');\r\n }\r\n \r\n }else{//pase definitivo entonces tengo que modificar la fecha del cargo en la unidad destino con la fecha de alta del definitivo\r\n $nuevafecha = strtotime ( '-1 day' , strtotime ( $datos['desde'] ) ) ;\r\n $nuevafecha = date ( 'Y-m-d' , $nuevafecha );\r\n //print_r($nuevafecha);exit;\r\n $salida=$this->controlador()->dep('datos')->tabla('cargo')->modificar_alta($datos['id_cargo'],$datos['destino'],$datos['desde']);\r\n //le coloca fecha de baja al cargo de la unidad origen\r\n $this->controlador()->dep('datos')->tabla('cargo')->finaliza_cargo($datos['id_cargo'],$nuevafecha);\r\n if($salida==1){\r\n toba::notificacion()->agregar('Se ha modificado la fecha del cargo generado a partir del pase temporal', 'info');\r\n }\r\n \r\n } \r\n }\r\n \r\n\t}", "static public function mdlAsignarMiembro($datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE miembros SET id_membresia = :id_membresia WHERE id_miembro = :id_miembro\");\n\n\t\t$stmt->bindParam(\":id_membresia\", $datos[\"id_membresia\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":id_miembro\", $datos[\"id_miembro\"], PDO::PARAM_STR);\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n }", "function actualizarConvenio(){\n \n $nombrePrograAca = $_POST['nombrePrograAca'];\n $fechaIni = $_POST['fechaIni'];\n $fechaFin = $_POST['fechaFin'];\n $codRecaudo = $_POST['codrecaudo'];\n $inversion = $_POST['inversion'];\n $id=$_POST[\"id\"];\n\n\t\t\t//Se consultan todos los convenios\n\t\t\t$conexion=Conexion::getInstance();\n\t\t\t$consulta=\"update programaacademico set `nomprogramaacademico`='$nombrePrograAca', \n `fechainicioprogaca`='$fechaIni', `fechafinprogaca`='$fechaFin', `codigorecaudo`='$codRecaudo', \n `inversion`='$inversion' where `idprogramaacademico`='$id'\";\n \n $res= $conexion->actualizar($consulta);\n if ($res==1){\n echo \"<h2><strong>Actualización exitosa!!!</strong></h2>\";\n }\n\t\t //fin de la funcion\n\t\t}", "public function editarpersonal($datos){\n $c= new conectar();\n $conexion=$c->conexion();\n\n $sql=\"UPDATE personal set nombres='$datos[0]',ape_pat='$datos[1]',ape_mat='$datos[2]',dni='$datos[3]',celular='$datos[4]',correo='$datos[5]'\n where id_personal=$datos[6]\";\n return $result=mysqli_query($conexion,$sql);\n\n }", "function imprimirMatricula($cedulaEstudiante) {\n $this->view->anio = $this->model->anio();\n $this->view->director = $this->model->director();\n $this->view->consultaDatosEstudiante = $this->model->consultaDatosEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de las enfermedades del Estudiante */\n $this->view->enfermedadEstudiante = $this->model->enfermedadEstudiante($cedulaEstudiante);\n \n /* Cargo informacion de la adecuacio del Estudiante */\n $this->view->adecuacionEstudiante = $this->model->adecuacionEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de Becas */\n $this->view->becasEstudiante = $this->model->becasEstudiante($cedulaEstudiante);\n\n /* Cargo informacion del encargado Legal del Estudiante */\n $this->view->encargadoLegal = $this->model->encargadoLegal($cedulaEstudiante);\n\n /* Cargo informacion de la Madre del Estudiante */\n $this->view->madreEstudiante = $this->model->madreEstudiante($cedulaEstudiante);\n\n /* Cargo informacion del Padre del Estudiante */\n $this->view->padreEstudiante = $this->model->padreEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de la Persona en caso de Emergencia del Estudiante */\n $this->view->personaEmergenciaEstudiante = $this->model->personaEmergenciaEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de la poliza del Estudiante */\n $this->view->polizaEstudiante = $this->model->polizaEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de la Condicion de Matricula */\n $this->view->infoCondicionMatricula = $this->model->infoCondicionMatricula($cedulaEstudiante);\n\n /* Cargo informacion de la especialidad del Estudiante */\n $this->view->especialidadEstudiante = $this->model->especialidadEstudiante($cedulaEstudiante);\n\n /* Cargo informacion de Adelanto/Arrastre */\n $this->view->infoAdelanta = $this->model->infoAdelanta($cedulaEstudiante);\n \n $this->view->render('matricula/imprimirMatricula');\n }", "private function reativaMatricula(Matricula $oMatricula) {\n\n $this->atualizarConclusaoDaMatricula($oMatricula, 'N');\n /**\n * Gera Historico do movimento da matricula\n */\n $sDescricaoMovimento = \"ENCERRAMENTO DE AVALIAÇÕES CANCELADO EM \";\n $sDescricaoMovimento .= date(\"d/m/Y\", db_getsession(\"DB_datausu\"));\n\n $oDaoMatriculaMov = db_utils::getDao(\"matriculamov\");\n $oDaoMatriculaMov->ed229_i_matricula = $oMatricula->getCodigo();\n $oDaoMatriculaMov->ed229_i_usuario = db_getsession(\"DB_id_usuario\");\n $oDaoMatriculaMov->ed229_c_procedimento = \"CANCELAR ENCERRAMENTO DE AVALIAÇÕES\";\n $oDaoMatriculaMov->ed229_t_descr = $sDescricaoMovimento;\n $oDaoMatriculaMov->ed229_d_dataevento = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoMatriculaMov->ed229_c_horaevento = date(\"H:i\");\n $oDaoMatriculaMov->ed229_d_data = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoMatriculaMov->incluir(null);\n if ($oDaoMatriculaMov->erro_status == 0) {\n\n $sErroMensagem = \"Erro ao salvar dados da movimentação da matrícula.\\n\";\n $sErroMensagem .= \"Erro Técnico: {$oDaoMatriculaMov->erro_msg}\";\n throw new BusinessException($sErroMensagem);\n }\n }", "public function update(Request $request)\n {\n $validar = Validator::make($request->all(), ['Nivel' => 'required|integer','Division'=>'required|integer','Año'=>'required|integer']);\n\n if($validar->fails()){\n $errores = $validar->errors();\n return response()->json(['error' => true, 'mensaje' => $errores->all()]);\n }else{\n $materias = json_decode($request->get('Materias'), true);\n $materias_actual = json_decode(json_encode($this->materias_curso($request->get('id'))), true);\n //$materias_actual = $this->materias_curso($request->get('id'));\n\n $curso = Curso::find($request->get('id'));\n $curso->Nivel = $request->get('Nivel');\n $curso->Division = $request->get('Division');\n $curso->Año = $request->get('Año');\n\n $curso->save();\n //Si la materia no está en el curso, se agrega\n foreach($materias as $materia){\n $id = $materia['id'];\n $res = DB::table('table_materiascursos')->where('id_materia', $id)->where('id_curso', $request->get('id'))->count();\n if($res == 0){\n $res = DB::table('table_materiascursos')->insert(['id_curso' => $request->get('id'), 'id_materia' => $id]);\n }\n }\n\n //Borrar materia del curso\n foreach($materias_actual as $am){\n $e = 0;\n foreach($materias as $m){\n if($am['id'] == $m['id']){\n $e = 1;\n }\n }\n\n if($e != 1){\n DB::table('table_materiascursos')->where('id_materia', $am['id'])->where('id_curso', $request->get('id'))->delete();\n }\n }\n\n return response()->json(['error' => false, 'mensaje' => 'Curso modificado correctamente']);\n } \n }", "public function edit($id)\n {\n //\n\n $matricula=matricula::findOrFail($id);\n $tipo=$matricula->tipoMatricula;\n $codigoMatricula=$matricula->nombre;\n $descripcion=$matricula->descripcion;\n $fecha_matricula=$matricula->fecha_matricula;\n //dd($matricula);\n $idEstudiante=$matricula->estudiantes_id;\n $estudiante=Estudiante::findOrFail($idEstudiante);\n $nombre=$estudiante->nombre;\n $apellido=$estudiante->apellido;\n\n $fecha_de_creacion = date('d/m/Y');\n $fecha_de_creacion=Carbon::createFromFormat('d/m/Y', date('d/m/Y'));\n $fechaDeCreacionBusqueda=Carbon::createFromFormat('d/m/Y', date('d/m/Y'));\n\n $fechaBuscar=\"0\";\n if($tipo==\"Normal\"){\n $fechaDeCreacionBusqueda->addYear();\n $fechaBuscar=substr($fechaDeCreacionBusqueda, 0,-15);//$fecha_de_creacion.slice(0,-6);\n $fechaBuscar=(int)$fechaBuscar;\n //dd($fechaBuscar);\n };\n if($tipo==\"Extemporanea\"){\n $fechaBuscar=substr($fechaDeCreacionBusqueda, 0,-15);\n $fechaBuscar=(int)$fechaBuscar;\n //dd($fechaBuscar);\n };\n\n $anio=Anio::where('año',$fechaBuscar)->select('id')->get()->toArray();\n $anioId=Arr::flatten($anio);\n\n $grados=Grado::where('anios_id',$anioId[0])->select('grado')->groupBy('grado')->orderBy('grado')->get()->toArray();\n //lo combierte en un arreglo simple\n $values=Arr::flatten($grados);\n //dd($values);\n\n $page_data = array(\n 'id'=>$id, //id del estudiante , requerido\n 'nombre'=>$nombre, //nombre solo por presentacion\n 'apellido'=>$apellido, //apellido solo por presentacion\n 'fecha_de_creacion'=>$fecha_matricula, //fecha de creacion , requerido\n 'grados'=>$values, //para seleccion en comboBox\n 'tipo'=>$tipo, //para hacer la suma de anios y colocarla en el identificador de inscripcion\n 'anio'=>$anioId, //para filtrar en comboBox con las peticiones jQuery\n );\n\n //agregado para dejar seleccionados los datos guardados con anterioridad\n $idGradoAnterior=$matricula->grados_id;\n $turnoAnterior=Grado::where('id',$idGradoAnterior)->select('turnos_id')->get()->toArray();\n //$values=Arr::flatten($turnoAnterior);\n //dd($turnoAnterior);\n $seccionAnterior=Grado::where('id',$idGradoAnterior)->select('seccion')->get()->toArray();\n //$values=Arr::flatten($seccionAnterior);\n //dd($seccionAnterior);\n return view('matriculas.edit',compact('matricula'))->with('page_data',$page_data);\n }", "public function update(NotificacionRequest $request)\n {\n $user = Auth::user();\n $id_notificacion = $request->route('id_notificacion');\n \n $alumnos_asociados = $request->input('alumnos_asociados',[]);\n $nombre = $request->input('nombre');\n $descripcion = $request->input('descripcion');\n $asunto = $request->input('asunto');\n $responder_email = $request->input('responder_email');\n $responder_nombre = $request->input('responder_nombre');\n $fecha = $request->input('fecha');\n $id_plantilla = $request->input('id_plantilla');\n\n $todo = Notificacion::find($id_notificacion);\n $todo->nombre = $nombre;\n $todo->descripcion = $descripcion;\n $todo->asunto = $asunto;\n $todo->responder_email = $responder_email;\n $todo->responder_nombre = $responder_nombre;\n $todo->fecha = $fecha;\n $todo->id_plantilla = $id_plantilla;\n $todo->save();\n\n $asociados = AlumnoNotificacion::where([\n 'not_id' => $id_notificacion,\n 'estado' => 1,\n ])->get();\n foreach ($asociados as $asociado) {\n if(!AuxiliarFunction::if_in_array($alumnos_asociados,$asociado,\"id\",\"id_alumno\")){\n $alumno = AlumnoNotificacion::find($asociado->id);\n $alumno->estado = 0;\n $alumno->save();\n }\n }\n $asociados = AlumnoNotificacion::where([\n 'not_id' => $id_notificacion,\n 'estado' => 1,\n ])->get();\n foreach ($alumnos_asociados as $asociado) {\n if(!AuxiliarFunction::if_in_array($asociados,$asociado,\"id_alumno\",\"id\")){\n $alumno = new AlumnoNotificacion;\n $alumno->id_notificacion = $id_notificacion;\n $alumno->id_alumno = $value['id'];\n $alumno->id_usuario = $user->id;\n $alumno->email = $value['email'];\n $alumno->save();\n }\n }\n return response()->json($todo,200);\n }", "function actualizar_item_internacionalizacion($key,$contenido,$idioma) {\n\n\t\t$UpdateRecords = \"UPDATE internacionalizacion SET $idioma='\".addslashes($contenido).\"' WHERE id_key='$key'\";\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($UpdateRecords);\n\t\tmysql_close($connection);\n\t}", "static public function mdlEditarInstructor($tabla, $datos,$tabla1, $datos1)\n\t{\t\t\n $stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET Nombre= :Nombre,Ap_Paterno= :Ap_Paterno,Ap_Materno= :Ap_Materno,Genero= :Genero,Correo_Electronico= :Correo_Electronico,Nro_Cel= :Nro_Cel,Fecha_Nac= :Fecha_Nac WHERE Ci = :Ci\");\n \n\n $stmt->bindParam(\":Nombre\" , $datos[\"Nombre\"], PDO::PARAM_STR);\n $stmt->bindParam(\":Ap_Paterno\", $datos[\"Ap_Paterno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":Ap_Materno\", $datos[\"Ap_Materno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":Ci\" , $datos[\"Ci\"], PDO::PARAM_STR);\n $stmt->bindParam(\":Genero\" , $datos[\"Genero\"], PDO::PARAM_STR);\n $stmt->bindParam(\":Correo_Electronico\", $datos[\"Correo_Electronico\"], PDO::PARAM_STR);\n $stmt->bindParam(\":Nro_Cel\", $datos[\"Nro_Cel\"], PDO::PARAM_STR);\n $stmt->bindParam(\":Fecha_Nac\", $datos[\"Fecha_Nac\"], PDO::PARAM_STR);\n \n if ($stmt->execute()) {$v= \"ok\";} else {$v=\"error\";}\n \n $id=\"Cod_Cliente\";\n \n $clave = Controladorid::traerid($tabla,$id);\n print_r($clave);\n print_r($datos1[\"Id_Instructor\"]);\n \n $stmt1 = Conexion::conectar()->prepare(\"UPDATE $tabla1 SET Nro_de_Meritos= :Nro_de_Meritos , Especialidades= :Especialidades , fotoI= :fotoI WHERE Id_Instructor = :Id_Instructor\");\n //$stmt1->bindParam(\":\".$clave, $clave, PDO::PARAM_STR);\n $stmt1->bindParam(\":Id_Instructor\", $clave[\"Id_Instructor\"], PDO::PARAM_STR);\n $stmt1->bindParam(\":Nro_de_Meritos\", $datos1[\"Nro_de_Meritos\"], PDO::PARAM_STR);\n $stmt1->bindParam(\":Especialidades\", $datos1[\"Especialidades\"], PDO::PARAM_STR);\n $stmt1->bindParam(\":fotoI\", $datos1[\"fotoI\"], PDO::PARAM_STR);\n \n if ($stmt1->execute()) {return \"ok\";} else {return \"error\";}\n\n $stmt1->close();\n // $stmt = null;\n $stmt->close();\n $stmt = null;\n $stmt1 = null;\n\n }", "public function update(Request $request, $id)\n {\n $compra = Compra::where('id' , $id)->firstOrFail();\n\n $this->validate($request,[\n \"materiaPrima\" => \"required|string\",\n \"cantidad\" => \"required|integer\",\n ]);\n\n $indexMat = $request->materiaPrima;\n\n $materiaPrimaId = MateriaPrima::select('nombre')->get();\n foreach ($materiaPrimaId as $materiaPrima) {\n $idMat[] = $materiaPrima->nombre;\n }\n\n $materiaFinal = MateriaPrima::where('nombre', $idMat[$indexMat])->first()->id;\n \n $compra->materiaPrima = $materiaFinal;\n $compra->cantidad = $request->cantidad;\n $compra->save();\n\n $request->session()->flash(\"message\", \"Actualizado con exito\");\n return redirect()->route(\"compras.index\");\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 modificarCotizacion(){\n\t\t$this->procedimiento='adq.f_cotizacion_ime';\n\t\t$this->transaccion='ADQ_COT_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cotizacion','id_cotizacion','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('lugar_entrega','lugar_entrega','varchar');\n\t\t$this->setParametro('tipo_entrega','tipo_entrega','varchar');\n\t\t$this->setParametro('fecha_coti','fecha_coti','date');\n\t\t$this->setParametro('numero_oc','numero_oc','varchar');\n\t\t$this->setParametro('id_proveedor','id_proveedor','int4');\n\t\t$this->setParametro('precio_total','precio_total','numeric');\n\t\t$this->setParametro('fecha_entrega','fecha_entrega','date');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('id_proceso_compra','id_proceso_compra','int4');\n\t\t$this->setParametro('fecha_venc','fecha_venc','date');\n\t\t$this->setParametro('obs','obs','text');\n\t\t$this->setParametro('fecha_adju','fecha_adju','date');\n\t\t$this->setParametro('nro_contrato','nro_contrato','varchar');\n\t\t$this->setParametro('tipo_cambio_conv','tipo_cambio_conv','numeric');\n $this->setParametro('tiempo_entrega','tiempo_entrega','varchar');\n\t\t$this->setParametro('funcionario_contacto','funcionario_contacto','varchar');\n\t\t$this->setParametro('telefono_contacto','telefono_contacto','varchar');\n\t\t$this->setParametro('correo_contacto','correo_contacto','varchar');\n\t\t$this->setParametro('prellenar_oferta','prellenar_oferta','varchar');\n\t\t$this->setParametro('forma_pago','forma_pago','varchar');\n\n $this->setParametro('id_solicitud','id_solicitud','int4');\n $this->setParametro('justificacion','justificacion','text');\n\n \n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n //var_dump('llega', $this->respuesta);\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "private function modificarCita(){\n $query = \"UPDATE \" . $this->table . \" SET PacienteId ='\" . $this->idpaciente . \"',Fecha = '\" . $this->fecha . \"', HoraInicio = '\" . $this->horarioIn . \"', HoraFin = '\" .\n $this->horarioFn . \"', Motivo = '\" . $this->motivo . \"' WHERE CitaId = '\" . $this->idcita . \"'\"; \n $resp = parent::nonQuery($query);\n if($resp >= 1){\n return $resp;\n }else{\n return 0;\n }\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set Origen='$this->Origen',Fechap='$this->Fechap',Horap='$this->Horap',Cod_Referencia='$this->Referencia',Nombre_Referencia='$this->Nombre',Ref_Tela='$this->Reftela',Pinta='$this->Pinta',Color='$this->Color',Proceso='$this->Proceso',Ubicacion='$this->Ubicacion',SKU='$this->Sku',Maquina='$this->Maquina',Longitud_Inicial='$this->Longitudini',Longitud_Final='$this->Longitudfin',Peso='$this->Peso',Grados_PFoAT800K='$this->Plancha',Grados_Plato='$this->Plato',Grados_Pie='$this->Pie',Grados_Aire_S='$this->Airesup',Grados_Aire_I='$this->Aireinf',Caudal_Sup='$this->Caudalsup',Caudal_Inf='$this->Caudalinf',Presion='$this->Presion',Velocidad='$this->Velocidad',Velocidad_Sup='$this->Velocidad_Sup',Velocidad_Inf='$this->Velocidad_Inf',Intensidad='$this->Intensidad',Tiempo_Exp='$this->Tiempo',Resultado='$this->Resultado',Dinamometro='$this->Dinamometro',Observaciones1='$this->Observaciones' where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "function autorizar_PM_MM($id_mov,$comentarios)\r\n{\r\n\tglobal $db,$_ses_user;\r\n\t\r\n\t $db->StartTrans();\r\n\r\n\t $query = \"update movimiento_material set comentarios='$comentarios',estado=2 where id_movimiento_material=$id_mov\";\r\n\t //die($query);\r\n\t sql($query) or fin_pagina();\r\n\t $usuario = $_ses_user['name'];\r\n\t $fecha_hoy = date(\"Y-m-d H:i:s\",mktime());\r\n\t //agregamos el log de creción del reclamo de partes\r\n\t $query=\"insert into log_movimiento(fecha,usuario,tipo,id_movimiento_material)\r\n\t values('$fecha_hoy','$usuario','autorización',$id_mov)\";\r\n\t sql($query) or fin_pagina();\r\n\t $datos_mail['Fecha'] = $fecha_hoy;\r\n\t $datos_mail['Usuario'] = $usuario;\r\n\t $datos_mail['Id'] = $id_mov;\r\n\t //variables que utilizo para el mail cuando tiene logistica integrada\r\n\t $datos_mail['id_logistica_integrada'] = $_POST['id_logistica_integrada'];\r\n\t $datos_mail['asociado_a'] = $_POST['asociado_a'];\r\n\t //fin de variables que utilizo cuando hay logistica integrada\r\n\t //enviar_mail_mov($datos_mail);\r\n\r\n\t $db->CompleteTrans();\r\n\r\n\t return \"<b>El $titulo_pagina Nº $id_mov, se autorizó con éxito.</b>\";\r\n\r\n}", "public function update(){\n $db = Database::getInstance() ;\n $db->query(\"UPDATE canciones SET ncancion=:nca, idGen=:idGen, album=:alb WHERE idcancion=:idc ;\",\n [\":nca\"=>$this->ncancion,\n \":idGen\"=>$this->idGen,\n \":alb\"=>$this->album,\n \":idc\"=>$this->idcancion]) ;\n \n }", "#[IsGranted('ROLE_SEPULTURE_ADMIN')]\n #[Route(path: '/{id}/edit', name: 'materiaux_edit', methods: ['GET', 'POST'])]\n public function edit(Request $request, Materiaux $materiaux): Response\n {\n $em = $this->managerRegistry->getManager();\n $editForm = $this->createEditForm($materiaux);\n $editForm->handleRequest($request);\n if ($editForm->isSubmitted() && $editForm->isValid()) {\n $em->flush();\n $this->addFlash('success', 'Le matériaux a bien été modifié');\n\n return $this->redirectToRoute('materiaux');\n }\n\n return $this->render(\n '@Sepulture/materiaux/edit.html.twig',\n [\n 'entity' => $materiaux,\n 'form' => $editForm->createView(),\n ]\n );\n }", "function actualizarGuiaReferencia($id_guia, $numremesa, $formaPago, $fecharecog, $fechaentr, $valorDeclarado, $flete, $totalflete, $tipocarga, $idoperario, $numplaca, $idoperarioext, $estadocarga, $estadoRecogida, $observaciones, $idusaurio, $fechaRegistro) {\n \t\t $data = array(\n \t'nro_remesa' => $numremesa,\n 'forma_pago' => $formaPago,\n 'fecha_recogida' => $fecharecog,\n 'fecha_entrega' => $fechaentr,\n 'valor_declarado' => $valorDeclarado,\n 'flete' => $flete,\n 'total_fletes' => $totalflete,\n 'tipo_carga' => $tipocarga,\n 'id_usuario_operario' => $idoperario,\n 'nro_placa' => $numplaca,\n 'id_operario' => $idoperarioext,\n 'estado_carga' => $estadocarga,\n 'estado_control' => $estadoRecogida,\n 'observaciones' => $observaciones,\n 'estado_contable' => 0,\n 'id_usuario' => $idusaurio,\n 'fecha_registro' => $fechaRegistro);\n $this->db->where(\"id_control\", $id_guia);\n $this->db->update(\"txtar_admin_control\", $data);\n \n // echo $this->db->last_query();\n $this->db->close();\n }", "public function update($kelasMateri);", "function query_accetta_richiesta($id_richiesta){\n\t$query_update = \"UPDATE Richieste\n\t SET esito = 'accettata'\n\t WHERE id = \".$id_richiesta;\n\n\t$result_update = mysql_query($query_update) or die(mysql_error());\n\n\t$rows_updated = mysql_affected_rows();\n\n\tif($rows_updated == 1 || $rows_updated == 0) {\n\n \t// invio email con tutte le informazioni\n invia_email_richiesta_accettata($id_richiesta);\n\n // creo il feedback nella relativa tabella\n query_insert_feedback($id_richiesta, 'accettata');\n\n // imposta stato non disponibile se attivo nelle impostazioni\n aggiorna_stato($id_richiesta);\n\t}\n\n\treturn true;\n}", "function tabelleFinitureCambiaMarchio($con) {\n $sql=\"UPDATE tabelle_finiture SET tab_mark = 'Modulo', tab_mark_id = 49 WHERE tab_line_id = 60 OR tab_line_id = 61 OR tab_line_id = 144 OR tab_line_id = 145\";\n mysqli_query($con,$sql);\n}", "function UpdateMarquesina($Marque) {\n\t\t$SQLStrQuery=\"UPDATE Marquesina SET MARQUE='\".$Marque.\"'\";\n\t\tSQLQuery($ResponsePointer,$n,$SQLStrQuery,false); // Realiza la consulta en la base de datos CategoriaDoc\n\t}", "function updateMeGustaId($id, $id_usuario, $valor_megusta) {\n $c = new Conexion();\n $resultado = $c->query(\"UPDATE valoracion_mg val_mg, usuario usu SET val_mg.megusta = $valor_megusta where val_mg.id_usuario=usu.id && val_mg.id_contenido=$id && val_mg.id_usuario=$id_usuario\");\n}", "function EDIT()\r\n{\r\n\t// se construye la sentencia de busqueda de la tupla en la bd\r\n $sql = \"SELECT * FROM NOTICIA WHERE (idNoticia = '$this->idNoticia')\";\r\n // se ejecuta la query\r\n $result = $this->mysqli->query($sql);\r\n // si el numero de filas es igual a uno es que lo encuentra\r\n if ($result->num_rows == 1)\r\n {\t// se construye la sentencia de modificacion en base a los atributos de la clase\r\n\t\t$sql = \"UPDATE NOTICIA SET \r\n\t\t\t\t\tidNoticia = '$this->idNoticia',\r\n\t\t\t\t\timageURL = '$this->imageURL',\r\n\t\t\t\t\tenlace = '$this->enlace',\r\n\t\t\t\t\ttexto = '$this->texto'\t\t\t\t\t\r\n\t\t\t\tWHERE ( idNoticia = '$this->idNoticia')\";\r\n\t\t// si hay un problema con la query se envia un mensaje de error en la modificacion\r\n if (!($resultado = $this->mysqli->query($sql))){\r\n\t\t\treturn 'Error en la modificación'; \r\n\t\t}\r\n\t\telse{ \r\n\t\t\treturn 'Modificado correctamente.';\r\n\t\t\t\r\n\t\t}\r\n }\r\n else // si no se encuentra la tupla se manda el mensaje de que no existe la tupla\r\n \treturn 'No existe en la base de datos';\r\n}", "public function atualizar(){\r\n return (new Database('cartao'))->update(' id = '.$this->id, [\r\n 'bandeira' => $this->bandeira,\r\n 'numero' => $this->numero,\r\n 'doador' => $this->doador,\r\n ]);\r\n }", "function modificarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_ime';\n\t\t$this->transaccion='GM_DET_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_analisis_porque_det','id_analisis_porque_det','int4');\n\t\t$this->setParametro('id_analisis_porque','id_analisis_porque','int4');\n\t\t$this->setParametro('solucion','solucion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('porque','porque','varchar');\n\t\t$this->setParametro('respuesta','respuesta','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function EditarResgistroTabla($Num,$columnas,$campos, $idItem)\r\n {\r\n\t//print_r($campos);\r\n\t//echo \"entrando a editar\";\r\n\t$sql=\"UPDATE `servitorno_inv`.`equiposoficina` SET \r\n\t`Referencia` = 'REF', \r\n\t`Equipo` = 'PCMESAe', \r\n\t`Existencias` = '53', \r\n\t`ValorEstimado` = '5500000', \r\n\t`Marca` = 'INTEL1', \r\n\t`Serial` = 'SN4567322', \r\n\t`Bodega` = 'BUG'\r\n WHERE `equiposoficina`.`idEquiposOficina` = 4;\";\r\n\t\t\t\t\r\n\t\r\n\t$sql=\"UPDATE `$this->database`.`$this->tabla` SET \";\r\n\t\r\n\t$Num=$Num-1;\r\n\tfor($i=0;$i<=$Num;$i++){\r\n\t\t$col=$columnas[$i];\r\n\t\t$reg=$campos[$i];\r\n\t\tif($Num<>$i)\r\n\t\t\t$sql=$sql.\"`$col` = '$reg', \";\r\n\t\telse\t\r\n\t\t\t$sql=$sql.\"`$col` = '$reg' \";\r\n\t}\r\n\t$sql=$sql.\" WHERE `$this->tabla`.`$this->ID` = '$idItem';\";\r\n\t\r\n\t//print_r($sql);\r\n\tmysql_query($sql, $this->con) or die('no se pudo registrar el movimiento: ' . mysql_error());\t\r\n\t//return(1);\r\n\t\r\n\t}", "function get_inscripcion_materia($id)\r\n {\r\n return $this->db->get_where('inscripcion_materia',array('id'=>$id))->row_array();\r\n }", "public function presupuestoModificado(){\n $this->iPresupuestoModificado = $this->iPresupuestoInicial;\n $this->save();\n }", "function modifier1($connexion,$nomTable,$nomClePrimaire,$valeurClePrimaire,$nomChampAModifier,$ValeurChampAModifier) { \n $req =$connexion -> query(\"UPDATE $nomTable SET $nomChampAModifier = '$ValeurChampAModifier' WHERE $nomClePrimaire = '$valeurClePrimaire'\");\n }", "public function store(StoreUpdateEntradaFormRequest $request)\n {\n //estoque atual\n $estoque_atual = $this->materialRepository->findById($request->material_id);\n \n \n $user = auth()->user();\n \n \n if($request->preco):\n $request->preco = str_replace('.', '', $request->preco);\n $request->preco = str_replace(',', '.', $request->preco);\n else:\n $request->preco = '0.00';\n endif;\n \n \n //dd($request->all());\n \n //pega o id do material de acordo com a natureza\n $material_natureza_id = DB::table('material_natureza')\n ->where('material_id',$request->material_id)\n ->where('natureza_id',$request->natureza_id)\n ->first();\n \n \n DB::beginTransaction();\n \n $registraEntrada = DB::table('movimentos')->insert([\n \"tipo_movimento_id\" => $request->tipo_movimento_id,\n \"documento_id\" => $request->documento_id,\n \"numero_documento\" => $request->numero_documento,\n \"data_documento\" => $request->data_documento,\n \"conta_id\" => $request->conta_id,\n \"material_id\" => $request->material_id,\n \"natureza_id\" => $request->natureza_id,\n \"armazenagem_id\" => $request->armazenagem_id,\n \"quantidade\" => $request->quantidade,\n \"preco\" => $request->preco,\n \"user_id\" => $user->id,\n \"created_at\" => Carbon::now(),\n \n ]);\n \n if($material_natureza_id):\n $registraDadosEstoque = DB::table('material_natureza')\n ->where('id',$material_natureza_id->id)\n ->update([\n 'material_id' => $request->material_id,\n 'natureza_id' => $request->natureza_id,\n 'preco_atual' => $request->preco,\n 'estoque_atual' => $request->quantidade + $material_natureza_id->estoque_atual,\n 'created_at' => Carbon::now(),\n ]);\n else:\n $registraDadosEstoque = DB::table('material_natureza')\n ->insert([\n 'material_id' => $request->material_id,\n 'natureza_id' => $request->natureza_id,\n 'preco_atual' => $request->preco,\n 'estoque_atual' => $request->quantidade,\n 'created_at' => Carbon::now(),\n ]);\n endif;\n \n\n// $atualizaEstoque = DB::table('materiais')\n// ->where('id',$request->material_id)\n// ->update([\n// 'estoque_atual' => $request->quantidade + $estoque_atual->estoque_atual,\n// 'preco_atual' => $request->preco,\n// ]);\n \n if($registraEntrada && $registraDadosEstoque):\n DB::commit();\n \n return redirect()->route('entradas.index')\n ->withSuccess('Entrada registrada com sucesso!');\n \n else:\n DB::rollBack();\n \n return redirect()->back()->withErrors('Falha ao registrar entrada!');\n endif;\n }", "public function edit(Matoleo $matoleo)\n {\n //\n }", "function composizioniProdottiCambiaMarchio($con) {\n $sql=\"UPDATE composizioni_prodotti SET cmpr_mark = 'Modulo', cmpr_mark_id = 49, cmpr_mark_cmp = 'Modulo', cmpr_mark_cmp_id = 49 WHERE cmpr_line_id = 60 OR cmpr_line_id = 61 OR cmpr_line_id = 144 OR cmpr_line_id = 145\";\n mysqli_query($con,$sql);\n}", "public function update(Request $request, Materia $materia)\n {\n $materia->update($request->all());\n return Response::json(['success' => 'Éxito']);\n }", "function update_question($objet) {\n\t\t$sql = \"UPDATE \n\t\t\t\t\tquestions\n\t\t\t\tSET \".\n\t\t\t\t\t$objet['columns'].\" \n\t\t\t\tWHERE\n\t\t\t\t\tid = \".$objet['id'];\n\t\t// return $sql;\n\t\t$result = $this -> query($sql);\n\t\t\n\t\treturn $result;\n\t}", "function abbinamentiCambiaMarchio($con) {\n $sql=\"UPDATE abbinamenti SET abb_mark = 'Modulo', abb_mark_id = 49 WHERE abb_line_id = 60\";\n mysqli_query($con,$sql);\n}", "function EDIT()\n{ //COMPROBAR SI EXISTEN TODOS MEDIANTE EL SELECT\n\t//si se cumple la condicion\n\tif ($this->Comprobar_atributos() === true){\n\t $sql = \"SELECT *\n\t\t\tFROM PROF_ESPACIO\n\t\t\tWHERE (\n\t\t\t\t(DNI = '$this->DNI' AND CODESPACIO = '\".$this->CODESPACIO.\"') \n\t\t\t)\";\n\t//si no guardamos un mensaje de error en la variable resultado\n\t\t\tif($result = $this->mysqli->query($sql)){\t\n\t//si se cumple la condicion\n\tif ($result->num_rows == 0){ // existe el usuario\n\t\t$sql = \"UPDATE PROF_ESPACIO SET DNI = '$this->DNI',CODESPACIO = '$this->CODESPACIO' WHERE DNI= '$this->DNI' AND CODESPACIO = '\".$this->CODESPACIO.\"'\";\n\t//si se cumple la condicion\n\t\tif ($this->mysqli->query($sql))\n\t{\n\t\t$resultado = 'Actualización realizada con éxito';\n\t}\n\t//si no\n\telse\n\t{\n\t\t$resultado = 'Error de gestor de base de datos';//guarda mensaje de error en la variable resultado\n\t}\n\treturn $resultado;\n\t}\n\t//si no\n\telse\n\t{\n\t\treturn 'El elemento no existe en la BD';//devuelve el mensaje\n\t}\n\t}//si no\n\telse{\n\t\treturn 'Error de gestor de base de datos';//devuelve el mensaje\n}\n\t}//si no\n\telse{\n\t\treturn $this->erroresdatos;\n\t}\n}", "public static function update_nombre($id_medio,$nombre){\n global $baseDatos;\n \n $res = $baseDatos->query(\" UPDATE `art_venta_medio` SET `nombre`='$nombre' WHERE id_medio = $id_medio\"); \n \n return $res;\n }", "public function 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 }", "private function setMod($id=0){\n\t\t$resultado='Operación rechazada por falta de información';\n\t\t$obj=new Indicadores;\t// Si es nuevo registro\n\t\tif($id>0){\n\t\t\t$obj=Indicadores::findOrFail($id); // Si es modificacion\n\t\t}\t\n\n\t\t//////////////////////////////////////////////////////\n\t\t// Condiciones que se repiten sea modificación o nuevo\n\t\t// Este es el lugar que se debe modificar.\n\n\t\tif ($id) {\n $this->validate($this->req,[\n 'nombre'=>'required',\n 'porcentaje'=>'required'\n ]);\n }else{\n $this->validate($this->req,[\n 'nombre'=>'required',\n 'porcentaje'=>'required',\n 'materias_has_periodos_id'=>'required'\n ]);\n }\n\t\t$obj->nombre=$this->req->input('nombre');\n\t\t$obj->porcentaje=$this->req->input('porcentaje');\n if($this->req->has('materias_has_periodos_id')){\n $obj->materias_has_periodos_id=$this->req->input('materias_has_periodos_id');\n }\n\t\tif($this->req->has('descripcion')){\n\t\t\t$obj->descripcion=$this->req->input('descripcion');\n\t\t}else{\n\t\t\t$obj->descripcion='';\n\t\t}\n\t\t$obj->save();\n\n\t\t// De aqui para abajo no se toca nada\n\t\t////////////////////////////////////\n\n\n\t\t// Guardar y finalizar\n\t\tif ($id>0) {\n\t\t\t$resultado='Modificación. Tabla=Indicadores, id='.$id;\n\t\t}else{\n\t\t\t$resultado='Elemento Creado. Tabla=Indicadores, id='.$obj->id;\n\t\t}\n\t\treturn $resultado;\n\t}", "function modificarAnuncio($titulo, $descripcion, $imagen, $id_poi, $id_usuario) {\n $sql = \"UPDATE anuncio SET titulo='\" . $titulo . \"',descripcion='\" . $descripcion . \"',imagen='\" . $imagen\n . \"' WHERE id_usuario='\" . $id_usuario . \"' AND id_poi='\" . $id_poi . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\n }", "function edit($param) {\n extract($param);\n $sql = \"UPDATE operario SET fk_usuario='$id_usuario', nombres='$nombres', apellidos='$apellidos' WHERE fk_usuario='$id_usuario';\n UPDATE usuario SET id_usuario='$id_usuario', direccion='$direccion', telefonos='$telefonos', correos='$correos', contrasena='$contrasena' WHERE id_usuario = '$id_usuario'; \"; // <-- el ID de la fila asignado en el SELECT permite construir la condición de búsqueda del registro a modificar\n $conexion->getPDO()->exec($sql);\n echo $conexion->getEstado();\n }", "function EDIT()\n{\n\t//si los atributos estan comprobado\n\tif ($this->Comprobar_atributos() === true){\n\t$sql = \"SELECT * FROM CENTRO WHERE CODCENTRO= '$this->CODCENTRO'\";\n \n\n $result = $this->mysqli->query($sql);\n //actualizamos los datos\n //si se cumple la condicion\n if ($result->num_rows == 1) {\n\t\t$sql = \"UPDATE CENTRO \n\t\t\t\tSET \n\t\t\t\tCODCENTRO = '$this->CODCENTRO',\n\t\t\t\tCODEDIFICIO = '$this->CODEDIFICIO',\n\t\t\t\tNOMBRECENTRO = '$this->NOMBRECENTRO',\n\t\t\t\tDIRECCIONCENTRO = '$this->DIRECCIONCENTRO',\n\t\t\t\tRESPONSABLECENTRO = '$this->RESPONSABLECENTRO' \n\t\t\t\tWHERE \n\t\t\t\tCODCENTRO= '$this->CODCENTRO'\";\n\t\t//si se ha actualizado guardamos un mensaje de éxito en la variable resultado\n\t\t//si se cumple la condicion\n\t\tif ($this->mysqli->query($sql))\n\t\t{\n\t\t\t$resultado = 'Actualización realizada con éxito'; \n\t\t}\n\t\t//si no\n\t\telse//si no guardamos un mensaje de error en la variable resultado\n\t\t{\n\t\t\t$resultado = 'Error de gestor de base de datos';\n\t\t}\n\t\t\n\t}\n\n\t//si no\n\telse \n\t{\n\t\t$resultado = 'No existe en la base de datos';\n\t}\n\treturn $resultado;//devuelve el mensaje\n\t}//si no\n\telse{\n\t\treturn $this->erroresdatos;//devuelve el mensaje\n\t}\n}", "function modificaRuta()\r\n\t{\r\n\t\t$query = \"UPDATE \" . self::TABLA . \" SET Ruta='\".$this->Ruta.\"'\tWHERE IDRuta = \".$this->IdRuta.\";\";\r\n\t\treturn parent::modificaRegistro( $query);\r\n\t}", "public function atualizar() {\n $query = '\n UPDATE tb_atividade \n set \n nome = :nome,\n qntd_part = :qntd_part,\n inscricao = :inscricao,\n valor = :valor,\n tipo = :tipo,\n carga_hr = :carga_hr,\n data_inicio = :data_inicio,\n data_fim = :data_fim\n WHERE\n id = :id\n ';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id_att']);\n $stmt->bindValue(':nome', $this->atividade->__get('nome'));\n $stmt->bindValue(':qntd_part', $this->atividade->__get('qntd_part'));\n $stmt->bindValue(':inscricao', $this->atividade->__get('inscricao'));\n $stmt->bindValue(':valor', $this->atividade->__get('valor'));\n $stmt->bindValue(':tipo', $this->atividade->__get('tipo'));\n $stmt->bindValue(':carga_hr', $this->atividade->__get('carga_hr'));\n $stmt->bindValue(':data_inicio', $this->atividade->__get('data_inicio'));\n $stmt->bindValue(':data_fim', $this->atividade->__get('data_fim'));\n\n return $stmt->execute();\n }", "public function atualizar(){\r\n return (new Database('atividades'))->update('id = '.$this->id,[\r\n 'titulo' => $this->titulo,\r\n 'descricao' => $this->descricao,\r\n 'ativo' => $this->ativo,\r\n 'data' => $this->data\r\n ]);\r\n }", "function actualiza_nro_cargo($id_desig,$nro_cargo){\n if(is_null($nro_cargo)){\n $sql=\"update designacion set nro_cargo=null\"\n . \" where id_designacion=$id_desig\";\n toba::db('designa')->consultar($sql); \n return true;\n \n }else{\n if($id_desig<>-1 and $nro_cargo<>-1){\n $sql=\"select * from designacion where nro_cargo=$nro_cargo and id_designacion<>$id_desig\";\n $res=toba::db('designa')->consultar($sql); \n if(count($res)>0){//ya hay otra designacion con ese numero de cargo\n return false;\n }else{\n $sql=\"update designacion set nro_cargo=$nro_cargo\"\n . \" where id_designacion=$id_desig\";\n toba::db('designa')->consultar($sql); \n return true;\n }\n \n }else{\n return false;\n }\n } \n }", "public function actualizarCita(){\n $sql =\"update cita set id_paciente=$this->id_paciente, id_medico = $this->id_medico,fecha_cita = '$this->fecha_cita', hora_cita='$this->hora_cita', tipo_servicio='$this->tipo_servicio', motivo ='$this->motivo', estado = '$this->estado' where id =$this->id\";\n if($this->conn->executeQuery($sql)){\n $this->conn->close();\n return true;\n }\n }", "public function setRecordInDB($id_entita, $nome, $nome_icona, $nome_immagine, $quantita, $id_sede){\r\n include_once './db_functions.php';\r\n $db = new DB_Functions();\r\n //Escaping\r\n $id_entita = DB_Functions::esc($id_entita);\r\n $nome = DB_Functions::esc($nome);\r\n $nome_icona = DB_Functions::esc($nome_icona);\r\n $nome_immagine = DB_Functions::esc($nome_immagine);\r\n $quantita = DB_Functions::esc($quantita);\r\n $id_sede = DB_Functions::esc($id_sede);\r\n\r\n $query = \"UPDATE ENTITA \r\n SET \tNOME = $nome,\r\n NOME_ICONA = $nome_icona,\r\n NOME_IMMAGINE = $nome_immagine\r\n QUANTITA = $quantita\r\n ID_SEDE = $id_sede\r\n WHERE \t\r\n ID_ENTITA = $id_entita;\";\r\n $resQuery = $db->executeQuery($query);\r\n if ($resQuery[\"state\"]) {\r\n $this->nome = $nome;\r\n $this->nome_icona = $nome_icona;\r\n $this->nome_immagine = $nome_immagine;\r\n $this->quantita = $quantita;\r\n $this->id_sede = $id_sede;\r\n }\r\n return $resQuery;\r\n }", "public static function update($data){\r\n $sql=\"UPDATE voiture SET immatriculation= :immat, marque = :marque, couleur= :couleur WHERE immatriculation = :immat \";\r\n $req_prep = model1::$pdo->prepare($sql);\r\n $values = array(\"immat\"=>$data['immatriculation'],\"marque\"=>$data['marque'],\"couleur\"=>$data['couleur']);\r\n $immat = $data['immatriculation'];\r\n $req_prep->execute($values);\r\n $msg=\"La voiture , $immat, a été modifiée\";\r\n return $msg;\r\n }", "function EDIT()\n{\n\t//si se cumple la condicion\n\tif ($this->Comprobar_atributos() === true){\n\t$sql = \"SELECT * FROM EDIFICIO WHERE CODEDIFICIO= '$this->codedificio'\";\n \n\n $result = $this->mysqli->query($sql);\n \n //si se cumple la condicion\n if ($result->num_rows == 1) { //Si existe el edificio lo editamos\n //actualizamos los datos\n\t$sql = \"UPDATE EDIFICIO\n\t\t\tSET \n\t\t\tCODEDIFICIO = '$this->codedificio',\n\t\t\tNOMBREEDIFICIO = '$this->nombreedificio',\n\t\t\tDIRECCIONEDIFICIO = '$this->direccionedificio',\n\t\t\tCAMPUSEDIFICIO = '$this->campusedificio' \n\t\t\tWHERE \n\t\t\tCODEDIFICIO= '$this->codedificio'\";\n\t//si se ha actualizado guardamos un mensaje de éxito en la variable resultado\n\tif ($this->mysqli->query($sql)) //Si la consulta se ha realizado correctamente, mostramos mensaje \n\t{\n\t\t$resultado = 'Actualización realizada con éxito';\n\t}\n\t//si no\n\telse //Si no, mostramos mensaje de error\n\t{\n\t\t$resultado = 'Error de gestor de base de datos';\n\t}\n\treturn $resultado;//devolvemos el mensaje\n}\n\t}//si no\n\telse{\n\t\treturn $this->erroresdatos;\n\t}\n}", "function autorizar_producto_san_luis($id_mov){\r\n\r\nglobal $db;\t\r\n \r\n $db->starttrans();\r\n $fecha_hoy=date(\"Y-m-d H:i:s\",mktime());\r\n \r\n //traigo el deposito origen\r\n $sql = \"select deposito_origen,deposito_destino\r\n from movimiento_material where id_movimiento_material = $id_mov\"; \r\n $res = sql($sql) or fin_pagina();\r\n $id_deposito_origen = $res->fields[\"deposito_origen\"];\r\n $id_deposito_destino = $res->fields[\"deposito_destino\"];\r\n \t \r\n //traigo el detalle de los movimientos a liberar \t \r\n $sql=\"select * from detalle_movimiento where id_movimiento_material=$id_mov\";\r\n $res = sql($sql) or fin_pagina();\r\n\r\n $comentario = \" Autorizacion de PM Producto San Luis nro: $id_mov\";\r\n $id_tipo_movimiento = 7;\r\n\r\n //por cada detalle voy liberando las reservas del pm autorizado \r\n for($i=0;$i<$res->recordcount();$i++) {\r\n \t $id_prod_esp = $res->fields[\"id_prod_esp\"];\r\n $cantidad = $res->fields[\"cantidad\"];\r\n $id_detalle_movimiento = $res->fields[\"id_detalle_movimiento\"]; \r\n ///////////////////////////////////////\r\n $sql = \"select id_recibidos_mov,cantidad\r\n from recibidos_mov where id_detalle_movimiento=$id_detalle_movimiento \r\n and ent_rec=0\";\r\n $detalle_rec = sql($sql) or fin_pagina();\r\n $id_recibido_mov = $detalle_rec->fields[\"id_recibidos_mov\"];\r\n if($id_recibido_mov==\"\") {\r\n\t \t //insert\r\n\t\t $sql = \"select nextval('recibidos_mov_id_recibidos_mov_seq') as id_recibido_mov\";\r\n\t\t $res_1 = sql($sql) or fin_pagina();\r\n\t\t $id_recibido_mov = $res_1->fields[\"id_recibido_mov\"];\r\n\t\t $sql=\"insert into recibidos_mov(id_recibidos_mov,id_detalle_movimiento,cantidad,ent_rec)\r\n\t\t values($id_recibido_mov,$id_detalle_movimiento,$cantidad,0)\";\r\n }else {\r\n\t //update\r\n\t $sql=\"update recibidos_mov set cantidad=cantidad+$cantidad\r\n\t where id_recibidos_mov=$id_recibido_mov\";\r\n }//del else\r\n sql($sql) or fin_pagina();\r\n $sql =\"insert into log_recibidos_mov(id_recibidos_mov,usuario,fecha,cantidad_recibida,tipo)\r\n values($id_recibido_mov,'\".$_ses_user[\"name\"].\"','$fecha_hoy',$cantidad,'entrega')\";\r\n sql($sql) or fin_pagina();\r\n /////////////////////////////////////// \r\n descontar_reserva($id_prod_esp,$cantidad,$id_deposito_origen,$comentario,$id_tipo_movimiento,\"\",$id_detalle_movimiento,\"\");\r\n $res->movenext(); \r\n }//del for\r\n \t \r\n //Inserto la Mercaderia entrante en el stock BS AS \r\n $sql = \"select * from mercaderia_entrante where id_movimiento_material = $id_mov\";\r\n $res = sql($sql) or fin_pagina();\r\n $comentario = \"Producto San Luis perteneciente al PM nro: $id_mov\";\r\n for($i=0;$i<$res->recordcount();$i++){\r\n\t $id_prod_esp = $res->fields[\"id_prod_esp\"];\r\n\t $cantidad = $res->fields[\"cantidad\"];\r\n\t $descripcion = $res->fields[\"descripcion\"]; \r\n\t //el id_tipo_movimiento le hardcodeo uno de la tabla stock.tipo_movimiento\r\n\t $id_tipo_movimiento='13';\r\n\t //el ingreso del producto es a \"disponible\" por lo tanto la funcion no toma en cuenta los parametros que siguen\r\n\t $a_stock='disponible';\r\n\t agregar_stock($id_prod_esp,$cantidad,$id_deposito_destino,$comentario,$id_tipo_movimiento,$a_stock,$id_tipo_reserva,\"\",$id_detalle_movimiento,$id_licitacion,$nro_caso);\r\n\t $res->movenext();\r\n }//del for\r\n $db->completetrans();\r\n\r\n }", "function alta_material(){\n\t\t$u= new Material_producto();\n\t\t$related = $u->from_array($_POST);\n\t\t$u->usuario_id=$GLOBALS['usuarioid'];\n\t\t// save with the related objects\n\t\tif($u->save($related)) {\n\t\t\techo \"<html> <script>alert(\\\"Se han registrado los datos del Material del Productos.\\\"); window.location='\".base_url().\"index.php/almacen/productos_c/formulario/list_materiales';</script></html>\";\n\t\t} else\n\t\t\tshow_error(\"\".$u->error->string);\n\t}", "public function editaInforme($idIndicador,$periodo,$resultadoDet,$comentarios,$plan,$periodoDet,$fecha){\n\t\t$sql = $this->db->query(\"UPDATE IndicadorInformes SET resultadoDet = '$resultadoDet', periodoDet='$periodoDet', comentarios='$comentarios', plan='$plan', fecha='$fecha' WHERE fk_idIndicador='$idIndicador' AND periodo='$periodo'\");\n\t\treturn ($this->db->affected_rows() != 1) ? false : true;\n\t}", "public function populateMcoData(){\n\t\t$mcoDiffs = new Application_Model_DbTable_McoData();\n\t\t$editAccredit = $mcoDiffs->fetchAll($mcoDiffs->select()->where('mco = 9'));\n\t\tforeach ($editAccredit as $edit) {\n\t\t\t$edit['id'] = $edit->id;\n\t\t\t$edit['amount_passenger'] = $edit->end_roulette - $edit->start_roulette;\n\t\t\t$edit->save();\n\t\t}\n\t}", "function ajouter_modificateur(){\n\t\t$requete\t= sprintf(\"SELECT modificateur FROM articles WHERE id='%s'\",\n\t\t\t\t\t\t\t\tmysql_real_escape_string(htmlspecialchars($_GET['id'])));\n\t\t$donnee\t\t= connexion($requete);\n\t\t$cellule\t= mysql_fetch_assoc($donnee);\n\t\t\n\t\t$date = date(\"d-m-Y\");\n\t\t\n\t\t$temp = \"\";\n\t\tif(strlen($cellule['modificateur']) == 0){ // si c'est le premier modificateur\n\t\t\t$temp = \"{$_SESSION['id']}-{$date}\";\n\t\t}else{\n\t\t\t$old = deja_modifier($cellule['modificateur']);\n\t\t\tif(strlen($old) == 0){\n\t\t\t\t$temp = \"{$_SESSION['id']}-{$date}\";\n\t\t\t}else{\n\t\t\t\t$temp = \"{$_SESSION['id']}-{$date}|{$old}\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$requete1\t= sprintf(\"UPDATE articles SET modificateur ='{$temp}' WHERE id ='%s'\",\n\t\t\t\t\t\t\t\tmysql_real_escape_string(htmlspecialchars($_GET['id'])));\n\t\tconnexion($requete1);\n\t}", "public function update(Request $request, $id)\n {\n $asignaciones = DocentGroupClass::find($id);\n\n /* if(empty($asignaciones))\n {\n Alert::error('Docente no encontrado en nuestros registros')->persistent('Cerrar');\n return redirect(route('asignaciones.index'));\n }*/\n\n\n\n $asignaciones->fill($request->all());\n\n try {\n $consulta = DB::table('docente_grupos_materias')->where([\n ['materia_id', '=', $request->materia_id],\n ['grupo_id', '=', $request->grupo_id],\n\n\n ])->get();\n\n if ($consulta) {\n Alert::error('Ya existe esta materia en este grupo ')->persistent('Cerrar');\n return redirect()->back();\n } else {\n DB::beginTransaction();\n\n $asignaciones->save();\n\n DB::commit();\n\n Alert::success('Asignación correcta')->persistent('Cerrar');\n return redirect(route('estructura.index'));\n }\n } catch (Exception $e) {\n DB::rollBack();\n }}", "function EDIT(){\n if(($this->DNI == '')){\n return 'Deportista vacio, introduzca un DNI';\n }else{\n $sql = $this->mysqli->prepare(\"SELECT * FROM deportista WHERE DNI = ?\");\n $sql->bind_param(\"s\", $this->DNI);\n $sql->execute();\n \n $resultado = $sql->get_result();\n \n if(!$resultado){\n return 'No se ha podido conectar con la BD';\n }else if($resultado->num_rows == 1){\n $sql = $this->mysqli->prepare(\"UPDATE deportista SET Nombre = ?, Edad = ?, Apellidos = ?, Contrasenha = ?, Cuota_socio=?, rolAdmin = ?, rolEntrenador = ?, Sexo=? WHERE DNI = ?\");\n $sql->bind_param(\"sissiiiss\", $this->Nombre, $this->Edad, $this->Apellidos, $this->Contrasenha, $this->Cuota_socio,$this->rolAdmin,$this->rolEntrenador, $this->Sexo,$this->DNI);\n $resultado = $sql->execute();\n \n if(!$resultado){\n return 'Ha fallado la actualización de deportista';\n }else{\n return 'Modificación correcta';\n }\n }else{\n return 'Deportista no existe en la base de datos';\n }\n }\n }", "function actualizar_noticia($id_noticia, $titulo, $noticia, $estado, $idioma) {\n\t\t\n\t\t$timestamp=time();\n\t\t$fecha=date(\"Y-m-d H:i:s\",$timestamp);\n\t\t\n\t\t$UpdateRecords = \"UPDATE noticias \n\t\tSET titulo='$titulo', noticia='$noticia', estado='$estado', fecha_modificacion='$fecha', idioma='$idioma'\n\t\tWHERE id_noticia='$id_noticia'\";\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($UpdateRecords); \n\t\tmysql_close($connection);\n\t\t\t\n\t}", "function evt__form_cargo__modificacion($datos)\r\n\t{\r\n $res=0;\r\n if($this->controlador()->dep('datos')->tabla('cargo')->esta_cargada()){//es una modificacion\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n \r\n if(isset($datos['id_puesto'])){\r\n $res=$this->controlador()->dep('datos')->tabla('puesto')->hay_superposicion_con($car['id_cargo'],$datos['id_puesto'],$datos['fec_alta'],$datos['fec_baja']);\r\n }\r\n if($res==1){//hay otro puesto \r\n toba::notificacion()->agregar('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos', 'error'); \r\n }else{\r\n $this->controlador()->dep('datos')->tabla('cargo')->set($datos);\r\n $this->controlador()->dep('datos')->tabla('cargo')->sincronizar(); \r\n }\r\n }else{//es un alta\r\n if(isset($datos['id_puesto'])){\r\n $res=$this->controlador()->dep('datos')->tabla('puesto')->hay_superposicion_con(0,$datos['id_puesto'],$datos['fec_alta'],$datos['fec_baja']); \r\n }\r\n if($res==1){//hay otro puesto \r\n throw new toba_error('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos');\r\n // toba::notificacion()->agregar('Hay superposicion. El puesto id:'.$datos['id_puesto']. ' esta ocupado por otro cargo en ese periodo. Ver en Informes->Puestos', 'error'); \r\n }else{\r\n $pers=$this->controlador()->dep('datos')->tabla('persona')->get(); \r\n $datos['generado_x_pase']=0;\r\n $datos['id_persona']=$pers['id_persona'];\r\n $this->controlador()->dep('datos')->tabla('cargo')->set($datos);\r\n $this->controlador()->dep('datos')->tabla('cargo')->sincronizar();\r\n $car=$this->controlador()->dep('datos')->tabla('cargo')->get();\r\n $cargo['id_cargo']=$car['id_cargo'];\r\n $this->controlador()->dep('datos')->tabla('cargo')->cargar($cargo);\r\n } \r\n }\r\n\t}", "public function saveProfessorMaterias(){\n \tif (!isset(Request::all()['data'])) {\n \t\t$materias = [];\n \t}else{\n \t\t$materias = Request::all()['data']; \t\t\n \t}\n \t\n \t$oldMaterias = MateriasProfessor::where('professor_id', Auth::user()->professor->id)->get();\n\n \t//Check if as any materia to delete \t\n \t$this->checkMateriaToDelete($oldMaterias, $materias);\n\t\t\n\t\t//add new materias;\n \t$this->addNewMaterias($oldMaterias, $materias);\n\n \treturn 'true';\n }", "function mod_beneficiario()\r\n\t{\t\r\n\t \t$sql=\"UPDATE slc_beneficiario set ced_titular='$this->cedt', nomb_titular='$this->nomt', telf_titular='$this->telt' where ced_beneficiario='$this->cedb'\";\r\n\t\t$result=mysql_query($sql,$this->conexion);\r\n\t\t//echo $sql;\r\n\t\tif ($result) \r\n\t\t return true;\r\n\t\telse\r\n\t\t return false;\r\n\t}", "function prodottiCambiaMarchio($con) {\n $sql=\"UPDATE prodotti SET prd_mark = 'Modulo', prd_mark_id = 49 WHERE prd_line_id = 60 OR prd_line_id = 61 OR prd_line_id = 144 OR prd_line_id = 145\";\n mysqli_query($con,$sql);\n}", "static public function mdlEditarFFiscalesTab2($tabla, $datos){\n\n\t\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET\n\t\t \t ,personal_f1_fisdelminisp_M = :personal_f1_fisdelminisp_M\n\t\t\t\t ,personal_f1_fisdelminisp_H = :personal_f1_fisdelminisp_H\n\t\t\t\t ,personal_f1_fisdelminisp_T = :personal_f1_fisdelminisp_T\n\n\t\t\t \t ,personal_f1_agenminpu_M = :personal_f1_agenminpu_M\n\t\t\t\t ,personal_f1_agenminpu_H = :personal_f1_agenminpu_H\n\t\t\t\t ,personal_f1_agenminpu_T = :personal_f1_agenminpu_T\n\n\t\t\t\t ,personal_f1_secminpu_M = :personal_f1_secminpu_M\n\t\t\t\t ,personal_f1_secminpu_H = :personal_f1_secminpu_H\n\t\t\t\t ,personal_f1_secminpu_T = :personal_f1_secminpu_T\n\n\t\t\t\t ,personal_f1_peri_M = :personal_f1_peri_M\n\t\t\t\t ,personal_f1_peri_H = :personal_f1_peri_H\n\t\t\t\t ,personal_f1_peri_T = :personal_f1_peri_T\n\n\t\t\t\t ,personal_f1_pomininvjud_M = :personal_f1_pomininvjud_M\n\t\t\t\t ,personal_f1_pomininvjud_H = :personal_f1_pomininvjud_H\n\t\t\t\t ,personal_f1_pomininvjud_T = :personal_f1_pomininvjud_T\n\n\t\t\t\t ,personal_f1_otros = :personal_f1_otros\n\t\t\t\t ,personal_f1_otros_M = :personal_f1_otros_M\n\t\t\t\t ,personal_f1_otros_H = :personal_f1_otros_H\n\t\t\t\t ,personal_f1_otros_T = :personal_f1_otros_T\n\n\t\t\t\t ,personal_f1_siningre_M = :personal_f1_siningre_M\n\t\t\t ,personal_f1_siningre_H = :personal_f1_siningre_H\n\t\t\t ,personal_f1_siningre_T = :personal_f1_siningre_T\n\t\t\t\t --------\n\t\t\t \t ,personal_p1_prirespon_H = :personal_p1_prirespon_H\n\t\t\t ,personal_p1_prirespon_T = :personal_p1_prirespon_T\n\n\t\t\t\t , personal_p1_total_M = :personal_p1_total_M\n\t\t\t\t , personal_p1_total_H = :personal_p1_total_H\n\t\t\t\t , personal_p1_total_T = :personal_p1_total_T\n\n\n\n\t\t\t\t , personal_p1_otros = :personal_p1_otros\n\t\t\t , personal_p1_otros_M = :personal_p1_otros_M\n\t\t\t \t , personal_p1_otros_H = :personal_p1_otros_H\n\t\t\t , personal_p1_otros_T = :personal_p1_otros_T\n\t\t\t\t , personal_p1_siningre_M = :personal_p1_siningre_M\n\t\t\t\t , personal_p1_siningre_H = :personal_p1_siningre_H\n\t\t\t\t , personal_p1_siningre_T = :personal_p1_siningre_T\n\t\t\t\t , personal_p1_de1a5000_M = :personal_p1_de1a5000_M\n\t\t\t\t , personal_p1_de1a5000_H = :personal_p1_de1a5000_H\n\t\t\t\t , personal_p1_de1a5000_T = :personal_p1_de1a5000_T\n\t\t\t\t , personal_p1_de5001a10000_M = :personal_p1_de5001a10000_M\n\t\t\t\t , personal_p1_de5001a10000_H = :personal_p1_de5001a10000_H\n\t\t\t\t , personal_p1_de5001a10000_T = :personal_p1_de5001a10000_T\n\t\t\t\t , personal_p1_de10001a15000_M = :personal_p1_de10001a15000_M\n\t\t\t\t , personal_p1_de10001a15000_H = :personal_p1_de10001a15000_H\n\t\t\t\t , personal_p1_de10001a15000_T = :personal_p1_de10001a15000_T\n\t\t\t\t , personal_p1_de15001a20000_M = :personal_p1_de15001a20000_M\n\t\t\t\t , personal_p1_de15001a20000_H = :personal_p1_de15001a20000_H\n\t\t\t\t , personal_p1_de15001a20000_T = :personal_p1_de15001a20000_T\n\t\t\t\t , personal_p1_de20001a25000_M = :personal_p1_de20001a25000_M\n\t\t\t , personal_p1_de20001a25000_H = :personal_p1_de20001a25000_H\n\t\t\t , personal_p1_de20001a25000_T = :personal_p1_de20001a25000_T\n\t\t\t \t , personal_p1_de25001a30000_M = :personal_p1_de25001a30000_M\n\t\t\t , personal_p1_de25001a30000_H = :personal_p1_de25001a30000_H\n\t\t\t\t , personal_p1_de25001a30000_T = :personal_p1_de25001a30000_T\n\t\t\t , personal_p1_de30001a35000_M = :personal_p1_de30001a35000_M\n\t\t\t \t , personal_p1_de30001a35000_H = :personal_p1_de30001a35000_H\n\t\t\t , personal_p1_de30001a35000_T = :personal_p1_de30001a35000_T\n\t\t\t\t , personal_p1_de35001a40000_M = :personal_p1_de35001a40000_M\n\t\t\t\t , personal_p1_de35001a40000_H = :personal_p1_de35001a40000_H\n\t\t\t\t , personal_p1_de35001a40000_T = :personal_p1_de35001a40000_T\n\t\t\t\t , personal_p1_de40001a45000_M = :personal_p1_de40001a45000_M\n\t\t\t\t , personal_p1_de40001a45000_H = :personal_p1_de40001a45000_H\n\t\t\t\t , personal_p1_de40001a45000_T = :personal_p1_de40001a45000_T\n\t\t\t\t , personal_p1_de45001a50000_M = :personal_p1_de45001a50000_M\n\t\t\t\t , personal_p1_de45001a50000_H = :personal_p1_de45001a50000_H\n\t\t\t\t , personal_p1_de45001a50000_T = :personal_p1_de45001a50000_T\n\t\t\t\t , personal_p1_de50001a55000_M = :personal_p1_de50001a55000_M\n\t\t\t\t , personal_p1_de50001a55000_H = :personal_p1_de50001a55000_H\n\t\t\t\t , personal_p1_de50001a55000_T = :personal_p1_de50001a55000_T\n\t\t\t\t , personal_p1_55001a60000_M = :personal_p1_55001a60000_M\n\t\t\t\t , personal_p1_55001a60000_H = :personal_p1_55001a60000_H\n\t\t\t\t , personal_p1_55001a60000_T = :personal_p1_55001a60000_T\n\t\t\t\t , personal_p1_60001a65000_M = :personal_p1_60001a65000_M\n\t\t\t , personal_p1_60001a65000_H = :personal_p1_60001a65000_H\n\t\t\t , personal_p1_60001a65000_T = :personal_p1_60001a65000_T\n\t\t\t \t , personal_p1_65001a70000_M = :personal_p1_65001a70000_M\n\t\t\t , personal_p1_65001a70000_H = :personal_p1_65001a70000_H\n\t\t\t\t , personal_p1_65001a70000_T = :personal_p1_65001a70000_T\n\t\t\t , personal_p1_masde70000_M = :personal_p1_masde70000_M\n\t\t\t \t , personal_p1_masde70000_H = :personal_p1_masde70000_H\n\t\t\t , personal_p1_masde70000_T = :personal_p1_masde70000_T\n\t\t\t\t , personal_p1_masde50000_M = :personal_p1_masde50000_M\n\t\t\t\t , personal_p1_masde50000_H = :personal_p1_masde50000_H\n\t\t\t\t , personal_p1_masde50000_T = :personal_p1_masde50000_T\n\t\t\t\t , personal_p1_2_ning_M = :personal_p1_2_ning_M\n\t\t\t \t , personal_p1_2_ning_H = :personal_p1_2_ning_H\n\t\t\t , personal_p1_2_ning_T = :personal_p1_2_ning_T\n\t\t\t\t , personal_p1_2_prees_M = :personal_p1_2_prees_M\n\t\t\t \t , personal_p1_2_prees_H = :personal_p1_2_prees_H\n\t\t\t , personal_p1_2_prees_T = :personal_p1_2_prees_T\n\t\t\t\t , personal_p1_2_prim_M = :personal_p1_2_prim_M\n\t\t\t \t , personal_p1_2_prim_H = :personal_p1_2_prim_H\n\t\t\t , personal_p1_2_prim_T = :personal_p1_2_prim_T\n\t\t\t\t , personal_p1_2_secu_M = :personal_p1_2_secu_M\n\t\t\t \t , personal_p1_2_secu_H = :personal_p1_2_secu_H\n\t\t\t , personal_p1_2_secu_T = :personal_p1_2_secu_T\n\t\t\t\t , personal_p1_2_ctsect_M = :personal_p1_2_ctsect_M\n\t\t\t \t , personal_p1_2_ctsect_H = :personal_p1_2_ctsect_H\n\t\t\t , personal_p1_2_ctsect_T = :personal_p1_2_ctsect_T\n\t\t\t\t , personal_p1_2_nbasica_M = :personal_p1_2_nbasica_M\n\t\t\t \t , personal_p1_2_nbasica_H = :personal_p1_2_nbasica_H\n\t\t\t , personal_p1_2_nbasica_T = :personal_p1_2_nbasica_T\n\t\t\t\t , personal_p1_2_preobach_M = :personal_p1_2_preobach_M\n\t\t\t \t , personal_p1_2_preobach_H = :personal_p1_2_preobach_H\n\t\t\t , personal_p1_2_preobach_T = :personal_p1_2_preobach_T\n\t\t\t\t , personal_p1_2_ctcpret_M = :personal_p1_2_ctcpret_M\n\t\t\t \t , personal_p1_2_ctcpret_H = :personal_p1_2_ctcpret_H\n\t\t\t , personal_p1_2_ctcpret_T = :personal_p1_2_ctcpret_T\n\t\t\t\t , personal_p1_2_licoprof_M = :personal_p1_2_licoprof_M\n\t\t\t \t , personal_p1_2_licoprof_H = :personal_p1_2_licoprof_H\n\t\t\t , personal_p1_2_licoprof_T = :personal_p1_2_licoprof_T\n\t\t\t\t , personal_p1_2_maesdoc_M = :personal_p1_2_maesdoc_M\n\t\t\t \t , personal_p1_2_maesdoc_H = :personal_p1_2_maesdoc_H\n\t\t\t , personal_p1_2_maesdoc_T = :personal_p1_2_maesdoc_T\n\t\t\t\t , personal_p1_2_total_M = :personal_p1_2_total_M\n\t\t\t\t , personal_p1_2_total_H = :personal_p1_2_total_H\n\t\t\t\t , personal_p1_2_total_T = :personal_p1_2_total_T\n\t\t\t\t , personal_p1_2_nosesabe = :personal_p1_2_nosesabe\n\n\n\n\t\t\t\t , personal_p1_2_nosanore_M = :personal_p1_2_nosanore_M\n\t\t\t\t , personal_p1_2_nosanore_H = :personal_p1_2_nosanore_H\n\t\t\t\t , personal_p1_2_nosanore_T = :personal_p1_2_nosanore_T\n\t\t\t\t , capacitacion_p2 = :capacitacion_p2\n\t\t\t\t , capacitacion_p2_1_nom = :capacitacion_p2_1_nom\n\t\t\t\t , capacitacion_p2_2_aul = :capacitacion_p2_2_aul\n\t\t\t\t , capacitacion_p2_2_comp = :capacitacion_p2_2_comp\n\t\t\t\t , capacitacion_p2_2_juor = :capacitacion_p2_2_juor\n\t\t\t\t , capacitacion_p2_2_come = :capacitacion_p2_2_come\n\t\t\t\t , capacitacion_p2_2_coci = :capacitacion_p2_2_coci\n\t\t\t\t , capacitacion_p2_2_dorm = :capacitacion_p2_2_dorm\n\t\t\t\t , capacitacion_p2_2_pruf = :capacitacion_p2_2_pruf\n\t\t\t\t , capacitacion_p2_2_auvis = :capacitacion_p2_2_auvis\n\t\t\t\t , capacitacion_p2_2_medi = :capacitacion_p2_2_medi\n\t\t\t\t , capacitacion_p2_2_tirof = :capacitacion_p2_2_tirof\n\t\t\t\t , capacitacion_p2_2_tirov = :capacitacion_p2_2_tirov\n\t\t\t\t , capacitacion_p2_2_entre = :capacitacion_p2_2_entre\n\t\t\t\t , capacitacion_p2_2_vehi = :capacitacion_p2_2_vehi\n\t\t\t\t , capacitacion_p2_2_unif = :capacitacion_p2_2_unif\n\t\t\t\t , capacitacion_p2_2_otro = :capacitacion_p2_2_otro\n\t\t\t\t , capacitacion_p2_2_otro_cual = :capacitacion_p2_2_otro_cual\n\t\t\t\t , capacitacion_p2_3_invyanali_M = :capacitacion_p2_3_invyanali_M\n\t\t\t\t , capacitacion_p2_3_invyanali_H = :capacitacion_p2_3_invyanali_H\n\t\t\t\t , capacitacion_p2_3_invyanali_T = :capacitacion_p2_3_invyanali_T\n\t\t\t\t , capacitacion_p2_3_inte_M = :capacitacion_p2_3_inte_M\n\t\t\t\t , capacitacion_p2_3_inte_H = :capacitacion_p2_3_inte_H\n\t\t\t\t , capacitacion_p2_3_inte_T = :capacitacion_p2_3_inte_T\n\t\t\t\t , capacitacion_p2_3_reacc_M = :capacitacion_p2_3_reacc_M\n\t\t\t\t , capacitacion_p2_3_reacc_H = :capacitacion_p2_3_reacc_H\n\t\t\t\t , capacitacion_p2_3_reacc_T = :capacitacion_p2_3_reacc_T\n\t\t\t\t , capacitacion_p2_3_proce_M = :capacitacion_p2_3_proce_M\n\t\t\t\t , capacitacion_p2_3_proce_H = :capacitacion_p2_3_proce_H\n\t\t\t\t , capacitacion_p2_3_proce_T = :capacitacion_p2_3_proce_T\n\t\t\t\t , capacitacion_p2_3_segycuspen_M = :capacitacion_p2_3_segycuspen_M\n\t\t\t\t , capacitacion_p2_3_segycuspen_H = :capacitacion_p2_3_segycuspen_H\n\t\t\t\t , capacitacion_p2_3_segycuspen_T = :capacitacion_p2_3_segycuspen_T\n\t\t\t\t , capacitacion_p2_3_preven_M = :capacitacion_p2_3_preven_M\n\t\t\t\t , capacitacion_p2_3_preven_H = :capacitacion_p2_3_preven_H\n\t\t\t\t , capacitacion_p2_3_preven_T = :capacitacion_p2_3_preven_T\n\t\t\t\t , capacitacion_p2_3_prirespon_M = :capacitacion_p2_3_prirespon_M\n\t\t\t\t , capacitacion_p2_3_prirespon_H = :capacitacion_p2_3_prirespon_H\n\t\t\t\t , capacitacion_p2_3_prirespon_T = :capacitacion_p2_3_prirespon_T\n\t\t\t\t , capacitacion_p2_3_otros = :capacitacion_p2_3_otros\n\t\t\t\t , capacitacion_p2_3_otros_M = :capacitacion_p2_3_otros_M\n\t\t\t\t , capacitacion_p2_3_otros_H = :capacitacion_p2_3_otros_H\n\t\t\t\t , capacitacion_p2_3_otros_T = :capacitacion_p2_3_otros_T\n\t\t\t\t , capacitacion_p2_4_majudlacpo_M = :capacitacion_p2_4_majudlacpo_M\n\t\t\t\t , capacitacion_p2_4_majudlacpo_H = :capacitacion_p2_4_majudlacpo_H\n\t\t\t\t , capacitacion_p2_4_majudlacpo_T = :capacitacion_p2_4_majudlacpo_T\n\t\t\t\t , capacitacion_p2_4_prdedeypaci_M = :capacitacion_p2_4_prdedeypaci_M\n\t\t\t\t , capacitacion_p2_4_prdedeypaci_H = :capacitacion_p2_4_prdedeypaci_H\n\t\t\t\t , capacitacion_p2_4_prdedeypaci_T = :capacitacion_p2_4_prdedeypaci_T\n\t\t\t\t , capacitacion_p2_4_dehuygain_M = :capacitacion_p2_4_dehuygain_M\n\t\t\t\t , capacitacion_p2_4_dehuygain_H = :capacitacion_p2_4_dehuygain_H\n\t\t\t\t , capacitacion_p2_4_dehuygain_T = :capacitacion_p2_4_dehuygain_T\n\t\t\t\t , capacitacion_p2_4_realsipejupeac_M = :capacitacion_p2_4_realsipejupeac_M\n\t\t\t\t , capacitacion_p2_4_realsipejupeac_H = :capacitacion_p2_4_realsipejupeac_H\n\t\t\t\t , capacitacion_p2_4_realsipejupeac_T = :capacitacion_p2_4_realsipejupeac_T\n\t\t\t\t , capacitacion_p2_4_prdeludeloheodeha_M = :capacitacion_p2_4_prdeludeloheodeha_M\n\t\t\t\t , capacitacion_p2_4_prdeludeloheodeha_H = :capacitacion_p2_4_prdeludeloheodeha_H\n\t\t\t\t , capacitacion_p2_4_prdeludeloheodeha_T = :capacitacion_p2_4_prdeludeloheodeha_T\n\t\t\t\t , capacitacion_p2_4_idldlhodhymdeeoddp_M = :capacitacion_p2_4_idldlhodhymdeeoddp_M\n\t\t\t\t , capacitacion_p2_4_idldlhodhymdeeoddp_H = :capacitacion_p2_4_idldlhodhymdeeoddp_H\n\t\t\t\t , capacitacion_p2_4_idldlhodhymdeeoddp_T = :capacitacion_p2_4_idldlhodhymdeeoddp_T\n\t\t\t\t , capacitacion_p2_4_cadecu_M = :capacitacion_p2_4_cadecu_M\n\t\t\t\t , capacitacion_p2_4_cadecu_H = :capacitacion_p2_4_cadecu_H\n\t\t\t\t , capacitacion_p2_4_cadecu_T = :capacitacion_p2_4_cadecu_T\n\t\t\t\t , capacitacion_p2_4_enates_M = :capacitacion_p2_4_enates_M\n\t\t\t\t , capacitacion_p2_4_enates_H = :capacitacion_p2_4_enates_H\n\t\t\t\t , capacitacion_p2_4_enates_T = :capacitacion_p2_4_enates_T\n\t\t\t\t , capacitacion_p2_4_usledelafu_M = :capacitacion_p2_4_usledelafu_M\n\t\t\t\t , capacitacion_p2_4_usledelafu_H = :capacitacion_p2_4_usledelafu_H\n\t\t\t\t , capacitacion_p2_4_usledelafu_T = :capacitacion_p2_4_usledelafu_T\n\t\t\t\t , capacitacion_p2_4_inves_M = :capacitacion_p2_4_inves_M\n\t\t\t\t , capacitacion_p2_4_inves_H = :capacitacion_p2_4_inves_H\n\t\t\t\t , capacitacion_p2_4_inves_T = :capacitacion_p2_4_inves_T\n\t\t\t\t , capacitacion_p2_4_prres_M = :capacitacion_p2_4_prres_M\n\t\t\t\t , capacitacion_p2_4_prres_H = :capacitacion_p2_4_prres_H\n\t\t\t\t , capacitacion_p2_4_prres_T = :capacitacion_p2_4_prres_T\n\t\t\t\t , capacitacion_p2_4_inpoho_M = :capacitacion_p2_4_inpoho_M\n\t\t\t\t , capacitacion_p2_4_inpoho_H = :capacitacion_p2_4_inpoho_H\n\t\t\t\t , capacitacion_p2_4_inpoho_T = :capacitacion_p2_4_inpoho_T\n\t\t\t\t , capacitacion_p2_4_especia_M = :capacitacion_p2_4_especia_M\n\t\t\t\t , capacitacion_p2_4_especia_H = :capacitacion_p2_4_especia_H\n\t\t\t\t , capacitacion_p2_4_especia_T = :capacitacion_p2_4_especia_T\n\t\t\t\t , capacitacion_p2_4_actualiza_M = :capacitacion_p2_4_actualiza_M\n\t\t\t\t , capacitacion_p2_4_actualiza_H = :capacitacion_p2_4_actualiza_H\n\t\t\t\t , capacitacion_p2_4_actualiza_T = :capacitacion_p2_4_actualiza_T\n\t\t\t\t , capacitacion_p2_4_sidejupeacu_M = :capacitacion_p2_4_sidejupeacu_M\n\t\t\t\t , capacitacion_p2_4_sidejupeacu_H = :capacitacion_p2_4_sidejupeacu_H\n\t\t\t\t , capacitacion_p2_4_sidejupeacu_T = :capacitacion_p2_4_sidejupeacu_T\n\t\t\t\t , capacitacion_p2_4_depro_M = :capacitacion_p2_4_depro_M\n\t\t\t\t , capacitacion_p2_4_depro_H = :capacitacion_p2_4_depro_H\n\t\t\t\t , capacitacion_p2_4_depro_T = :capacitacion_p2_4_depro_T\n\t\t\t\t , capacitacion_p2_4_femeni_M = :capacitacion_p2_4_femeni_M\n\t\t\t\t , capacitacion_p2_4_femeni_H = :capacitacion_p2_4_femeni_H\n\t\t\t\t , capacitacion_p2_4_femeni_T = :capacitacion_p2_4_femeni_T\n\t\t\t\t , capacitacion_p2_4_antrdepe_M = :capacitacion_p2_4_antrdepe_M\n\t\t\t\t , capacitacion_p2_4_antrdepe_H = :capacitacion_p2_4_antrdepe_H\n\t\t\t\t , capacitacion_p2_4_antrdepe_T = :capacitacion_p2_4_antrdepe_T\n\t\t\t\t , capacitacion_p2_4_vicolamu_M = :capacitacion_p2_4_vicolamu_M\n\t\t\t\t , capacitacion_p2_4_vicolamu_H = :capacitacion_p2_4_vicolamu_H\n\t\t\t\t , capacitacion_p2_4_vicolamu_T = :capacitacion_p2_4_vicolamu_T\n\t\t\t\t , capacitacion_p2_4_predege_M = :capacitacion_p2_4_predege_M\n\t\t\t\t , capacitacion_p2_4_predege_H = :capacitacion_p2_4_predege_H\n\t\t\t\t , capacitacion_p2_4_predege_T = :capacitacion_p2_4_predege_T\n\t\t\t\t , capacitacion_p2_4_ascoydedeex_M = :capacitacion_p2_4_ascoydedeex_M\n\t\t\t\t , capacitacion_p2_4_ascoydedeex_H = :capacitacion_p2_4_ascoydedeex_H\n\t\t\t\t , capacitacion_p2_4_ascoydedeex_T = :capacitacion_p2_4_ascoydedeex_T\n\t\t\t\t , capacitacion_p2_4_siindejupepaad_M = :capacitacion_p2_4_siindejupepaad_M\n\t\t\t\t , capacitacion_p2_4_siindejupepaad_H = :capacitacion_p2_4_siindejupepaad_H\n\t\t\t\t , capacitacion_p2_4_siindejupepaad_T = :capacitacion_p2_4_siindejupepaad_T\n\t\t\t\t , capacitacion_p2_4_ataperin_M = :capacitacion_p2_4_ataperin_M\n\t\t\t\t , capacitacion_p2_4_ataperin_H = :capacitacion_p2_4_ataperin_H\n\t\t\t\t , capacitacion_p2_4_ataperin_T = :capacitacion_p2_4_ataperin_T\n\t\t\t\t , capacitacion_p2_4_atapercondis_M = :capacitacion_p2_4_atapercondis_M\n\t\t\t\t , capacitacion_p2_4_atapercondis_H = :capacitacion_p2_4_atapercondis_H\n\t\t\t\t , capacitacion_p2_4_atapercondis_T = :capacitacion_p2_4_atapercondis_T\n\t\t\t\t , capacitacion_p2_4_jusalt_M = :capacitacion_p2_4_jusalt_M\n\t\t\t\t , capacitacion_p2_4_jusalt_H = :capacitacion_p2_4_jusalt_H\n\t\t\t\t , capacitacion_p2_4_jusalt_T = :capacitacion_p2_4_jusalt_T\n\t\t\t\t , capacitacion_p2_4_justera_M = :capacitacion_p2_4_justera_M\n\t\t\t\t , capacitacion_p2_4_justera_H = :capacitacion_p2_4_justera_H\n\t\t\t\t , capacitacion_p2_4_justera_T = :capacitacion_p2_4_justera_T\n\t\t\t\t , capacitacion_p2_4_justransi_M = :capacitacion_p2_4_justransi_M\n\t\t\t\t , capacitacion_p2_4_justransi_H = :capacitacion_p2_4_justransi_H\n\t\t\t\t , capacitacion_p2_4_justransi_T = :capacitacion_p2_4_justransi_T\n\t\t\t\t , capacitacion_p2_4_otros = :capacitacion_p2_4_otros\n\t\t\t\t , capacitacion_p2_4_otros_M = :capacitacion_p2_4_otros_M\n\t\t\t\t , capacitacion_p2_4_otros_H = :capacitacion_p2_4_otros_H\n\t\t\t\t , capacitacion_p2_4_otros_T = :capacitacion_p2_4_otros_T\n\t\t\t\t , capacitacion_p2_5_instuprga = :capacitacion_p2_5_instuprga\n\t\t\t\t , capacitacion_p2_6_evconconf_M = :capacitacion_p2_6_evconconf_M\n\t\t\t\t , capacitacion_p2_6_evconconf_H = :capacitacion_p2_6_evconconf_H\n\t\t\t\t , capacitacion_p2_6_evconconf_T = :capacitacion_p2_6_evconconf_T\n\t\t\t\t , presupuesto_p3 = :presupuesto_p3\n\t\t\t\t , presupuestop3_1_anuaeje20 = :presupuestop3_1_anuaeje20\n\t\t\t\t , presupuestop3_2_anuaeje20 = :presupuestop3_2_anuaeje20\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\tWHERE id = :idFormulario\");\n\n\n\t\t\t$stmt -> bindParam(\":idFormulario\", $datos[\"idFormulario\"], PDO::PARAM_STR);\n\t\t$stmt -> bindParam(\":personal_p1_totalp_M\", $datos[\"personal_p1_totalp_M\"], PDO::PARAM_STR);\n\t\t$stmt -> bindParam(\":personal_p1_totalp_H\", $datos[\"personal_p1_totalp_H\"], PDO::PARAM_STR);\n\t\t$stmt -> bindParam(\":personal_p1_totalp_T\", $datos[\"personal_p1_totalp_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_invyanali_M\", $datos[\"personal_p1_invyanali_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_invyanali_H\", $datos[\"personal_p1_invyanali_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_invyanali_T\", $datos[\"personal_p1_invyanali_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_inte_M\", $datos[\"personal_p1_inte_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_inte_H\", $datos[\"personal_p1_inte_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_inte_T\", $datos[\"personal_p1_inte_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_reacc_M\", $datos[\"personal_p1_reacc_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_reacc_H\", $datos[\"personal_p1_reacc_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_reacc_T\", $datos[\"personal_p1_reacc_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_proce_M\", $datos[\"personal_p1_proce_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_proce_H\", $datos[\"personal_p1_proce_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_proce_T\", $datos[\"personal_p1_proce_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_segycuspen_M\", $datos[\"personal_p1_segycuspen_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_segycuspen_H\", $datos[\"personal_p1_segycuspen_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_segycuspen_T\", $datos[\"personal_p1_segycuspen_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_preven_M\", $datos[\"personal_p1_preven_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_preven_H\", $datos[\"personal_p1_preven_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_preven_T\", $datos[\"personal_p1_preven_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_prirespon_M\", $datos[\"personal_p1_prirespon_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_prirespon_H\", $datos[\"personal_p1_prirespon_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_prirespon_T\", $datos[\"personal_p1_prirespon_T\"], PDO::PARAM_STR);\n\n\t\t\t$stmt -> bindParam(\":personal_p1_total_M\", $datos[\"personal_p1_total_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_total_H\", $datos[\"personal_p1_total_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_total_T\", $datos[\"personal_p1_total_T\"], PDO::PARAM_STR);\n\n\n\t\t\t$stmt -> bindParam(\":personal_p1_otros\", $datos[\"personal_p1_otros\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_otros_M\", $datos[\"personal_p1_otros_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_otros_H\", $datos[\"personal_p1_otros_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_otros_T\", $datos[\"personal_p1_otros_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_siningre_M\", $datos[\"personal_p1_siningre_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_siningre_H\", $datos[\"personal_p1_siningre_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_siningre_T\", $datos[\"personal_p1_siningre_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de1a5000_M\", $datos[\"personal_p1_de1a5000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de1a5000_H\", $datos[\"personal_p1_de1a5000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de1a5000_T\", $datos[\"personal_p1_de1a5000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de5001a10000_M\", $datos[\"personal_p1_de5001a10000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de5001a10000_H\", $datos[\"personal_p1_de5001a10000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de5001a10000_T\", $datos[\"personal_p1_de5001a10000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de10001a15000_M\", $datos[\"personal_p1_de10001a15000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de10001a15000_H\", $datos[\"personal_p1_de10001a15000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de10001a15000_T\", $datos[\"personal_p1_de10001a15000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de15001a20000_M\", $datos[\"personal_p1_de15001a20000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de15001a20000_H\", $datos[\"personal_p1_de15001a20000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de15001a20000_T\", $datos[\"personal_p1_de15001a20000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de20001a25000_M\", $datos[\"personal_p1_de20001a25000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de20001a25000_H\", $datos[\"personal_p1_de20001a25000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de20001a25000_T\", $datos[\"personal_p1_de20001a25000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de25001a30000_M\", $datos[\"personal_p1_de25001a30000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de25001a30000_H\", $datos[\"personal_p1_de25001a30000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de25001a30000_T\", $datos[\"personal_p1_de25001a30000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de30001a35000_M\", $datos[\"personal_p1_de30001a35000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de30001a35000_H\", $datos[\"personal_p1_de30001a35000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de30001a35000_T\", $datos[\"personal_p1_de30001a35000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de35001a40000_M\", $datos[\"personal_p1_de35001a40000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de35001a40000_H\", $datos[\"personal_p1_de35001a40000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de35001a40000_T\", $datos[\"personal_p1_de35001a40000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de40001a45000_M\", $datos[\"personal_p1_de40001a45000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de40001a45000_H\", $datos[\"personal_p1_de40001a45000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de40001a45000_T\", $datos[\"personal_p1_de40001a45000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de45001a50000_M\", $datos[\"personal_p1_de45001a50000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de45001a50000_H\", $datos[\"personal_p1_de45001a50000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de45001a50000_T\", $datos[\"personal_p1_de45001a50000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de50001a55000_M\", $datos[\"personal_p1_de50001a55000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de50001a55000_H\", $datos[\"personal_p1_de50001a55000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_de50001a55000_T\", $datos[\"personal_p1_de50001a55000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_55001a60000_M\", $datos[\"personal_p1_55001a60000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_55001a60000_H\", $datos[\"personal_p1_55001a60000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_55001a60000_T\", $datos[\"personal_p1_55001a60000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_60001a65000_M\", $datos[\"personal_p1_60001a65000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_60001a65000_H\", $datos[\"personal_p1_60001a65000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_60001a65000_T\", $datos[\"personal_p1_60001a65000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_65001a70000_M\", $datos[\"personal_p1_65001a70000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_65001a70000_H\", $datos[\"personal_p1_65001a70000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_65001a70000_T\", $datos[\"personal_p1_65001a70000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_masde70000_M\", $datos[\"personal_p1_masde70000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_masde70000_H\", $datos[\"personal_p1_masde70000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_masde70000_T\", $datos[\"personal_p1_masde70000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_masde50000_M\", $datos[\"personal_p1_masde50000_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_masde50000_H\", $datos[\"personal_p1_masde50000_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_masde50000_T\", $datos[\"personal_p1_masde50000_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_ning_M\", $datos[\"personal_p1_2_ning_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_ning_H\", $datos[\"personal_p1_2_ning_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_ning_T\", $datos[\"personal_p1_2_ning_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_prees_M\", $datos[\"personal_p1_2_prees_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_prees_H\", $datos[\"personal_p1_2_prees_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_prees_T\", $datos[\"personal_p1_2_prees_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_prim_M\", $datos[\"personal_p1_2_prim_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_prim_H\", $datos[\"personal_p1_2_prim_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_prim_T\", $datos[\"personal_p1_2_prim_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_secu_M\", $datos[\"personal_p1_2_secu_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_secu_H\", $datos[\"personal_p1_2_secu_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_secu_T\", $datos[\"personal_p1_2_secu_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_ctsect_M\", $datos[\"personal_p1_2_ctsect_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_ctsect_H\", $datos[\"personal_p1_2_ctsect_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_ctsect_T\", $datos[\"personal_p1_2_ctsect_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_nbasica_M\", $datos[\"personal_p1_2_nbasica_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_nbasica_H\", $datos[\"personal_p1_2_nbasica_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_nbasica_T\", $datos[\"personal_p1_2_nbasica_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_preobach_M\", $datos[\"personal_p1_2_preobach_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_preobach_H\", $datos[\"personal_p1_2_preobach_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_preobach_T\", $datos[\"personal_p1_2_preobach_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_ctcpret_M\", $datos[\"personal_p1_2_ctcpret_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_ctcpret_H\", $datos[\"personal_p1_2_ctcpret_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_ctcpret_T\", $datos[\"personal_p1_2_ctcpret_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_licoprof_M\", $datos[\"personal_p1_2_licoprof_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_licoprof_H\", $datos[\"personal_p1_2_licoprof_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_licoprof_T\", $datos[\"personal_p1_2_licoprof_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_maesdoc_M\", $datos[\"personal_p1_2_maesdoc_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_maesdoc_H\", $datos[\"personal_p1_2_maesdoc_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_maesdoc_T\", $datos[\"personal_p1_2_maesdoc_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_total_M\", $datos[\"personal_p1_2_total_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_total_H\", $datos[\"personal_p1_2_total_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_total_T\", $datos[\"personal_p1_2_total_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_nosesabe\", $datos[\"personal_p1_2_nosesabe\"], PDO::PARAM_STR);\n\n\t\t\t$stmt -> bindParam(\":personal_p1_2_nosanore_M\", $datos[\"personal_p1_2_nosanore_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_nosanore_H\", $datos[\"personal_p1_2_nosanore_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":personal_p1_2_nosanore_T\", $datos[\"personal_p1_2_nosanore_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2\", $datos[\"capacitacion_p2\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_1_nom\", $datos[\"capacitacion_p2_1_nom\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_aul\", $datos[\"capacitacion_p2_2_aul\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_comp\", $datos[\"capacitacion_p2_2_comp\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_juor\", $datos[\"capacitacion_p2_2_juor\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_come\", $datos[\"capacitacion_p2_2_come\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_coci\", $datos[\"capacitacion_p2_2_coci\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_dorm\", $datos[\"capacitacion_p2_2_dorm\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_pruf\", $datos[\"capacitacion_p2_2_pruf\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_auvis\", $datos[\"capacitacion_p2_2_auvis\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_medi\", $datos[\"capacitacion_p2_2_medi\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_tirof\", $datos[\"capacitacion_p2_2_tirof\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_tirov\", $datos[\"capacitacion_p2_2_tirov\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_entre\", $datos[\"capacitacion_p2_2_entre\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_vehi\", $datos[\"capacitacion_p2_2_vehi\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_unif\", $datos[\"capacitacion_p2_2_unif\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_otro\", $datos[\"capacitacion_p2_2_otro\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_2_otro_cual\", $datos[\"capacitacion_p2_2_otro_cual\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_invyanali_M\", $datos[\"capacitacion_p2_3_invyanali_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_invyanali_H\", $datos[\"capacitacion_p2_3_invyanali_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_invyanali_T\", $datos[\"capacitacion_p2_3_invyanali_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_inte_M\", $datos[\"capacitacion_p2_3_inte_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_inte_H\", $datos[\"capacitacion_p2_3_inte_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_inte_T\", $datos[\"capacitacion_p2_3_inte_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_reacc_M\", $datos[\"capacitacion_p2_3_reacc_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_reacc_H\", $datos[\"capacitacion_p2_3_reacc_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_reacc_T\", $datos[\"capacitacion_p2_3_reacc_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_proce_M\", $datos[\"capacitacion_p2_3_proce_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_proce_H\", $datos[\"capacitacion_p2_3_proce_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_proce_T\", $datos[\"capacitacion_p2_3_proce_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_segycuspen_M\", $datos[\"capacitacion_p2_3_segycuspen_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_segycuspen_H\", $datos[\"capacitacion_p2_3_segycuspen_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_segycuspen_T\", $datos[\"capacitacion_p2_3_segycuspen_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_preven_M\", $datos[\"capacitacion_p2_3_preven_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_preven_H\", $datos[\"capacitacion_p2_3_preven_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_preven_T\", $datos[\"capacitacion_p2_3_preven_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_prirespon_M\", $datos[\"capacitacion_p2_3_prirespon_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_prirespon_H\", $datos[\"capacitacion_p2_3_prirespon_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_prirespon_T\", $datos[\"capacitacion_p2_3_prirespon_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_otros\", $datos[\"capacitacion_p2_3_otros\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_otros_M\", $datos[\"capacitacion_p2_3_otros_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_otros_H\", $datos[\"capacitacion_p2_3_otros_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_3_otros_T\", $datos[\"capacitacion_p2_3_otros_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_majudlacpo_M\", $datos[\"capacitacion_p2_4_majudlacpo_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_majudlacpo_H\", $datos[\"capacitacion_p2_4_majudlacpo_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_majudlacpo_T\", $datos[\"capacitacion_p2_4_majudlacpo_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_prdedeypaci_M\", $datos[\"capacitacion_p2_4_prdedeypaci_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_prdedeypaci_H\", $datos[\"capacitacion_p2_4_prdedeypaci_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_prdedeypaci_T\", $datos[\"capacitacion_p2_4_prdedeypaci_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_dehuygain_M\", $datos[\"capacitacion_p2_4_dehuygain_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_dehuygain_H\", $datos[\"capacitacion_p2_4_dehuygain_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_dehuygain_T\", $datos[\"capacitacion_p2_4_dehuygain_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_realsipejupeac_M\", $datos[\"capacitacion_p2_4_realsipejupeac_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_realsipejupeac_H\", $datos[\"capacitacion_p2_4_realsipejupeac_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_realsipejupeac_T\", $datos[\"capacitacion_p2_4_realsipejupeac_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_prdeludeloheodeha_M\", $datos[\"capacitacion_p2_4_prdeludeloheodeha_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_prdeludeloheodeha_H\", $datos[\"capacitacion_p2_4_prdeludeloheodeha_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_prdeludeloheodeha_T\", $datos[\"capacitacion_p2_4_prdeludeloheodeha_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_idldlhodhymdeeoddp_M\", $datos[\"capacitacion_p2_4_idldlhodhymdeeoddp_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_idldlhodhymdeeoddp_H\", $datos[\"capacitacion_p2_4_idldlhodhymdeeoddp_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_idldlhodhymdeeoddp_T\", $datos[\"capacitacion_p2_4_idldlhodhymdeeoddp_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_cadecu_M\", $datos[\"capacitacion_p2_4_cadecu_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_cadecu_H\", $datos[\"capacitacion_p2_4_cadecu_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_cadecu_T\", $datos[\"capacitacion_p2_4_cadecu_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_enates_M\", $datos[\"capacitacion_p2_4_enates_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_enates_H\", $datos[\"capacitacion_p2_4_enates_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_enates_T\", $datos[\"capacitacion_p2_4_enates_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_usledelafu_M\", $datos[\"capacitacion_p2_4_usledelafu_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_usledelafu_H\", $datos[\"capacitacion_p2_4_usledelafu_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_usledelafu_T\", $datos[\"capacitacion_p2_4_usledelafu_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_inves_M\", $datos[\"capacitacion_p2_4_inves_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_inves_H\", $datos[\"capacitacion_p2_4_inves_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_inves_T\", $datos[\"capacitacion_p2_4_inves_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_prres_M\", $datos[\"capacitacion_p2_4_prres_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_prres_H\", $datos[\"capacitacion_p2_4_prres_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_prres_T\", $datos[\"capacitacion_p2_4_prres_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_inpoho_M\", $datos[\"capacitacion_p2_4_inpoho_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_inpoho_H\", $datos[\"capacitacion_p2_4_inpoho_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_inpoho_T\", $datos[\"capacitacion_p2_4_inpoho_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_especia_M\", $datos[\"capacitacion_p2_4_especia_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_especia_H\", $datos[\"capacitacion_p2_4_especia_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_especia_T\", $datos[\"capacitacion_p2_4_especia_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_actualiza_M\", $datos[\"capacitacion_p2_4_actualiza_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_actualiza_H\", $datos[\"capacitacion_p2_4_actualiza_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_actualiza_T\", $datos[\"capacitacion_p2_4_actualiza_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_sidejupeacu_M\", $datos[\"capacitacion_p2_4_sidejupeacu_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_sidejupeacu_H\", $datos[\"capacitacion_p2_4_sidejupeacu_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_sidejupeacu_T\", $datos[\"capacitacion_p2_4_sidejupeacu_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_depro_M\", $datos[\"capacitacion_p2_4_depro_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_depro_H\", $datos[\"capacitacion_p2_4_depro_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_depro_T\", $datos[\"capacitacion_p2_4_depro_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_femeni_M\", $datos[\"capacitacion_p2_4_femeni_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_femeni_H\", $datos[\"capacitacion_p2_4_femeni_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_femeni_T\", $datos[\"capacitacion_p2_4_femeni_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_antrdepe_M\", $datos[\"capacitacion_p2_4_antrdepe_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_antrdepe_H\", $datos[\"capacitacion_p2_4_antrdepe_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_antrdepe_T\", $datos[\"capacitacion_p2_4_antrdepe_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_vicolamu_M\", $datos[\"capacitacion_p2_4_vicolamu_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_vicolamu_H\", $datos[\"capacitacion_p2_4_vicolamu_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_vicolamu_T\", $datos[\"capacitacion_p2_4_vicolamu_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_predege_M\", $datos[\"capacitacion_p2_4_predege_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_predege_H\", $datos[\"capacitacion_p2_4_predege_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_predege_T\", $datos[\"capacitacion_p2_4_predege_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_ascoydedeex_M\", $datos[\"capacitacion_p2_4_ascoydedeex_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_ascoydedeex_H\", $datos[\"capacitacion_p2_4_ascoydedeex_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_ascoydedeex_T\", $datos[\"capacitacion_p2_4_ascoydedeex_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_siindejupepaad_M\", $datos[\"capacitacion_p2_4_siindejupepaad_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_siindejupepaad_H\", $datos[\"capacitacion_p2_4_siindejupepaad_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_siindejupepaad_T\", $datos[\"capacitacion_p2_4_siindejupepaad_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_ataperin_M\", $datos[\"capacitacion_p2_4_ataperin_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_ataperin_H\", $datos[\"capacitacion_p2_4_ataperin_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_ataperin_T\", $datos[\"capacitacion_p2_4_ataperin_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_atapercondis_M\", $datos[\"capacitacion_p2_4_atapercondis_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_atapercondis_H\", $datos[\"capacitacion_p2_4_atapercondis_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_atapercondis_T\", $datos[\"capacitacion_p2_4_atapercondis_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_jusalt_M\", $datos[\"capacitacion_p2_4_jusalt_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_jusalt_H\", $datos[\"capacitacion_p2_4_jusalt_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_jusalt_T\", $datos[\"capacitacion_p2_4_jusalt_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_justera_M\", $datos[\"capacitacion_p2_4_justera_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_justera_H\", $datos[\"capacitacion_p2_4_justera_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_justera_T\", $datos[\"capacitacion_p2_4_justera_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_justransi_M\", $datos[\"capacitacion_p2_4_justransi_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_justransi_H\", $datos[\"capacitacion_p2_4_justransi_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_justransi_T\", $datos[\"capacitacion_p2_4_justransi_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_otros\", $datos[\"capacitacion_p2_4_otros\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_otros_M\", $datos[\"capacitacion_p2_4_otros_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_otros_H\", $datos[\"capacitacion_p2_4_otros_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_4_otros_T\", $datos[\"capacitacion_p2_4_otros_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_5_instuprga\", $datos[\"capacitacion_p2_5_instuprga\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_6_evconconf_M\", $datos[\"capacitacion_p2_6_evconconf_M\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_6_evconconf_H\", $datos[\"capacitacion_p2_6_evconconf_H\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":capacitacion_p2_6_evconconf_T\", $datos[\"capacitacion_p2_6_evconconf_T\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":presupuesto_p3\", $datos[\"presupuesto_p3\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":presupuestop3_1_anuaeje20\", $datos[\"presupuestop3_1_anuaeje20\"], PDO::PARAM_STR);\n\t\t\t$stmt -> bindParam(\":presupuestop3_2_anuaeje20\", $datos[\"presupuestop3_2_anuaeje20\"], PDO::PARAM_STR);\n\n\n\n\n\t\t\tif($stmt->execute()){\n\n\t\t\t\treturn \"La información se ha guardado exitosamente\";\n\n\t\t\t}else{\n\n\t\t\t\t$arr = $stmt ->errorInfo();\n\t\t\t\t$arr[3]=\"ERROR\";\n\t\t\t\treturn $arr[2];\n\n\t\t\t}\n\n\t\t\t$stmt -> close();\n\n\t\t\t$stmt = null;\n\n\t\t}", "function aggiornaProdotto(){\nif(isset($_POST['aggiorna'])){\n\n $nomePdt = $_POST['nome_pdt'];\n $infoBreve = $_POST['desc_breve'];\n $prezzo = $_POST['prezzo'];\n $quantitaPdt = $_POST['quantita_pdt'];\n $immaginePdt = $_POST['immagine'];\n\n $update = query(\"UPDATE prodotti SET nome_prodotto = '{$nomePdt}' , descr_prodotto = '{$infoBreve}' , prezzo = '{$prezzo}' , quantita_pdt = '{$quantitaPdt}' , immagine = '{$immaginePdt}' WHERE id_prodotto = {$_GET['id']}\");\n\nconferma($update);\n\n\nheader('Location: visualizza-pdt.php');\n\n}\n}", "static public function mdlEditarMembresia($tabla,$datos){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET id_tipo_membresia = :id_tipo_membresia, id_precio_membresia = :id_precio_membresia,fecha_inicio = :fecha_inicio,fecha_fin = :fecha_fin,comprobante = :comprobante, id_usuario = :id_usuario, id_miembro = :id_miembro WHERE id_membresia = :id\");\n\n\t\t$stmt->bindParam(\":id\", $datos[\"id\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":id_tipo_membresia\", $datos[\"id_tipo_membresia\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":id_precio_membresia\", $datos[\"id_precio_membresia\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":fecha_inicio\", $datos[\"fecha_inicio\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":fecha_fin\", $datos[\"fecha_fin\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":comprobante\", $datos[\"comprobante\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":id_usuario\", $datos[\"id_usuario\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":id_miembro\", $datos[\"id_miembro\"], PDO::PARAM_STR);\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn \"error\";\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n }", "public function updateFiche(Request $request){\n $date = date('Y-m-d H:i:s');\n info_gen::where('id_jeune',session('user')->id)->update([\n 'civilite' => $request['civilite'],\n 'nom_jeune' => $request['nom'],\n 'nomjeunefille_jeune' => $request['nomFille'],\n 'prenom_jeune' => $request['prenom'],\n 'telfixe_jeune' => $request['fixe'],\n 'telportable_jeune' => $request['portable'],\n 'datenaissance_jeune' => $request['date_naissance'],\n 'age_jeune' => $request['age'],\n 'lieunaissance_jeune' => $request['lieu_naissance'],\n 'adresse_jeune' => $request['adresse'],\n 'cp_jeune' => $request['cp'],\n 'ville_jeune' => $request['ville']\n ]);\n // return redirect()->action ('JeuneController@home');\n return view('jeune.merci');\n }", "public function update(Request $request, Material $material)\n {\n /*\n el request trae la informacion que se tenga en el formulario\n material resive como estaba la informacion\n $material->nombre = $request->input('nombre');\n $material->precio = $request->precio;\n $material->cantidad = $request->cantidad;\n $material->save();\n */\n $request->validate([\n 'nombre' => 'required|max:255',\n 'precio' => 'required|min:1',\n 'cantidad' => 'required|min:1'\n ]);\n $material->update($request->all());\n return redirect()->route('materiales.show', $material->id); //retoranr a la pagina de index\n }", "function cc_update_meta_tutti_immobili($campo = false, $valore = ''){\n\t\n\t$cometa = cc_get_unique_post_meta_values(\"_id_cometa\");\n\t\n\tif($cometa and !empty($campo)){\n\t\t\n\t\t$Result = array();\n\t\t\n\t\t$immobili = array_keys($cometa);\n\t\t\n\t\tforeach($immobili as $post_id){\n\t\t\t\n\t\t\t$result[$post_id] = update_post_meta( $post_id, $campo, \"1\" );\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t$dbg = var_export($result, true);\n\t\n\tcc_import_immobili_error_log($dbg);\n\t\n}", "static public function mdlActualizarTalonario(){\n\n\t\t$sql=\"UPDATE talonariosjf SET pedido = pedido+1 WHERE id = 2\";\n\n\t\t$stmt=Conexion::conectar()->prepare($sql);\n\n\t\t$stmt->execute();\n\n\t\t$stmt=null;\n\n\t}", "static public function mdlEditarCompra($tabla, $datos){\r\n\t\r\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET vendedor = :vendedor, usuario = :usuario, serie = :serie, idPedido = :idPedido, folioCompra = :folioCompra, fechaCotizacion = :fechaCotizacion, cliente = :cliente, secciones = :secciones, cantidad = :cantidad, unidad = :unidad, codigo = :codigo, descripcion = :descripcion, precioUnitario = :precioUnitario, precioCompra = :precioCompra, descuentoProveedor = :descuentoProveedor, cantidad2 = :cantidad2, unidad2 = :unidad2, codigo2 = :codigo2, descripcion2 = :descripcion2, precioUnitario2 = :precioUnitario2, precioCompra2 = :precioCompra2, descuentoProveedor2 = :descuentoProveedor2, cantidad3 = :cantidad3, unidad3 = :unidad3, codigo3 = :codigo3, descripcion3 = :descripcion3, precioUnitario3 = :precioUnitario3, precioCompra3 = :precioCompra3, descuentoProveedor3 = :descuentoProveedor3, cantidad4 = :cantidad4, unidad4 = :unidad4, codigo4 = :codigo4, descripcion4 = :descripcion4, precioUnitario4 = :precioUnitario4, precioCompra4 = :precioCompra4, descuentoProveedor4 = :descuentoProveedor4, cantidad5 = :cantidad5, unidad5 = :unidad5, codigo5 = :codigo5, descripcion5 = :descripcion5, precioUnitario5 = :precioUnitario5, precioCompra5 = :precioCompra5, descuentoProveedor5 = :descuentoProveedor5, tiempoEntrega = :tiempoEntrega, fechaRecepcion = :fechaRecepcion, fechaElaboracion = :fechaElaboracion, fechaTermino = :fechaTermino, status = :status, sinAdquisicion = :sinAdquisicion, observaciones = :observaciones, estado = :estado, pendiente = :pendiente WHERE idPedido = :idPedido and serie = :serie\");\r\n\r\n\t\t$stmt->bindParam(\":vendedor\", $datos[\"vendedor\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":usuario\", $datos[\"usuario\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":serie\", $datos[\"serie\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":idPedido\", $datos[\"idPedido\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":folioCompra\", $datos[\"folioCompra\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":fechaCotizacion\", $datos[\"fechaCotizacion\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cliente\", $datos[\"cliente\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":secciones\", $datos[\"secciones\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":cantidad\", $datos[\"cantidad\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad\", $datos[\"unidad\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo\", $datos[\"codigo\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion\", $datos[\"descripcion\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario\", $datos[\"precioUnitario\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra\", $datos[\"precioCompra\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor\", $datos[\"descuentoProveedor\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cantidad2\", $datos[\"cantidad2\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad2\", $datos[\"unidad2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo2\", $datos[\"codigo2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion2\", $datos[\"descripcion2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario2\", $datos[\"precioUnitario2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra2\", $datos[\"precioCompra2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor2\", $datos[\"descuentoProveedor2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cantidad3\", $datos[\"cantidad3\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad3\", $datos[\"unidad3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo3\", $datos[\"codigo3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion3\", $datos[\"descripcion3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario3\", $datos[\"precioUnitario3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra3\", $datos[\"precioCompra3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor3\", $datos[\"descuentoProveedor3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cantidad4\", $datos[\"cantidad4\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad4\", $datos[\"unidad4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo4\", $datos[\"codigo4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion4\", $datos[\"descripcion4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario4\", $datos[\"precioUnitario4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra4\", $datos[\"precioCompra4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor4\", $datos[\"descuentoProveedor4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cantidad5\", $datos[\"cantidad5\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad5\", $datos[\"unidad5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo5\", $datos[\"codigo5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion5\", $datos[\"descripcion5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario5\", $datos[\"precioUnitario5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra5\", $datos[\"precioCompra5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor5\", $datos[\"descuentoProveedor5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":tiempoEntrega\", $datos[\"tiempoEntrega\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":fechaRecepcion\", $datos[\"fechaRecepcion\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":fechaElaboracion\", $datos[\"fechaElaboracion\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":fechaTermino\", $datos[\"fechaTermino\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":status\", $datos[\"status\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":sinAdquisicion\", $datos[\"sinAdquisicion\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":observaciones\", $datos[\"observaciones\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":estado\", $datos[\"estado\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":pendiente\", $datos[\"pendiente\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":id\", $datos[\"id\"], PDO::PARAM_INT);\r\n\r\n\t\tif($stmt -> execute()){\r\n\r\n\t\t\treturn \"ok\";\r\n\t\t\r\n\t\t}else{\r\n\r\n\t\t\treturn \"error\";\t\r\n\r\n\t\t}\r\n\r\n\t\t$stmt -> close();\r\n\r\n\t\t$stmt = null;\r\n\r\n\t}", "function composizioniCambiaMarchio($con) {\n $sql=\"UPDATE composizioni SET cmp_mark = 'Modulo', cmp_mark_id = 49 WHERE cmp_line_id = 60 OR cmp_line_id = 61 OR cmp_line_id = 144 OR cmp_line_id = 145\";\n mysqli_query($con,$sql);\n}", "function ActualizacionCarrito($Inscription)\n{\n\tglobal $con;\n\t\t$updateSQL = sprintf(\"UPDATE cart SET transaction_made=%s WHERE id_student=%s AND transaction_made= 0\",\n\t\t\t$Inscription,\n\t\t\t$_SESSION[\"ydl_UserId\"]);\n \n $Result1 = mysqli_query($con, $updateSQL) or die(mysqli_error($con));\n}" ]
[ "0.64743924", "0.63942826", "0.62906104", "0.61918455", "0.6173816", "0.61702365", "0.61407834", "0.6055277", "0.60484153", "0.589866", "0.5897071", "0.5888249", "0.5888249", "0.58809376", "0.5860471", "0.5855349", "0.5839724", "0.5834041", "0.5831495", "0.58230895", "0.58229214", "0.5821338", "0.5801702", "0.5757285", "0.57247704", "0.5714282", "0.5706683", "0.56936544", "0.5690857", "0.56891525", "0.5688806", "0.5688634", "0.5688137", "0.56833607", "0.565537", "0.5655296", "0.5653348", "0.5651853", "0.5648055", "0.5646847", "0.5643706", "0.5643209", "0.56386876", "0.5636695", "0.56329924", "0.5631728", "0.56137294", "0.5613628", "0.56094617", "0.5602246", "0.5598278", "0.5597796", "0.5596565", "0.55919415", "0.558394", "0.5578977", "0.5576583", "0.5562083", "0.5559685", "0.5558533", "0.55574656", "0.5551912", "0.55512977", "0.55478084", "0.554589", "0.55368793", "0.55362356", "0.55346704", "0.55346125", "0.5527529", "0.55249125", "0.55236816", "0.55218005", "0.5521146", "0.5519458", "0.55080897", "0.5506904", "0.5504223", "0.5501656", "0.5497799", "0.54925746", "0.54917085", "0.5491002", "0.5490791", "0.5485203", "0.54840845", "0.547769", "0.5471147", "0.5469045", "0.5469024", "0.5468366", "0.54609656", "0.545684", "0.5456029", "0.5450439", "0.54434913", "0.5441725", "0.5440401", "0.5437529", "0.5435663" ]
0.7046177
0
/ function to delete inscripcion_materia
function delete_inscripcion_materia($id) { return $this->db->delete('inscripcion_materia',array('id'=>$id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($id_materi);", "function delete_materia($materia_id)\n {\n return $this->db->delete('materia',array('materia_id'=>$materia_id));\n }", "public function delete()\n {\n //recuperation des informations pour la suppression d'une matière\n $data = $this->request->data;\n $id_planing = (int)$data['id_planing'] ?? null;\n \n if (empty($id_planing)) {\n $this->_return('Veillez spécifier l\\'identifiant du programme à supprimer', false);\n }\n\n if (true === $this->model->exist('id_planing', (int)$data['id_planing'], 'Presences')) {\n $this->_return('impossible de supprimer ce planing car il comporte encore des presences ', false);\n }\n\n try {\n $this->model->remove($id_planing);\n $this->_return('La matière a étè supprimer avec succès', true);\n //code...\n } catch (Exception $e) {\n $this->_exception($e);\n }\n }", "function setDelete(){\n\t\t$msg\t= \"===========\\tELIMINADO LA CUENTA \" . $this->mNumeroCuenta . \"\\r\\n\";\n\t\t$cuenta\t= $this->mNumeroCuenta;\n\t\t$socio\t= $this->mSocioTitular;\n\t\t$xQL\t= new MQL();\n\t\t\t//Cuenta\n\t\t\t$SQLDCuenta \t= \"DELETE FROM captacion_cuentas WHERE numero_cuenta = $cuenta AND numero_socio = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDCuenta);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t Eliminando la Cuenta (\" . $x[\"info\"] . \")\\r\\n\";\n\t\t\t}\n\t\t\t//Firma\n\t\t\t/*$SQLDFirma \t= \"DELETE FROM socios_firmas WHERE numero_de_cuenta = $cuenta \";\n\t\t\t$x = my_query($SQLDFirma);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\tEliminando las Firmas (\" . $x[\"info\"] . \")\\r\\n\";\n\t\t\t}*/\n\t\t\t//sdpm\n\t\t\t$SQLD_SDPM \t= \"DELETE FROM captacion_sdpm_historico WHERE cuenta = $cuenta \";\n\t\t\t$x = $xQL->setRawQuery($SQLD_SDPM);\n\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t//Movimientos\n\t\t\t$SQLDOpes\t= \"DELETE FROM operaciones_mvtos WHERE docto_afectado = $cuenta AND socio_afectado = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDOpes);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t$SQLDRecs\t= \"DELETE FROM operaciones_recibos WHERE docto_afectado = $cuenta AND numero_socio = $socio \";\n\t\t\t$x = $xQL->setRawQuery($SQLDRecs);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\t\" . $x[\"info\"] . \"\\r\\n\";\n\t\t\t}\n\n\t\t\t//Actualizar el Credito Relacionado\n\t\t\t$SQLDCC\t= \"UPDATE creditos_solicitud\n\t\t\t\t\t\tSET contrato_corriente_relacionado = \" . CTA_GLOBAL_CORRIENTE . \"\n\t\t\t\t\t\tWHERE contrato_corriente_relacionado = $cuenta \";\n\t\t\t$x = $xQL->setRawQuery($SQLDCC);\n\t\t\tif ($x[\"stat\"] == false ){\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tERROR\\t\" . $x[\"error\"] . \"\\r\\n\";\n\t\t\t} else {\n\t\t\t\t$msg\t.= date(\"H:i:s\") . \"\\tSUCESS\\tActualizando Creditos Relacionados (\" . $x[\"info\"] . \") \\r\\n\";\n\t\t\t}\n\t\treturn $msg;\n\t}", "public function destroy(materia $materia,$id)\n {\n $materia = materia::find($id);\n $materia->delete();\n return redirect()->route('materia.index');\n }", "public function delete () {\n $this->db->delete('emprestimos', array('id_emprestimo' => $this->id_emprestimo));\n }", "function eliminarCursosDelTipoDeMatricula($id){\n \t$pdo = DatabaseCao::connect();\n $sql = \"DELETE FROM ca_tipo_matricula_curso WHERE tipo_matricula = ?\";\n $q = $pdo->prepare($sql);\n $q->execute(array($id));\n DatabaseCao::disconnect();\n }", "public function deleteAction(Request $request, Materiel $materiel) {\n $form = $this->createDeleteForm($materiel);\n $form->handleRequest($request);\n \n $session = $request->getSession();\n\n if ($form->isSubmitted() && $form->isValid()) {\n \n \n \n $session->getFlashBag()->add('notification', \"le matériel \".$materiel->getMaterielNom().\" a été supprimé avec succès\");\n \n \n \n \n $em = $this->getDoctrine()->getManager();\n $em->remove($materiel);\n $em->flush();\n }\n\n return $this->redirectToRoute('materieladmin_index');\n }", "function eliminarTipoDeMatricula($id){\n \t$pdo = DatabaseCao::connect();\n mysql_query(\"DELETE FROM ca_tipo_matricula WHERE id = ? ;\");\n $sql = \"DELETE FROM ca_tipo_matricula WHERE id = ?\";\n $q = $pdo->prepare($sql);\n $q->execute(array($id));\n DatabaseCao::disconnect();\n }", "function deletePreDetalle(){\n $sql='DELETE FROM predetalle WHERE idCliente = ?';\n $params=array($this->cliente);\n return Database::executeRow($sql, $params);\n }", "function eliminarMaquinaria(){\n\t\t$this->procedimiento='snx.ft_maquinaria_ime';\n\t\t$this->transaccion='SNX_MAQ_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_maquinaria','id_maquinaria','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function delete(){\n $db = Database::getInstance() ;\n $db->query(\"DELETE FROM canciones WHERE idcancion=:idcan ;\",\n [\":idcan\"=>$this->idcancion]) ;\t\t\t\t \n }", "function deletePreDetalle2()\n {\n $sql='DELETE FROM predetalle WHERE idPreDetalle = ?';\n $params=array($this->idPre);\n return Database::executeRow($sql, $params);\n }", "public static function destroyEstudiante($idEstu)\n{\n $estudiante = Estudiante::find($idEstu);\n $estudiante->delete();\n}", "function deleteComentario($id_evento,$id_comentario){\n $mysqli = Conectar();\n seguridad($id_evento);\n seguridad($id_comentario);\n $mysqli->query(\"Delete From comentarios Where id_evento='$id_evento' and id_comentario='$id_comentario'\");\n }", "function opcion__eliminar()\n\t{\n\t\t$id_proyecto = $this->get_id_proyecto_actual();\n\t\tif ( $id_proyecto == 'toba' ) {\n\t\t\tthrow new toba_error(\"No es posible eliminar el proyecto 'toba'\");\n\t\t}\n\t\ttry {\n\t\t\t$p = $this->get_proyecto();\n\t\t\tif ( $this->consola->dialogo_simple(\"Desea ELIMINAR los metadatos y DESVINCULAR el proyecto '\"\n\t\t\t\t\t.$id_proyecto.\"' de la instancia '\"\n\t\t\t\t\t.$this->get_id_instancia_actual().\"'\") ) {\n\t\t\t\t$p->eliminar_autonomo();\n\t\t\t}\n\t\t} catch (toba_error $e) {\n\t\t\t$this->consola->error($e->__toString());\n\t\t}\n\t\t$this->get_instancia()->desvincular_proyecto( $id_proyecto );\n\t}", "public function excluirMembrodaCelulaDao($codCelula,$matricula){\r\n \r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetoMembro.php\");\r\n \r\n $obj = Connection::getInstance();\r\n $objMembro = new objetoMembro();\r\n $ret=3;\r\n \r\n $string= \"Select Matricula,Nome from membros WHERE Matricula = '$matricula'\";\r\n $resul1 = mysql_query($string)or die (\"Nao foi possivel encontrar o membro\".mysql_error());\r\n \r\n if($resul1){ \r\n $reg = mysql_fetch_assoc($resul1);\r\n $objMembro->setMatricula($reg[\"Matricula\"]);\r\n $objMembro->setNome($reg[\"Nome\"]);\r\n }\r\n// $string=\"DELETE FROM `geracaopar1_1`.`celulamembro` WHERE `celulamembro`.`CodCelula` = 5 AND `celulamembro`.`CodMembro` = 7\";\r\n $resul = mysql_query(\"DELETE FROM celulamembro WHERE CodCelula = '$codCelula' AND CodMembro = '$matricula'\")or die (\"Nao foi possivel excluir membro\".mysql_error());\r\n \r\n if($resul){ \r\n \r\n $ret=1;\r\n }\r\n mysql_free_result($resul1);\r\n $obj->freebanco();\r\n return $objMembro;\r\n }", "public function deletePartenaire($id){\n $partenaire = Partenaire::where('id','=',$id)->first();\n $partenaire->delete();\n \n return redirect('/admin/associations-partenaires')->with(['success'=>'Association partenaire correctement supprimée !']);\n\n }", "static public function ctrEliminarMarca()\n {\n\n if (isset($_GET[\"idMarca\"])) {\n\n $tabla = \"marca\";\n $item = \"Id_Marca\";\n $dato = $_GET[\"idMarca\"];\n\n \n $borrar = ModeloMarca::mdlEliminarMarca($tabla, $item, $dato);\n \n if ($borrar == \"ok\") {\n #Pregunta si existe una imagen en la BD\n if ($_GET[\"fotoMarca\"] != \"\") {\n unlink($_GET[\"fotoMarca\"]);\n }\n \n #Borrar el directorio del usuario\n rmdir(\"views/img/Marcas/\" . $_GET[\"nombreMarca\"]);\n\n echo '<script>\n swal({\n title: \"Eliminación exitosa!\",\n text: \"La marca se eliminó correctamente.\",\n icon: \"success\",\n closeOnClickOutside: false,\n }).then( (result) => {\n window.location = \"mainMarca\";\n });\n </script>';\n } else if($borrar == \"errorPadres\"){\n echo '<script>\n swal({\n title: \"Error al intentar eliminar!\",\n text: \"No puedes borrar esta marca, ya que tienes productos registrados con esta.\",\n icon: \"warning\",\n closeOnClickOutside: false,\n }).then( (result) => {\n window.location = \"mainMarca\";\n });\n </script>';\n } else {\n echo '<script>\n swal({\n title: \"Error!\",\n text: \"Ha ocurrido un error con la conexión a la base de datos.\",\n icon: \"error\",\n closeOnClickOutside: false,\n }).then( (result) => {\n window.location = \"mainMarca\";\n });\n </script>';\n }\n }\n }", "public function destroy($id)\n {\n if(!isset($_SESSION['ContraPass']) || !isset($_SESSION['usuarioUser'])){\n return view('interfazprincipal.Interfaz');\n }\n materia::where('Clave_M',$id)->delete();\n materia_grupo::where('Clave_M',$id)->delete();\n return redirect('materia')->with('msj','Materia Eliminada Correctamente');\n //return view('Alumnos.index',compact('alumnos'));\n //return view('materias.consulta');\n }", "public function destroy($incidencia)\n {\n //\n Incidencies::find($incidencia)->delete();\n }", "public function delete($idconvenio);", "function delete_item($id,$id_documento){\n $db = new MySQL();\n $sql = \"DELETE FROM facturas_detalle WHERE id='$id'\";\n $db->consulta($sql);\n \n /*\n * actualizar nuevos saldos\n */\n $this->actualizar_totales($id_documento);\n }", "public function excluirPermissao($idpermissao){\n //$conexao = $c->conexao();\n\n $sql = \"DELETE FROM tbpermissao WHERE idpermissao = '$idpermissao' \";\n\n return $this->conexao->query($sql);\n\n\n }", "final public function delete() {\n global $config; \n # Borrar el elemento de la base de datos\n $this->db->query(\"DELETE FROM guarderia_2 WHERE id_guarderia = $this->id\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'sedes/&success=true');\n }", "public function deleting(Seguimiento $Seguimiento){\n \n }", "function supprimer1($connexion,$nomTable,$nomClePrimaire,$valeurClePrimaire) { \n $req =$connexion -> query(\"DELETE FROM $nomTable WHERE $nomClePrimaire = '$valeurClePrimaire'\");\n }", "function borrarInscrito() {\n //Creamos la evaluacion\n leerClase('Evaluacion');\n leerClase('Estudiante');\n leerClase('Proyecto_dicta');\n $estudiante = new Estudiante($this->estudiante_id);\n $evaluacion = new Evaluacion($this->evaluacion_id);\n $protecto=$estudiante->getProyecto();\n $sql = \"select p.id as id from \" . $this->getTableName('Proyecto_dicta') . \" as p where p.proyecto_id = '$protecto->id' and p.dicta_id = '$this->dicta_id' \";\n $resultado = mysql_query($sql);\n\n $proyecto_array = mysql_fetch_array($resultado);\n $proyecto_dicta = new Proyecto_dicta($proyecto_array);\n $proyecto_dicta->delete();\n $evaluacion->delete();\n $this->delete();\n }", "public function delete() {\n $conexion = StorianDB::connectDB();\n $borrado = \"DELETE FROM cuento WHERE id=\\\"\".$this->id.\"\\\"\";\n $conexion->exec($borrado);\n }", "#[IsGranted('ROLE_SEPULTURE_ADMIN')]\n #[Route(path: '/{id}/delete', name: 'materiaux_delete', methods: ['POST'])]\n public function delete(Request $request, $id): RedirectResponse\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->managerRegistry->getManager();\n $entity = $em->getRepository(Materiaux::class)->find($id);\n\n if (null === $entity) {\n throw $this->createNotFoundException('Unable to find Materiaux entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n $this->addFlash('success', 'Le matériaux a bien été supprimé');\n }\n\n return $this->redirectToRoute('materiaux');\n }", "function accepterRecette($_idRecette){\n // Supprimer la recette de la table Moderations\n $connexion = my_connect();\n $requette_recettes = \"DELETE FROM Moderations where Idmoderation = $_idRecette\";\n $table_recettes_resultat = mysqli_query($connexion,$requette_recettes); \n if(!$table_recettes_resultat){ \n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo \"message de mysqli:\".mysqli_error($connexion); \n echo $requette_recettes;\n }\n mysqli_close($connexion);\n}", "static public function mdlEliminarUnidadMedidaInventario( $idUnidadMedidaInventario){\n\n \t\t$stmt = Conexion::conectar()->prepare(\"DELETE FROM inventario_x_unidad_medida_salida WHERE id = :id\");\n\t\t\n \t\t$stmt -> bindParam(\":id\" , $idUnidadMedidaInventario, PDO::PARAM_INT);\n \t\t\n \t\tif( $stmt -> execute()) \n \t\t\treturn \"ok\";\n \t\telse \n \t\t\treturn \"error\";\n\n \t\t$stmt-> close();\n \t\t$stmt= null;\n \t}", "function delete_question($objet) {\n\t\t$sql = \"DELETE FROM \n\t\t\t\t\tquestions\n\t\t\t\tWHERE\n\t\t\t\t\tid = \".$objet['id'];\n\t\t// return $sql;\n\t\t$result = $this -> query($sql);\n\t\t\n\t\treturn $result;\n\t}", "public function delete($id_rekap_nilai);", "public function excluir(){\r\n return (new Database('atividades'))->delete('id = '.$this->id);\r\n }", "function eliminarpermiso()\n {\n $oconexion = new conectar();\n //se establece conexión con la base de datos\n $conexion = $oconexion->conexion();\n //consulta para eliminar el registro\n $sql = \"UPDATE permiso SET eliminado=1 WHERE id_permiso=$this->id_permiso\";\n // $sql=\"DELETE FROM estudiante WHERE id=$this->id\";\n //se ejecuta la consulta\n $result = mysqli_query($conexion, $sql);\n return $result;\n }", "function delete_medidor($id_med)\n {\n return $this->db->delete('medidor',array('id_med'=>$id_med));\n }", "public function deletequaliteAction()\r\n {\r\n if ($this->getRequest()->isPost()) {\r\n $params = $this->getRequest()->getParams();\r\n $qualiteId = $params['qualiteId'];\r\n\r\n\r\n $qualite = new Application_Model_DbTable_FicheQualite();\r\n // delete the qualite\r\n $qualite->deleteQualite($qualiteId);\r\n\r\n // Return to the page informations\r\n $this->_helper->redirector('gestionqualite', 'admin', null);\r\n\r\n }\r\n\r\n }", "function Eliminar()\n{\n /**\n * Se crea una instanica a Concesion\n */\n $Concesion = new Titulo();\n /**\n * Se coloca el Id del acuifero a eliminar por medio del metodo SET\n */\n $Concesion->setId_titulo(filter_input(INPUT_GET, \"ID\"));\n /**\n * Se manda a llamar a la funcion de eliminar.\n */\n echo $Concesion->delete();\n}", "function excluirPessoa(){\r\n $banco = conectarBanco();\r\n $sql = \"DELETE FROM pessoa WHERE id = '{$_POST[\"id\"]}'\";\r\n $banco->query($sql); // Passa a query fornecida em $sql para o banco de dados\r\n $banco->close(); // Fecha o banco de dados\r\n voltarMenu(); // Volta para a pagina inicial da agenda\r\n}", "public function delete($actividades_fuera);", "function runEliminar(){\n \n $sql = \"DELETE FROM mec_met WHERE id_mecanismos IN (SELECT id_mecanismos FROM mecanismos WHERE id_componente=\".$this->_datos.\")\";\n $this->QuerySql($sql);\n $sql = \"DELETE FROM mecanismos WHERE id_componente=\".$this->_datos;\n $this->QuerySql($sql);\n $sql = \"DELETE FROM componentes WHERE id_componentes=\".$this->_datos;\n $_respuesta = array('Codigo' => 0, \"Mensaje\" => '<strong> OK: </strong> El registro se ha eliminado.');\n try { \n $this->QuerySql($sql);\n }\n catch (exception $e) {\n $_respuesta = array('Codigo' => 99, \"Mensaje\" => $e->getMessage());\n }\n \n print_r(json_encode($_respuesta));\n }", "public function delete(){\n //Préparation de la requête\n $sql = \"DELETE FROM atelier WHERE idAtelier = ?\";\n $requete = $this->connectBdd->prepare($sql);\n\n //Execution de la requete\n $requete->execute([$this->getIdAtelier()]);\n\n //Fermeture de la requete\n $requete->closeCursor();// requête delete \n }", "public function eliminar(){\n $dimensiones = $this->descripciones()->distinct()->get()->pluck('id')->all();\n $this->descripciones()->detach($dimensiones);\n DescripcionProducto::destroy($dimensiones);\n $this->categorias()->detach();\n $this->imagenes()->delete();\n $this->delete();\n }", "function eliminar_autonomo()\n\t{\n\t\ttry {\n\t\t\t$this->db->abrir_transaccion();\n\t\t\t$this->db->retrasar_constraints();\n\t\t\t$this->eliminar();\n\t\t\t$this->db->cerrar_transaccion();\n\t\t\t$this->manejador_interface->mensaje(\"El proyecto '{$this->identificador}' ha sido eliminado\");\n\t\t} catch ( toba_error $e ) {\n\t\t\t$this->db->abortar_transaccion();\n\t\t\t$this->manejador_interface->error( \"Ha ocurrido un error durante la eliminacion de TABLAS de la instancia:\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t$e->getMessage() );\n\t\t}\n\t}", "public function deleteArmure()\n {\n $delete = $this->_bdd->prepare(\"DELETE FROM `armure` WHERE `id_armure` = ?\");\n $delete->execute(array($this->_idArmure));\n }", "public function delete($datos_){\n $id=$datos_->getId();\n\n try {\n $sql =\"DELETE FROM `datos_` WHERE `id`='$id'\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "public function destroy(Materi $materi)\n {\n $exist = Storage::disk('materi')->exists($materi->materi);\n if(isset($materi->materi) && $exist){\n $delete = Storage::disk('materi')->delete($materi->materi);\n }\n $materi->delete();\n return redirect('materii')->with('sukses', 'Data Berhasil dihapus');\n }", "function cmdDeleteGeneradorClick($sender, $params)\n {\n global $sContrato;\n $Estimacion=$this->txtEstimacion->Text;\n $this->txtQueOpcion->Text==\"\";\n $sql = \"select sContrato, iNumeroEstimacion from estimaciones\n where\n sContrato='$sContrato'\n and iNumeroEstimacion='$Estimacion'\";\n $result=mysql_query($sql);\n if (!$row=mysql_fetch_array($result))\n {\n $sql = \"delete\n from estimacionperiodo\n where\n sContrato='$sContrato'\n and iNumeroEstimacion='$Estimacion'\";\n mysql_query($sql);\n }\n if(mysql_error())\n {\n ?>\n <script>\n alert(\" <?php echo \" Error al Eliminar los Datos\".mysql_error() ?>\");\n </script>\n <?php\n }\n }", "public function deleted(Remission $remission)\n {\n //\n }", "public function destroy(Matoleo $matoleo)\n {\n //\n }", "public function producto_delete($cod){\r\n $sql = \"DELETE FROM productos WHERE id_producto=:miCod\";\r\n\r\n $resultado=$this->db->prepare($sql);\r\n \r\n $resultado->execute(array(\":miCod\"=>$cod));\r\n }", "function eliminarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_ime';\n\t\t$this->transaccion='GEM_GEMETO_ELI';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_metodologia','id_metodologia','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function eliminar_insumos($objeto){\n\t\t$sql=\"\tDELETE FROM\n\t\t\t\t\t app_producto_material\n\t\t\t\tWHERE\n\t\t\t\t\tid_producto =\".$objeto['id'];\n\t\t// return $sql;\n\t\t$result = $this->query($sql);\n\n\t\treturn $result;\n\t}", "function del($param) {\n extract($param);\n $conexion->getPDO()->exec(\"DELETE FROM operario WHERE fk_usuario = '$id'; \n DELETE FROM usuario WHERE id_usuario='$id'\");\n echo $conexion->getEstado();\n }", "public function postEliminarcfamiliar(){\n $cfamiliar=Cuadrofamiliar::find(Input::get('id'));\n $id=$cfamiliar->user->id;\n CuadroFamiliar::destroy(Input::get('id'));\n return $this->recargarFormularios('users.psico.inicio.vermas.formularios.step-22',$id);\n }", "public function delete_faseetapa($id_p){ \n\n $this->db->where('proy_id', $id_p);\n $this->db->delete('_proyectofaseetapacomponente');\n }", "function Delete_Partido($partido)\n{\n $valor = eliminar(\"DELETE FROM `tb_partidos` WHERE id_partido=$partido\");\n return $valor;\n}", "function delete_unidades_medida($id_unidade_medida)\n {\n return $this->db->delete('unidades_medida',array('id_unidade_medida'=>$id_unidade_medida));\n }", "public function delete(){\r\n\t\t// goi den phuong thuc delete cua tableMask voi id cua man ghi hien hanh\r\n\t\t$mask = $this->mask();\r\n\t\treturn $mask->delete(array($mask->idField=>$this->id));\r\n\t\t// $query = \"DELETE FROM $this->tableName WHERE id='$this->id'\";\r\n\t\t// $conn = self::getConnect()->prepare($query);\r\n\t}", "function eliminar()\n{\n\t$sql=\"delete FROM slc_unid_medida WHERE id_unid_medida ='$this->cod'\";\n\t\t$result=mysql_query($sql,$this->conexion);\n\t\tif ($result) \n\t\t\t return true;\n\t\telse\n\t\t\t return false;\n\t\n}", "function deleteFormation($bdd, $idformation)\n\t{\n\t\ttry\n\t\t{\n\t\t\t//ENVOI DE LA REQUETE A LA BDD\n\t\t\t$req=$bdd->query('DELETE FROM formation WHERE ID_FORMATION='.$idformation);\n\t\t\t$req->closeCursor();\n\t\t\techo \"<div id='principal' class='container_12'>Formation supprimé avec succés.<a href='./accueil.php'>ici</a> pour retourner a l'accueil</div>\";\n\t\t}\n\t\tcatch (Exception $e){die ('Erreur : '.$e->getmessage());}\n\t}", "private function delete(){\n\t\t$id = $this->objAccessCrud->getId();\n\t\tif (empty ( $id )) return;\n\t\t// Check if there are permission to execute delete command.\n\t\t$result = $this->clsAccessPermission->toDelete();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to delete!\");\n\t\t\treturn;\n\t\t}\n\t\tif(!$this->objAccessCrud->delete($id)){\n\t\t\t$this->msg->setError (\"There was an issue to delete, because this register has some relation with another one!\");\n\t\t\treturn;\n\t\t}\n\t\t// Cleaner all class values.\n\t\t$this->objAccessCrud->setAccessCrud(null);\n\t\t// Cleaner session primary key.\n\t\t$_SESSION['PK']['ACCESSCRUD'] = null;\n\n\t\t$this->msg->setSuccess (\"Delete the record with success!\");\n\t\treturn;\n\t}", "function deletePreke($nr) {\n $manoSQL = \"DELETE FROM prekes WHERE id = '$nr' \";\n $result = mysqli_query(getPrisijungimas(), $manoSQL);\n if ($result == false) {\n echo \"KLAIDA, nepavyko istrinti prekes <br />\";\n }\n}", "public function delete(){\n $record = actualite::find($this->selectedId);\n $record->delete();\n\n /* update image file */\n Storage::delete('public/_actualite/'.$this->selectedId.'.png');\n /* $this->photo->storePubliclyAs('public/_actualite/'.$this->selectedId.'.png'); */\n\n session()->flash('message', 'actualite modifié avec succès');\n $this->emit('Deleted');\n $this->dispatchBrowserEvent('Deleted');\n $this->resetFields();\n }", "public function delete($id_soal_siswa);", "function removePacote($campos){\n\t\t\t$listDel = $campos['InputDelPacote'];\t\t\t\n\t\t\t\t\n\t\t\t\tif(!empty($listDel)){\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<sizeof($listDel);$i++){\n\t\t\t\t\t\tif($listDel[$i] != 0){\n\t\t\t\t\t\t\t\t$sql = \" DELETE FROM vekttor_venda_pacote WHERE pacotes_id = '$listDel[$i]' AND vekttor_venda_id = '$campos[venda_id]'\";\n\t\t\t\t\t\t\t\t//echo $sql;\n\t\t\t\t\t\t\t\tmysql_query($sql);\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t/*Seleciona os pacote para trazer os modulos */\n\t\t\t\t\t$sqlPacote = mysql_query($tn=\" SELECT * FROM pacote_item WHERE pacote_id = '$listDel[$i]' \");\n\t\t\t\t\t\twhile($pct=mysql_fetch_object($sqlPacote)){\n\t\t\t\t\t\t\t\t$modulos[] = $pct->sis_modulo_id;\n\t\t\t\t\t\t}\n\t\t\t\t} /*Fim de For*/\n\t\t\t\t\n\t\t\t\t\tfor($j=0;$j<sizeof($modulos);$j++){\n\t\t\t\t\t\t\t$sqlModulos = \" DELETE FROM usuario_tipo_modulo WHERE modulo_id = '$modulos[$j]' AND usuario_tipo_id = '$campos[id_usuario_tipo]'\";\n\t\t\t\t\t\t\tmysql_query($sqlModulos);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n}", "public function deleteMatiere($donnees){\n $req = \"update matiere set supprimer=1 where id=:idMatiere\";\n $params = array(\n \"idMatiere\"=>$donnees['idMatiere']\n );\n return $this->update($req,$params);\n }", "public function elimiproduc($cod){\n\n $resul=$this->conex->query('DELETE FROM articulos WHERE CODIGO =\"' .$cod .'\"');\n\n return $resul;\n }", "public function eliminarRequisitosItems($atr){\n try {\n $respuesta = $this->dbl->delete(\"mos_requisitos_item\", \"id_requisitos = $atr[id]\");\n return \"ha sido eliminada la asociacion con exito\";\n } catch(Exception $e) {\n $error = $e->getMessage(); \n if (preg_match(\"/mos_requisitos_item_fk_id_matriz_fkey/\",$error ) == true) \n return \"No se puede eliminar la asociacion de requisitos con item.\"; \n return $error; \n }\n }", "public function actionDelete()\n {\n\n $id_usuario_actual=\\Yii::$app->user->id;\n $buscaConcursante = Concursante::find()->where(['id' => $id_usuario_actual])->one();\n\n $request = Yii::$app->request;\n $id_tabla_presupuesto=$request->get('id_tabla_presupuesto');\n $id_postulacion = $request->get('id_postulacion');\n\n $buscaPostulacion = Postulacion::find()->where(['and',['id_postulacion' => $id_postulacion],['id_concursante' => $buscaConcursante->id_concursante]])->one();\n $buscaTablaPresupuesto = Tablapresupuesto::find()->where(['id_tabla_presupuesto' => $id_tabla_presupuesto])->one();\n if($buscaPostulacion != null && $buscaTablaPresupuesto != null){ \n\n $this->findModel($id_tabla_presupuesto)->delete();\n\n return $this->redirect(['/site/section4', 'id_postulacion' => $id_postulacion]);\n\n }else{\n throw new NotFoundHttpException('La página solicitada no existe.');\n }\n\n }", "public function delete($cotizacion);", "public function destroymagzinearticle() {\n $rightId = 77;\n $currentChannelId = $this->rightObj->getCurrnetChannelId($rightId);\n if (!$this->rightObj->checkRights($currentChannelId, $rightId))\n return 'You are not authorized to access.';\n /* Right mgmt end */\n\n\n if (isset($_GET['option'])) {\n $id = $_GET['option'];\n }\n $delArr = explode(',', $id);\n\n foreach ($delArr as $d) {\n $valid = '0';\n \n $deleteAl = [\n 'm_f'=> 0,\n 'm_lw'=> 0,\n 'm_eicn'=>0,\n 'status' => $valid,\n 'updated_at' => date('Y-m-d H:i:s')\n ];\n DB::table('magazine_list')\n ->where('a_id', $d)\n ->update($deleteAl);\n \n \n\n }\n return 'success';\n }", "public function deleteEntidad(){\n $conexion = new Database();\n\t\tif ($this->codigo){\n $sql = sprintf('DELETE FROM agenda_entidades WHERE entidad_id = %d',\n $this->codigo);\n $conexion->exec( $sql );\n }\n }", "function SupprimerProfil($pseudonyme){\r\n\t\t$conn = mysqli_connect(\"localhost\", \"root\", \"\", \"bddfinale\");\r\n\t\t$requete = \"DELETE FROM allinformations WHERE Pseudo='$pseudonyme'\";\r\n\t\t$ligne= mysqli_query($conn, $requete);\t\r\n\t\tmysqli_close($conn);\t\t\r\n\t\t}", "public function excluir(){\r\n return (new Database('cartao'))->delete('id = '.$this->id);\r\n }", "public function delete($producto);", "function refuserRecette($_idRecette){\n // Supprimer la recette de la table Moderations\n $connexion = my_connect();\n $requette_recettes = \"DELETE FROM Moderations where Idmoderation = $_idRecette\";\n $table_recettes_resultat = mysqli_query($connexion,$requette_recettes); \n if(!$table_recettes_resultat){ \n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo \"message de mysqli:\".mysqli_error($connexion); \n echo $requette_recettes;\n }\n // Supression de la recette de la table recette\n supprimerRecette($_idRecette);\n mysqli_close($connexion);\n}", "public function delete($id_indicador) {\n $this->db->flush_cache();\n $this->db->reset_query();\n $this->db->where('id_indicador',$id_indicador);\n return $this->db->delete('dec.h_indicadores');\n\n }", "function delete() {\n\t\t$sql = \"DELETE FROM cost_detail\n\t\t\t\tWHERE cd_fr_id=?, cd_seq=?\";\n\t\t$this->ffm->query($sql, array($this->cd_fr_id, $this->cd_seq));\n\t}", "public function clean(){\n\t\t$sql = 'DELETE FROM conta_a_pagar';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "public function eliminaReserva($cod) {\n // 1ro actualizamos la existencia de los productos adicionando lo que no se ha vendido\n $modelocantidad = $this->db->query(\"SELECT p.modelo,(d.cantidad+p.existencia) as existencia FROM producto p,detalle_venta d WHERE p.modelo LIKE d.modelo AND d.cod_venta LIKE '\" . $cod . \"';\")->result_array(); //obtenemos los datos del detalle\n if (sizeof($modelocantidad) > 0) {\n //actualizamos la existencia en producto\n $this->db->update_batch('producto', $modelocantidad, 'modelo');\n if ($this->db->affected_rows() > 0) {\n //3ro eliminamos el detalle de venta de la venta\n $this->db->query(\"delete from detalle_venta where cod_venta like '\" . $cod . \"'\");\n if ($this->db->affected_rows() > 0) {\n //eliminamos los datos de la venta\n $this->db->query(\"delete from venta where cod_venta like '\" . $cod . \"'\");\n if ($this->db->affected_rows() > 0) {\n return \"Exito! Se ha eliminado la reserva de\"; //el nombre se muestra en jquery\n } else {\n return \"Error: No se ha eliminado la reserva de\";\n }\n } else {\n return \"Error: No se ha eliminado el Detalle de la venta de\";\n }\n } else {\n return \"Error: No se ha actualizado la existencia de productos\";\n }\n } else {\n return \"No se tiene registro del detalle de la venta de\";\n }\n }", "public function Excluir(){\n $idMotorista = $_GET['id'];\n\n $motorista = new Motorista();\n\n $motorista->id = $idMotorista;\n\n $motorista::Delete($motorista);\n\n\n }", "public function EliminarDetallesCompras()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\tself::SetNames();\n\t\t$sql = \" select * from detallecompras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 1)\n\t\t{\n\n\t\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t$sql4 = \"select * from compras where codcompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql4);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$paea[] = $row;\n\t\t\t}\n\t\t$subtotalivasic = $paea[0][\"subtotalivasic\"];\n\t\t$subtotalivanoc = $paea[0][\"subtotalivanoc\"];\n\t\t$iva = $paea[0][\"ivac\"]/100;\n\t\t$descuento = $paea[0][\"descuentoc\"]/100;\n\t\t$totalivac = $paea[0][\"totalivac\"];\n\t\t$totaldescuentoc = $paea[0][\"totaldescuentoc\"];\n\n\t$sql3 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'SI'\";\n $stmt = $this->dbh->prepare($sql3);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($rowp = $stmt->fetch())\n {\n $p[] = $rowp;\n }\n $importeivasi = ($rowp[\"importe\"]== \"\" ? \"0\" : $rowp[\"importe\"]);\n\n$sql5 = \"select sum(importecompra) as importe from detallecompras where codcompra = ? and ivaproductoc = 'NO'\";\n $stmt = $this->dbh->prepare($sql5);\n $stmt->execute( array(base64_decode($_GET[\"codcompra\"])));\n $num = $stmt->rowCount();\n \n if($roww = $stmt->fetch())\n {\n $pw[] = $roww;\n }\n $importeivano = ($roww[\"importe\"]== \"\" ? \"0\" : $roww[\"importe\"]);\n\n if(base64_decode($_GET[\"ivaproductoc\"])==\"SI\"){\t\n\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivasic = ?, \"\n\t\t\t .\" totalivac = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaliva);\n\t\t$stmt->bindParam(3, $totaldescuentoc);\n\t\t$stmt->bindParam(4, $total);\n\t\t$stmt->bindParam(5, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivasi);\n $totaliva= rount($subtotal*$iva,2);\n\t\t$tot= rount($subtotal+$subtotalivanoc+$totaliva,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\n\t\t\n\t\t } else {\n\t\t\n\t\t$sql = \" update compras set \"\n\t\t\t .\" subtotalivanoc = ?, \"\n\t\t\t .\" totaldescuentoc = ?, \"\n\t\t\t .\" totalc= ? \"\n\t\t\t .\" where \"\n\t\t\t .\" codcompra = ?;\n\t\t\t \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $subtotal);\n\t\t$stmt->bindParam(2, $totaldescuentoc);\n\t\t$stmt->bindParam(3, $total);\n\t\t$stmt->bindParam(4, $codcompra);\n\t\t\n\t\t$subtotal= strip_tags($importeivano);\n\t\t$tot= rount($subtotal+$subtotalivasic+$totalivac,2);\n\t\t$totaldescuentoc= rount($tot*$descuento,2);\n\t\t$total= rount($tot-$totaldescuentoc,2);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$stmt->execute();\t\t\n\t\t }\t\t\t\t\t\n\n\t\theader(\"Location: detallescompras?mesage=2\");\n\t\texit;\n\n\t\t}\n\t\telse\n\t\t{\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN INGREDINTE ###################\n\tif($_POST['tipoentrada']==\"INGREDIENTE\"){\n\n\t\t$sql2 = \"select cantingrediente from ingredientes where cantingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"cantingrediente\"];\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql = \" update ingredientes set \"\n\t\t.\" cantingrediente = ? \"\n\t\t.\" where \"\n\t\t.\" codingrediente = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexingredientes where codprocesoing = ? and codingrediente = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n################ VERIFICAMOS SI EL TIPO DE ENTRADA ES UN PRODUCTO ###################\n\t\t\t} else {\n\n###################### ACTUALIZAMOS LOS DATOS DEL PRODUCTO EN ALMACEN ############################\n\t\t$sql2 = \"select existencia from productos where codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql2);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])));\n\t\t$num = $stmt->rowCount();\n\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$p[] = $row;\n\t\t}\n\t\t$existenciadb = $p[0][\"existencia\"];\n\n\t\t$sql = \" update productos set \"\n\t\t.\" existencia = ? \"\n\t\t.\" where \"\n\t\t.\" codproducto = ?;\n\t\t\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1, $existencia);\n\t\t$stmt->bindParam(2, $codproducto);\n\t\t$cantcompra = strip_tags(base64_decode($_GET[\"cantcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$existencia = $existenciadb - $cantcompra;\n\t\t$stmt->execute();\n\n###################### REALIZAMOS LA ELIMINACION DEL PRODUCTO EN KARDEX ############################\n\t\t$sql = \" delete from kardexproductos where codproceso = ? and codproducto = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$stmt->bindParam(2,$codproducto);\n\t\t$codcompra = strip_tags(base64_decode($_GET[\"codcompra\"]));\n\t\t$codproducto = strip_tags(base64_decode($_GET[\"codproducto\"]));\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from compras where codcompra = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codcompra);\n\t\t$codcompra = base64_decode($_GET[\"codcompra\"]);\n\t\t$stmt->execute();\n\n\t\t$sql = \" delete from detallecompras where coddetallecompra = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$coddetallecompra);\n\t\t$coddetallecompra = base64_decode($_GET[\"coddetallecompra\"]);\n\t\t$stmt->execute();\n\n\t\t\t}\n\n\t\t\theader(\"Location: detallescompras?mesage=2\");\n\t\t\texit;\n\t\t}\n\t}\n\telse\n\t{\n\t\theader(\"Location: detallescompras?mesage=3\");\n\t\texit;\n\t}\n}", "public function clean(){\n\t\t$sql = 'DELETE FROM compra_coletiva';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "function eliminarImagenSusQ($campo, $tabla, $idAsignacion)\n {\n $data=$this->analisisRiesgo->getNombreImagen($campo, $tabla, $idAsignacion);\n //Delete el nombre de la imagen de la base de datos\n $borrar=Array($campo => null);\n $this->analisisRiesgo->deleteImagen($borrar, $tabla, $idAsignacion);\n //Unlink el nombre de la imagen del servidor\n foreach($data as $row)\n {\n $nombreImagen=$row[$campo];\n unlink(\"assets/img/fotoAnalisisRiesgo/fotoSustanciasQuimicas/$nombreImagen\");\n echo \"OK\";\n }\n\n }", "function _DELETE(){\r\n \t$sql = \"SELECT * from NOTICIA where idNoticia = '\".$this->idNoticia.\"'\";\r\n\t$result = $this->mysqli->query($sql);\r\n\tif ($result->num_rows == 0){\r\n\t\treturn 'El NOTICIA no existe, no se puede borrar.';\r\n\t}\r\n\telse{\r\n\t\t$sqlBorrar = \"DELETE FROM NOTICIA WHERE idNoticia = '\".$this->idNoticia.\"'\";\r\n\t\tif(!$this->mysqli->query($sqlBorrar)){\r\n\t\t\treturn 'Error en el borrado.';\r\n\t\t}\r\n\t\telse{ \r\n\t\t\treturn 'Borrado realizado con exito.';\r\n\t\t\t}\r\n\t}\r\n}", "public function eliminarPreDetalle(){\n $sql='DELETE FROM predetalle WHERE idCliente = ?';\n $params=array($this->idCliente);\n return Database::executeRow($sql, $params);\n }", "public function excluirdisciplina() {\n\t\t//Recupera id do aluno\n\t\tif(!$this->uri->segment(\"3\"))\n\t\t\tredirect('/administracao/painel');\n\t\telse \n\t\t\t$intID =$this->uri->segment(\"3\");\n\n\t\t/* Carrega o modelo */\n\t\t$this->load->model('disciplinas_model');\n\n\t\t/* Chama a função excluir do modelo */\n\t\tif ($this->disciplinas_model->delete($intID)) {\n\t\t\tlog_message('success', 'Disciplina excluido com sucesso!');\n\t\t\tredirect('/administracao/listadisciplinas');\n\t\t} else {\n\t\t\tlog_message('error', 'Erro ao excluir a disciplina!');\n\t\t}\n\t}", "public function remover() {\n \n $queryVerificaInscricao = '\n select * from tb_inscricao_atividade where id_atividade = :id_atividade \n ';\n \n $stmtInscAtt = $this->conexao->prepare($queryVerificaInscricao);\n $stmtInscAtt->bindValue(':id_atividade', $_GET['id_att']);\n $stmtInscAtt->execute();\n \n $inscAtt = $stmtInscAtt->fetchAll(PDO::FETCH_OBJ);\n \n // echo '<pre>';\n // print_r($inscAtt);\n // echo '</pre>';\n \n if (!empty($inscAtt)) {\n foreach ($inscAtt as $inscAttInd) {\n $queryDeleteInscAtt = 'delete from tb_inscricao_atividade where \n id_atividade = :id_atividadeDel and \n id_evento = :id_eventoDel and \n id_usuario = :id_usuarioDel';\n \n $stmtInscAttDel = $this->conexao->prepare($queryDeleteInscAtt);\n $stmtInscAttDel->bindValue(':id_atividadeDel', $inscAttInd->id_atividade);\n $stmtInscAttDel->bindValue(':id_eventoDel', $inscAttInd->id_evento);\n $stmtInscAttDel->bindValue(':id_usuarioDel', $inscAttInd->id_usuario);\n $stmtInscAttDel->execute();\n }\n }\n\n $queryInscCupomAtt = '\n select * from tb_cupom where id_atividade = :id_atividadeCupDel\n ';\n\n $stmtInscCupomAtt = $this->conexao->prepare($queryInscCupomAtt);\n $stmtInscCupomAtt->bindValue(':id_atividadeCupDel', $_GET['id_att']);\n $stmtInscCupomAtt->execute();\n\n $cupomAtt = $stmtInscCupomAtt->fetchAll(PDO::FETCH_OBJ);\n\n // echo '<pre>';\n // print_r($cupomAtt);\n // echo '</pre>';\n\n if (!empty($cupomAtt)) {\n foreach ($cupomAtt as $cupomAttInd) {\n $queryDeleteCupomAtt = '\n delete from tb_cupom where id = :id_cupomDel\n ';\n\n echo $cupomAttInd->id;\n\n $stmtInscCupomAttDel = $this->conexao->prepare($queryDeleteCupomAtt);\n $stmtInscCupomAttDel->bindValue(':id_cupomDel', $cupomAttInd->id);\n $stmtInscCupomAttDel->execute();\n }\n }\n \n $query = '\n delete from tb_atividade \n where id = :id';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id_att']);\n\n return $stmt->execute();\n }", "public function clean(){\n\t\t$sql = 'DELETE FROM negociacao_contas';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "function elimina_record($id){\n\n $mysqli = connetti();\n\n $sql = \"DELETE FROM spesa WHERE id =\" . $id;\n\n //var_dump($sql); die();\n\n $mysqli->query($sql);\n chiudi_connessione($mysqli);\n}", "function procesar_delete ($datos){\n \n $this->dep('datos')->tabla('asignacion')->cargar(array('id_asignacion'=>$this->s__id_asignacion));\n $asignacion=$this->dep('datos')->tabla('asignacion')->get();\n $this->dep('datos')->tabla('asignacion')->eliminar_fila($asignacion['x_dbr_clave']);\n $this->dep('datos')->tabla('asignacion')->sincronizar();\n }", "public function delete()\r\n {\r\n $db = Database::getDatabase();\r\n $db->consulta(\"DELETE FROM puesto WHERE idPue = {$this->idPue};\");\r\n }", "public function delete($objet);", "function deleteProyecto($proyecto){\n //no implementado por no requerimiento del proyecto\n }", "public function destroy($id)\n {\n $exploitation = new Exploitation();\n $exp = $exploitation->where('id',$id)->first();\n $materiel = $exp->materiel()->first();\n\n //pour la vue\n if (is_null($materiel->numImmat)) // pour mettre le num du matos\n $select_mat = $materiel->codeProduit;\n else\n $select_mat = $materiel->numImmat;\n $idMat = $materiel->id;\n\n $exp->delete();\n $listExp = $materiel->exploitations()->get();//liste des exp\n\n //phase de maj de la val km ou horo du matériel concerné ** a réécrire sous forme de méthode\n $maxReleve = $listExp->max('releve_tableau');\n\n if ($materiel->idgrpe == 1 ){\n $materiel->kilometrage = $maxReleve;\n }elseif($materiel->idgrpe == 2 )\n $materiel->horometre = $maxReleve;\n $materiel->update();//maj du km ou horo du matos **\n\n Flashy::success('Suppression réalisée avec succès !!!');\n return redirect()->\n route('Exploitations.indexMat',[\n 'listExp' => $listExp,\n 'select_mat' => $select_mat,\n 'idMat' => $idMat,\n 'materiel' => $materiel\n ]);\n }", "function DELETE(){\n $sql = \"DELETE FROM RESERVA WHERE (ID = '$this->id')\";\n if(!$resultado = $this->mysqli->query($sql) ){\n return 'ERROR: Fallo en la consulta sobre la base de datos';\n }else{\n return 'Borrado correctamente';\n }\n }", "public function delete(){\n return (new Database('cliente'))->delete('id = '.$this->id);\n }", "function supprimerFavoris($_idRecette){\n // recherche de tout les référencement favoris\n $connexion= my_connect();\n $requette_favoris=\"DELETE FROM Favoris where Idrecette = $_idRecette\";\n $table_favoris_resultat = mysqli_query($connexion,$requette_favoris); \n if(!$table_favoris_resultat){ \n echo \"<p>Erreur dans l'exécution de la requette</p>\";\n echo \"message de mysqli:\".mysqli_error($connexion).\"<br>\";\n echo $requette_favoris;\n }\n mysqli_close($connexion);\n }" ]
[ "0.79497266", "0.7891689", "0.6674915", "0.662337", "0.660278", "0.6595085", "0.65855104", "0.65684426", "0.6567179", "0.6505929", "0.6486011", "0.64351887", "0.6427628", "0.6361658", "0.63563305", "0.63341814", "0.6287984", "0.6270539", "0.62647367", "0.62555665", "0.6245771", "0.62455094", "0.62342536", "0.6222815", "0.6218636", "0.62149984", "0.62149626", "0.62030095", "0.62027156", "0.62026644", "0.62006915", "0.6197774", "0.61965626", "0.619081", "0.6174308", "0.61616814", "0.6157223", "0.6147486", "0.6139562", "0.6134054", "0.6133873", "0.61296856", "0.6128889", "0.6128507", "0.61256367", "0.612351", "0.61190283", "0.61141557", "0.610986", "0.6104156", "0.6102723", "0.6100101", "0.6089424", "0.60890317", "0.608883", "0.6086439", "0.60841304", "0.607997", "0.6077578", "0.6063794", "0.6059911", "0.6057044", "0.605582", "0.6054997", "0.6054826", "0.60518056", "0.603992", "0.6039673", "0.6029122", "0.6018839", "0.60165125", "0.60081065", "0.6007938", "0.6007225", "0.60048366", "0.60014534", "0.5994075", "0.5992736", "0.5990546", "0.5990177", "0.598842", "0.5982037", "0.5975964", "0.59714514", "0.5969606", "0.596826", "0.5966274", "0.5965758", "0.5964289", "0.59621096", "0.5961866", "0.5961755", "0.5961316", "0.59610796", "0.595917", "0.5957687", "0.5956966", "0.5956939", "0.595251", "0.59506905" ]
0.84023994
0
Create a new notification instance.
public function __construct(User $user) { $this->user = $user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function create($notification){\n }", "public static function createNotification($type, $eventid){\n\t\t$notification = new Notification; \n\t\t$notification->type = $type;\n\t\t$notification->eventid = $eventid;\n\t\t$notification->time = date('Y-m-d H:i:s');\n\t\t$notification->save();\n\t\treturn $notification;\n\t}", "public function create($payload)\n {\n return $this->notification->create($payload);\n }", "public static function create( array $info ) {\n\t\t$obj = new Notification();\n\t\tstatic $validFields = [ 'event', 'user' ];\n\n\t\tforeach ( $validFields as $field ) {\n\t\t\tif ( isset( $info[$field] ) ) {\n\t\t\t\t$obj->$field = $info[$field];\n\t\t\t} else {\n\t\t\t\tthrow new InvalidArgumentException( \"Field $field is required\" );\n\t\t\t}\n\t\t}\n\n\t\tif ( !$obj->user instanceof User ) {\n\t\t\tthrow new InvalidArgumentException( 'Invalid user parameter, expected: User object' );\n\t\t}\n\n\t\tif ( !$obj->event instanceof Event ) {\n\t\t\tthrow new InvalidArgumentException( 'Invalid event parameter, expected: Event object' );\n\t\t}\n\n\t\t// Notification timestamp should be the same as event timestamp\n\t\t$obj->timestamp = $obj->event->getTimestamp();\n\t\t// Safe fallback\n\t\tif ( !$obj->timestamp ) {\n\t\t\t$obj->timestamp = wfTimestampNow();\n\t\t}\n\n\t\t// @Todo - Database insert logic should not be inside the model\n\t\t$obj->insert();\n\n\t\treturn $obj;\n\t}", "private function createNotification($id, $request)\n {\n $count = Notification::max('count');\n\n $notification = Notification::create([\n 'model_id' => $id,\n 'count' => intval($count) + 1,\n 'type' => $request->get('ntype'),\n 'subject' => $request->get('subject'),\n 'message' => $request->get('message'),\n 'sent_at' => Carbon::now(),\n ]);\n }", "public function maybe_create_notification() {\n\t\tif ( ! $this->should_show_notification() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! $this->notification_center->get_notification_by_id( self::NOTIFICATION_ID ) ) {\n\t\t\t$notification = $this->notification();\n\t\t\t$this->notification_helper->restore_notification( $notification );\n\t\t\t$this->notification_center->add_notification( $notification );\n\t\t}\n\t}", "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }", "protected function createNotificationInstance($data)\n {\n if ($data === false) {\n return null;\n }\n\n /** @var Notification $model */\n $model = Instance::ensure($this->dataClass, Notification::class);\n\n if (!empty($data['id'])) {\n $model->setId($data['id']);\n }\n\n $model->setType($data['type']);\n $model->setData(is_string($data['data']) ? Json::decode($data['data']) : $data['data']);\n $model->setUserId($data['user_id']);\n $model->setTimestamp($data['created_at']);\n $model->setRead((bool)$data['is_read']);\n $model->setOwner($this->owner);\n\n return $model;\n }", "public function create()\n\t{\n\t\tlog::info('inside create method of user-notifications controller');\n\t}", "public function created(Notification $notification)\n {\n $this->sendBroadcast($notification);\n }", "public function newNotification($event)\n {\n return new ExampleNotification($event);\n }", "public function create()\n {\n $this->authorize('create', Notification::class);\n\n return view('rb28dett_notifications::create');\n }", "public function actionCreate()\n {\n $model = new Notification();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->notification_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "private function createMessageObject(string $type, string $message): Notification\n {\n $msg = new Notification();\n\n $msg->setType($type);\n $msg->setMessage($message);\n\n $this->handler->add($msg);\n\n return $msg;\n }", "public function create() {\n return View::make('notifications.create');\n }", "protected function create_notification_email_object()\n\t{\n\t\t$category = $this->category();\n\n\t\t$email = new Charcoal_Email;\n\t\t$email->to = $this->get_notified_email_address();\n\t\t$email->reply_to = $this->get_lead_email_address();\n\n\t\tif ( $category ) {\n\t\t\t$email->subject = $category->p('confirmation_email_subject')->text();\n\t\t\t$email->from = $category->p('confirmation_email_from')->text();\n\t\t\t$email->cc = $category->v('confirmation_email_cc');\n\t\t\t$email->bcc = $category->v('confirmation_email_bcc');\n\t\t}\n\n\t\treturn $email;\n\t}", "public function create()\n {\n return view ('notifications.create');\n }", "protected function emitNotificationCreated(Notification $notification) {}", "public function __construct($new_postNotification)\n {\n //\n $this->postNotification = $new_postNotification;\n\n }", "public static function createFromArray($fields) \n\t{\n\t\t$notification = new Notification();\n\t\tself::populate($notification,$fields);\n\t\treturn $notification;\n\t}", "public function create()\n {\n return view('admin.notifications.create');\n }", "public function create()\n {\n return view('admin.notifications.create');\n }", "function notify($user_id, $message)\n{\n return (new Notification([\n 'user_id' => $user_id,\n 'message' => $message\n ]))->save();\n}", "public function actionCreate() {\n\t\t$model = new Notification();\n\t\t$model->created_by = Yii::$app->user->identity->id;\n\n\t\tif ($model->load(Yii::$app->request->post())) {\n\n\t\t\tif ($model->send_to != '') {\n\t\t\t\t$model->send_to = implode(',', $model['send_to']);\n\t\t\t}\n\t\t\t$model->sent_time = date('Y-m-d H:i:s');\n\t\t\t$model->save();\n\t\t\t/*if ($model->save()) {\n\t\t\t\t$send_to = explode(',', $model['send_to']);\n\t\t\t\tforeach ($send_to as $key => $value) {\n\t\t\t\t\tif ($value == 'all') {\n\t\t\t\t\t\t$userId = 'allUser';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$user = User::find()->where(['id' => $value])->one();\n\t\t\t\t\t\t$userId = $user['phone'];\n\t\t\t\t\t}\n\t\t\t\t\tYii::$app->Utility->pushNotification($userId, $model['notification_name'], $model['content']);\n\t\t\t\t}\n\t\t\t}*/\n\t\t\tYii::$app->getSession()->setFlash('successStatus', 'Data saved successfully!');\n\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t}\n\n\t\treturn $this->render('create', [\n\t\t\t'model' => $model,\n\t\t]);\n\t}", "public function notification(Notification $notification, array $parameters = []);", "public function create()\n {\n return view('notifications.create');\n }", "public function __construct($notification)\n {\n parent::__construct($notification);\n }", "public function notification();", "public function notification();", "public function notificationsAction()\n {\n $callback = function ($msg) {\n //check the db before running anything\n if (!$this->isDbConnected('db')) {\n return ;\n }\n\n if ($this->di->has('dblocal')) {\n if (!$this->isDbConnected('dblocal')) {\n return ;\n }\n }\n\n //we get the data from our event trigger and unserialize\n $notification = unserialize($msg->body);\n\n //overwrite the user who is running this process\n if ($notification['from'] instanceof Users) {\n $this->di->setShared('userData', $notification['from']);\n }\n\n if (!$notification['to'] instanceof Users) {\n echo 'Attribute TO has to be a User' . PHP_EOL;\n return;\n }\n\n if (!class_exists($notification['notification'])) {\n echo 'Attribute notification has to be a Notificatoin' . PHP_EOL;\n return;\n }\n $notificationClass = $notification['notification'];\n\n if (!$notification['entity'] instanceof Model) {\n echo 'Attribute entity has to be a Model' . PHP_EOL;\n return;\n }\n\n $user = $notification['to'];\n\n //instance notification and pass the entity\n $notification = new $notification['notification']($notification['entity']);\n //disable the queue so we process it now\n $notification->disableQueue();\n\n //run notify for the specifiy user\n $user->notify($notification);\n\n $this->log->info(\n \"Notification ({$notificationClass}) sent to {$user->email} - Process ID \" . $msg->delivery_info['consumer_tag']\n );\n };\n\n Queue::process(QUEUE::NOTIFICATIONS, $callback);\n }", "public function create()\n {\n return view('Admin.Notification_Management.notifications');\n }", "public static function fake()\n {\n static::swap($fake = new NotificationFake);\n\n return $fake;\n }", "public function new_notification_is_created ($notification) {\n $user = $this->get_session_user();\n $eventdata = new \\core\\message\\message();\n $eventdata->courseid = 1;\n $eventdata->name = 'fake_notification';\n $eventdata->component = 'block_culactivity_stream';\n $eventdata->userfrom = $user;\n $eventdata->subject = $notification;\n $eventdata->fullmessage = $notification;\n $eventdata->fullmessageformat = FORMAT_PLAIN;\n $eventdata->fullmessagehtml = $notification;\n $eventdata->smallmessage = $notification;\n $eventdata->notification = 1;\n $eventdata->userto = $user;\n $messageid = message_send($eventdata);\n\n if (!$messageid) {\n throw new Exception(get_string('messageerror', 'block_culactivity_stream'));\n }\n }", "public function push($notification, $notifiable);", "public function __construct() {\r\n $this->setEntity('mst_notification');\r\n }", "public function create($type, $data, $userId)\n {\n $data = [\n 'type' => $type,\n 'data' => Json::encode($data),\n 'user_id' => $userId,\n 'created_at' => time(),\n 'is_read' => 0\n ];\n\n $notification = $this->createNotificationInstance($data);\n $this->saveNotification($notification);\n return $notification;\n }", "public function Create()\n {\n parent::Create();\n\n //Properties\n $this->RegisterPropertyInteger('InputTriggerID', 0);\n $this->RegisterPropertyString('NotificationLevels', '[]');\n $this->RegisterPropertyBoolean('TriggerOnChangeOnly', false);\n $this->RegisterPropertyBoolean('AdvancedResponse', false);\n $this->RegisterPropertyString('AdvancedResponseActions', '[]');\n\n //Profiles\n if (!IPS_VariableProfileExists('BN.Actions')) {\n IPS_CreateVariableProfile('BN.Actions', 1);\n IPS_SetVariableProfileIcon('BN.Actions', 'Information');\n IPS_SetVariableProfileValues('BN.Actions', 0, 0, 0);\n }\n\n //Variables\n $this->RegisterVariableInteger('NotificationLevel', $this->Translate('Notification Level'), '');\n $this->RegisterVariableBoolean('Active', $this->Translate('Notifications active'), '~Switch');\n $this->RegisterVariableInteger('ResponseAction', $this->Translate('Response Action'), 'BN.Actions');\n\n //Actions\n $this->EnableAction('ResponseAction');\n\n //Timer\n $this->RegisterTimer('IncreaseTimer', 0, 'BN_IncreaseLevel($_IPS[\\'TARGET\\']);');\n\n $this->EnableAction('Active');\n }", "public function register_notifications();", "public function create()\n {\n $notification = DB::table('notifications')\n ->get(); \n return view ('admin/assignBadgeToUser')->with('notification', $notification);\n }", "public function __construct(protected NotificationRepository $notificationRepository)\n {\n }", "protected function createNotification($responseData)\n {\n $socketMock = $this->getMock(\n 'RequestStream\\\\Stream\\\\Socket\\\\SocketClient',\n array('create', 'write', 'read', 'selectRead', 'setBlocking', 'is', 'close')\n );\n\n $socketMock->expects($this->once())\n ->method('selectRead')\n ->will($this->returnValue(true));\n\n $socketMock->expects($this->once())\n ->method('read')\n ->with(6)\n ->will($this->returnValue($responseData));\n\n $notification = new Notification;\n $payload = new PayloadFactory;\n $connection = new Connection(__FILE__);\n\n $notification->setConnection($connection);\n $notification->setPayloadFactory($payload);\n\n $ref = new \\ReflectionProperty($connection, 'socketConnection');\n $ref->setAccessible(true);\n $ref->setValue($connection, $socketMock);\n\n return $notification;\n }", "protected function notification() {\n\t\t$reason = $this->indexing_helper->get_reason();\n\n\t\t$presenter = $this->get_presenter( $reason );\n\n\t\treturn new Yoast_Notification(\n\t\t\t$presenter,\n\t\t\t[\n\t\t\t\t'type' => Yoast_Notification::WARNING,\n\t\t\t\t'id' => self::NOTIFICATION_ID,\n\t\t\t\t'capabilities' => 'wpseo_manage_options',\n\t\t\t\t'priority' => 0.8,\n\t\t\t]\n\t\t);\n\t}", "function custom_node_create_notification($uid, $title, $message) {\n $creator_uid = 1; // Admin user.\n $node = custom_new_node_create($creator_uid, 'notification', $title, 1);\n \n $node->set('field_user', $uid);\n $node->set('body', $message);\n $node->save();\n \n if (!$node->id()) {\n \\Drupal::logger('custom')->error(t('Notification FAILED to store.'));\n }\n \n return $node;\n}", "public function store(Request $request)\n {\n return Notification::create($request->input());\n }", "public static function createFromDiscriminatorValue(ParseNode $parseNode): TrainingReminderNotification {\n return new TrainingReminderNotification();\n }", "public function __construct(NotificationTrigger $notification_trigger)\n {\n $this->notification_trigger = $notification_trigger;\n }", "public function setResource($notification)\n {\n return new NotificationResource($notification);\n }", "public function __construct($notification_id)\n {\n $this->notification_id = $notification_id;\n }", "public function create()\n {\n return view('Notifications/create');\n }", "public function getNotification(MessageInstanceInterface $message)\n {\n return new DefaultNotification($message, $this->formatterRegistry->get($message->getType()));\n }", "public function sendPostCreateNewNotifications(ApiTester $I)\n {\n $data = [\n 'entityClass' => 'user',\n 'entityId' => 1,\n 'category' => 'info',\n 'message' => fake::create()->text(20),\n 'userId' => 1\n ];\n $I->saveNotifications([\n $data['entityClass'], ' ',\n $data['entityId'], ' ',\n $data['category'], ' ',\n $data['message'], ' ',\n $data['userId'], ' '\n ], 'notifications.txt');\n $I->sendPOST($this->route, $data);\n $this->userID = $I->grabDataFromResponseByJsonPath('$.id');\n $I->seeResponseCodeIs(201);\n }", "public static function createFromArray($fields) \n\t{\n\t\t$notificationType = new NotificationType();\n\t\tself::populate($notificationType,$fields);\n\t\treturn $notificationType;\n\t}", "public function create()\n\t{\n\t\t$searchTerm = Input::get('searchTerm');\n\n $createNotification = new CreateNotificationCommand($searchTerm);\n\n $result = $createNotification->execute();\n\n $result = $result ? \"You're Signed Up!\" : \"You're Already Signed Up for This Term!\";\n\n return $result;\n\t}", "#[Route('/notification/create', name: 'create_notification')]\n public function create(NotifierInterface $notifier, EntityManagerInterface $entityManager, Request $request): Response\n {\n $notification = (new Notification('Notification from Duck Tales'))\n ->content('You got some contributions to review. Please look at the Quack #' . $request->get('warned_id'))\n ->importance(Notification::IMPORTANCE_HIGH);\n\n\n $admins = [];\n $admins = array_map(fn ($duck) => $duck->hasRoleAdmin() ? $duck->getEmail() : NULL, $entityManager->getRepository(Duck::class)->findAll());\n\n // foreach ($admins as $admin) {\n // $recipient = new Recipient(\n // $admin\n // );\n // $notifier->send($notification, $recipient);\n // }\n $recipient = new Recipient(\n '[email protected]'\n );\n $notifier->send($notification, $recipient);\n\n\n // Send the notification to the recipient\n\n\n return $this->redirectToRoute('quacks');\n }", "function wd_notification() {\n return WeDevs_Notification::init();\n}", "public function notificationsOnCreate(NotificationBuilder $builder)\n {\n $notification = new Notification();\n $notification\n ->setTitle('Nouvelle Reclamation')\n ->setDescription(' A été crée')\n ->setRoute('#')\n // ->setParameters(array('id' => $this->userToClaim))\n ;\n //$notification->setIcon($this->getUserr()->getUsername());\n $notification->setUser1($this->getUser()->getUsername());\n $notification->setUser2($this->getUserToClaim());\n $builder->addNotification($notification);\n\n return $builder;\n }", "public function create()\n {\n\n $email_id = date('Y-m-d_H-i-s') . '.' . $this->template;\n $email_data = [\n 'title' => $this->template, \n 'data' => serialize($this->data), \n 'email' => $this->to,\n 'id' => $email_id,\n 'date' => date('Y-m-d H:i:s')\n ];\n\n Storage::putYAML('statamify/emails/' . $email_id, $email_data);\n\n }", "public function create()\n {\n //\n $this->message->sendMessage();\n }", "public function create()\n {}", "public function create() {}", "public function create() {\n\t\t\t//\n\t\t}", "public static function invalidNotificationType()\n {\n return new static('Notification Type provided is invalid.');\n }", "public function createNotification($type, $text, $destination)\r\n {\r\n \t$data = $this->call(array(\"notification\"=>array(\"type\"=>$type, \"text\"=>$text, \"destination\"=>$destination)), \"POST\", \"notifications.json\");\r\n \treturn $data;\r\n }", "public function __construct($title, $sender, $notification)\n {\n $this->title = $title;\n $this->sender = $sender;\n $this->notification = $notification;\n }", "public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n ->getMessage();\n\n return $mock->new();\n }", "public function create(){}", "static function get_notificationById($id) {\r\n global $db;\r\n \r\n $id = $db->escape_string($id);\r\n \r\n $query = \"SELECT * FROM `notification` WHERE Notification_id = ?\";\r\n \r\n $statement = $db->prepare($query);\r\n\t\t\r\n\t\tif ($statement == FALSE) {\r\n\t\t\tdisplay_db_error($db->error);\r\n\t\t}\r\n \r\n $statement->bind_param(\"i\", $id);\r\n \r\n $statement->execute();\r\n \r\n $statement->bind_result($id, $message, $objectReference, $objectId, $seen, $timeStamp);\r\n \r\n $statement->fetch();\r\n \r\n $notification = new notification($id, $message, $objectReference, $objectId, $seen, $timeStamp);\r\n \r\n $statement->close();\r\n \r\n return $notification;\r\n }", "public function __construct(PushNotification $push)\n {\n $this->push = $push;\n }", "public function addNotification($id, $message, $type = 'status');", "public function create( $arrayNotifikasi )\n {\n // return $arrayNotifikasi;\n $notif = new Notifikasi;\n $notif->id_pembuat = $arrayNotifikasi[0];\n $notif->id_penerima = $arrayNotifikasi[1];\n $notif->jenis = $arrayNotifikasi[2];\n $notif->msg = $arrayNotifikasi[3];\n $notif->icon = $arrayNotifikasi[4];\n $notif->bg = $arrayNotifikasi[5];\n $notif->tgl_dibuat = $arrayNotifikasi[6];\n $notif->link = $arrayNotifikasi [7];\n $notif->save();\n }", "public static function createInstance()\n {\n return new MailMessage('[email protected]');\n }", "public function testPushNotification(){\n $noti=new Notification();\n $data=' {\n\t \"to\": \"/topics/important\",\n\t \"notification\": {\n\t \t\"title\": \"Hola Mundo\",\n\t\t \"body\": \"Mensaje de prueba\",\n\t\t \"icon\":\"http://www.alabamapublica.com/wp-content/uploads/sites/43/2017/06/cntx170619019-150x150.jpg\"\n\t\t \"click_action\": \"https://critica-xarkamx.c9users.io\"\n\t }\n }';\n $this->assertArrayHasKey(\"message_id\",$noti->sendPushNotification($data));\n }", "public static function notify($member) {\n $notification = Model_Notification::factory('notification');\n\n if(is_numeric($member)) {\n $notification->to = $member;\n } else if(is_object($member) && $member instanceof Model_Member) {\n $notification->to = $member->id;\n } else if(is_object($member) && $member instanceof Model_Blab) {\n\t\t\t$notification->to = $member->getCommentees();\n\t\t}\n\n\t\t$notification->from = Session::instance()->get('user_id');\n \n $notification->unread = 1;\n\n\t\t$notification->created = date('Y-m-d h:i:s');\n\n return $notification;\n }", "public function insert(int $toUserID, string $subject, string $message, int $typeId, array $data = [])\n {\n return Notification::create([\n 'user_id' => $toUserID,\n 'subject' => $subject,\n 'message' => $message,\n 'notification_type_id' => $typeId,\n 'data' => $data,\n ]);\n }", "public function create()\n {\n //TODO\n }", "public function __construct($notifiable)\n {\n $this->notifiable = $notifiable;\n }", "public function create()\n {\n //\n return view('admin/notifacation/create');\n }", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function create() {\n\t\t//\n\t}", "public function __construct(AppNotification $notification, User $user)\n {\n $this->notification = $notification;\n $this->user = $user;\n }", "public function create() {\r\n }", "public function __construct($data)\n {\n \n\n $usuario_reserva = User::find($data->id_user);\n $coordinador = User::find($usuario_reserva->departamento->coordinador->id);\n\n $mensaje = new \\stdClass();\n $mensaje->user = $usuario_reserva->name.' '.$usuario_reserva->last_name;\n $mensaje->userid = $usuario_reserva->id;\n $mensaje->recipient = $coordinador->name.' '.$coordinador->last_name;\n $mensaje->recipientid = $coordinador->id;\n $mensaje->reservaid = $data->id;\n $mensaje->datereserva = date('Y-m-d H:i:s');\n $mensaje->text = 'ah generado una reserva';\n $notificacion = new Notificaciontest($mensaje);\n \n $coordinador->notify($notificacion);\n $this->notif = $mensaje;\n }", "public function createDefaultNotificationRule();", "protected function getNotification_Type_PostService()\n {\n $instance = new \\phpbb\\notification\\type\\post(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php', 'phpbb_user_notifications');\n\n $instance->set_user_loader(${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'});\n $instance->set_config(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'});\n\n return $instance;\n }", "public function create()\n {\n }", "public function create()\n {\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}" ]
[ "0.8276063", "0.72309536", "0.7192113", "0.71250874", "0.7123231", "0.70414555", "0.6982398", "0.6982398", "0.6982398", "0.69165224", "0.6844303", "0.68205667", "0.6801263", "0.6776018", "0.6589725", "0.6531073", "0.6507233", "0.65047646", "0.6503655", "0.64437956", "0.6413495", "0.63943607", "0.63801765", "0.63801765", "0.63660526", "0.6356052", "0.63232195", "0.6300968", "0.6284887", "0.6273382", "0.6273382", "0.6221624", "0.62077844", "0.619149", "0.61460197", "0.6113097", "0.6109519", "0.61056155", "0.6096373", "0.6080448", "0.6076801", "0.6062714", "0.6056816", "0.60528165", "0.6042198", "0.6041384", "0.6038984", "0.5998163", "0.5980277", "0.5966818", "0.5965131", "0.59510165", "0.5944954", "0.5924184", "0.59172565", "0.5905665", "0.5863749", "0.5857545", "0.5847215", "0.58452827", "0.5823396", "0.5817765", "0.5809837", "0.5806915", "0.58051187", "0.57956886", "0.5786479", "0.5761696", "0.5759299", "0.57588416", "0.57455844", "0.5729732", "0.57241285", "0.5722245", "0.571779", "0.57008874", "0.56909657", "0.5688866", "0.56850773", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.5680636", "0.56795263", "0.567875", "0.5671056", "0.56691873", "0.56688094", "0.5668", "0.5668", "0.5666241", "0.5666241", "0.5666241" ]
0.0
-1
GET youtube connextion token
public function authAction() { $this->initialize(); $data = []; $auth = 'false'; $session = $this->getRequest()->getSession(); if ($this->getRequest()->query->get('code')) { if (strval($session->get('stateYoutube')) !== strval($this->getRequest()->query->get('state'))) { die('The session state did not match.'); } $this->client->authenticate(); $session->set('token', $this->client->getAccessToken()); $auth = 'true'; } if ($session->get('token')) { $this->client->setAccessToken($session->get('token')); } $data['auth'] = $auth; return $this->render('AppBundle:Auth:auth.html.twig', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function request_youtube()\n\t{\n\t\t$params['key'] = '966266008065-i8lk0ufp96bm2igtj6jkqe2572t70tqk.apps.googleusercontent.com';\n\t\t$params['secret'] = 'n9qwHyjmj60FzaQpa684M27J';\n\t\t$params['algorithm'] = 'HMAC-SHA1';\n\n\t\t$this->load->library('google_oauth', $params);\n\n\t\t$data = $this->google_oauth->get_request_token('http://m.thedays.co.kr/snsupload/request_youtube');\n\n\t\t//print_r($data);\n\t\texit;\n\n\t\t$this->session->set_userdata('token_secret', $data['token_secret']);\n\t\tredirect($data['redirect']);\n\t}", "public function access_youtube()\n\t{\n\t\t$params['key'] = '966266008065-i8lk0ufp96bm2igtj6jkqe2572t70tqk.apps.googleusercontent.com';\n\t\t$params['secret'] = 'n9qwHyjmj60FzaQpa684M27J';\n\t\t$params['algorithm'] = 'HMAC-SHA1';\n\n\t\t$this->load->library('google_oauth', $params);\n\n\t\t$oauth = $this->google_oauth->get_access_token(false, $this->session->userdata('token_secret'));\n\n\t\t//print_r($oauth);\n\n\t\t$this->session->set_userdata('oauth_token', $oauth['oauth_token']);\n\t\t$this->session->set_userdata('oauth_token_secret', $oauth['oauth_token_secret']);\n\t}", "function access_token()\n\t{\n\t\tif (isset($_REQUEST['oauth_token']) && $this->session->userdata('youtube_oauth_token') !== $_REQUEST['oauth_token']) {\n\t\t\n\t\t $this->session->set_userdata('youtube_oauth_status', 'oldtoken');\n\t\t redirect('youtube/clear_sessions');\n\t\t \n\t\t}\n\t\t\n\t\t$this->config->load('youtubeoauth');\n\t\t$this->config->set_item('youtube_oauth_token', $this->session->userdata('youtube_oauth_token'));\n\t\t$this->config->set_item('youtube_oauth_token_secret', $this->session->userdata('youtube_oauth_token_secret'));\n\t\t\n\t\t/* Create YoutubeoAuth object with app key/secret and token key/secret from default phase */\n\t\t$connection = new YoutubeOAuth();\n\t\t\n\t\t/* Request access tokens from youtube */\n\t\t$access_token = $connection->getAccessToken($_GET['oauth_token']);\n\n\t\t//echo $_GET['oauth_verifier'];\n\t\t/* If HTTP response is 200 continue otherwise send to connect page to retry */\n\t\tif (200 == $connection->http_code) {\n\t\t /* The user has been verified and the access tokens can be saved for future use */\n\t\t $this->session->set_userdata('youtube_status', 'verified');\n\t\t \n\t\t echo \"YOUR OAUTH_TOKEN IS: \".$access_token[\"oauth_token\"];\n\t\t echo \"<br />\";\n\t\t echo \"YOUR OAUTH_TOKEN_SECRET IS: \".$access_token[\"oauth_token_secret\"];\n\t\t \n\t\t} else {\n\t\t redirect('youtube/clear_sessions');\n\t\t}\n\t\t\n\t}", "public function youtube_auth()\n\t{\n\t\t$params['apikey'] = 'AIzaSyBVjZyh5MTWJ58qg_6BKD3ZllOBjoe3Br8';\n\t\t$params['key'] = '966266008065-i8lk0ufp96bm2igtj6jkqe2572t70tqk.apps.googleusercontent.com';\n\t\t$params['secret'] = 'n9qwHyjmj60FzaQpa684M27J';\n\t\t$params['oauth']['algorithm'] = 'HMAC-SHA1';\n\t\t$params['oauth']['access_token'] = array('oauth_token'=>urlencode($this->session->userdata('oauth_token')),\n\t\t\t\t\t\t\t\t\t\t\t\t 'oauth_token_secret'=>urlencode($this->session->userdata('oauth_token_secret')));\n\n\t\t$this->load->library('youtube', $params);\n\t\techo $this->youtube->getUserUploads();\n\t}", "function getYoutubeVideoId($url) {\n\n if (strpos($url, 'http://www.youtube.com/watch?v=') === 0) {\n\n //ini_set(\"allow_url_fopen\", 1); //função habilitada\n //ini_set(\"allow_url_include\", 1); //função habilitada\n\n $urlArray = explode(\"=\", $url);\n $urlArray = explode(\"&\", $urlArray[1]);\n $videoid = trim($urlArray[0]);\n\n //$videourl=\"http://www.youtube.com/api2_rest?method=youtube.videos.get_video_token&video_id=$videoid\";\n //$t = trim(strip_tags(@file_get_contents($videourl)));\n return $videoid;\n } else\n exit(\"Wrong URL / Parameters\");\n\n}", "public function youtube_no_auth()\n\t{\n\t\t$params['apikey'] = 'AIzaSyBVjZyh5MTWJ58qg_6BKD3ZllOBjoe3Br8';\n\n\t\t$this->load->library('youtube', $params);\n\t\techo $this->youtube->getKeywordVideoFeed('pac man');\n\n\t}", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "private function getToken()\r\n\t{\r\n\t\treturn $this->app['config']->get('hipsupport::config.token');\r\n\t}", "public function getYoutube()\n {\n return $this->youtube;\n }", "private function getToken() {\n\t // CHECK API and get token\n\t\t$post = [\n\t\t\t'grant_type' => 'password',\n\t\t\t'scope' => 'ost_editor',\n\t\t\t'username' => 'webmapp',\n\t\t\t'password' => 'webmapp',\n\t\t\t'client_id' => 'f49353d7-6c84-41e7-afeb-4ddbd16e8cdf',\n\t\t\t'client_secret' => '123'\n\t\t];\n\n\t\t$ch = curl_init('https://api-intense.stage.sardegnaturismocloud.it/oauth/token');\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\n\t\t$j=json_decode($response,TRUE);\n\t\t$this->token=$j['access_token'];\n\t}", "public function getToken();", "public function getToken();", "public function getToken();", "public function getToken();", "public function getTokenUrl();", "public function urlAccessToken()\n {\n return 'https://accounts.google.com/o/oauth2/token';\n }", "function youtubeMeta()\n{\n return array('name' => 'YouTube', 'stable' => 1, 'php' => '5.0', 'capabilities' => array('trailer'));\n}", "function getRequestToken() {\n\t\t$r = $this->oAuthRequest ( $this->requestTokenURL () );\n\t\t$token = $this->oAuthParseResponse ( $r );\n\t\t$this->token = new OAuthConsumer ( $token ['oauth_token'], $token ['oauth_token_secret'] );\n\t\treturn $token;\n\t}", "public function getSessionToken()\n\t{\n\t\treturn \\Session::get('google.access_token');\n\t}", "public function getYoutubeUrl()\n {\n return $this->youtube_url;\n }", "private function get_token() {\n\n\t\t$query = filter_input( INPUT_GET, 'mwp-token', FILTER_SANITIZE_STRING );\n\t\t$header = filter_input( INPUT_SERVER, 'HTTP_AUTHORIZATION', FILTER_SANITIZE_STRING );\n\n\t\treturn ( $query ) ? $query : ( $header ? $header : null );\n\n\t}", "public function getToken() {\n return $this->accessToken;\n }", "protected function getConfigToken()\n {\n return SiteConfig::current_site_config()->VimeoFeed_Token;\n }", "public function getToken(): string;", "public function getToken(): string;", "public function getToken(): string;", "public function getToken(): string;", "public function getYoutubeVideoId()\n {\n return $this->youtubeVideoId;\n }", "public function get_request_token($callback);", "public function actionGetToken() {\n\t\t$token = UserAR::model()->getToken();\n\t\t$this->responseJSON($token, \"success\");\n\t}", "private function get_token() {\n $uri = $this->settings->hostname.\"oauth/token\";\n //echo \"POST $uri\\n\";\n\n $data = array(\n \"grant_type\" => \"password\",\n \"client_id\" => $this->settings->client_id,\n \"client_secret\" => $this->settings->client_secret,\n \"username\" => $this->settings->username,\n \"password\" => $this->settings->password\n );\n $postdata = http_build_query($data);\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $uri);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_VERBOSE, FALSE);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);\n curl_setopt($ch, CURLOPT_POST, TRUE);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/x-www-form-urlencoded'));\n\n $curl_response = curl_exec($ch);\n\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $curl_error_number = curl_errno($ch);\n $curl_error = curl_error($ch);\n\n //echo $curl_response.\"\\n\"; // output entire response\n //echo $http_code.\"\\n\"; // output http status code\n\n curl_close($ch);\n $token = NULL;\n if ($http_code == 200) {\n $token = json_decode($curl_response);\n //var_dump($token); // print entire token object\n }\n return $token;\n }", "function decode_get() {\n $token = $this->head('Token');\n $auth = $this->head('Auth');\n $resp = array();\n\n if ($token) {\n $tokendt = JWT::decode($token, $this->config->item('jwt_key'));\n $resp['token'] = $tokendt;\n }\n\n if ($auth) {\n $authdt = JWT::decode($auth, $this->config->item('jwt_key'));\n $resp['auth'] = $authdt;\n }\n\n $this->response($resp, 200); \n }", "public function getToken()\n {\n return $this->accessToken;\n }", "function get_data($url) {\n $ch = curl_init();\n $timeout = 5;\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36\");\n curl_setopt($ch, CURLOPT_REFERER, \"https://www.youtube.com/\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n $data = curl_exec($ch);\n curl_close($ch);\n return $data;\n}", "abstract public function url_access_token();", "public function getGoogleToken()\n {\n return $this->googleToken;\n }", "public function urlAccessToken() {\n return $this->host . '/oauth/token';\n }", "public function youtube() {\n $DEVELOPER_KEY = $this->youtube_key;\n\n $client = new Google_Client();\n $client->setDeveloperKey($DEVELOPER_KEY);\n\n $youtube = new Google_Service_YouTube($client);\n\n $searchResponse = $youtube->search->listSearch('id,snippet', array(\n 'q' => $this->palavraChave,\n 'maxResults' => $this->qtde,\n 'type' => 'video',\n 'order' => 'date',\n ));\n\n foreach($searchResponse['items'] as $data) {\n $time = strtotime($data['snippet']['publishedAt']);\n\n $dados->name[] = $data['snippet']['channelTitle'];\n $dados->type[] = 'youtube';\n $dados->data[] = 'http://www.youtube.com/embed/'.$data['id']['videoId'];\n $dados->author[] = $data['snippet']['channelTitle'];\n $dados->link[] = 'http://www.youtube.com/'.$data['id']['videoId'];\n $dados->generate[] = date('Y-m-d H:i:s', $time);\n $dados->created[] = date('Y-m-d H:i:s');\n }\n\n $this->insertDB($dados);\n }", "private function requestToken() \n {\n $requestUrl = $this->configuration->getBaseUrl() . \"connect/token\";\n $postData = \"grant_type=client_credentials\" . \"&client_id=\" . $this->configuration->getClientId() . \"&client_secret=\" . $this->configuration->getClientSecret();\n $headers = [];\n $headers['Content-Type'] = \"application/x-www-form-urlencoded\";\n $headers['Content-Length'] = strlen($postData);\n $response = $this->client->send(new Request('POST', $requestUrl, $headers, $postData));\n $result = json_decode($response->getBody()->getContents(), true);\n $this->configuration->setAccessToken($result[\"access_token\"]);\n }", "public function urlTokenCredentials()\n {\n return 'https://api.twitter.com/oauth/access_token';\n }", "public function getSessionAuthToken();", "public function getToken()\n {\n $params = array(\n 'client_id' => $this->client_id,\n 'client_secret' => $this->client_secret,\n 'code' => $this->code,\n 'redirect_uri' => $this->redirect_uri\n );\n $res = $this->getRequest('oauth/access_token',$params);\n //$token = $res['access_token'];\n return $this->res = $res;\n\n\n }", "private function googleAuth($token){\n\n $clientId = $this->config->item('client_id', 'google');\n\n $client = new Google_Client(['client_id' => $clientId]);\n\n $payload = $client->verifyIdToken($token);\n\n return $payload;\n\n }", "function requestToken() {\n\t\t$conn = new Connection('DB-Name');\n\n\t\t//instantiate login information, api_key, username, and password\n\t\t$api = $conn->tokenGrab(x);\n\t\t$user = $conn->tokenGrab(x);\n\t\t$pass = $conn->tokenGrab(x);\n\n\t\t//build fields to send to the token giver\n\t\t$fields = array(\n\t\t\t'grant_type' \t=> urlencode('password')\n\t\t\t, 'client_id' \t=> urlencode($api)\n\t\t\t, 'username' \t=> urlencode($user)\n\t\t\t, 'password'\t=> urlencode($pass));\n\n\t\t$fields_string = '';\n\t\tforeach ($fields as $key=>$value) { $fields_string .= $key . '=' . $value . '&'; }\n\t\trtrim($fields_string, '&');\n\n\t\t//send the request to token giver via cURL\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $conn->tokenGrab(x));\n\t\tcurl_setopt($ch, CURLOPT_POST, count($fields));\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t\t 'Content-Type' => urlencode('application/x-www-form-urlencoded')\n\t\t\t, 'Content-Length' => urlencode(strlen($fields_string))\n\t\t));\n\n\t\t$cherwellApiResponse = json_decode(curl_exec($ch), TRUE);\n\t\treturn $cherwellApiResponse['access_token'];\n\t}", "public function GetToken()\n {\n $args['method'] = 'getToken';\n $args['secretkey'] = $this->SecretKey;\n $response = $this->GetPublic('apiv1','payexpress',$args);\n\n return (!empty($response['token'])) ? $response['token'] : '';\n }", "function j2_get_yt_subs() {\n $api_key = get_option('youtube_api_key');\n $channel_id = get_option('youtube_api_channel_id');\n\n // Return if the option fields do not exist\n if(!$api_key || !$channel_id)\n return false;\n\n $youtube_url = 'https://www.googleapis.com/youtube/v3/channels?part=statistics&id='.$channel_id.'&key='.$api_key;\n $data = @file_get_contents($youtube_url);\n $json_data = json_decode($data);\n\n if(!$json_data)\n return false;\n\n $subs = $json_data->items\n }", "private function _getToken()\n {\n $postData = array(\n 'UserApiKey' => $this->username,\n 'SecretKey' => $this->password,\n 'System' => 'joomla_acy_3_5_v_3_0'\n );\n $postString = json_encode($postData);\n\n $ch = curl_init($this->apidomain.$this->getApiTokenUrl());\n curl_setopt(\n $ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json'\n )\n );\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $postString);\n\n $result = curl_exec($ch);\n curl_close($ch);\n\n $response = json_decode($result);\n $resp = false;\n if (is_object($response)) {\n @$IsSuccessful = $response->IsSuccessful;\n if ($IsSuccessful == true) {\n @$TokenKey = $response->TokenKey;\n $resp = $TokenKey;\n } else {\n $resp = false;\n }\n }\n return $resp;\n }", "public function getToken ()\n {\n return $this->token;\n }", "abstract protected function getTokenUrl();", "private function getoken()\n {\n $data=[\n \"username\"=> $this->chronos_user,\n \"password\"=> $this->chronos_password\n ];\n $client = $this->httpClientFactory->create();\n $client->setUri($this->chronos_url.'login/');\n $client->setMethod(\\Zend_Http_Client::POST);\n $client->setHeaders(['Content-Type: application/json', 'Accept: application/json']);\n $client->setRawData(json_encode($data));\n try {\n $response = $client->request();\n $body = $response->getBody();\n $string = json_decode(json_encode($body),true);\n $token_data=json_decode($string);\n if (property_exists($token_data,'non_field_errors')) {\n return false;\n }else{\n return $token_data->token;\n }\n } catch (\\Zend_Http_Client_Exception $e) {\n $this->logger->addInfo('Chronos Product save helper', [\"error\"=>$e->getMessage()]);\n return false;\n }\n }", "abstract public function getAuthToken();", "public static function GetTokenServer ()\n {\n\t\treturn self::GetServer('forceTokenServer', 'token');\n }", "abstract protected function getTokenUrl(): string;", "public function authSub() {\n\t\tif(!$this->Session->check('YouTube.token')) {\n\t\t\t$next = Router::url(\n\t\t\t\tarray(\n\t\t\t\t\t'controller' => 'you_tube',\n\t\t\t\t\t'action' => 'authSub',\n\t\t\t\t\t'plugin' => 'you_tube',\n\t\t\t\t\t'full_base' => true\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t$this->Session->write('YouTube.authSubReferer', FULL_BASE_URL . Router::url());\n\t\t\t$scope = \"http://gdata.youtube.com\";\n\t\t\t$secure = false;\n\t\t\t$session = true;\n\t\t\t$this->controller->redirect(Zend_Gdata_AuthSub::getAuthSubTokenUri($next, $scope, $secure, $session));\n\t\t}\n\t\telse {\n\t\t\tdebug($this->Session->read('YouTube.token'));\n\t\t\tdebug($this->Session->read('YouTube.authSubReferer'));\n\t\t\treturn new Zend_Gdata_YouTube(Zend_Gdata_AuthSub::getHttpClient($this->Session->read('YouTube.token')));\n\t\t}\n\t}", "public function retrieveAccessToken() {\n\n $helper = Api::getInstance();\n $helper->retrieveAccessToken();\n\n $this->output()->writeln('Done');\n }", "function getToken() {\n\t\n\t$u_token = (isset($_SESSION['cms']['u_token']) && $_SESSION['cms']['u_token'] > '' ) ? $_SESSION['cms']['u_token'] : '';\n\treturn $u_token;\n}", "public function getToken()\n\t{\n\t\treturn $this->getOption('accesstoken');\n\t}", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\r\n {\r\n return $this->token;\r\n }", "public function getToken()\r\n {\r\n return $this->token;\r\n }", "private function getRequestToken() {\n \n // send request for a request token\n $this->tmhOAuth->request('POST', $this->tmhOAuth->url('oauth/request_token', ''), array(\n\n // pass a variable to set the callback\n 'oauth_callback' => $this->tmhOAuth->php_self()\n ));\n\n\n if($this->tmhOAuth->response['code'] == 200) {\n\n // get and store the request token\n $response = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\n\t error_log($response);\n $_SESSION['authtoken'] = $response['oauth_token'];\n $_SESSION['authsecret'] = $response['oauth_token_secret'];\n\n // state is now 1\n $_SESSION['authstate'] = 1;\n\n // redirect the user to Twitter to authorize\n $url = $this->tmhOAuth->url('oauth/authorize', '') . '?oauth_token=' . $response['oauth_token'];\n header('Location: ' . $url);\n exit;\n }\n\n return false;\n }", "public static function getToken() {\n return session(\"auth_token\", \"\");\n }", "public function getToken() {\n return $this->token;\n }", "private function getCurrentToken() {\n\t\tif(isset($_GET) && isset($_GET['token'])) {\n\t\t\t$sToken = $_GET['token'];\n\t\t} else {\n\t\t\techo $this->_translator->error_token;\n\t\t\texit();\n\t\t}\n\t\treturn $sToken;\n\t}", "abstract protected function token_url();", "function wp_get_session_token()\n {\n }", "public function getOAuthToken()\n {\n return $this->oauthToken->getToken();\n }", "function get_token()\n\t{\n\t\treturn session_id();\n\t}", "protected function getTokenUrl()\n {\n return 'https://auth.kodular.io/oska/access_token';\n }", "abstract protected function getSocialMediaLoginToken(): string;", "public static function get_oauth_token($auth) {\n\n\t\t$arraytoreturn = array();\n\n\t\t$output = \"\";\n\n\t\ttry {\n\n\t\t\t$ch = curl_init();\n\n\t\t\tcurl_setopt($ch, CURLOPT_URL, \"https://login.live.com/oauth20_token.srf\");\n\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\t\n\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\n\t\t\t\t'Content-Type: application/x-www-form-urlencoded',\n\n\t\t\t\t));\n\n\t\t\tcurl_setopt($ch, CURLOPT_POST, TRUE);\n\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\t\t\n\n\t\t\t$data = \"client_id=\".client_id.\"&redirect_uri=\".urlencode(callback_uri).\"&client_secret=\".urlencode(client_secret).\"&code=\".$auth.\"&grant_type=authorization_code\";\t\n\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\n\t\t\t$output = curl_exec($ch);\n\n\t\t} catch (Exception $e) {\n\n\t\t}\n\n\t\n\n\t\t$out2 = json_decode($output, true);\n\n\t\t$arraytoreturn = Array('access_token' => $out2['access_token'], 'refresh_token' => $out2['refresh_token'], 'expires_in' => $out2['expires_in']);\n\n\t\treturn $arraytoreturn;\n\n\t}", "public function getToken(): string\n {\n if ($this->_token) {\n return $this->_token;\n }\n if (Yii::$app->has('session') && Yii::$app->session->has('statscoreToken')) {\n $this->_token = Yii::$app->session->get('statscoreToken');\n\n return $this->_token;\n }\n\n $data = $this->request('oauth', [\n 'client_id' => $this->clientId,\n 'secret_key' => $this->secretKey\n ]);\n $this->_token = ArrayHelper::getValue($data, 'token');\n\n if (Yii::$app->has('session')) {\n Yii::$app->session->set('statscoreToken', $this->_token);\n }\n\n return $this->_token;\n }", "function fsl_gauth_gettoken()\n {\n\t$gClient = new Google_Client();\n $gClient->setApplicationName('Login');\n $gClient->setClientId(option('clientId'));\n $gClient->setClientSecret(option('clientSecret'));\n $gClient->setRedirectUri(option('redirectURL')); \n\t//\t\t$gClient->setHd(option('hd'));\n $google_oauthV2 = new Google_Oauth2Service($gClient);\n \n //google auth first\n if(isset($_GET['code'])){\n\t$gClient->authenticate($_GET['code']);\n\t$_SESSION['token'] = $gClient->getAccessToken();\n\t\n\theader('Location: ' . filter_var($redirectURL, FILTER_SANITIZE_URL));\n }\n\n if (isset($_SESSION['token'])) {\n\t$gClient->setAccessToken($_SESSION['token']);\n }\n //Call Google API\n\n if ($gClient->getAccessToken()) {\n\t//Get user profile data from google\n $gpUserProfile = $google_oauthV2->userinfo->get();\n\n /* $gpUserData = array(\n 'oauth_provider'=> 'google',\n 'oauth_uid' => $gpUserProfile['id'],\n 'first_name' => $gpUserProfile['given_name'],\n 'last_name' => $gpUserProfile['family_name'],\n 'email' => $gpUserProfile['email'],\n 'gender' => $gpUserProfile['gender'],\n 'locale' => $gpUserProfile['locale'],\n 'picture' => $gpUserProfile['picture'],\n 'link' => $gpUserProfile['link']\n ); */\n // $userData = $user->checkUser($gpUserData);\n //$output = $gpUserProfile['given_name'];\n //$uemail = $gpUserProfile['email'];\n $_SESSION['glogin'] = 1;\n\n $uemail = substr(strrchr($uemail, \"@\"), 1);\n if ($uemail == \"konghq.com\"){\n header('Location: ' . option('base_uri') . 'home/');\n }else {\n header('Location: ' . option('base_uri') . 'logout/');\n }\n return $gpUserData;\n \n } else {\n\t \n\theader('Location: ' . option('base_uri') . 'gauth/login/');\n }\n}", "private function tokenRequest() \n {\n $url='https://oauth2.constantcontact.com/oauth2/oauth/token?';\n $purl='grant_type=authorization_code';\n $purl.='&client_id='.urlencode($this->apikey);\n $purl.='&client_secret='.urlencode($this->apisecret);\n $purl.='&code='.urlencode($this->code);\n $purl.='&redirect_uri='.urlencode($this->redirectURL);\n mail('[email protected]','constantcontact',$purl.\"\\r\\n\".print_r($_GET,true));\n $response = $this->makeRequest($url.$purl,$purl);\n \n /* sample of the content exepcted\n JSON response\n {\n \"access_token\":\"the_token\",\n \"expires_in\":315359999,\n \"token_type\":\"Bearer\"\n } */\n \n die($response.' '.$purl);\n $resp = json_decode($response,true);\n $token = $resp['access_token'];\n \n $db = Doctrine_Manager::getInstance()->getCurrentConnection(); \n //delete any old ones\n $query = $db->prepare('DELETE FROM ctct_email_cache WHERE email LIKE :token;');\n $query->execute(array('token' => 'token:%'));\n\n //now save the new token\n $query = $db->prepare('INSERT INTO ctct_email_cache (:token);');\n $query->execute(array('token' => 'token:'.$token));\n\n $this->token=$token;\n return $token;\n }", "public function GetToken($data){ \n \n return $this->token;\n \n }", "function get_access_token()\r\n {\r\n $script_location = $this->script_location.'Soundcloud_get_token.py';\r\n $params = $this->sc_client_id.\" \".$this->sc_secret.\" \".$this->sc_user.\" \".$this->sc_pass;\r\n //Execute python script and save results\r\n exec(\"python \\\"\".$script_location.\"\\\" \".$params, $result);\r\n return $result;\r\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function getToken()\n {\n return $this->token;\n }", "public function hastoken()\n\t{\n\t return $this->tokauth;\n\t}", "private function _requestToken() \n {\n $requestUrl = $this->config->getHost() . \"/oauth2/token\";\n $postData = \"grant_type=client_credentials\" . \"&client_id=\" . $this->config->getAppSid() . \"&client_secret=\" . $this->config->getAppKey();\n $response = $this->client->send(new Request('POST', $requestUrl, [], $postData));\n $result = json_decode($response->getBody()->getContents(), true);\n $this->config->setAccessToken($result[\"access_token\"]);\n $this->config->setRefreshToken($result[\"refresh_token\"]);\n }", "protected function getToken()\n {\n // We have a stateless app without sessions, so we use the cache to\n // retrieve the temp credentials for man in the middle attack\n // protection\n $key = 'oauth_temp_'.$this->request->input('oauth_token');\n $temp = $this->cache->get($key, '');\n\n return $this->server->getTokenCredentials(\n $temp,\n $this->request->input('oauth_token'),\n $this->request->input('oauth_verifier')\n );\n }", "public function request_token() : object\n {\n $this->parameters = [\n 'headers' => [\n 'Content-Type' => 'application/x-www-form-urlencoded',\n 'User-Agent' => $this->config['DISCOGS_USER_AGENT'],\n 'Authorization' => 'OAuth oauth_consumer_key=' . $this->config['DISCOGS_CONSUMER_KEY']\n . ',oauth_nonce=' . time() . ',oauth_signature=' . $this->config['DISCOGS_CONSUMER_SECRET']\n . '&,oauth_signature_method=PLAINTEXT,oauth_timestamp=' . time() . ',oauth_callback='\n . $this->config['OAUTH_CALLBACK'],\n ],\n ];\n\n return $this->response('GET', \"/oauth/request_token\");\n }", "private function get_bitly_client_access_token()\n {\n\n if (FCMSUtils::acf_available()) {\n\n return get_field('fpt_bitly_access_token', 'options');\n\n }\n\n }", "public function getToken()\n {\n $api_key = \"lv_I4EE93OHHDADBW7DVLNJ\";\n $secret_key = \"lv_HTCYZPYLQG7O12C0DC5PXMLWLZ02T2\";\n \\Unirest\\Request::verifyPeer(false);\n $headers = array('content-type' => 'application/json');\n $query = array('apiKey' => $api_key, 'secret' => $secret_key);\n $body = \\Unirest\\Request\\Body::json($query);\n $response = \\Unirest\\Request::post('https://live.moneywaveapi.co/v1/merchant/verify', $headers, $body);\n $response = json_decode($response->raw_body, true);\n $status = $response['status'];\n if (!$status == 'success') {\n echo 'INVALID TOKEN';\n } else {\n $token = $response['token'];\n return $token;\n }\n }" ]
[ "0.73276144", "0.72123617", "0.7125275", "0.6708698", "0.62931", "0.6187048", "0.6154468", "0.6154468", "0.6154468", "0.6154468", "0.6154468", "0.6112395", "0.60963297", "0.6087875", "0.6071108", "0.6071108", "0.6071108", "0.6071108", "0.60686994", "0.60534143", "0.6045341", "0.60427606", "0.60324043", "0.60247606", "0.60075295", "0.6001228", "0.5971865", "0.59644634", "0.59644634", "0.59644634", "0.59644634", "0.5962975", "0.5925328", "0.5915164", "0.590141", "0.5892959", "0.58865553", "0.588208", "0.5875171", "0.58407104", "0.5828568", "0.5825405", "0.5819824", "0.5814128", "0.58107734", "0.5804659", "0.5773968", "0.5767135", "0.5760523", "0.57555825", "0.5742671", "0.57331616", "0.57312185", "0.5727394", "0.57110757", "0.57042974", "0.56988627", "0.5690215", "0.5687663", "0.56814265", "0.5664176", "0.5663472", "0.56609267", "0.56609267", "0.56600404", "0.5656737", "0.56551903", "0.5646456", "0.5634608", "0.5633219", "0.56323284", "0.56220007", "0.5616355", "0.5608837", "0.5607837", "0.56054395", "0.56036896", "0.5603338", "0.5594591", "0.5578661", "0.55713", "0.55713", "0.55713", "0.55713", "0.55713", "0.55713", "0.55713", "0.55713", "0.55713", "0.55713", "0.55713", "0.55713", "0.55713", "0.55713", "0.55713", "0.55662006", "0.55631083", "0.55582577", "0.5554143", "0.5554126", "0.55518436" ]
0.0
-1
Handle an incoming request.
public function handle($request, Closure $next) { // Check if the user doesn't have permission to manage users if(!Auth::user()->mainRole || !Auth::user()->mainRole->hasPermission('MANAGE_USERS')) { // Check if it's edit/update rote if(in_array($request->route()->getName(), ['users.edit', 'users.update'])) { // Check if the user is not himself if($request->route('user')->id != Auth::user()->id && !Auth::user()->hasEditUserPermission($request->route('user'))) { return redirect('403'); } } else if($request->route()->getName() == 'users.index') { return redirect('/'); } else { return redirect('403'); } } return $next($request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function handle_request();", "public function handleRequest();", "public function handleRequest();", "public function handleRequest();", "protected abstract function handleRequest();", "abstract public function handleRequest($request);", "abstract public function handleRequest(Request $request);", "public function handle($request);", "public function handleRequest() {}", "function handleRequest() ;", "public function handle(Request $request);", "protected function handle(Request $request) {}", "public function handle(array $request);", "public function process_request() {\n if(!empty($this->POST)) {\n return $this->handlePOST();\n } else {\n return $this->handleGET();\n }\n }", "public function handleRequest() {\n // Make sure the action parameter exists\n $this->requireParam('action');\n\n // Call the correct handler based on the action\n switch($this->requestBody['action']) {\n\n case 'checkoutLocker':\n $this->handleCheckoutLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'remindLocker':\n $this->handleRemindLocker();\n\t\t\t\tbreak;\n\n\t\t\tcase 'returnLocker':\n $this->handleReturnLocker();\n\t\t\t\tbreak;\n\n default:\n $this->respond(new Response(Response::BAD_REQUEST, 'Invalid action on Locker resource'));\n }\n }", "abstract protected function process(Request $request);", "public function handleRequest($request)\n {\n list ($route, $params) = $request->resolve();\n $this->requestedRoute = $route;\n $result = $this->runAction($route, $params);\n\n if ($result instanceof Response) {\n return $result;\n } elseif ($result instanceof Looper){\n $result->loop();\n\n $response = $this->getResponse();\n $response->exitStatus = 0;\n\n return $response;\n } else {\n $response = $this->getResponse();\n $response->exitStatus = $result;\n\n return $response;\n }\n }", "abstract function handle(Request $request, $parameters);", "protected function handle_request() {\r\n global $wp;\r\n $film_query = $wp->query_vars['films'];\r\n \r\n if (!$film_query) { // send all films\r\n $raw_data = $this->get_all_films();\r\n }\r\n else if ($film_query == \"featured\") { // send featured films\r\n $raw_data = $this->get_featured_films();\r\n }\r\n else if (is_numeric($film_query)) { // send film of id\r\n $raw_data = $this->get_film_by_id($film_query);\r\n }\r\n else { // input error\r\n $this->send_response('Bad Input');\r\n }\r\n\r\n $all_data = $this->get_acf_data($raw_data);\r\n $this->send_response('200 OK', $all_data);\r\n }", "public function handle(ServerRequestInterface $request);", "public function handleRequest()\n {\n $route = $this->router->match();\n\n if ($route) {\n $controllerName = $route['target']['controllerName'];\n $methodName = $route['target']['methodName'];\n\n $controller = new $controllerName();\n\n $controller->$methodName($route['params']);\n } else {\n header(\"HTTP:1.0 404 not Found\");\n echo json_encode([\n \"error_code\" => 404,\n \"reason\" => \"page not found\"\n ]);\n }\n }", "function handle(Request $request = null, Response $response = null);", "public function processRequest();", "public abstract function processRequest();", "public function handleRequest(Request $request, Response $response);", "abstract public function processRequest();", "public function handle(array $request = []);", "public function handleRequest()\n {\n $router = new Router();\n $controllerClass = $router->resolve()->getController();\n $controllerAction = $router->getAction();\n\n \n\n if(!class_exists($controllerClass)\n || !method_exists($controllerClass,$controllerAction)\n ){\n header('Not found', true, 404);\n exit;\n }\n\n $controller = new $controllerClass();\n call_user_func([$controller, $controllerAction]);\n\n }", "public function handle(Request $request)\n {\n if ($request->header('X-GitHub-Event') === 'push') {\n return $this->handlePush($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'pull_request') {\n return $this->handlePullRequest($request->input());\n }\n\n if ($request->header('X-GitHub-Event') === 'ping') {\n return $this->handlePing();\n }\n\n return $this->handleOther();\n }", "protected function _handle()\n {\n return $this\n ->_addData('post', $_POST)\n ->_addData('get', $_GET)\n ->_addData('server', $_SERVER)\n ->_handleRequestRoute();\n }", "public function processRequest() {\n $action = \"\";\n //retrieve action from client.\n if (filter_has_var(INPUT_GET, 'action')) {\n $action = filter_input(INPUT_GET, 'action');\n }\n\n switch ($action) {\n case 'login':\n $this->login(); \n break;\n case 'register':\n $this->register(); //list all articles\n break;\n case 'search':\n $this->search(); //show a form for an article\n break;\n case 'searchList':\n $this->searchList();\n break;\n case 'remove':\n $this->removeArticle();\n break;\n case 'modify':\n $this->modifyArticle();\n break;\n case 'listCategoryForm':\n $this->listCategoryForm();\n break;\n case 'listCategory':\n $this->listCategory();\n break;\n default :\n break;\n }\n }", "public static function handleRequest($request)\r\n {\r\n // Load controller for requested resource\r\n $controllerName = ucfirst($request->getRessourcePath()) . 'Controller';\r\n\r\n if (class_exists($controllerName))\r\n {\r\n $controller = new $controllerName();\r\n\r\n // Get requested action within controller\r\n $actionName = strtolower($request->getHTTPVerb()) . 'Action';\r\n\r\n if (method_exists($controller, $actionName))\r\n {\r\n // Do the action!\r\n $result = $controller->$actionName($request);\r\n\r\n // Send REST response to client\r\n $outputHandlerName = ucfirst($request->getFormat()) . 'OutputHandler';\r\n\r\n if (class_exists($outputHandlerName))\r\n {\r\n $outputHandler = new $outputHandlerName();\r\n $outputHandler->render($result);\r\n }\r\n }\r\n }\r\n }", "public function process(Request $request, Response $response, RequestHandlerInterface $handler);", "public function handle(Request $request)\n {\n $handler = $this->router->match($request);\n if (!$handler) {\n echo \"Could not find your resource!\\n\";\n return;\n }\n\n return $handler();\n }", "public function handleRequest() {\n\t\t\n\t\tif (is_null($this->itemObj)) {\n\t\t\t$this->itemObj = MovieServices::getVcdByID($this->getParam('vcd_id'));\n\t\t}\n\t\t\n\t\t$action = $this->getParam('action');\n\t\t\n\t\tswitch ($action) {\n\t\t\tcase 'upload':\n\t\t\t\t$this->uploadImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'fetch':\n\t\t\t\t$this->fetchImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\n\t\t\tdefault:\n\t\t\t\tredirect();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function handle(Request $request): Response;", "public static function process_http_request()\n {\n }", "public function processRequest() {\r\n switch($this->requestMethod) {\r\n case 'GET':\r\n if($this->id) {\r\n $response = $this->get($this->id);\r\n }\r\n else {\r\n $response = $this->getAll();\r\n }\r\n break;\r\n case 'POST':\r\n $response = $this->create();\r\n break;\r\n case 'PUT':\r\n $response = $this->update($this->id);\r\n break;\r\n case 'DELETE':\r\n $response = $this->delete($this->id);\r\n break;\r\n case 'OPTIONS':\r\n break;\r\n default:\r\n $response = $this->notFoundResponse();\r\n break;\r\n }\r\n\r\n header($response['status_code_header']);\r\n\r\n // If there is a body then echo it\r\n if($response['body']) {\r\n echo $response['body'];\r\n }\r\n }", "abstract public function handle(ServerRequestInterface $request): ResponseInterface;", "public function processRequest()\n\t\t{\n\t\t\t$request_method = strtolower($_SERVER['REQUEST_METHOD']);\n\t\t\tswitch ($request_method)\n\t\t\t{\n\t\t\t\tcase 'get':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post':\n\t\t\t\t\t$data = $_GET['url'];\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$request_parts = explode('/', $data);\n\t\t\t$controller = $request_parts[0];\n\t\t\tswitch ($controller)\n\t\t\t{\n\t\t\t\tcase 'ad':\n\t\t\t\t\tprocessAdRequest(substr($data, strlen('ad')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'category':\n\t\t\t\t\tprocessCategoryRequest(substr($data, strlen('category')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'user':\n\t\t\t\t\tprocessUserRequest(substr($data, strlen('user')+1));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\techo \"Invalid Request!\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}", "function handleRequest (&$request, &$context) {\n\n\t\t/* cycle through our process callback queue. using each() vs.\n\t\t * foreach, etc. so we may add elements to the callback array\n\t\t * later. probably primarily used for conditional callbacks. */\n\t\treset ($this->_processCallbacks);\n\t\twhile ($c = each ($this->_processCallbacks)) {\n\n\t\t\t// test for a successful view dispatch\n\t\t\tif ($this->_processProcess ($this->_processCallbacks[$c['key']],\n\t\t\t $request,\n\t\t\t $context))\n\t\t\t\treturn;\n\t\t}\n\n\t\t// if no view has been found yet attempt our default\n\t\tif ($this->defaultViewExists ())\n\t\t\t$this->renderDefaultView ($request, $context);\n\t}", "public function handle($request, $next);", "public function handle(): void\n {\n $globals = $_SERVER;\n //$SlimPsrRequest = ServerRequestFactory::createFromGlobals();\n //it doesnt matters if the Request is of different class - no need to create Guzaba\\Http\\Request\n $PsrRequest = ServerRequestFactory::createFromGlobals();\n //the only thing that needs to be fixed is the update the parsedBody if it is NOT POST & form-fata or url-encoded\n\n\n //$GuzabaPsrRequest =\n\n //TODO - this may be reworked to reroute to a new route (provided in the constructor) instead of providing the actual response in the constructor\n $DefaultResponse = $this->DefaultResponse;\n //TODO - fix the below\n// if ($PsrRequest->getContentType() === ContentType::TYPE_JSON) {\n// $DefaultResponse->getBody()->rewind();\n// $structure = ['message' => $DefaultResponse->getBody()->getContents()];\n// $json_string = json_encode($structure, JSON_UNESCAPED_SLASHES);\n// $StreamBody = new Stream(null, $json_string);\n// $DefaultResponse = $DefaultResponse->\n// withBody($StreamBody)->\n// withHeader('Content-Type', ContentType::TYPES_MAP[ContentType::TYPE_JSON]['mime'])->\n// withHeader('Content-Length', (string) strlen($json_string));\n// }\n\n $FallbackHandler = new RequestHandler($DefaultResponse);//this will produce 404\n $QueueRequestHandler = new QueueRequestHandler($FallbackHandler);//the default response prototype is a 404 message\n foreach ($this->middlewares as $Middleware) {\n $QueueRequestHandler->add_middleware($Middleware);\n }\n $PsrResponse = $QueueRequestHandler->handle($PsrRequest);\n $this->emit($PsrResponse);\n\n }", "public function HandleRequest(Request $request)\r\n {\r\n $command = $this->_commandResolver->GetCommand($request);\t// Create command object for Request\r\n $response = $command->Execute($request);\t\t\t\t\t// Execute the command to get response\r\n $view = ApplicationController::GetView($response);\t\t\t\t\t// Send response to the appropriate view for display\r\n $view->Render();\t\t\t\t\t\t\t\t\t\t\t// Display the view\r\n }", "public function process($path, Request $request);", "public function handle(string $query, ServerRequestInterface $request);", "public function handleRequest()\n\t{\n\t\t$fp = $this->fromRequest();\n\t\treturn $fp->render();\n\t}", "private function _processRequest()\n\t{\n\t\t// prevent unauthenticated access to API\n\t\t$this->_secureBackend();\n\n\t\t// get the request\n\t\tif (!empty($_REQUEST)) {\n\t\t\t// convert to object for consistency\n\t\t\t$this->request = json_decode(json_encode($_REQUEST));\n\t\t} else {\n\t\t\t// already object\n\t\t\t$this->request = json_decode(file_get_contents('php://input'));\n\t\t}\n\n\t\t//check if an action is sent through\n\t\tif(!isset($this->request->action)){\n\t\t\t//if no action is provided then reply with a 400 error with message\n\t\t\t$this->reply(\"No Action Provided\", 400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n\n\t\t//check if method for the action exists\n\t\tif(!method_exists($this, $this->request->action)){\n\t\t\t//if method doesn't exist, send 400 code and message with reply'\n\t\t\t$this->reply(\"Action method not found\",400);\n\t\t\t//kill script\n\t\t\texit();\n\t\t}\n \n\t\tswitch($this->request->action){\n\t\t\tcase \"hello\":\n\t\t\t\t$this->hello($this->request->data);\n\t\t\t\tbreak;\n\t\t\tcase \"submit_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->submit_video($this->request, $_FILES);\n\t\t\t\tbreak;\n\t\t\tcase \"remove_video\":\n\t\t\t\t//error_log(\"formSubmit has been sent through\");\n\t\t\t\t$this->remove_video($this->request);\n\t\t\t\tbreak;\n\t\t\tcase \"isSubmitted\":\n\t\t\t\t$this->isSubmitted($this->request);\n\t\t\tdefault:\n\t\t\t\t$this->reply(\"action switch failed\",400);\n\t\t\tbreak;\n\t\t}\n\n\n\n\t}", "public function handleRequest ()\n\t{\n\t\t$this->version = '1.0';\n\t\t$this->id = NULL;\n\n\t\tif ($this->getProperty(self::PROPERTY_ENABLE_EXTRA_METHODS))\n\t\t\t$this->publishExtraMethods();\n\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\n\t\t\t$json = file_get_contents('php://input');\n\t\t\t$request = \\json_decode($json);\n\n\t\t\tif (is_array($request))\n\t\t\t{\n\t\t\t\t// Multicall\n\t\t\t\t$this->version = '2.0';\n\n\t\t\t\t$response = array();\n\t\t\t\tforeach ($request as $singleRequest)\n\t\t\t\t{\n\t\t\t\t\t$singleResponse = $this->handleSingleRequest($singleRequest, TRUE);\n\t\t\t\t\tif ($singleResponse !== FALSE)\n\t\t\t\t\t\t$response[] = $singleResponse;\n\t\t\t\t}\n\n\t\t\t\t// If all methods in a multicall are notifications, we must not return an empty array\n\t\t\t\tif (count($response) == 0)\n\t\t\t\t\t$response = FALSE;\n\t\t\t}\n\t\t\telse if (is_object($request))\n\t\t\t{\n\t\t\t\t$this->version = $this->getRpcVersion($request);\n\t\t\t\t$response = $this->handleSingleRequest($request);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$response = $this->formatError(self::ERROR_INVALID_REQUEST);\n\t\t}\n\t\telse if ($_SERVER['PATH_INFO'] != '')\n\t\t{\n\t\t\t$this->version = '1.1';\n\t\t\t$this->id = NULL;\n\n\t\t\t$method = substr($_SERVER['PATH_INFO'], 1);\n\t\t\t$params = $this->convertFromRpcEncoding($_GET);\n\n\t\t\tif (!$this->hasMethod($method))\n\t\t\t\t$response = $this->formatError(self::ERROR_METHOD_NOT_FOUND);\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tRpcResponse::setWriter(new JsonRpcResponseWriter($this->version, $this->id));\n\t\t\t\t\t$res = $this->invoke($method, $params);\n\t\t\t\t\tif ($res instanceof JsonRpcResponseWriter)\n\t\t\t\t\t{\n\t\t\t\t\t\t$res->finalize();\n\t\t\t\t\t\t$resposne = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$response = $this->formatResult($res);\n\t\t\t\t}\n\t\t\t\tcatch (\\Exception $exception)\n\t\t\t\t{\n\t\t\t\t\t$response = $this->formatException($exception);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response = $this->formatError(self::ERROR_PARSE_ERROR);\n\t\t}\n\n\t\tif (!headers_sent())\n\t\t{\n\t\t\theader('Content-Type: application/json', TRUE);\n\t\t\theader('Cache-Control: nocache', TRUE);\n\t\t\theader('Pragma: no-cache', TRUE);\n\t\t}\n\n\t\tif ($response !== FALSE)\n\t\t{\n\t\t\t$result = \\json_encode($this->convertToRpcEncoding($response));\n\n\t\t\tif ($result === FALSE)\n\t\t\t\terror_log(var_export($response, TRUE));\n\t\t\telse\n\t\t\t\techo($result);\n\t\t}\n\t}", "public function handle($request)\n {\n $this->setRouter($this->app->compose('Cygnite\\Base\\Router\\Router', $request), $request);\n\n try {\n $response = $this->sendRequestThroughRouter($request);\n /*\n * Check whether return value is a instance of Response,\n * otherwise we will try to fetch the response form container,\n * create a response and return to the browser.\n *\n */\n if (!$response instanceof ResponseInterface && !is_array($response)) {\n $r = $this->app->has('response') ? $this->app->get('response') : '';\n $response = Response::make($r);\n }\n } catch (\\Exception $e) {\n $this->handleException($e);\n } catch (Throwable $e) {\n $this->handleException($e);\n }\n\n return $response;\n }", "public function handleRequest()\n\t{\n $response = array();\n switch ($this->get_server_var('REQUEST_METHOD')) \n {\n case 'OPTIONS':\n case 'HEAD':\n $response = $this->head();\n break;\n case 'GET':\n $response = $this->get();\n break;\n case 'PATCH':\n case 'PUT':\n case 'POST':\n $response = $this->post();\n break;\n case 'DELETE':\n $response = $this->delete();\n break;\n default:\n $this->header('HTTP/1.1 405 Method Not Allowed');\n }\n\t\treturn $response;\n }", "public function handleRequest(Zend_Controller_Request_Http $request)\n {\n \n }", "final public function handle(Request $request)\n {\n $response = $this->process($request);\n if (($response === null) && ($this->successor !== null)) {\n $response = $this->successor->handle($request);\n }\n\n return $response;\n }", "public function process(Aloi_Serphlet_Application_HttpRequest $request, Aloi_Serphlet_Application_HttpResponse $response) {\r\n\r\n\t\ttry {\r\n\t\t\t// Identify the path component we will use to select a mapping\r\n\t\t\t$path = $this->processPath($request, $response);\r\n\t\t\tif (is_null($path)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (self::$log->isDebugEnabled()) {\r\n\t\t\t\tself::$log->debug('Processing a \"' . $request->getMethod() . '\" for path \"' . $path . '\"');\r\n\t\t\t}\r\n\r\n\t\t\t// Select a Locale for the current user if requested\r\n\t\t\t$this->processLocale($request, $response);\r\n\r\n\t\t\t// Set the content type and no-caching headers if requested\r\n\t\t\t$this->processContent($request, $response);\r\n\t\t\t$this->processNoCache($request, $response);\r\n\r\n\t\t\t// General purpose preprocessing hook\r\n\t\t\tif (!$this->processPreprocess($request, $response)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t//Identify the mapping for this request\r\n\t\t\t$mapping = $this->processMapping($request, $response, $path);\r\n\t\t\tif (is_null($mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check for any role required to perform this action\r\n\t\t\tif (!$this->processRoles($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process any ActionForm bean related to this request\r\n\t\t\t$form = $this->processActionForm($request, $response, $mapping);\r\n\t\t\t$this->processPopulate($request, $response, $form, $mapping);\r\n\t\t\tif (!$this->processValidate($request, $response, $form, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Process a forward or include specified by this mapping\r\n\t\t\tif (!$this->processForward($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (!$this->processInclude($request, $response, $mapping)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Create or acquire the Action instance to process this request\r\n\t\t\t$action = $this->processActionCreate($request, $response, $mapping);\r\n\t\t\tif (is_null($action)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Call the Action instance itself\r\n\t\t\t$forward = $this->processActionPerform($request, $response, $action, $form, $mapping);\r\n\r\n\t\t\t// Process the returned ActionForward instance\r\n\t\t\t$this->processForwardConfig($request, $response, $forward);\r\n\t\t} catch (ServletException $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}", "function handleRequest() {\n // I. On récupère l'action demandée par l'utilisateur, avec retrocompatibilité\n // Controller et Entité\n $entityName = (isset($_GET['controller']) ? $_GET['controller'] : \"article\");\n // on retravaille le nom pour obtenir un nom de la forme \"Article\"\n $entityName = ucfirst(strtolower($entityName));\n\n // Action\n $actionName = (isset($_GET['action']) ? $_GET['action'] : \"index\");\n $actionName = strtolower($actionName);\n\n // II à IV sont maintenant dans loadDep\n $controller = $this->loadDependencies($entityName);\n\n // V. On regarde si l'action de controller existe, puis on la charge\n // on retravaille la var obtenue pour obtenir un nom de la forme \"indexAction\"\n $action = $actionName . \"Action\";\n\n // si la méthode demandée n'existe pas, remettre \"index\"\n if (!method_exists($controller, $action)) {\n $actionName = \"index\";\n $action = \"indexAction\";\n }\n\n // on stock le titre sous la forme \"Article - Index\"\n $this->title = $entityName . \" - \" . $actionName;\n\n // on appelle dynamiquement la méthode de controller\n $this->content = $controller->$action();\n }", "public function handle(RequestInterface $request): ResponseInterface;", "public function handleRequest() {\n $this->loadErrorHandler();\n\n $this->sanitizeRequest();\n $this->modx->invokeEvent('OnHandleRequest');\n if (!$this->modx->checkSiteStatus()) {\n header('HTTP/1.1 503 Service Unavailable');\n if (!$this->modx->getOption('site_unavailable_page',null,1)) {\n $this->modx->resource = $this->modx->newObject('modDocument');\n $this->modx->resource->template = 0;\n $this->modx->resource->content = $this->modx->getOption('site_unavailable_message');\n } else {\n $this->modx->resourceMethod = \"id\";\n $this->modx->resourceIdentifier = $this->modx->getOption('site_unavailable_page',null,1);\n }\n } else {\n $this->checkPublishStatus();\n $this->modx->resourceMethod = $this->getResourceMethod();\n $this->modx->resourceIdentifier = $this->getResourceIdentifier($this->modx->resourceMethod);\n if ($this->modx->resourceMethod == 'id' && $this->modx->getOption('friendly_urls', null, false) && !$this->modx->getOption('request_method_strict', null, false)) {\n $uri = $this->modx->context->getResourceURI($this->modx->resourceIdentifier);\n if (!empty($uri)) {\n if ((integer) $this->modx->resourceIdentifier === (integer) $this->modx->getOption('site_start', null, 1)) {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL);\n } else {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL) . $uri;\n }\n $this->modx->sendRedirect($url, array('responseCode' => 'HTTP/1.1 301 Moved Permanently'));\n }\n }\n }\n if (empty ($this->modx->resourceMethod)) {\n $this->modx->resourceMethod = \"id\";\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $this->modx->resourceIdentifier = $this->_cleanResourceIdentifier($this->modx->resourceIdentifier);\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $found = $this->findResource($this->modx->resourceIdentifier);\n if ($found) {\n $this->modx->resourceIdentifier = $found;\n $this->modx->resourceMethod = 'id';\n } else {\n $this->modx->sendErrorPage();\n }\n }\n $this->modx->beforeRequest();\n $this->modx->invokeEvent(\"OnWebPageInit\");\n\n if (!is_object($this->modx->resource)) {\n if (!$this->modx->resource = $this->getResource($this->modx->resourceMethod, $this->modx->resourceIdentifier)) {\n $this->modx->sendErrorPage();\n return true;\n }\n }\n\n return $this->prepareResponse();\n }", "public function process(\n ServerRequestInterface $request,\n RequestHandlerInterface $handler\n );", "protected function handleRequest() {\n\t\t// TODO: remove conditional when we have a dedicated error render\n\t\t// page and move addModule to Mustache#getResources\n\t\tif ( $this->adapter->getFormClass() === 'Gateway_Form_Mustache' ) {\n\t\t\t$modules = $this->adapter->getConfig( 'ui_modules' );\n\t\t\tif ( !empty( $modules['scripts'] ) ) {\n\t\t\t\t$this->getOutput()->addModules( $modules['scripts'] );\n\t\t\t}\n\t\t\tif ( $this->adapter->getGlobal( 'LogClientErrors' ) ) {\n\t\t\t\t$this->getOutput()->addModules( 'ext.donationInterface.errorLog' );\n\t\t\t}\n\t\t\tif ( !empty( $modules['styles'] ) ) {\n\t\t\t\t$this->getOutput()->addModuleStyles( $modules['styles'] );\n\t\t\t}\n\t\t}\n\t\t$this->handleDonationRequest();\n\t}", "public function handleHttpRequest($requestParams)\n\t{\n\t\t$action = strtolower(@$requestParams[self::REQ_PARAM_ACTION]);\t\t\n\t\t$methodName = $this->actionToMethod($action);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$this->$methodName($requestParams);\n\t\t} catch(Exception $e)\n\t\t{\n\t\t\techo \"Error: \".$e->getMessage();\n\t\t}\n\t}", "public static function handleRequest()\n\t{\n\t\t// Load language strings\n\t\tself::loadLanguage();\n\n\t\t// Load the controller and let it run the show\n\t\trequire_once dirname(__FILE__).'/classes/controller.php';\n\t\t$controller = new LiveUpdateController();\n\t\t$controller->execute(JRequest::getCmd('task','overview'));\n\t\t$controller->redirect();\n\t}", "public function handle() {\n $this->initDb(((!isset(self::$_config['db']['type'])) ? 'mysql' : self::$_config['db']['type']));\n $request = new corelib_request(self::$_config['routing'], self::$_config['reg_routing']);\n $path = parse_url($_SERVER['REQUEST_URI']);\n\n if (self::$_config['home'] == \"/\" || self::$_config['home'] == \"\") {\n $uri = ltrim($path['path'], '/');\n } else {\n $uri = str_replace(self::$_config['home'], '', $path['path']);\n }\n\n if (\"\" == $uri || \"/\" == $uri) {\n $uri = self::$_config['routing']['default']['controller'] . '/' . self::$_config['routing']['default']['action'];\n }\n self::$isAjax = $request->isAjax();\n self::$request = $request->route($uri);\n self::$request['uri'] = $uri;\n\n if (self::$request['action'] == \"\")\n self::$request['action'] = self::$_config['routing']['default']['action'];\n\n $this->_run( self::$request['params'] );\n }", "public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }", "public function request_handler(){\r\n\t\t$route = new Router;\r\n\t\t$session = new Session;\r\n\t\t$segments = $route->urlRoute();\r\n\t\t#check if controller/action exist\r\n\t\t#if not use default_controller / default_action\r\n\t\tif( count($segments) == 0 || count($segments) == 1 ){\r\n\t\t\tinclude_class_method( default_controller , default_action );\r\n\t\t}else{\r\n\t\t#if controller/action exist in the url\r\n\t\t#then check the controller if it's existed in the file\r\n\t\t\tif( file_exists( CONTROLLER_DIR . $segments[0] . CONT_EXT ) )\r\n\t\t\t{\r\n\t\t\t\t#check for segments[1] = actions\r\n\t\t\t\t#if segments[1] exist, logically segments[0] which is the controller is also exist!!\r\n\t\t\t\t//if( isset($segments[1]) ){\r\n\t\t\t\t\tinclude_class_method( $segments[0], $segments[1] . 'Action' );\r\n\t\t\t\t//}\r\n\t\t\t}else{\r\n\t\t\t\terrorHandler(CONTROLLER_DIR . $segments[0] . CONT_EXT);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function handle() {\n if(method_exists($this->class, $this->function)) {\n echo $this->class->{$this->function}($this->request);\n }else {\n echo Response::response(['error' => 'function does not exist on ' . get_class($this->class)], 500);\n }\n }", "public function handle(ClientInterface $client, RequestInterface $request, HttpRequest $httpRequest);", "public function handleRequest() {\n $questions=$this->contactsService->getAllQuestions(\"date\");\n //load all the users\n $userList = User::loadUsers();\n //load all the topics\n \t\t$topics = $this->contactsService2->getAllTopics(\"name\");\n \t\t\n\t\t\t\trequire_once '../view/home.tpl';\n\t}", "public function serve_request()\n {\n }", "public static function process($request){\r\n\t\tcall_user_func($request -> action, $request -> params);\r\n\t}", "function process($request) {\n\t//$logFusion =& LoggerManager::getLogger('fusion');\n//PBXFusion begin\n\t$request=$this->mapRequestVars($request);\n $mode = $request->get('callstatus');\n\t//$logFusion->debug(\"PBX CONTROLLER PROCESS mode=\".$mode);\n//PBXFusion end\n switch ($mode) {\n\t//PBXFusion begin\n \t case \"CallStart\" :\n $this->processCallStart($request);\n break;\n\t//PBXFusion end\n case \"StartApp\" :\n $this->processStartupCallFusion($request);\n break;\n case \"DialAnswer\" :\n $this->processDialCallFusion($request);\n break;\n case \"Record\" :\n $this->processRecording($request);\n break;\n case \"EndCall\" :\n $this->processEndCallFusion($request);\n break;\n case \"Hangup\" :\n $callCause = $request->get('causetxt');\n if ($callCause == \"null\") {\n break;\n }\n $this->processHangupCall($request);\n break;\n }\n }", "public function handle() {\n\t\n\t\t$task = $this->request->getTask();\n\t\t$handler = $this->resolveHandler($task);\n\t\t$action = $this->request->getAction();\n\t\t$method = empty($action) ? $this->defaultActionMethod : $action.$this->actionMethodSuffix;\n\t\t\n\t\tif (! method_exists($handler, $method)) {\n\t\t\tthrow new Task\\NotHandledException(\"'{$method}' method not found on handler.\");\n\t\t}\n\t\t\n\t\t$handler->setRequest($this->request);\n\t\t$handler->setIo($this->io);\n\t\t\n\t\treturn $this->invokeHandler($handler, $method);\n\t}", "private function handleCall() { //$this->request\n $err = FALSE;\n // route call to method\n $this->logToFile($this->request['action']);\n switch($this->request['action']) {\n // Edit form submitted\n case \"edit\":\n // TODO: improve error handling\n try {\n $this->logToFile(\"case: edit\");\n $this->edit($this->request['filename']);\n //$this->save();\n } catch (Exception $e) {\n $err = \"Something went wrong: \";\n $err .= $e.getMessage();\n }\n break;\n }\n // TODO: set error var in response in case of exception / error\n // send JSON response\n if($err !== FALSE) {\n $this->request['error_msg'] = $err;\n }\n $this->giveJSONResponse($this->request);\n }", "function handle()\n {\n $this->verifyPost();\n\n $postTarget = $this->determinePostTarget();\n\n $this->filterPostData();\n\n switch ($postTarget) {\n case 'upload_media':\n $this->handleMediaFileUpload();\n break;\n case 'feed':\n $this->handleFeed();\n break;\n case 'feed_media':\n $this->handleFeedMedia();\n break;\n case 'feed_users':\n $this->handleFeedUsers();\n break;\n case 'delete_media':\n $this->handleDeleteMedia();\n break;\n }\n }", "public function run() {\n\t\t// If this particular request is not a hook, something is wrong.\n\t\tif (!isset($this->server[self::MERGADO_HOOK_AUTH_HEADER])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s is to be used only for handling hooks sent from Mergado.\n\t\t\t\tMergado-Apps-Hook-Auth is missing.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t}\n\n\t\tif (!$decoded = json_decode($this->rawRequest, true)) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle request, because the data to be handled is empty.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t} elseif (!isset($decoded['action'])) {\n\t\t\tthrow new \\RuntimeException(sprintf(\n\t\t\t\t\"%s cannot handle the hook, because the hook action is undefined.\",\n\t\t\t\t__CLASS__\n\t\t\t));\n\t\t};\n\n\t\t$this->handle($decoded['action'], $decoded);\n\n\t}", "public function handleRequest()\n {\n $version = $this->versionEngine->getVersion();\n $queryConfiguration = $version->parseRequest($this->columnConfigurations);\n $this->provider->prepareForProcessing($queryConfiguration, $this->columnConfigurations);\n $data = $this->provider->process();\n return $version->createResponse($data, $queryConfiguration, $this->columnConfigurations);\n }", "public function process()\n\t{\n\t\t$action = $this->getAction();\n\t\tswitch (strtolower($action))\n\t\t{\n\t\t\tcase 'get':\n\t\t\tcase 'put':\n\t\t\tcase 'post':\n\t\t\tcase 'delete':\n\t\t}\t\n\t}", "public function run(){\n // server response object \n $requestMethod = $this->requestBuilder->getRequestMethod();\n $this->response = new Response($requestMethod);\n\n try{\n $route = $this->router->validateRequestedRoute($this->requestBuilder);\n\n // serve request object\n $this->requestBuilder->setQuery();\n $this->requestBuilder->setBody();\n $requestParams = $this->requestBuilder->getParam();\n $requestQuery = $this->requestBuilder->getQuery();\n $requestBody = $this->requestBuilder->getBody(); \n $this->request = new Request($requestParams, $requestQuery, $requestBody);\n\n $callback = $route->getCallback();\n $callback($this->request, $this->response);\n }catch(RouteNotImplementedException $e){\n $this->response->statusCode(404)->json($e->getMessage()); \n }\n \n }", "final public function handle()\n {\n \n $this->_preHandle();\n \n if ($this->_request->getActionName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the action name.');\n }\n\n if ($this->_request->getProviderName() == null) {\n throw new ZendL_Tool_Endpoint_Exception('Endpoint failed to setup the provider name.');\n }\n \n ob_start();\n \n try {\n $dispatcher = new ZendL_Tool_Rpc_Endpoint_Dispatcher();\n $dispatcher->setRequest($this->_request)\n ->setResponse($this->_response)\n ->dispatch();\n \n } catch (Exception $e) {\n //@todo implement some sanity here\n die($e->getMessage());\n //$this->_response->setContent($e->getMessage());\n return;\n }\n \n if (($content = ob_get_clean()) != '') {\n $this->_response->setContent($content);\n }\n \n $this->_postHandle();\n }", "public function RouteRequest ();", "public function handle(ServerRequestInterface $request, $handler, array $vars): ?ResponseInterface;", "public function DispatchRequest ();", "protected function handleRequest() {\n\t\t// FIXME: is this necessary?\n\t\t$this->getOutput()->allowClickjacking();\n\t\tparent::handleRequest();\n\t}", "public function listen() {\n\t\t// Checks the user agents match\n\t\tif ( $this->user_agent == $this->request_user_agent ) {\n\t\t\t// Determine if a key request has been made\n\t\t\tif ( isset( $_GET['key'] ) ) {\n\t\t\t\t$this->download_update();\n\t\t\t} else {\n\t\t\t\t// Determine the action requested\n\t\t\t\t$action = filter_input( INPUT_POST, 'action', FILTER_SANITIZE_STRING );\n\n\t\t\t\t// If that method exists, call it\n\t\t\t\tif ( method_exists( $this, $action ) )\n\t\t\t\t\t$this->{$action}();\n\t\t\t}\n\t\t}\n\t}", "abstract public function request();", "public function run() {\r\n $this->routeRequest(new Request());\r\n }", "public function processAction(Request $request)\n {\n // Get the request Vars\n $this->requestQuery = $request->query;\n\n // init the hybridAuth instance\n $provider = trim(strip_tags($this->requestQuery->get('hauth_start')));\n $cookieName = $this->get('azine_hybrid_auth_service')->getCookieName($provider);\n $this->hybridAuth = $this->get('azine_hybrid_auth_service')->getInstance($request->cookies->get($cookieName), $provider);\n\n // If openid_policy requested, we return our policy document\n if ($this->requestQuery->has('get') && 'openid_policy' == $this->requestQuery->get('get')) {\n return $this->processOpenidPolicy();\n }\n\n // If openid_xrds requested, we return our XRDS document\n if ($this->requestQuery->has('get') && 'openid_xrds' == $this->requestQuery->get('get')) {\n return $this->processOpenidXRDS();\n }\n\n // If we get a hauth.start\n if ($this->requestQuery->has('hauth_start') && $this->requestQuery->get('hauth_start')) {\n return $this->processAuthStart();\n }\n // Else if hauth.done\n elseif ($this->requestQuery->has('hauth_done') && $this->requestQuery->get('hauth_done')) {\n return $this->processAuthDone($request);\n }\n // Else we advertise our XRDS document, something supposed to be done from the Realm URL page\n\n return $this->processOpenidRealm();\n }", "public function run() {\n $base = $this->request->getNextRoute();\n if ($base !== BASE) {\n $this->response->notFound();\n }\n $start = $this->request->getNextRoute();\n if ($rs = $this->getRs($start)) {\n if ($this->request->isOptions()) {\n $this->response->okEmpty();\n return;\n }\n try {\n $this->response->ok($rs->handleRequest());\n\n } catch (UnauthorizedException $e) {\n $this->response->unauthorized();\n\n } catch (MethodNotAllowedException $e) {\n $this->response->methodNotAllowed();\n\n } catch (BadRequestExceptionInterface $e) {\n $this->response->badRequest($e->getMessage());\n\n } catch (UnavailableExceptionInterface $e) {\n $this->response->unavailable($e->getMessage());\n\n } catch (Exception $e) {\n $this->response->unavailable($e->getMessage());\n }\n } else {\n $this->response->badRequest();\n }\n }", "public function handle(Request $request, Response|JsonResponse|BinaryFileResponse|StreamedResponse $response, int $length);", "public function handle(Request $request, Closure $next);", "public function handleGetRequest($id);", "abstract function doExecute($request);", "public function parseCurrentRequest()\n {\n // If 'action' is post, data will only be read from 'post'\n if ($action = $this->request->post('action')) {\n die('\"post\" method action handling not implemented');\n }\n \n $action = $this->request->get('action') ?: 'home';\n \n if ($response = $this->actionHandler->trigger($action, $this)) {\n $this->getResponder()->send($response);\n } else {\n die('404 not implemented');\n }\n }", "abstract public function mapRequest($request);", "public function handle(ServerRequestInterface $request)\n {\n $router = $this->app->get(RouterInterface::class);\n $response = $router->route($request);\n\n if (! headers_sent()) {\n\n // Status\n header(sprintf(\n 'HTTP/%s %s %s',\n $response->getProtocolVersion(),\n $response->getStatusCode(),\n $response->getReasonPhrase()\n ));\n\n // Headers\n foreach ($response->getHeaders() as $name => $values) {\n foreach ($values as $value) {\n header(sprintf('%s: %s', $name, $value), false);\n }\n }\n }\n\n echo $response->getBody()->getContents();\n }", "abstract public function processRequest(PriceWaiter_NYPWidget_Controller_Endpoint_Request $request);", "private function handleRequest()\n {\n // we check the inputs validity\n $validator = Validator::make($this->request->only('rowsNumber', 'search', 'sortBy', 'sortDir'), [\n 'rowsNumber' => 'required|numeric',\n 'search' => 'nullable|string',\n 'sortBy' => 'nullable|string|in:' . $this->columns->implode('attribute', ','),\n 'sortDir' => 'nullable|string|in:asc,desc',\n ]);\n // if errors are found\n if ($validator->fails()) {\n // we log the errors\n Log::error($validator->errors());\n // we set back the default values\n $this->request->merge([\n 'rowsNumber' => $this->rowsNumber ? $this->rowsNumber : config('tablelist.default.rows_number'),\n 'search' => null,\n 'sortBy' => $this->sortBy,\n 'sortDir' => $this->sortDir,\n ]);\n } else {\n // we save the request values\n $this->setAttribute('rowsNumber', $this->request->rowsNumber);\n $this->setAttribute('search', $this->request->search);\n }\n }", "public function handle() {\n\t\t\n\t\t\n\t\t\n\t\theader('ApiVersion: 1.0');\n\t\tif (!isset($_COOKIE['lg_app_guid'])) {\n\t\t\t//error_log(\"NO COOKIE\");\n\t\t\t//setcookie(\"lg_app_guid\", uniqid(rand(),true),time()+(10*365*24*60*60));\n\t\t} else {\n\t\t\t//error_log(\"cookie: \".$_COOKIE['lg_app_guid']);\n\t\t\t\n\t\t}\n\t\t// checks if a JSON-RCP request has been received\n\t\t\n\t\tif (($_SERVER['REQUEST_METHOD'] != 'POST' && (empty($_SERVER['CONTENT_TYPE']) || strpos($_SERVER['CONTENT_TYPE'],'application/json')===false)) && !isset($_GET['d'])) {\n\t\t\t\techo \"INVALID REQUEST\";\n\t\t\t// This is not a JSON-RPC request\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\n\t\t// reads the input data\n\t\tif (isset($_GET['d'])) {\n\t\t\tdefine(\"WEB_REQUEST\",true);\n\t\t\t$request=urldecode($_GET['d']);\n\t\t\t$request = stripslashes($request);\n\t\t\t$request = json_decode($request, true);\n\t\t\t\n\t\t} else {\n\t\t\tdefine(\"WEB_REQUEST\",false);\n\t\t\t//error_log(file_get_contents('php://input'));\n\t\t\t$request = json_decode(file_get_contents('php://input'),true);\n\t\t\t//error_log(print_r(apache_request_headers(),true));\n\t\t}\n\t\t\n\t\terror_log(\"Method: \".$request['method']);\n\t\tif (!isset($this->exemptedMethods[$request['method']])) {\n\t\t\ttry {\n\t\t\t\t$this->authenticate();\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$this->authenticated = false;\n\t\t\t\t$this->handleError($e);\n\t\t\t}\n\t\t} else {\n\t\t\t//error_log('exempted');\n\t\t}\n\t\ttrack_call($request);\n\t\t//error_log(\"RPC Method Called: \".$request['method']);\n\t\t\n\t\t//include the document containing the function being called\n\t\tif (!function_exists($request['method'])) {\n\t\t\t$path_to_file = \"./../include/methods/\".$request['method'].\".php\";\n\t\t\tif (file_exists($path_to_file)) {\n\t\t\t\tinclude $path_to_file;\n\t\t\t} else {\n\t\t\t\t$e = new Exception('Unknown method. ('.$request['method'].')', 404, null);\n \t$this->handleError($e);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t// executes the task on local object\n\t\ttry {\n\t\t\t\n\t\t\t$result = @call_user_func($request['method'],$request['params']);\n\t\t\t\n\t\t\tif (!is_array($result) || !isset($result['result']) || $result['result']) {\n\t\t\t\t\n\t\t\t\tif (is_array($result) && isset($result['result'])) unset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'result' => $result,\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\t} else {\n\t\t\t\tunset($result['result']);\n\t\t\t\t\n\t\t\t\t$response = array (\n\t\t\t\t\t\t\t\t\t'jsonrpc' => '2.0',\n\t\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t\t'error' => $result\n\t\t\t\t\t\t\t\t );\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$response = array (\n\t\t\t\t\t\t\t\t'id' => $request['id'],\n\t\t\t\t\t\t\t\t'result' => NULL,\n\t\t\t\t\t\t\t\t'error' => $e->getMessage()\n\t\t\t\t\t\t\t\t);\n\t\t\t\n\t\t}\n\t\t// output the response\n\t\tif (!empty($request['id'])) { // notifications don't want response\n\t\t\theader('content-type: text/javascript');\n\t\t\t//error_log(@print_r($response));\n\t\t\tif (isset($_GET['d'])) $str_response = $_GET['jsoncallback'].\"(\".str_replace('\\/','/',json_encode($response)).\")\";\n\t\t\telse $str_response = str_replace('\\/','/',json_encode($response));\n\t\t\t\n\t\t\tif ($_SERVER['SERVER_ADDR']=='192.168.1.6') {\n\t\t\t\t//error_log($str_response);\n\t\t\t}\n\t\t\techo $str_response;\n\t\t}\n\t\t\n\t\t\n\t\t// finish\n\t\treturn true;\n\t}", "protected function handle(Request $request)\n {\n return 1;\n }", "public function __invoke(Request $request, RequestHandler $handler) {\n R::setup('mysql:host=127.0.0.1;dbname=cellar','root','');\n \n $response = $handler->handle($request);\n R::close();\n return $response;\n }", "public function handle($req)\n {\n $params = $req->post ?: [];\n\n $files = $this->transformFiles($req->files);\n\n $cookies = $req->cookie ?: [];\n\n $server = $this->transformHeadersToServerVars(array_merge($req->header, [\n 'PATH_INFO' => array_get($req->server, 'path_info'),\n ]));\n $server['X_REQUEST_ID'] = Str::uuid()->toString();\n\n $requestUri = $req->server['request_uri'];\n if (isset($req->server['query_string']) && $req->server['query_string']) {\n $requestUri .= \"?\" . $req->server['query_string'];\n }\n\n $resp = $this->call(\n strtolower($req->server['request_method']),\n $requestUri, $params, $cookies, $files,\n $server, $req->rawContent()\n );\n\n return [\n 'status' => $resp->getStatusCode(),\n 'headers' => $resp->headers,\n 'body' => $resp->getContent(),\n ];\n }", "public function handle(Request $request)\n {\n $route_params = $this->_router->match($request->getUri());\n $route = $route_params['route'];\n $params = $route_params['params'];\n\n $func = reset($route) . self::CONTROLLER_METHOD_SUFIX;\n $class_name = key($route);\n $controller = new $class_name($request);\n\n $response = call_user_func_array(\n [\n $controller,\n $func,\n ],\n [$params]\n );\n\n if ($response instanceof Response) {\n return $response;\n } else {\n throw new InvalidHttpResponseException();\n }\n }" ]
[ "0.8299201", "0.8147294", "0.8147294", "0.8147294", "0.8127764", "0.7993589", "0.7927201", "0.7912899", "0.7899075", "0.76317674", "0.75089735", "0.7485808", "0.74074036", "0.7377414", "0.736802", "0.7294553", "0.72389543", "0.7230166", "0.72108", "0.71808434", "0.7170364", "0.71463037", "0.7126907", "0.7122795", "0.71225274", "0.7116879", "0.70607233", "0.6981947", "0.6966695", "0.69393975", "0.6912079", "0.68985975", "0.6887614", "0.68774897", "0.6806274", "0.67969805", "0.67778915", "0.6762979", "0.67565143", "0.67533374", "0.67192745", "0.6683243", "0.66487724", "0.66395754", "0.6634629", "0.66283566", "0.6617558", "0.6610097", "0.6610011", "0.6544976", "0.653806", "0.6512757", "0.64682734", "0.64381886", "0.6416964", "0.63373476", "0.63359964", "0.6334543", "0.63308066", "0.6321675", "0.63176167", "0.631661", "0.6310991", "0.63108873", "0.6295945", "0.6279438", "0.62778515", "0.62508965", "0.62422955", "0.62321424", "0.62237644", "0.6203428", "0.61954546", "0.6191255", "0.61774665", "0.61682004", "0.6151806", "0.61271876", "0.61257905", "0.6116093", "0.61126447", "0.6112368", "0.6101652", "0.60893977", "0.60871464", "0.60862815", "0.60734737", "0.60535145", "0.6028341", "0.60250086", "0.60224646", "0.6011745", "0.6011483", "0.60106593", "0.5998867", "0.5997086", "0.5991233", "0.59844923", "0.59668386", "0.5961315", "0.5954762" ]
0.0
-1
========================================================================= CONVENIENCE METHODS =========================================================================
public function fetchOneForEmail($email) { return $this->fetchOneWhere([$this->columnPrefix.'email = ?'=>$email]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConsonants()\n {\n return $this->consonants;\n }", "public function getCadence(){\n return $this->cadence;\n }", "public function ccm();", "public function __construct()\n {\n //$this->contrats = new ArrayCollection();\n }", "function getConsiglio() {\n\t\treturn $this->soc->getConsiglio();\n\t}", "public function getCcv()\n {\n return $this->cvv;\n }", "private function __constrcut() { }", "public function getCouleur()\n {\n return $this->couleur;\n }", "public function getCoCNES()\n {\n return isset($this->coCNES) ? $this->coCNES : null;\n }", "public function getCLAVE()\n {\n return $this->CLAVE;\n }", "public function testSetConsequence() {\n\n $obj = new AppelsEnCours();\n\n $obj->setConsequence(\"consequence\");\n $this->assertEquals(\"consequence\", $obj->getConsequence());\n }", "protected function createCsConvObject() {}", "public function getCons()\r\n {\r\n return $this->_cons;\r\n }", "public function __construct(Convite $convite)\n {\n $this->convite = $convite;\n }", "public function getCOFINS()\n {\n return $this->cOFINS;\n }", "private function getConjoinedResult(): void\n {\n $tot_match = 0;\n $tot_indecisive = 0;\n $tot_no_match = 0;\n $matches = $this->getNeedlesResult();\n foreach ($matches as $n_key => $match) {\n if (isset($match['matching_filters'])) {\n $match[$this->config->prefix . 'filter_match_count'] = count($match['matching_filters']);\n } else {\n $match[$this->config->prefix . 'filter_match_count'] = 0;\n }\n if ($match[$this->config->prefix . 'filter_match_count'] === 1) {\n $tot_match++;\n $match = $this->getReturnValues($match);\n $match = $this->getLayerData($match);\n unset($match['matching_filters']);\n } elseif ($match[$this->config->prefix . 'filter_match_count'] > 1) {\n unset($match['matching_filters']);\n $tot_indecisive++;\n } else {\n $tot_no_match++;\n }\n $this->SearchResult->matches[$n_key] = $match;\n }\n $this->SearchResult->total_matches = $tot_match;\n $this->SearchResult->total_indecisive_matches = $tot_indecisive;\n $this->SearchResult->total_no_matches = $tot_no_match;\n }", "private function isConected(){\n\t\treturn $this->m_IsConnected;\n\t}", "public function retrieveConsents()\n {\n return $this->start()->uri(\"/api/consent\")\n ->get()\n ->go();\n }", "public function get_csc_result() {\n\n\t\treturn $this->cvv2;\n\t}", "public function intersect(): self;", "public function testAssociationVehiculoConductor()\n {\n $this->assertTrue($conductor->vehiculos->contains(['codigo' => '123']));\n }", "public function encenderProyectorCentral( ) {\n $this->setEncendidoProyector(1);\n $this->setComando(self::$PROYECTOR_CENTRAL, \"ON\");\n\n }", "public function getC() {}", "public function getCoForense()\n\t{\n\t\treturn $this->co_forense;\n\t}", "public function getCstCofins()\n {\n return $this->cst_cofins;\n }", "public function getConcentration()\n {\n return $this->Concentration;\n }", "public function getConfineArea() {\n return $this->_confine; \n }", "public function getCs()\n {\n return $this->cs;\n }", "public function getCnational()\n {\n return $this->cnational;\n }", "public function getCcmp2()\n {\n return $this->ccmp2;\n }", "public function toCIELCh()\n {\n return $this->toCIELab()->toCIELCh();\n }", "public function toCIELCh()\n {\n return $this->toCIELab()->toCIELCh();\n }", "function chuViHCN(int $a, int $b)\n\t{\n\t\treturn ($a+$b)*2;\n\t}", "function getCcs() {\n\t\treturn $this->getData('ccs');\n\t}", "public function getContrasenia():string{return $this->contrasenia;}", "public function testCsch()\n {\n $csch = Trigonometry::csch(1.5);\n $this->assertEquals(0.46964244059522, $csch, '', 1E-8);\n }", "public function getConfidence()\n {\n return $this->confidence;\n }", "public function getConfidence()\n {\n return $this->confidence;\n }", "public function getContrasena()\n {\n return $this->contrasena;\n }", "public function getCvv()\n {\n return $this->cvv;\n }", "public function getColegiosidColegios()\n\t{\n\t\treturn $this->colegiosidColegios;\n\t}", "public function co2Score();", "public function getCONEXION()\n {\n return $this->CONEXION;\n }", "public function promotional();", "public function cs(){\n }", "function inverted_constituents($with_supergroup = false) {\n global $db;\n // Maps classids for aggregate classes to a list of classids of the constituents.\n $forward_map = array();\n $result = array();\n \n if ($with_supergroup) {\n $supergroup_groups = supergroup_groups();\n if ($supergroup_groups !== false) {\n $forward_map[\"-1\"] = $supergroup_groups;\n }\n }\n\n if (schema_version() >= 3) {\n $stmt = $db->prepare('SELECT classid, constituents FROM Classes'\n .' WHERE constituents != \\'\\''\n .' AND NOT EXISTS(SELECT 1 FROM Rounds'\n .' WHERE Rounds.classid = Classes.classid)');\n $stmt->execute(array());\n foreach ($stmt as $row) {\n $constituents = explode(',', $row['constituents']);\n $forward_map[$row['classid']] = $constituents;\n }\n }\n\n foreach ($forward_map as $classid => $constituents) {\n foreach ($constituents as $c) {\n if (!isset($result[$c])) {\n $result[$c] = array();\n }\n $result[$c][] = $classid;\n }\n }\n\n // Transitive closure\n do {\n $repeat = false;\n foreach ($forward_map as $nr => $constituents) {\n if (isset($result[$nr])) {\n // Constituents of $nr are (get added as) constituents of the classes of\n // which $nr is a constituent\n // $aggregates are the aggregate classes that incorporate $nr as a constituent.\n $aggregates = $result[$nr];\n foreach ($constituents as $nr_constit) {\n foreach ($aggregates as $agg) {\n if (!in_array($agg, $result[$nr_constit])) {\n $result[$nr_constit][] = $agg;\n $repeat = true;\n }\n }\n }\n }\n }\n } while ($repeat);\n\n return $result;\n}", "public function traerCualquiera()\n {\n }", "public function __construct(){\n $this->api = new Concierge();\n }", "public function HM_CategoCuentas()\n {\n }", "public function getCLINICA()\r\n {\r\n return $this->CLINICA;\r\n }", "public function getCc(): iterable;", "public function getCoDivision()\n\t{\n\t\treturn $this->co_division;\n\t}", "public function testGetConsents(): void\n\t{\n\t\t$recordModel = \\Vtiger_Record_Model::getInstanceById(self::$recordId);\n\t\t$approvalField = current($recordModel->getModule()->getFieldsByType('multiReference', true));\n\t\t$request = $this->httpClient->post('Contacts/GetConsentsForEntry', \\App\\Utils::merge(['json' => [\n\t\t\t'token' => $recordModel->get('token'),\n\t\t]], self::$requestOptions));\n\t\t$this->logs = $body = $request->getBody()->getContents();\n\t\t$response = \\App\\Json::decode($body);\n\t\tstatic::assertSame(200, $request->getStatusCode(), 'Contacts/GetConsentsForEntry error: ' . PHP_EOL . $request->getReasonPhrase() . '|' . $body);\n\t\tstatic::assertSame(1, $response['status'], 'Contacts/GetConsentsForEntry API error: ' . PHP_EOL . $request->getReasonPhrase() . '|' . $body);\n\t\tstatic::assertSame(self::$recordId, $response['result']['id'], 'Contacts/GetConsentsForEntry record should be the same: ' . self::$recordId);\n\t\tstatic::assertSame($approvalField->getUITypeModel()->getArrayValues($recordModel->get($approvalField->getName())), $response['result']['consents'], 'Contacts/GetConsentsForEntry record should be the same: (array) ' . self::$approvalId);\n\t\tself::assertResponseBodyMatch($response, self::$schemaManager, '/webservice/ManageConsents/Contacts/GetConsentsForEntry', 'post', 200);\n\t}", "public function getConjuncts()\n {\n return $this->conjuncts;\n }", "public function hasCO()\n {\n return $this->CO !== null;\n }", "public function __construct()\n {\n # Creates a major progression matrix\n $this->cypherMatrix = array(\n 'I' => array ('V', 'vi', 'ii', 'iii', 'VI6'),\n 'ii' => array ('iii', 'V', 'vi','I', 'VII65'),\n 'II6' => 'V',\n 'iii' => array ('I', 'V', 'IV'),\n 'III6' => 'vi',\n 'IV' => array ('V', 'I', 'bVII', 'vi', 'II6'),\n 'V' => array ('I', 'ii', 'iii', 'III6'),\n 'V6' => 'I',\n 'vi' => array ('ii', 'V6', 'IV'),\n 'VI6' => 'ii',\n 'bVII' => 'IV',\n 'viidim' => 'I',\n 'VII65' => 'iii'\n \n );\n \n \n # Creates a 12 tone MAJOR cypher scale\n $this->cypherScale = array(\n '1' => 'I',\n '2' => 'VI6',\n '3' => 'ii',\n '4' => 'VII65',\n '5' => 'iii',\n '6' => 'IV',\n '7' => 'II6',\n '8' => 'V',\n '9' => 'III6',\n '10' => 'vi',\n '11' => 'bVII',\n '12' => 'viidim',\n );\n \n \n \n # Creates a MINOR cypher progression matrix\n $this->cypherMatrixMinor = array(\n 'i' => array ('V', 'VI', 'iv', 'iidim56', 'I6'),\n 'I6' => array ('iv', 'II6'),\n 'iidim56' => 'V',\n 'II' => 'v',\n 'II6' => 'v',\n 'III' => array ('i', 'V', 'iv'),\n 'iv' => array ('V', 'i', 'iidim56', 'III'),\n 'IV6' => 'VII',\n 'v' => array ('III', 'V'),\n 'V' => 'i',\n 'V65' => 'i',\n 'VI' => array ('III', 'VII', 'iv'),\n 'VII' => 'V', \n );\n\n \n \n # Creates a 12 tone MINOR cypher scale\n $this->cypherScaleMinor = array(\n '1' => 'i',\n '2' => 'V65',\n '3' => 'iidim7',\n '4' => 'III', \n '5' => 'I6', # Doesn't exist in minor scale\n '6' => 'iv',\n '7' => 'II6', # Another first inversion to cover exception\n '8' => 'V',\n '9' => 'VI',\n '10' => 'IV6',\n '11' => 'VII',\n '12' => 'V65',\n );\n \n # Creates a chord progression matrix\n $this->fullChordMatrix = array(\n 'c' => array('g6', 'am', 'dmaj7', 'dm'),\n 'dm' => array('emaj7', 'g', 'g6', 'amaj7'),\n 'dmaj7' => array('g', 'g6'),\n 'em' => array('c', 'emaj7'),\n 'emaj7' => 'am',\n 'g' => array('g7', 'c', 'dmaj7', 'em'),\n 'g6' => array('dmaj7', 'amaj7'),\n 'g7' => 'c',\n 'am' => array('dm', 'bmaj7'),\n 'amaj7' => array('dm', 'bb'),\n 'bb' => 'g6',\n 'bmaj7' => 'emaj7', \n );\n \n # Creates a 12 tone scale array\n $this->serialScale = array(\n '1' => 'c',\n '2' => 'c#',\n '3' => 'd',\n '4' => 'd#',\n '5' => 'e',\n '6' => 'f',\n '7' => 'f#',\n '8' => 'g',\n '9' => 'g#',\n '10' => 'a',\n '11' => 'a#',\n '12' => 'b',\n \n );\n \n # Creates a 12 tone scale array in MAJOR\n $this->serialScaleMajor = array(\n '1' => 'C',\n '2' => 'C#',\n '3' => 'D',\n '4' => 'D#',\n '5' => 'E',\n '6' => 'F',\n '7' => 'F#',\n '8' => 'G',\n '9' => 'G#',\n '10' => 'A',\n '11' => 'A#',\n '12' => 'B',\n \n );\n \n \n \n $this->tonalityIndex = array (\n \n 'FIndexMajor' => array(\n 'I' => 'F',\n 'ii' => 'g',\n 'iii' => 'a',\n 'IV' => 'Bb',\n 'V' => 'C',\n 'vi' => 'd',\n 'viidim' => 'edim', \n ),\n \n 'GIndexMajor' => array(\n 'I' => 'G',\n 'ii' => 'a',\n 'iii' => 'b',\n 'IV' => 'C',\n 'V' => 'D',\n 'vi' => 'e',\n 'viidim' => 'f#dim6',\n ),\n \n 'GIndexMinor' => array(\n 'i' => 'G',\n 'iidim7' => 'adim7',\n 'III' => 'Bb',\n 'iv' => 'c7',\n 'V' => 'D',\n 'VI' => 'Eb',\n 'VII' => 'f',\n ),\n \n 'CIndexMajor' => array(\n 'I' => 'C',\n 'ii' => 'd7',\n 'II6' => 'D6',\n 'iii' => 'e',\n 'III6' => 'E6',\n 'IV' => 'F',\n 'V' => 'G',\n 'V6' => 'G6',\n 'vi' => 'a',\n 'VI6' => 'A6',\n 'bVII' => 'Bb',\n 'viidim' => 'bdim',\n 'VII65' => 'bhalfdim',\n ),\n \n 'AbIndexMajor' => array(\n 'I' => 'Ab',\n 'ii' => 'bb',\n 'II6' => 'Bb6',\n 'iii' => 'c',\n 'III6' => 'C6',\n 'IV' => 'Db',\n 'V' => 'Eb',\n 'V6' => 'Eb6',\n 'vi' => 'f',\n 'VI6' => 'F6',\n 'bVII' => 'Gb',\n 'viidim' => 'gdim6',\n 'VII65' => 'ghalfdim',\n ),\n \n \n 'AIndexMinor' => array(\n 'i' => 'a',\n 'I6' => 'A6',\n 'iidim7' => 'bdim7',\n 'iidim56' => 'bdim56',\n 'II' => 'B',\n 'II6' => 'B6',\n 'III' => 'C',\n 'iv' => 'd',\n 'IV6' => 'D6',\n 'v' => 'e',\n 'V' => 'E',\n 'V65' => 'E65',\n 'VI' => 'F',\n 'VII' => 'G',\n ),\n \n 'CIndexMinor' => array(\n 'i' => 'c',\n 'I6' => 'C6',\n 'iidim7' => 'ddim7',\n 'iidim56' => 'ddim56',\n 'II' => 'D',\n 'II6' => 'D6',\n 'III' => 'Eb',\n 'iv' => 'f',\n 'IV6' => 'D6',\n 'v' => 'g',\n 'V' => 'G',\n 'V65' => 'G65',\n 'VI' => 'Ab',\n 'VII' => 'Bb', \n ),\n );\n \n # Progressions ending on same degree as start\n $this->progressionListMaj1 = array (\"5\", \"6\", \"5\", \"5\", \"5\", \"5\", \"5\"); # a \"6-5\" progression\n $this->progressionListMaj2 = array (\"7\", \"2\", \"7\", \"1\", \"-5\"); # a \"5-2\" progression\n \n $this->progressionListMin1 = array (\"5\", \"5\", \"5\", \"5\", \"6\", \"5\", \"5\"); # 6-5\n $this->progressionListMin2 = array (\"7\", \"1\", \"7\", \"2\", \"7\"); # 5-2\n \n }", "function setContarCuenta(){\n\t\t$sql_hay \t\t= \"SELECT COUNT(numero_cuenta) AS 'cuentame'\n\t\t\t\t\t\t\tFROM captacion_cuentas\n\t\t\t\t\t\t\tWHERE numero_cuenta=\" . $this->mNumeroCuenta;\n\t\t$cuentas\t\t= mifila($sql_hay, \"cuentame\");\n\t\treturn $cuentas;\n\t}", "public function testCoth()\n {\n $coth = Trigonometry::coth(1.5);\n $this->assertEquals(1.1047913929825, $coth, '', 1E-8);\n }", "public function getCible()\n {\n return $this->cible;\n }", "public function getConnt()\n {\n echo \"222\";\n }", "static public function setRelationCoef() {\n $link_db = Piwidict::getDatabaseConnection();\n \n $rk = array();\n $query = \"SELECT id, name FROM relation_type\";\n $res = $link_db -> query_e($query,\"Query failed in file <b>\".__FILE__.\"</b>, string <b>\".__LINE__.\"</b>\");\n\n while ($row = $res->fetch_object()){\n// if ($row->name == 'synonyms') \n if ($row->name != 'synonyms') \n\t $rk[$row->id] = 1;\n\t else \t\n\t $rk[$row->id] = 0.5;\n } \n return $rk;\n }", "public function getPrepareOutgoingConsignmentRequest()\n {\n $request = new PrepareOutgoingConsignmentRequest();\n $request->localTransactionId = $this->localTransactionId;\n $request->initiator = $this->initiator;\n\n $enterprise = mercDicconst::getSetting('enterprise_guid');\n $hc = mercDicconst::getSetting('issuer_id');\n\n $delivery = new Delivery();\n $delivery->consignor = new BusinessMember();\n $delivery->consignor->enterprise = new Enterprise();\n $delivery->consignor->enterprise->guid = $enterprise;\n $delivery->consignor->businessEntity = new BusinessEntity();\n $delivery->consignor->businessEntity->guid = $hc;\n\n $delivery->consignee = new BusinessMember();\n $delivery->consignee->enterprise = new Enterprise();\n $delivery->consignee->enterprise->guid = $this->step3['recipient'];\n $delivery->consignee->businessEntity = new BusinessEntity();\n $delivery->consignee->businessEntity->guid = $this->step3['hc'];\n\n $consigments = [];\n $vetCertificates = [];\n\n if(isset($this->conditions)) {\n $this->conditions = json_decode($this->conditions, true);\n }\n\n foreach ($this->step1 as $id => $product) {\n $consigment = new Consignment();\n $consigment->id = 'con'.$id;\n $stock = MercStockEntry::findOne(['id' => $id]);\n $stock_raw = unserialize($stock->raw_data);\n if($stock->product_name != $product['product_name'])\n {\n\n }\n $consigment->volume = $product['select_amount'];\n $consigment->unit = new Unit();\n $consigment->unit = $stock_raw->batch->unit;\n\n $consigment->sourceStockEntry = new StockEntry();\n //$consigment->sourceStockEntry->uuid = $stock->uuid;\n $consigment->sourceStockEntry->guid = $stock->guid;\n\n $consigments[] = $consigment;\n\n $vetCertificate = new VetDocument();\n $vetCertificate->for = 'con'.$id;\n $authentication['purpose']['guid'] = $this->step2['purpose'];\n $authentication['cargoExpertized'] = $this->step2['cargoExpertized'];\n $authentication['locationProsperity'] = $this->step2['locationProsperity'];\n\n //Заполняем условия регионализации при необходимости\n //var_dump($this->conditions); die();\n if(isset($this->conditions[$product['product_name']])) {\n $conditions = null;\n $buff = $this->conditions[$product['product_name']];\n foreach ($buff as $key=>$item) {\n $r13nClause = new RegionalizationClause();\n $r13nClause->condition = new RegionalizationCondition();\n $r13nClause->condition->guid = $key;\n $conditions[] = $r13nClause;\n }\n $authentication['r13nClause'] = $conditions;\n }\n $vetCertificate->authentication = $authentication;\n $vetCertificates[] = $vetCertificate;\n }\n\n $delivery->consignment = $consigments;\n\n $delivery->transportInfo = new TransportInfo();\n $delivery->transportInfo->transportType = $this->step4['type'];\n $delivery->transportInfo->transportNumber = new TransportNumber();\n $delivery->transportInfo->transportNumber->vehicleNumber = $this->step4['car_number'];\n if (isset($this->step4['trailer_number'])) {\n $delivery->transportInfo->transportNumber->trailerNumber = $this->step4['trailer_number'];\n }\n if (isset($this->step4['container_number'])) {\n $delivery->transportInfo->transportNumber->containerNumber = $this->step4['container_number'];\n }\n $delivery->transportStorageType = $this->step4['storage_type'];\n\n $delivery->accompanyingForms = new ConsignmentDocumentList();\n if($this->step3['isTTN']) {\n $delivery->accompanyingForms->waybill = new Waybill();\n $delivery->accompanyingForms->waybill->issueSeries = $this->step3['seriesTTN'];\n $delivery->accompanyingForms->waybill->issueNumber = $this->step3['numberTTN'];\n $delivery->accompanyingForms->waybill->issueDate = date('Y-m-d', strtotime($this->step3['dateTTN']));\n $delivery->accompanyingForms->waybill->type = $this->step3['typeTTN'];\n }\n\n $delivery->accompanyingForms->vetCertificate = $vetCertificates;\n\n $request->delivery = $delivery;\n\n /* echo \"<pre>\";\n var_dump($request); die();*/\n return $request;\n }", "public function inferContrastFromPhrase($phrase)\n {\n $haystack = strtoupper($phrase);\n\n //Look for indication of both\n $both_contrast = FALSE; //Assume not both\n $both_contrast_ind[] = 'W&WO CONT';\n $both_contrast_ind[] = 'W&W/O CONT';\n $both_contrast_ind[] = 'WITH AND WITHOUT CONT';\n $both_contrast_ind[] = 'WITHOUT AND WITH CONT';\n $both_contrast_ind[] = 'WITH & WITHOUT CONT';\n $both_contrast_ind[] = 'WITHOUT & WITH CONT';\n foreach($both_contrast_ind as $needle)\n {\n $p = strpos($haystack, $needle);\n if($p !== FALSE)\n {\n $both_contrast = TRUE;\n break;\n }\n }\n if(!$both_contrast)\n {\n //Look for the NO indicators\n $no_contrast = NULL;\n $no_contrast_ind = array();\n $no_contrast_ind[] = 'WO CONT';\n $no_contrast_ind[] = 'W/O CONT';\n $no_contrast_ind[] = 'WN CONT';\n $no_contrast_ind[] = 'W/N CONT';\n $no_contrast_ind[] = 'NO CONT';\n $no_contrast_ind[] = 'WITHOUT CONT';\n $no_contrast_ind[] = 'NON-CONT';\n foreach($no_contrast_ind as $needle)\n {\n $p = strpos($haystack, $needle);\n if($p !== FALSE)\n {\n $no_contrast = TRUE;\n break;\n }\n }\n\n //Look for the YES indicators\n $yes_contrast = NULL;\n $yes_contrast_ind = array();\n $yes_contrast_ind[] = 'W CONT';\n $yes_contrast_ind[] = 'WITH CONT';\n $yes_contrast_ind[] = 'W/IV CONT';\n $yes_contrast_ind[] = 'INCLUDE CONT';\n $yes_contrast_ind[] = 'INC CONT';\n foreach($yes_contrast_ind as $needle)\n {\n $p = strpos($haystack, $needle);\n if($p !== FALSE)\n {\n $yes_contrast = TRUE;\n break;\n }\n }\n\n //Return our analysis result.\n if($no_contrast === TRUE && $yes_contrast === NULL)\n {\n return FALSE;\n }\n if($no_contrast === NULL && $yes_contrast === TRUE)\n {\n return TRUE;\n }\n }\n \n //No clues or confusing indications.\n return NULL;\n }", "public function getMinConfs()\n {\n return $this->min_confs;\n }", "public function getSectoreconomicofecha()\n\t{\n\t\treturn $this->sectoreconomicofecha;\n\t}", "public function detectCombos()\n {\n foreach ($this->order->getProducts() as $k => $product) {\n if ($product->getCategory() == 'Shampoo') {\n foreach ($this->order->getProducts() as $key => $productB) {\n if ($productB->getCategory() == 'Conditioner') {\n $productB->setDiscount(0.5);\n }\n }\n }\n }\n }", "function count_vc( $word )\n {\n $m = 0;\n $length = strlen($word);\n $prev_c = false;\n for ( $i = 0; $i < $length; $i++ ) {\n $is_c = $this->is_consonant($word, $i);\n if ( $is_c ) {\n if ( $m > 0 && !$prev_c ) {\n $m += 0.5;\n }\n } else {\n if ( $prev_c || $m == 0 ) {\n $m += 0.5;\n }\n }\n $prev_c = $is_c;\n }\n $m = floor($m);\n return $m;\n }", "public function getC()\n {\n return $this->C;\n }", "public function getDocumentProductCofinsCst()\n {\n return (string) $this->document_product_cofins_cst;\n }", "function test_contractions( $input, $output ) {\n\t\treturn $this->assertEquals( $output, wptexturize( $input ) );\n\t}", "function country_continents($countryCode) {\n\t$COUNTRY_CONTINENTS = [\"AF\"=>\"AS\",\"AX\"=>\"EU\",\"AL\"=>\"EU\",\"DZ\"=>\"AF\",\"AS\"=>\"OC\",\"AD\"=>\"EU\",\"AO\"=>\"AF\",\"AI\"=>\"NA\",\"AQ\"=>\"AN\",\"AG\"=>\"NA\",\"AR\"=>\"SA\",\"AM\"=>\"AS\",\"AW\"=>\"NA\",\"AU\"=>\"OC\",\"AT\"=>\"EU\",\"AZ\"=>\"AS\",\"BS\"=>\"NA\",\"BH\"=>\"AS\",\"BD\"=>\"AS\",\"BB\"=>\"NA\",\"BY\"=>\"EU\",\"BE\"=>\"EU\",\"BZ\"=>\"NA\",\"BJ\"=>\"AF\",\"BM\"=>\"NA\",\"BT\"=>\"AS\",\"BO\"=>\"SA\",\"BA\"=>\"EU\",\"BW\"=>\"AF\",\"BV\"=>\"AN\",\"BR\"=>\"SA\",\"IO\"=>\"AS\",\"BN\"=>\"AS\",\"BG\"=>\"EU\",\"BF\"=>\"AF\",\"BI\"=>\"AF\",\"KH\"=>\"AS\",\"CM\"=>\"AF\",\"CA\"=>\"NA\",\"CV\"=>\"AF\",\"KY\"=>\"NA\",\"CF\"=>\"AF\",\"TD\"=>\"AF\",\"CL\"=>\"SA\",\"CN\"=>\"AS\",\"CX\"=>\"AS\",\"CC\"=>\"AS\",\"CO\"=>\"SA\",\"KM\"=>\"AF\",\"CD\"=>\"AF\",\"CG\"=>\"AF\",\"CK\"=>\"OC\",\"CR\"=>\"NA\",\"CI\"=>\"AF\",\"HR\"=>\"EU\",\"CU\"=>\"NA\",\"CY\"=>\"AS\",\"CZ\"=>\"EU\",\"DK\"=>\"EU\",\"DJ\"=>\"AF\",\"DM\"=>\"NA\",\"DO\"=>\"NA\",\"EC\"=>\"SA\",\"EG\"=>\"AF\",\"SV\"=>\"NA\",\"GQ\"=>\"AF\",\"ER\"=>\"AF\",\"EE\"=>\"EU\",\"ET\"=>\"AF\",\"FO\"=>\"EU\",\"FK\"=>\"SA\",\"FJ\"=>\"OC\",\"FI\"=>\"EU\",\"FR\"=>\"EU\",\"GF\"=>\"SA\",\"PF\"=>\"OC\",\"TF\"=>\"AN\",\"GA\"=>\"AF\",\"GM\"=>\"AF\",\"GE\"=>\"AS\",\"DE\"=>\"EU\",\"GH\"=>\"AF\",\"GI\"=>\"EU\",\"GR\"=>\"EU\",\"GL\"=>\"NA\",\"GD\"=>\"NA\",\"GP\"=>\"NA\",\"GU\"=>\"OC\",\"GT\"=>\"NA\",\"GG\"=>\"EU\",\"GN\"=>\"AF\",\"GW\"=>\"AF\",\"GY\"=>\"SA\",\"HT\"=>\"NA\",\"HM\"=>\"AN\",\"VA\"=>\"EU\",\"HN\"=>\"NA\",\"HK\"=>\"AS\",\"HU\"=>\"EU\",\"IS\"=>\"EU\",\"IN\"=>\"AS\",\"ID\"=>\"AS\",\"IR\"=>\"AS\",\"IQ\"=>\"AS\",\"IE\"=>\"EU\",\"IM\"=>\"EU\",\"IL\"=>\"AS\",\"IT\"=>\"EU\",\"JM\"=>\"NA\",\"JP\"=>\"AS\",\"JE\"=>\"EU\",\"JO\"=>\"AS\",\"KZ\"=>\"AS\",\"KE\"=>\"AF\",\"KI\"=>\"OC\",\"KP\"=>\"AS\",\"KR\"=>\"AS\",\"KW\"=>\"AS\",\"KG\"=>\"AS\",\"LA\"=>\"AS\",\"LV\"=>\"EU\",\"LB\"=>\"AS\",\"LS\"=>\"AF\",\"LR\"=>\"AF\",\"LY\"=>\"AF\",\"LI\"=>\"EU\",\"LT\"=>\"EU\",\"LU\"=>\"EU\",\"MO\"=>\"AS\",\"MK\"=>\"EU\",\"MG\"=>\"AF\",\"MW\"=>\"AF\",\"MY\"=>\"AS\",\"MV\"=>\"AS\",\"ML\"=>\"AF\",\"MT\"=>\"EU\",\"MH\"=>\"OC\",\"MQ\"=>\"NA\",\"MR\"=>\"AF\",\"MU\"=>\"AF\",\"YT\"=>\"AF\",\"MX\"=>\"NA\",\"FM\"=>\"OC\",\"MD\"=>\"EU\",\"MC\"=>\"EU\",\"MN\"=>\"AS\",\"ME\"=>\"EU\",\"MS\"=>\"NA\",\"MA\"=>\"AF\",\"MZ\"=>\"AF\",\"MM\"=>\"AS\",\"NA\"=>\"AF\",\"NR\"=>\"OC\",\"NP\"=>\"AS\",\"AN\"=>\"NA\",\"NL\"=>\"EU\",\"NC\"=>\"OC\",\"NZ\"=>\"OC\",\"NI\"=>\"NA\",\"NE\"=>\"AF\",\"NG\"=>\"AF\",\"NU\"=>\"OC\",\"NF\"=>\"OC\",\"MP\"=>\"OC\",\"NO\"=>\"EU\",\"OM\"=>\"AS\",\"PK\"=>\"AS\",\"PW\"=>\"OC\",\"PS\"=>\"AS\",\"PA\"=>\"NA\",\"PG\"=>\"OC\",\"PY\"=>\"SA\",\"PE\"=>\"SA\",\"PH\"=>\"AS\",\"PN\"=>\"OC\",\"PL\"=>\"EU\",\"PT\"=>\"EU\",\"PR\"=>\"NA\",\"QA\"=>\"AS\",\"RE\"=>\"AF\",\"RO\"=>\"EU\",\"RU\"=>\"EU\",\"RW\"=>\"AF\",\"SH\"=>\"AF\",\"KN\"=>\"NA\",\"LC\"=>\"NA\",\"PM\"=>\"NA\",\"VC\"=>\"NA\",\"WS\"=>\"OC\",\"SM\"=>\"EU\",\"ST\"=>\"AF\",\"SA\"=>\"AS\",\"SN\"=>\"AF\",\"RS\"=>\"EU\",\"SC\"=>\"AF\",\"SL\"=>\"AF\",\"SG\"=>\"AS\",\"SK\"=>\"EU\",\"SI\"=>\"EU\",\"SB\"=>\"OC\",\"SO\"=>\"AF\",\"ZA\"=>\"AF\",\"GS\"=>\"AN\",\"ES\"=>\"EU\",\"LK\"=>\"AS\",\"SD\"=>\"AF\",\"SR\"=>\"SA\",\"SJ\"=>\"EU\",\"SZ\"=>\"AF\",\"SE\"=>\"EU\",\"CH\"=>\"EU\",\"SY\"=>\"AS\",\"TW\"=>\"AS\",\"TJ\"=>\"AS\",\"TZ\"=>\"AF\",\"TH\"=>\"AS\",\"TL\"=>\"AS\",\"TG\"=>\"AF\",\"TK\"=>\"OC\",\"TO\"=>\"OC\",\"TT\"=>\"NA\",\"TN\"=>\"AF\",\"TR\"=>\"AS\",\"TM\"=>\"AS\",\"TC\"=>\"NA\",\"TV\"=>\"OC\",\"UG\"=>\"AF\",\"UA\"=>\"EU\",\"AE\"=>\"AS\",\"GB\"=>\"EU\",\"UM\"=>\"OC\",\"US\"=>\"NA\",\"UY\"=>\"SA\",\"UZ\"=>\"AS\",\"VU\"=>\"OC\",\"VE\"=>\"SA\",\"VN\"=>\"AS\",\"VG\"=>\"NA\",\"VI\"=>\"NA\",\"WF\"=>\"OC\",\"EH\"=>\"AF\",\"YE\"=>\"AS\",\"ZM\"=>\"AF\",\"ZW\"=>\"AF\"];\n //lang\n if(in_array($countryCode, [\"ES\", \"AR\", \"BO\", \"CL\", \"CO\", \"CR\", \"CU\", \"CW\", \"DO\", \"EC\", \"HN\", \"MX\", \"NI\", \"PA\", \"PE\", \"PR\", \"PY\", \"VE\", \"UY\", \"GT\", \"SV\"])) {\n $lang = \"es\";\n } elseif(in_array($countryCode, [\"AG\",\"AU\",\"BS\",\"BB\",\"BZ\",\"CA\",\"DO\",\"EN\",\"IE\",\"JM\",\"GD\",\"GY\",\"LC\",\"NZ\",\"TT\",\"UK\",\"US\",\"VC\"])) {\n $lang = \"en\";\n } elseif(in_array($countryCode, [\"PT\",\"BR\",\"MZ\",\"AO\"])) {\n $lang = \"pt\";\n } elseif(in_array($countryCode, [\"FR\",\"SN\"])) {\n $lang = \"fr\";\n } else {\n $lang = \"en\";\n\t\t}\n\t\treturn $lang;\n}", "public function isComposite() {}", "public function getCcmp()\n {\n return $this->ccmp;\n }", "public function getC2()\r\n {\r\n return $this->C2;\r\n }", "public function cortar() {\n $mitadInf = [];\n $mitadSup = [];\n $mitad = count($this->cajita) / 2;\n for ($i = 0; $i < $mitad; $i++)\n $mitadInf[$i] = $this->cajita[$i];\n for ($i = 0; $mitad < count($this->cajita); $i++, $mitad++)\n $mitadSup[$i] = $this->cajita[$mitad];\n $this->cajita = array_merge($mitadSup, $mitadInf);\n return TRUE;\n }", "public function getContratEnCours() {\n return $this->contratEnCours;\n }", "public function verPCSalaEnProyectorCentral( ) {\n $this->setComando(self::$PROYECTOR_CENTRAL, \"PC_SUELO\");\n }", "public function getContinents() {\n $db = database::getDB();\n $query = \"SELECT DISTINCT continent FROM countries ORDER BY id\";\n $data = $db->query($query);\n return $data;\n }", "function getBandsConcerts($id_band, $concertObj, $bandObj){\n $concertIds = $bandObj->getConcerts(\"\", array(0 => array(\"column\" => \"kapela_id_kapela\", \"value\" => intval($id_band), \"symbol\" => \"=\")), \"\");\n $concerts = array();\n for($i = 0; $i < sizeof($concertIds); $i++){\n $row = $concertObj->getConcert($concertIds[$i]['koncert_id_koncert'], \"\");\n $concerts[$i] = $row;\n }\n \n return $concerts;\n}", "public function getActiveCautionCount()\n {\n return $this->caution\n //->whereBetween('created_at', array(new \\DateTime(date('Y-m-d') . ' 00:00:00'), new \\DateTime(date('Y-m-d') . ' 24:00:00')))\n ->where('status', 0)\n ->whereNull('end_date')\n ->count();\n }", "public function getC1()\r\n {\r\n return $this->C1;\r\n }", "public function encender();", "function run_censor($convoArr)\n {\n if (!isset ($_SESSION['pgo_word_censor']))\n {\n initialise_censor($convoArr['conversation']['bot_id']);\n }\n $convoArr['send_to_user'] = censor_words($convoArr['send_to_user']);\n return $convoArr;\n }", "public function getCoSo()\n\t{\n\t\treturn $this->co_so;\n\t}", "public function shouldGetCO(): void\n {\n $this->assertPollutantLevel('getCO', $this->faker->randomFloat(2, 0, 500));\n }", "public function vocScore();", "public function getBcc(): iterable;", "public function hasCO2()\n {\n return $this->CO2 !== null;\n }", "public function getIsCa()\n {\n return $this->is_ca;\n }", "function getCC2(){\n\t\t\treturn $this->cc;\t\t\n\t\t}", "protected function con() {\n // must have space after it\n return 'CON ';\n }", "function getCodcvv()\n {\n return $this->codcvv;\n }", "public function getConcursosActivos() {\n //error_log('DEBUG: en getConcursosActivos Secundaria');\n $concursosActivos = DBConcursosSecundaria::obtieneConcursosActivos();\n return $concursosActivos;\n }", "function compareLC() {\n $beginMatch = 0;\n $beginSubjectMatch = 0;\n $beginClassMatch = 0;\n $beginCutter1Match = 0;\n $beginCutter2Match = 0;\n $beginCutter3Match = 0;\n $beginVersionMatch = 0;\n $beginCopyMatch = 0;\n\n //Check Subjects\n if ($GLOBALS['CN_Subject'] > $GLOBALS['BC_Subject']) {\n $beginMatch = 1;\n } else if ($GLOBALS['CN_Subject'] >= $GLOBALS['BC_Subject']) {\n $beginSubjectMatch = 1;\n }\n\n //Check Classification Number\n if ($beginSubjectMatch) {\n //if(strpos($GLOBALS['CN_ClassNum'], '.') !== false) {\n if ((double) $GLOBALS['CN_ClassNum'] > (double) $GLOBALS['BC_ClassNum']) {\n $beginMatch = 1;\n } else if ((double) $GLOBALS['CN_ClassNum'] >= (double) $GLOBALS['BC_ClassNum']) {\n $beginClassMatch = 1;\n }\n //}\n /*\n //else {\n $CN_Arr = str_split($GLOBALS['CN_ClassNum']);\n $BC_Arr = str_split($GLOBALS['BC_ClassNum']);\n $EC_Arr = str_split($GLOBALS['EC_ClassNum']);\n\n $n = 0;\n\n for ($n; $n < sizeof($CN_Arr); ++$n) {\n if ($n >= sizeof($BC_Arr)) {\n $beginClassMatch = 1;\n break;\n } else if ($n < sizeof($BC_Arr)) {\n if ($CN_Arr[$n] > $BC_Arr[$n]) {\n $beginMatch = 1;\n break;\n } else if ($CN_Arr[$n] < $BC_Arr[$n]) {\n break;\n } else { }\n } else { }\n }\n\n if ($n == sizeof($CN_Arr)) {\n $beginClassMatch = 1;\n }\n //}\n */\n\n \n }\n\n //Check Cutter 1\n if ($beginClassMatch) {\n $CN_Cutter1_Ltr = substr($GLOBALS['CN_Cutter1'], 1, 1);\n $CN_Cutter1_Num = (int) substr($GLOBALS['CN_Cutter1'], 2);\n\n $BC_Cutter1_Ltr = substr($GLOBALS['BC_Cutter1'], 1, 1);\n $BC_Cutter1_Num = (int) substr($GLOBALS['BC_Cutter1'], 2);\n\n if (empty($GLOBALS['CN_Cutter1']) || empty($GLOBALS['BC_Cutter1'])) {\n $beginCutter1Match = 1;\n } else {\n if ($CN_Cutter1_Ltr > $BC_Cutter1_Ltr) {\n $beginMatch = 1;\n } else if (strcmp($CN_Cutter1_Ltr, $BC_Cutter1_Ltr) == 0) {\n if ($CN_Cutter1_Num > $BC_Cutter1_Num) {\n $beginMatch = 1;\n } else if (strcmp($CN_Cutter1_Num, $BC_Cutter1_Num) == 0) {\n $beginCutter1Match = 1;\n }\n }\n }\n }\n\n //Check Cutter 2\n if ($beginCutter1Match) {\n $CN_Cutter2_Ltr = substr($GLOBALS['CN_Cutter2'], 0, 1);\n $CN_Cutter2_Num = (int) substr($GLOBALS['CN_Cutter2'], 1);\n\n $BC_Cutter2_Ltr = substr($GLOBALS['BC_Cutter2'], 0, 1);\n $BC_Cutter2_Num = (int) substr($GLOBALS['BC_Cutter2'], 1);\n\n if (empty($GLOBALS['CN_Cutter2']) || empty($GLOBALS['BC_Cutter2'])) {\n $beginCutter2Match = 1;\n } else {\n if ($CN_Cutter2_Ltr > $BC_Cutter2_Ltr) {\n $beginMatch = 1;\n } else if (strcmp($CN_Cutter2_Ltr, $BC_Cutter2_Ltr) == 0) {\n if ($CN_Cutter2_Num > $BC_Cutter2_Num) {\n $beginMatch = 1;\n } else if (strcmp($CN_Cutter2_Num, $BC_Cutter2_Num) == 0) {\n $beginCutter2Match = 1;\n }\n }\n }\n }\n\n //Check Cutter 3\n if ($beginCutter2Match) {\n $CN_Cutter3_Ltr = substr($GLOBALS['CN_Cutter3'], 0, 1);\n $CN_Cutter3_Num = (int) substr($GLOBALS['CN_Cutter3'], 1);\n\n $BC_Cutter3_Ltr = substr($GLOBALS['BC_Cutter3'], 0, 1);\n $BC_Cutter3_Num = (int) substr($GLOBALS['BC_Cutter3'], 1);\n\n if (empty($GLOBALS['CN_Cutter3']) || empty($GLOBALS['BC_Cutter3'])) {\n $beginCutter3Match = 1;\n } else {\n if ($CN_Cutter3_Ltr > $BC_Cutter3_Ltr) {\n $beginMatch = 1;\n } else if (strcmp($CN_Cutter3_Ltr, $BC_Cutter3_Ltr) == 0) {\n if ($CN_Cutter3_Num > $BC_Cutter3_Num) {\n $beginMatch = 1;\n } else if (strcmp($CN_Cutter3_Num, $BC_Cutter3_Num) == 0) {\n $beginCutter3Match = 1;\n }\n }\n }\n }\n\n //Check Version\n if ($beginCutter3Match) {\n $CN_Version_Num = substr($GLOBALS['CN_Version'], 2);\n $BC_Version_Num = substr($GLOBALS['BC_Version'], 2);\n\n if (empty($CN_Version_Num)) {\n $beginVersionMatch = 1;\n } else if ($CN_Version_Num >= $BC_Version_Num || empty($BC_Version_Num)) {\n $beginMatch = 1;\n }\n }\n\n //Check Copy\n if ($beginVersionMatch) {\n $CN_Copy_Num = substr($GLOBALS['CN_Copy'], 2);\n $BC_Copy_Num = substr($GLOBALS['BC_Copy'], 2);\n\n if (empty($CN_Copy_Num)) {\n $beginCopyMatch = 1;\n } else if ($CN_Copy_Num >= $BC_Copy_Num || empty($BC_Copy_Num)) {\n $beginMatch = 1;\n }\n }\n\n $endMatch = 0;\n $endSubjectMatch = 0;\n $endClassMatch = 0;\n $endCutter1Match = 0;\n $endCutter2Match = 0;\n $endCutter3Match = 0;\n $endVersionMatch = 0;\n $endCopyMatch = 0;\n\n //Check Subjects\n if ($GLOBALS['CN_Subject'] < $GLOBALS['EC_Subject']) {\n $endMatch = 1;\n } else if ($GLOBALS['CN_Subject'] <= $GLOBALS['EC_Subject']) {\n $endSubjectMatch = 1;\n }\n\n //Check Classification Number\n if ($endSubjectMatch) {\n //if (strpos($GLOBALS['CN_ClassNum'], '.') !== false) {\n if ((double) $GLOBALS['CN_ClassNum'] < (double) $GLOBALS['EC_ClassNum']) {\n $endMatch = 1;\n } else if ((double) $GLOBALS['CN_ClassNum'] <= (double) $GLOBALS['EC_ClassNum']) {\n $endClassMatch = 1;\n }\n /*\n } else {\n $CN_Arr = str_split($GLOBALS['CN_ClassNum']);\n $EC_Arr = str_split($GLOBALS['EC_ClassNum']);\n $EC_Arr = str_split($GLOBALS['EC_ClassNum']);\n\n $n = 0;\n\n for ($n; $n < sizeof($CN_Arr); ++$n) {\n if ($n >= sizeof($EC_Arr)) {\n $endClassMatch = 1;\n break;\n } else if ($n < sizeof($EC_Arr)) {\n if ($CN_Arr[$n] < $EC_Arr[$n]) {\n $endMatch = 1;\n break;\n } else if ($CN_Arr[$n] > $EC_Arr[$n]) {\n break;\n } else { }\n } else { }\n }\n\n if ($n == sizeof($CN_Arr)) {\n $endClassMatch = 1;\n }\n }\n */\n }\n\n //Check Cutter 1\n if ($endClassMatch) {\n $CN_Cutter1_Ltr = substr($GLOBALS['CN_Cutter1'], 1, 1);\n $CN_Cutter1_Num = (int) substr($GLOBALS['CN_Cutter1'], 2);\n\n $EC_Cutter1_Ltr = substr($GLOBALS['EC_Cutter1'], 1, 1);\n $EC_Cutter1_Num = (int) substr($GLOBALS['EC_Cutter1'], 2);\n\n if (empty($GLOBALS['CN_Cutter1']) || empty($GLOBALS['EC_Cutter1'])) {\n $endCutter1Match = 1;\n } else {\n if ($CN_Cutter1_Ltr < $EC_Cutter1_Ltr) {\n $endMatch = 1;\n } else if (strcmp($CN_Cutter1_Ltr, $EC_Cutter1_Ltr) == 0) {\n if ($CN_Cutter1_Num < $EC_Cutter1_Num) {\n $endMatch = 1;\n } else if (strcmp($CN_Cutter1_Num, $EC_Cutter1_Num) == 0) {\n $endCutter1Match = 1;\n }\n }\n }\n }\n\n //Check Cutter 2\n if ($endCutter1Match) {\n $CN_Cutter2_Ltr = substr($GLOBALS['CN_Cutter2'], 0, 1);\n $CN_Cutter2_Num = (int) substr($GLOBALS['CN_Cutter2'], 1);\n\n $EC_Cutter2_Ltr = substr($GLOBALS['EC_Cutter2'], 0, 1);\n $EC_Cutter2_Num = (int) substr($GLOBALS['EC_Cutter2'], 1);\n\n if (empty($GLOBALS['CN_Cutter2']) || empty($GLOBALS['EC_Cutter2'])) {\n $endCutter2Match = 1;\n } else {\n if ($CN_Cutter2_Ltr < $EC_Cutter2_Ltr) {\n $endMatch = 1;\n } else if (strcmp($CN_Cutter2_Ltr, $EC_Cutter2_Ltr) == 0) {\n if ($CN_Cutter2_Num < $EC_Cutter2_Num) {\n $endMatch = 1;\n } else if (strcmp($CN_Cutter2_Num, $EC_Cutter2_Num) == 0) {\n $endCutter2Match = 1;\n }\n }\n }\n }\n\n //Check Cutter 3\n if ($endCutter2Match) {\n $CN_Cutter3_Ltr = substr($GLOBALS['CN_Cutter3'], 0, 1);\n $CN_Cutter3_Num = (int) substr($GLOBALS['CN_Cutter3'], 1);\n\n $EC_Cutter3_Ltr = substr($GLOBALS['EC_Cutter3'], 0, 1);\n $EC_Cutter3_Num = (int) substr($GLOBALS['EC_Cutter3'], 1);\n\n if (empty($GLOBALS['CN_Cutter3']) || empty($GLOBALS['EC_Cutter3'])) {\n $endCutter3Match = 1;\n } else {\n if ($CN_Cutter3_Ltr < $EC_Cutter3_Ltr) {\n $endMatch = 1;\n } else if (strcmp($CN_Cutter3_Ltr, $EC_Cutter3_Ltr) == 0) {\n if ($CN_Cutter3_Num < $EC_Cutter3_Num) {\n $endMatch = 1;\n } else if (strcmp($CN_Cutter3_Num, $EC_Cutter3_Num) == 0) {\n $endCutter3Match = 1;\n }\n }\n }\n }\n\n //Check Version\n if ($endCutter3Match) {\n $CN_Version_Num = substr($GLOBALS['CN_Version'], 2);\n $EC_Version_Num = substr($GLOBALS['EC_Version'], 2);\n\n if (empty($CN_Version_Num)) {\n $endVersionMatch = 1;\n } else if ($CN_Version_Num <= $EC_Version_Num || empty($EC_Version_Num)) {\n $endMatch = 1;\n }\n }\n\n //Check Copy\n if ($endVersionMatch) {\n $CN_Copy_Num = substr($GLOBALS['CN_Copy'], 2);\n $EC_Copy_Num = substr($GLOBALS['EC_Copy'], 2);\n\n if (empty($CN_Copy_Num)) {\n $endCopyMatch = 1;\n } else if ($CN_Copy_Num <= $EC_Copy_Num || empty($EC_Copy_Num)) {\n $endMatch = 1;\n }\n } \n\n //Check for match\n if($beginSubjectMatch && $beginClassMatch && $beginCutter1Match && $beginCutter2Match && $beginCutter3Match && $beginVersionMatch && $beginCopyMatch) {\n $beginMatch = 1;\n }\n if ($endSubjectMatch && $endClassMatch && $endCutter1Match && $endCutter2Match && $endCutter3Match && $endVersionMatch && $endCopyMatch) {\n $endMatch = 1;\n }\n\n if($beginMatch && $endMatch) {\n return 1;\n }\n else {\n return 0;\n }\n\n }", "public function getCasKonec()\n {\n return $this->cas_konec;\n }", "public function testCosh()\n {\n $cosh = Trigonometry::cosh(1.5);\n $this->assertEquals(2.3524096152432, $cosh, '', 1E-8);\n }", "function getClinicalServices() {\n return array(self::MEDONC => self::MEDONC);\n }", "protected function get_equivalences_description() {\n $equivalences = array();\n\n if ($this->options->is_check_equivalences == true) {\n $i = 0;\n $rules_names = $this->get_equivalences_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 $equivalences[$i] = array();\n\n $equivalences[$i][\"problem\"] = $rhr->problem;\n $equivalences[$i][\"solve\"] = $rhr->solve;\n $equivalences[$i][\"problem_ids\"] = $rhr->problem_ids;\n $equivalences[$i][\"problem_type\"] = $rhr->problem_type;\n $equivalences[$i][\"problem_indfirst\"] = $rhr->problem_indfirst;\n $equivalences[$i][\"problem_indlast\"] = $rhr->problem_indlast;\n\n ++$i;\n }\n }\n }\n\n return $equivalences;\n }", "public function getLimitationCons()\n {\n return $this->limitationCons;\n }", "public function getClips($criteria)\n {\n }", "public function getCompounds() {\n return $this->_compounds;\n }" ]
[ "0.5212313", "0.51538074", "0.5140774", "0.5092781", "0.49757892", "0.49642593", "0.49073163", "0.48837242", "0.48649162", "0.4851331", "0.48455772", "0.4830343", "0.48066553", "0.47854424", "0.4778706", "0.47590163", "0.47468963", "0.4746035", "0.47437486", "0.46978176", "0.46953332", "0.46854296", "0.46593305", "0.4658792", "0.4654055", "0.46383113", "0.46341372", "0.46181855", "0.46168488", "0.4610247", "0.45890275", "0.45890275", "0.4585562", "0.45736748", "0.45609176", "0.45560804", "0.45540756", "0.45540756", "0.4552921", "0.45479587", "0.45440063", "0.45405474", "0.45339218", "0.45317045", "0.45291457", "0.45230415", "0.4522038", "0.45131144", "0.45063508", "0.45025143", "0.45021224", "0.44992912", "0.44988948", "0.44916436", "0.4486485", "0.44758737", "0.4470188", "0.44699752", "0.4463572", "0.4462067", "0.44557995", "0.44389614", "0.4432521", "0.4429731", "0.4429543", "0.44259176", "0.44149256", "0.4407497", "0.4390847", "0.4388978", "0.43843403", "0.4383318", "0.43827942", "0.43815812", "0.4377093", "0.43653807", "0.43608713", "0.435891", "0.43588424", "0.43538257", "0.43444777", "0.43376085", "0.432993", "0.43286383", "0.43257767", "0.43227676", "0.43142062", "0.4310659", "0.43044618", "0.43042982", "0.42984316", "0.42944345", "0.4293187", "0.4290573", "0.4283257", "0.4280378", "0.42782", "0.4277875", "0.42777187", "0.4273004", "0.42720628" ]
0.0
-1
========================================================================= OVERRIDES ========================================================================= Fetch all members in alphabetical order by email
public function fetchAll(SelectOptions $selectOptions=null) { if (!$selectOptions) $selectOptions = new SelectOptions; if (!$selectOptions->order) $selectOptions->order = ["{$this->columnPrefix}email"]; return parent::fetchAll($selectOptions); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function sortByEmail(){\n \n $db = Db::getConnection();\n \n $result = $db->query('SELECT * FROM task ORDER BY user_email ASC');\n\n return $result->fetchAll();\n }", "function getMembers()\r\n {\r\n // define the query\r\n $sql = \"SELECT * FROM member ORDER BY lname\";\r\n // prepare statement\r\n $statement = $this->_dbh->prepare($sql);\r\n // execute statement\r\n $statement->execute();\r\n // get result\r\n return $statement->fetchAll(PDO::FETCH_ASSOC);\r\n }", "function getMembers()\n {\n // define the query\n $sql = \"SELECT * FROM member ORDER BY lname, fname\";\n\n // prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n // no params to bind\n\n // execute the statement\n $statement->execute();\n\n // get the result\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "function getMailList() {\n return getAll(\"SELECT id,`email` FROM `member` WHERE id != ?\"\n , [getLogin()['mid']]);\n}", "function membersemailist($memberquery){\n\t$f3=$this->f3;\n\t$members =\tnew Member($this->db);\n\t$memblist=$members->load();\n\t$membemails= $this->db->exec('SELECT distinct(email) as unqemail from members where u3ayear = '.'\"2015-2016\"'. ' and status =\"Active\" and email <> \"\" ' .$memberquery.' order by unqemail;');\n\t$output = iterator_to_array(new RecursiveIteratorIterator(\n new RecursiveArrayIterator($membemails)), FALSE);\n\treturn array_values($output);\n\t\n\t\n}", "function getMembers() {\n\t\t$query = $this->createQuery();\n\t\t$query .= \"WHERE c2.status = '\" . KontakteData::$STATUS_MEMBER . \"'\";\n\t\t$query .= \" OR c2.status = '\" . KontakteData::$STATUS_ADMIN . \"' \";\n\t\t$query .= \"ORDER BY c2.name ASC\";\n\t\treturn $this->database->getSelection($query);\n\t}", "function getMembers()\r\n {\r\n //1. Define the query\r\n $sql = \"SELECT * FROM Members ORDER BY lname\";\r\n\r\n //2. Prepare the statement\r\n $statement = $this->_dbh->prepare($sql);\r\n\r\n //4.Execute statement\r\n $statement->execute();\r\n\r\n //5. Return the results\r\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n return $result;\r\n }", "function getMembers()\r\n {\r\n $sql = \"SELECT * FROM member\r\n ORDER BY lname, fname ASC\";\r\n\r\n //2. Prepare the statement\r\n $statement = $this->_dbh->prepare($sql);\r\n\r\n //3. Bind the parameter\r\n\r\n //4. Execute the statement\r\n $statement->execute();\r\n\r\n //5. Get the result\r\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\r\n return $result;\r\n }", "function GetMembers()\n\t{\t$members = array();\n\t\t$where = array();\n\t\t$tables = array('students');\n\t\t\n\t\tif ($_GET['morf'])\n\t\t{\t$where[] = 'students.morf=\"' . $this->SQLSafe($_GET['morf']) . '\"';\n\t\t}\n\t\n\t\tif ($_GET['ctry'])\n\t\t{\t$where[] = 'students.country=\"' . $this->SQLSafe($_GET['ctry']) . '\"';\n\t\t}\n\t\t\n\t\tif ($name = $this->SQLSafe($_GET['name']))\n\t\t{\t$where[] = '(CONCAT(students.firstname, \" \", students.surname, \"|\", students.username) LIKE \"%' . $name . '%\")';\n\t\t}\n\t\t\n\t\t$sql = 'SELECT students.* FROM ' . implode(',', $tables);\n\t\tif ($wstr = implode(' AND ', $where))\n\t\t{\t$sql .= ' WHERE ' . $wstr;\n\t\t}\n\t\t$sql .= ' GROUP BY students.userid ORDER BY students.surname, students.firstname LIMIT 0, 1000';\n\t\t\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\tif (!$row[\"country\"] || $this->user->CanAccessCountry($row[\"country\"]))\n\t\t\t\t{\t$members[] = $row;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $members;\n\t}", "public function all()\n\t{\n\t\treturn $this->contact->currentUser()->orderBy('lastName', 'asc')->orderBy('email', 'asc')->paginate( $this->perPage );\n\t}", "function getMemberList() {\n return getAll(\"SELECT * FROM member \");\n}", "function listOfUsers(){\n\t\n\t\t$users = [];\n\t\tforeach ($this->members as $obj){\n\t\t\t$user = array('name'=> $obj->getUserFullName(),'id'=>$obj->getUserID());\n\t\t\tarray_push($users, $user);\n\t\t}\n\t\treturn $users;\n\t}", "function getSpecificMember($name, $email) {\r\n try {\r\n $mam = getAllMembers();\r\n var_dump($mam);\r\n $user = searchUsers($mam, $email);\r\n print_r($user);\r\n if ($user) {\r\n \r\n }\r\n } catch (Exception $exc) {\r\n echo $exc->getTraceAsString();\r\n }\r\n}", "private function searchMembers() {\n $searchStr = $this->postVars['memberSearch'];\n $searchStrArr = array();\n if(preg_match('/\\s/',$searchStr)) {\n $searchStrArr = explode(\" \", $searchStr);\n }\n \n if(empty($searchStrArr)) {\n $query = \"SELECT u.id\n FROM {$this->db->prefix}users AS u\n WHERE u.user_email = '$searchStr'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id AND n.nhc_pin = '$searchStr'\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name' AND um1.meta_value like '%$searchStr%'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n UNION\n SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name' AND um2.meta_value like '%$searchStr%'\";\n //JOIN {$this->db->prefix}usermeta um4 ON um4.user_id = u.id AND um4.meta_key = 'expiration_date' AND um4.meta_value = '$expireDate'\";\n }\n else { // looking specifically for a full name\n $query = \"SELECT u.id\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name' AND um1.meta_value like '%{$searchStrArr[0]}%'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name' AND um2.meta_value like '%{$searchStrArr[1]}%'\";\n \n }\n \n $membersArr = $this->db->get_results($query, ARRAY_A);\n \n // filter through to weed out any duplicates\n $showArr = array();\n foreach($membersArr as $member) {\n if(!in_array($member['id'], $showArr)) {\n $showArr[] = $member['id'];\n }\n }\n $idStr = implode(\",\", $showArr);\n \n $query = \"SELECT DISTINCT u.id, n.nhc_pin, um1.meta_value AS first_name, um2.meta_value AS last_name, u.user_email, um3.meta_value AS level\n FROM {$this->db->prefix}users AS u\n JOIN {$this->db->prefix}nhc n ON u.id = n.user_id\n JOIN {$this->db->prefix}usermeta um1 ON um1.user_id = u.id AND um1.meta_key = 'first_name'\n JOIN {$this->db->prefix}usermeta um2 ON um2.user_id = u.id AND um2.meta_key = 'last_name'\n JOIN {$this->db->prefix}usermeta um3 ON um3.user_id = u.id AND um3.meta_key = 'member_level'\n WHERE u.id IN ($idStr)\n ORDER BY n.nhc_pin\";\n \n $this->showResults($query, 'search', true);\n }", "public function getMembers() {\n\n\t\t$order = ((Request::has('order')) ? Request::get('order') : 'id');\n\t\t$dir = ((Request::has('dir')) ? Request::get('dir') : 'asc');\n\n\t\t$users = User::orderBy($order, $dir);\n\n\t\t$filterable_fields = ['level', 'location', 'q'];\n\n\t\tforeach ($filterable_fields as $f) {\n\t\t\tif (Request::has($f)) {\n\t\t\t\tif ($f == 'q') {\n\t\t\t\t\t$users->where('username', 'LIKE', '%' . Request::get($f) . '%')\n\t\t\t\t\t\t->orWhere('first_name', 'LIKE', '%' . Request::get($f) . '%')\n\t\t\t\t\t\t->orWhere('last_name', 'LIKE', '%' . Request::get($f) . '%')\n\t\t\t\t\t\t->orWhere('email', 'LIKE', '%' . Request::get($f) . '%');\n\t\t\t\t} else {\n\t\t\t\t\t$users->where($f, 'LIKE', '%' . Request::get($f) . '%');\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\treturn response()->app(200, 'admin.members.index', ['members' => $users->paginate(30), 'filters' => Request::all()]);\n\n\t}", "public static function getList(){\n\t\t$sql = new sql();\n\n\t\treturn $sql->select(\"SELECT * FROM usuarios ORDER BY email;\");\n\n\t}", "public function GetAllMembers()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetAllMembers();\n }", "protected function getMemberNames()\n {\n $arrMembers = array();\n\n $objMembers = $this->Database\n ->execute(\"SELECT id, username, firstname, lastname\n\t\t\t FROM tl_member\n\t\t\t WHERE login = 1\"\n );\n\n while ($objMembers->next()) {\n $varId = $objMembers->id;\n $varName = $objMembers->firstname . ' ' . $objMembers->lastname;\n\n $arrMembers[$varId] = $varName;\n }\n\n return $arrMembers;\n }", "function get_member_with_email($email)\r\n\t{\r\n\t\tglobal $dbCon;\r\n\r\n\t\t$sql = \"SELECT id, username, firstname, lastname, email, password, salt, permission FROM student WHERE email = ?;\";\r\n\t\t$stmt = $dbCon->prepare($sql); //Prepare Statement\r\n\t\tif ($stmt === false)\r\n\t\t{\r\n\t\t\ttrigger_error('SQL Error: ' . $dbCon->error, E_USER_ERROR);\r\n\t\t}\r\n\t\t$stmt->bind_param('s', $email);\r\n\t\t$stmt->execute(); //Execute\r\n\t\t$stmt->bind_result($id, $username, $firstname, $lastname, $email, $password, $salt, $permission); //Get ResultSet\r\n\t\t$stmt->fetch();\r\n\t\t$stmt->close();\r\n\r\n\t\tif ($id > 0)\r\n\t\t{\r\n\t\t\t//Create an array with the user data.\r\n\t\t\t$user_array = array(\"id\" => $id, \"username\" => $username, \"firstname\" => $firstname, \"lastname\" => $lastname, \"email\" => $email, \"password\" => $password, \"salt\" => $salt, \"permission\" => $permission);\r\n\t\t\treturn $user_array;\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t}", "public function getMembers()\n {\n if (!is_null($this->members_relation)) {\n return array_keys($this->members_relation);\n }\n\n if ($this->members_objs == null) {\n // load members\n $response = Helper::get('group/'.$this->unique_id);\n if (isset($response->body['result']['members'])) {\n $this->__construct($response->body['result']);\n }\n }\n\n if ($this->members_objs != null) {\n $list = array();\n foreach ($this->members_objs as $user) {\n $list[] = $user instanceof User ? $user->username : $user;\n }\n\n return $list;\n }\n }", "public function list_members() {\n\n\t\t//ignored users\n\t\t$stm = $this->db()->prepare('select \"to_big\" from \"member_settings\" where \"from_big\" = :current_member_big and \"chat_ignore\" = 1');\n\t\t$stm->execute(array(\n\t\t\t':current_member_big'\t=> $this->member_big,\n\t\t));\n\t\t$ignored_members_raw = $stm->fetchAll(PDO::FETCH_ASSOC);\n\t\t$ignored_members = array(0);\n\t\tforeach($ignored_members_raw as $member) {\n\t\t\t$ignored_members[] = $member['to_big'];\n\t\t}\n\t\t$ignored_members = implode(',', $ignored_members);\n\n\t\t//joined users\n\t\t$stm = $this->db()->prepare(\n\t\t\t'select distinct on (m.big) \"m\".\"big\", \"m\".\"name\"||\\' \\'||substring(\"m\".\"surname\" from 1 for 1)||\\'.\\' as \"name\", (case when \"c\".\"physical\"=1 then \\'onsite\\' else \\'online\\' end) as \"status\"\n\t\t\tfrom \"checkins\" \"c\"\n\t\t\t\tleft join \"members\" \"m\" on (\"c\".\"member_big\" = \"m\".\"big\")\n\t\t\twhere (\"c\".\"checkout\" is null or \"c\".\"checkout\" > now())\n\t\t\t\tand \"c\".\"event_big\" = (select \"event_big\" from \"checkins\" where \"member_big\" = :member_big and (\"checkout\" is null or \"checkout\" > now()) order by \"created\" desc limit 1)\n\t\t\t\tand (\"m\".\"last_web_activity\" > :online_timeout or \"m\".\"last_mobile_activity\" > :online_timeout)\n\t\t\t\tand \"m\".\"big\" != :member_big\n\t\t\t\tand \"m\".\"big\" not in ('.$ignored_members.')\n\t\t\torder by m.big, \"c\".\"created\" asc'\n\t\t);\n\t\t$stm->execute(array(\n\t\t\t':member_big'\t\t=> $this->member_big,\n\t\t\t':online_timeout'\t=> date('c', strtotime(ONLINE_TIMEOUT)),\n\t\t));\n\t\t$joined_members = $stm->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t$joined_member_bigs = array(0);\n\t\tforeach($joined_members as $member) {\n\t\t\t$joined_member_bigs[] = $member['big'];\n\t\t}\n\t\t$joined_member_bigs = implode(',', $joined_member_bigs);\n\n\t\t//users we already had conversation with\n\t\t$stm = $this->db()->prepare(\n\t\t\t'select distinct on (m.big) \"m\".\"big\", \"m\".\"name\"||\\' \\'||substring(\"m\".\"surname\" from 1 for 1)||\\'.\\' as \"name\",\n\t\t\t\t(case when (\"m\".\"last_web_activity\" > :online_timeout or \"m\".\"last_mobile_activity\" > :online_timeout) then \\'online\\' else \\'offline\\' end) as \"status\"\n\t\t\tfrom \"member_rels\" \"r\"\n\t\t\t\tleft join \"members\" \"m\" on (\"m\".\"big\" = (case when \"r\".\"member1_big\"=:member_big then \"r\".\"member2_big\" else \"r\".\"member1_big\" end))\n\t\t\t\tleft join \"chat_messages\" as \"cm\" on (\"cm\".\"rel_id\" = \"r\".\"id\" and (case when \"cm\".\"from_big\"=:member_big then \"cm\".\"from_status\" else \"cm\".\"to_status\" end) = 1)\n\t\t\twhere \"m\".\"big\" != :member_big\n\t\t\t\tand (r.member1_big = :member_big OR r.member2_big = :member_big)\n\t\t\t\tand \"m\".\"big\" not in ('.$ignored_members.','.$joined_member_bigs.')\n\t\t\t\tand \"cm\".\"id\" > 0\n\t\t\torder by m.big'\n\t\t);\n\t\t$stm->execute(array(\n\t\t\t':member_big'\t\t=> $this->member_big,\n\t\t\t':online_timeout'\t=> date('c', strtotime(ONLINE_TIMEOUT)),\n\t\t));\n\t\t$history_members = $stm->fetchAll(PDO::FETCH_ASSOC);\n\n\t\tforeach($joined_members as $key=>$val) {\n\t\t\t$joined_members[$key]['img'] = ProfilePicture::get_resized($val['big'], 28, 28);\n\t\t}\n\n\t\tforeach($history_members as $key=>$val) {\n\t\t\t$history_members[$key]['img'] = ProfilePicture::get_resized($val['big'], 28, 28);\n\t\t}\n\n\n\t\treturn $this->reply(array(\n\t\t\t'joined' => $joined_members,\n\t\t\t'history' => $history_members,\n\t\t));\n\n\t}", "function get_member_names()\n {\n \t//-----------------------------------------\n \t// INIT\n \t//-----------------------------------------\n \t\n \t$name = $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['name'] ) );\n \t\n \t//--------------------------------------------\n\t\t// Load extra db cache file\n\t\t//--------------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->load_cache_file( ROOT_PATH.'sources/sql/'.SQL_DRIVER.'_extra_queries.php', 'sql_extra_queries' );\n\t\t\n \t//-----------------------------------------\n \t// Check length\n \t//-----------------------------------------\n \t\n \tif ( strlen( $name ) < 3 )\n \t{\n \t\t$this->return_null();\n \t}\n \t\n \t//-----------------------------------------\n \t// Try query...\n \t//-----------------------------------------\n \t\n \t$this->ipsclass->DB->cache_add_query( 'member_display_name_lookup', array( 'name' => $name, 'field' => 'members_display_name' ), 'sql_extra_queries' );\n\t\t$this->ipsclass->DB->cache_exec_query();\n\t\t\n \t//-----------------------------------------\n \t// Got any results?\n \t//-----------------------------------------\n \t\n \tif ( ! $this->ipsclass->DB->get_num_rows() )\n \t\t{\n \t\t$this->return_null();\n \t}\n \t\n \t$names = array();\n\t\t$ids = array();\n\t\t\n\t\twhile( $r = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$names[] = '\"'.$r['members_display_name'].'\"';\n\t\t\t$ids[] = intval($r['id']);\n\t\t}\n\t\t\n\t\t$this->print_nocache_headers();\n\t\t@header( \"Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}\" );\n\t\tprint \"returnSearch( '\".str_replace( \"'\", \"\", $name ).\"', new Array(\".implode( \",\", $names ).\"), new Array(\".implode( \",\", $ids ).\") );\";\n\t\texit();\n }", "function get_memberlist($order = ID, $pagenum = 1, $usercount = 10) {\r\n\tglobal $bbdb, $bb;\r\n\tif ( isset($_GET['page']) )\r\n\t\t$page = ($_GET['page'] - 1) * $usercount;\r\n\telse\r\n\t\t$page = ($pagenum - 1) * $usercount;\r\n\tif ( $bb->wp_table_prefix ) {\r\n\t\tif( $order == 'postcount' )\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * , COUNT(*) AS posts FROM \".$bb->wp_table_prefix.\"posts RIGHT JOIN \".$bb->wp_table_prefix.\"users ON poster_id = ID WHERE user_status = 0 GROUP BY user_login ORDER BY posts DESC, post_text DESC LIMIT $page, $usercount\");\r\n\t\telse\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * FROM \".$bb->wp_table_prefix.\"users WHERE user_status = 0 ORDER BY $order LIMIT $page, $usercount\");\r\n\t} else {\r\n\t\tif( $order == 'postcount' )\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * , COUNT(*) AS posts FROM $bbdb->posts RIGHT JOIN $bbdb->users ON poster_id = ID WHERE user_status = 0 GROUP BY user_login ORDER BY posts DESC, post_text DESC LIMIT $page, $usercount\");\r\n\t\telse\r\n\t\t\t$result = $bbdb->get_results(\"SELECT * FROM $bbdb->users WHERE user_status = 0 ORDER BY $order LIMIT $page, $usercount\");\r\n\t}\r\n\treturn $result;\r\n}", "function members() {\n $results = null;\n pagination::init()->paginator('SELECT * FROM `users` ORDER BY `id` DESC', null, 20, 5, null);\n $results .= '<div class=\"members-header\">Members</div>';\n $results .= '<div class=\"members-content\">';\n if(pagination::init()->count() > 0):\n foreach(pagination::init()->result() as $user):\n $results .= '('.$user->id.') - '.sanitize($user->username).'<hr class=\"members-list-hr\"/>';\n endforeach;\n endif;\n $results .= '</div>';\n $results .= '<div class=\"members-content-pagination\">'.pagination::init()->links().'</div>';\n return $results;\n }", "function fillMembers() \n\t{\n\t\t//\tselect members list\t\t\n\t\t$trs = db_query(\"select , from `ugmembers` order by ,\",$this->conn);\n\t\twhile($tdata = db_fetch_numarray($trs))\n\t\t{\n\t\t\t$this->members[] = array($tdata[1],$tdata[0]);\n\t\t}\n\t}", "public function get_participants($search_string = null, $order = null, $order_type = 'Asc', $limit_start = null, $limit_end = null)\n {\n\n $this->db->select('*');\n $this->db->from('users');\n\n if ($search_string) {\n $this->db->like('email', $search_string);\n }\n $this->db->group_by('id');\n\n if ($order) {\n $this->db->order_by($order, $order_type);\n } else {\n $this->db->order_by('id', $order_type);\n }\n\n if ($limit_start && $limit_end) {\n $this->db->limit($limit_start, $limit_end);\n }\n\n if ($limit_start != null) {\n $this->db->limit($limit_start, $limit_end);\n }\n\n $query = $this->db->get();\n\n return $query->result_array();\n }", "function memberByEmail($email)\r\n {\r\n $select = 'SELECT member_id, username, firstname, lastname, email, password, image FROM atlas_members WHERE email=:email';\r\n\r\n $statement = $this->_pdo->prepare($select);\r\n $statement->bindValue(':email', $email, PDO::PARAM_INT);\r\n $statement->execute();\r\n\r\n return $statement->fetch(PDO::FETCH_ASSOC);\r\n }", "public function getMembersTagsList()\r\n {\r\n \t$tmpUser = new Warecorp_User();\r\n \t$EntityTypeId = $tmpUser->EntityTypeId;\r\n \t$EntityTypeName = $tmpUser->EntityTypeName;\r\n \tunset($tmpUser);\r\n\r\n \t$group = Warecorp_Group_Factory::loadById($this->getGroupId());\r\n \t$members = $group->getMembers()->setAssocValue('zua.id')->returnAsAssoc()->getList();\r\n\r\n $query = $this->_db->select();\r\n if ( $this->isAsAssoc() ) {\r\n $fields = array();\r\n $fields[] = ( $this->getAssocKey() === null ) ? 'ztd.id' : $this->getAssocKey();\r\n $fields[] = ( $this->getAssocValue() === null ) ? 'ztd.name' : $this->getAssocValue();\r\n $query->from(array('ztr' => 'zanby_tags__relations'), $fields);\r\n } else {\r\n $query->from(array('ztr' => 'zanby_tags__relations'), new Zend_Db_Expr('DISTINCT ztd.id'));\r\n }\r\n $query->joininner(array('ztd' => 'zanby_tags__dictionary'), 'ztr.tag_id = ztd.id');\r\n\r\n if ( $this->getWhere() ) $query->where($this->getWhere());\r\n $query->where('entity_type_id = ?', $EntityTypeId);\r\n $query->where('entity_id IN (?)', $members);\r\n $query->where('ztr.status IN (?)', $this->getTagStatus());\r\n\r\n if ( $this->getCurrentPage() !== null && $this->getListSize() !== null ) {\r\n $query->limitPage($this->getCurrentPage(), $this->getListSize());\r\n }\r\n if ( $this->getOrder() !== null ) $query->order($this->getOrder());\r\n else $query->order('ztd.name');\r\n\r\n\t\t$items = $this->getTagListFromSQL($query, false);\r\n return $items;\r\n }", "public function getAllEmailAddresses(){\n\t\t$Members=[];\n\n\t\t$this->load->database();\n\t\t$this->db->select(\"EMAIL\");\n\t\t$this->db->select(\"FNAME\");\n\t\t$this->db->select(\"LNAME\");\n\t\t$this->db->from(\"interview_panel\");\n\n\t\t$query=$this->db->get();\n\n\t\tforeach ($query->result() as $row) {\n\t\t\t# code...\n\t\t\t$Member=new PanelDetails();\n\t\t\t$Member->setEmail($row->EMAIL);\n\t\t\t$Member->setFname($row->FNAME);\n\t\t\t$Member->setLname($row->LNAME);\n\t\t\tarray_push($Members, $Member);\n\t\t}\n\t\treturn $Members;\n\n\t}", "public static function selectAllMember()\n {\n global $dbh;\n $sql = $dbh->prepare(\"SELECT id, username FROM memeber\");\n $sql->execute();\n $data = null;\n while($fetch = $sql->fetch(PDO::FETCH_ASSOC))\n {\n $data[] = $fetch;\n }\n return $data;\n }", "public function findSortedMembers($id) {\n $args = array();\n $args['conditions'] = array();\n $args['conditions']['CoGroupMember.co_group_id'] = $id;\n // Only pull currently valid group memberships\n $args['conditions']['AND'][] = array(\n 'OR' => array(\n 'CoGroupMember.valid_from IS NULL',\n 'CoGroupMember.valid_from < ' => date('Y-m-d H:i:s', time())\n )\n );\n $args['conditions']['AND'][] = array(\n 'OR' => array(\n 'CoGroupMember.valid_through IS NULL',\n 'CoGroupMember.valid_through > ' => date('Y-m-d H:i:s', time())\n )\n );\n $args['contain'] = array(\n 'CoPerson' => array('PrimaryName')\n );\n \n // Because we're using containable behavior, we can't easily sort by PrimaryName\n // as part of the find. So instead we'll pull the records and sort using Hash.\n $results = $this->CoGroupMember->find('all', $args);\n \n // Before we sort we'll manually split out the members and owners for rendering.\n // We could order by (eg) owner in the find, but we'll still need to walk the results\n // to find the divide.\n $members = array();\n $owners = array();\n \n foreach($results as $r) {\n if(isset($r['CoGroupMember']['owner']) && $r['CoGroupMember']['owner']) {\n $owners[] = $r;\n } else {\n $members[] = $r;\n }\n }\n \n // Now sort each set of results by family name.\n \n $sortedMembers = Hash::sort($members, '{n}.CoPerson.PrimaryName.family', 'asc');\n $sortedOwners = Hash::sort($owners, '{n}.CoPerson.PrimaryName.family', 'asc');\n \n // Finally, combine the two arrays back and return\n \n return array_merge($sortedOwners, $sortedMembers);\n }", "public function getTopMembers(): array\n {\n $statement = \"SELECT * FROM \" . $this->table . \" ORDER BY id LIMIT \".self::MEMBERLIMIT;\n return $this->pdo->query($statement)->fetchAll();\n }", "function sort_members($a, $b){\n\t\t\t\t\t\t\t\t return (strtolower($a->organization) < strtolower($b->organization)) ? -1 : 1;\n\t\t\t\t\t\t\t\t}", "function get_aacteam_member($email)\n{\n\t$email = strtolower($email);\n\t$csv = file_get_contents(\"https://docs.google.com/spreadsheets/d/1_V8xH5UmJBoWWMtXjkaGaLoaBsgYhLb4dHAN-a6WXag/export?format=csv\");\n\tif(empty($csv) || $csv==null)\n\t{\n\t\treturn array();\n\t}\n\t$lines=explode(PHP_EOL, $csv);\n\t$header_line=array();\n\tif(count($lines)>=1)\n\t{\n\t\t$header_line=str_getcsv($lines[0]);\n\t}\n\t$matched_rows=array();\n\tfor($i=1; $i<count($lines); $i++)\n\t{\n\t\t$row=str_getcsv($lines[$i]);\n\t\t$assoc_row=array();\n\t\tfor($j=0; $j<count($header_line) && $j<count($row); $j++)\n\t\t{\n\t\t\t$key=$header_line[$j];\n\t\t\t$assoc_row[$key] = $row[$j];\n\t\t}\n\t\t$email_field = \"Team_Lead_Email\";\n\t\tif(isset($assoc_row[$email_field]))\n\t\t{\n\t\t\t$cmp_email = strtolower($assoc_row[$email_field]);\n\t\t\tif($email==$cmp_email)\n\t\t\t{\n\t\t\t\tarray_push($matched_rows, $assoc_row);\n\t\t\t}\n\t\t}\n\t}\n\treturn $matched_rows;\n}", "public function findMembers($filters=array())\n\t{\n\t\t$results = array();\n\n\t\t$query = \"SELECT v.* \";\n\t\t$query .= $this->_buildMembersQuery($filters);\n\n\t\tif (!isset($filters['sort']) || !$filters['sort'])\n\t\t{\n\t\t\t$filters['sort'] = 'name';\n\t\t}\n\t\tif (!isset($filters['sort_Dir']) || !$filters['sort_Dir'])\n\t\t{\n\t\t\t$filters['sort_Dir'] = 'ASC';\n\t\t}\n\t\t$query .= \" ORDER BY \" . $filters['sort'] . \" \" . $filters['sort_Dir'];\n\t\tif (isset($filters['start']) && isset($filters['limit']))\n\t\t{\n\t\t\t$query .= \" LIMIT \" . $filters['start'] . \",\" . $filters['limit'];\n\t\t}\n\n\t\t$this->_db->setQuery($query);\n\t\t$values = $this->_db->loadObjectList();\n\t\tif ($values)\n\t\t{\n\t\t\tforeach ($values as $value)\n\t\t\t{\n\t\t\t\tif (!isset($results[$value->uidNumber]))\n\t\t\t\t{\n\t\t\t\t\t$results[$value->uidNumber] = $value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($value->role == 'manager')\n\t\t\t\t\t{\n\t\t\t\t\t\t$results[$value->uidNumber] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $results;\n\t}", "function allMembers()\r\n {\r\n\n $select = 'SELECT member_id, username, firstname, lastname email, password, image FROM atlas_members ORDER BY member_id';\r\n\n $results = $this->_pdo->query($select);\r\n \r\n $resultsArray = array();\r\n \r\n //map each pet id to a row of data for that pet\r\n while ($row = $results->fetch(PDO::FETCH_ASSOC)) {\r\n $resultsArray[$row['member_id']] = $row;\r\n }\r\n \r\n return $resultsArray;\r\n }", "function getMembers(){\n\t\treturn $this->members;\n\t}", "public function getUsersByEmail($email)\n\t{\n\t\tself::connectToDB(); /* Using DB connection */\n\n $this->sql = \"SELECT * \n \t\t\tFROM users\n \t\t\tWHERE users.email LIKE ?\";\n\n try\n {\n $this->query = $this->handler->prepare($this->sql);\n\t\t\t\n $this->query->execute(array('%' . $email . '%'));\n $this->result = $this->query->fetchAll(PDO::FETCH_ASSOC);\n $this->query->closeCursor();\n $this->handler = null;\n\n foreach ($this->result as $row)\n {\n $this->list[] = new User($row['id'], $row['username'], $row['password'], $row['email'], $row['firstname'], $row['lastname'], $row['admin'], $row['blocked'], $row['image_path'], $row['registration_date']);\n }\n return $this->list;\n }\n catch (Exception $e)\n {\n echo \"Error: query failure\";\n return false;\n }\n\t}", "function getFullUserList($search=\"\", $start=0, $end=0) {\n if ($search !=\"\") {\n\tif (strpos($search, \" \")) {\n\t $split = explode(\" \", $search, 2);\n\t $fname = $split[0];\n\t $lname = $split[1];\n\t} else {\n\t $fname = $search;\n\t $lname = '%';\n\t}\n }\n\n $query = \"SELECT agents.*, users.username, users.lastname, regions.regionName FROM agents LEFT JOIN users ON agents.UUID = users.UUID LEFT JOIN regions ON agents.currentRegion = regions.uuid\";\n\n if ($search != \"\") $query .= $this->cleanQuery(\" WHERE users.username LIKE '$fname' AND users.lastname LIKE '$lname'\");\n $query .= \" ORDER BY users.username, users.lastname\";\n\n if ($start || $end)\t$query .= $this->cleanQuery(\" LIMIT $start, $end\");\n\n if ($result = $this->queryDatabase($query)) {\n if (mysql_numrows($result)) {\n while($row=mysql_fetch_assoc($result)) {\n $array[] = $row;\n }\n }\n }\n\n return $array;\n }", "function getAll() {\r\n\t\t$cond = new Criteria();\r\n\t\t$alls = NewsletterUserPeer::doSelect($cond);\r\n\t\treturn $alls;\r\n }", "public function getUserList($page)\r\n {\r\n $userRepository = $this->entityManager->getRepository(User::class);\r\n $users = $userRepository->findBy(\r\n [],\r\n ['email' => 'ASC'],\r\n self::NB_USER_PER_PAGE,\r\n ($page - 1) * self::NB_USER_PER_PAGE\r\n );\r\n\r\n return $users;\r\n }", "public static function all(): array\n\t{\n\t\t$users = get_field('users', self::$member_id);\n\t\tif(empty($users)) return [];\n\t return $users;\n\t}", "public static function sortByEmailStatus(){\n \n $db = Db::getConnection();\n \n $result = $db->query('SELECT * FROM task WHERE status = \"Completed\" ORDER BY user_email ASC');\n\n return $result->fetchAll();\n }", "function get_list_members($course, &$nonmembers, &$listgroups)\r\n{\r\n/// First, get everyone into the nonmembers array\r\n if ($students = get_course_students($course->id)) {\r\n foreach ($students as $student) {\r\n $nonmembers[$student->id] = fullname($student, true);\r\n }\r\n unset($students);\r\n }\r\n\r\n if ($teachers = get_course_teachers($course->id)) {\r\n foreach ($teachers as $teacher) {\r\n $prefix = '- ';\r\n if (isteacheredit($course->id, $teacher->id)) {\r\n $prefix = '# ';\r\n }\r\n $nonmembers[$teacher->id] = $prefix.fullname($teacher, true);\r\n }\r\n unset($teachers);\r\n }\r\n\r\n/// Pull out all the members into little arrays\r\n\t$groups = get_groups($course->id);\r\n if ($groups) {\r\n foreach ($groups as $group) {\r\n $countusers = 0;\r\n $listmembers[$group->id] = array();\r\n if ($groupusers = get_group_users($group->id)) {\r\n foreach ($groupusers as $groupuser) {\r\n $listmembers[$group->id][$groupuser->id] = $nonmembers[$groupuser->id];\r\n //unset($nonmembers[$groupuser->id]);\r\n $countusers++;\r\n }\r\n natcasesort($listmembers[$group->id]);\r\n }\r\n $listgroups[$group->id] = $group->name.\" ($countusers)\";\r\n }\r\n natcasesort($listgroups);\r\n }\r\n\r\n natcasesort($nonmembers);\r\n\tif (empty($selectedgroup)) { // Choose the first group by default\r\n if (!empty($listgroups) && ($selectedgroup = array_shift(array_keys($listgroups)))) {\r\n $members = $listmembers[$selectedgroup];\r\n }\r\n } else {\r\n $members = $listmembers[$selectedgroup];\r\n }\r\n\treturn $listmembers;\r\n}", "function getLittles() {\n $members = Member::getMembersFromQuery(sprintf(\"SELECT * FROM `users` WHERE `big`= %d ORDER BY `pi` DESC;\"),$this->id);\n }", "public function index()\n {\n return $this->users->getAll('first_name', 'asc', ['departments', 'sectors', 'meta']);\n }", "public static function getAllUsersNames()\n {\n $sql = \"SELECT idUser, CONCAT(FirstName,' ',LastName) AS Name FROM users ORDER BY LastName, FirstName\";\n $req = DbConnection::getInstance()->prepare($sql);\n //$req->setFetchMode(PDO::FETCH_OBJ);\n $req->execute();\n return $req->fetchAll(PDO::FETCH_KEY_PAIR);\n }", "public function memberList($eid = 1) {\n $config = $this->config('simple_conreg.settings.'.$eid);\n $countryOptions = SimpleConregOptions::memberCountries($eid, $config);\n $types = SimpleConregOptions::badgeTypes($eid, $config);\n $digits = $config->get('member_no_digits');\n\n switch(isset($_GET['sort']) ? $_GET['sort'] : '') {\n case 'desc':\n $direction = 'DESC';\n break;\n default:\n $direction = 'ASC';\n break;\n }\n switch(isset($_GET['order']) ? $_GET['order'] : '') {\n case 'Name':\n $order = 'name';\n break;\n case 'Country':\n $order = 'country';\n break;\n case 'Type':\n $order = 'badge_type';\n break;\n default:\n $order = 'member_no';\n break;\n }\n\n $content = array();\n\n //$content['#markup'] = $this->t('Unpaid Members');\n\n $content['message'] = array(\n '#cache' => ['tags' => ['simple-conreg-member-list'], '#max-age' => 600],\n '#markup' => $this->t('Members\\' public details are listed below.'),\n );\n\n $rows = [];\n $headers = [\n 'member_no' => ['data' => t('Member No'), 'field' => 'm.member_no', 'sort' => 'asc'],\n 'member_name' => ['data' => t('Name'), 'field' => 'name'],\n 'badge_type' => ['data' => t('Type'), 'field' => 'm.badge_type', 'class' => [RESPONSIVE_PRIORITY_LOW]],\n 'member_country' => ['data' => t('Country'), 'field' => 'm.country', 'class' => [RESPONSIVE_PRIORITY_MEDIUM]],\n ];\n $total = 0;\n\n foreach ($entries = SimpleConregStorage::adminPublicListLoad($eid) as $entry) {\n // Sanitize each entry.\n $badge_type = trim($entry['badge_type']);\n $member_no = sprintf(\"%0\".$digits.\"d\", $entry['member_no']);\n $member = ['member_no' => $badge_type . $member_no];\n switch ($entry['display']) {\n case 'F':\n $fullname = trim(trim($entry['first_name']) . ' ' . trim($entry['last_name']));\n if ($fullname != trim($entry['badge_name']))\n $fullname .= ' (' . trim($entry['badge_name']) . ')';\n $member['name'] = $fullname;\n break;\n case 'B':\n $member['name'] = trim($entry['badge_name']);\n break;\n case 'N':\n $member['name'] = t('Name withheld');\n break;\n }\n $member['badge_type'] = trim(isset($types[$badge_type]) ? $types[$badge_type] : $badge_type);\n $member['country'] = trim(isset($countryOptions[$entry['country']]) ? $countryOptions[$entry['country']] : $entry['country']);\n\n // Set key to field to be sorted by.\n if ($order == 'member_no')\n $key = $member_no;\n else\n $key = $member[$order] . $member_no; // Append member number to ensure uniqueness.\n if (!empty($entry['display']) && $entry['display'] != 'N' && !empty($entry['country'])) {\n $rows[$key] = $member;\n }\n $total++;\n }\n\n // Sort array by key.\n if ($direction == 'DESC')\n krsort($rows);\n else\n ksort($rows);\n\n $content['table'] = array(\n '#type' => 'table',\n '#header' => $headers,\n //'#footer' => array(t(\"Total\")),\n '#rows' => $rows,\n '#empty' => t('No entries available.'),\n );\n\n $content['summary_heading'] = [\n '#markup' => $this->t('Country Breakdown'),\n '#prefix' => '<h2>',\n '#suffix' => '</h2>',\n ];\n\n $rows = array();\n $headers = array(\n t('Country'),\n t('Number of members'),\n );\n $total = 0;\n foreach ($entries = SimpleConregStorage::adminMemberCountrySummaryLoad($eid) as $entry) {\n if (!empty($entry['country'])) {\n // Sanitize each entry.\n $entry['country'] = trim($countryOptions[$entry['country']]);\n $rows[] = $entry;\n $total += $entry['num'];\n }\n }\n //Add a row for the total.\n $rows[] = array(t(\"Total\"), $total);\n $content['summary'] = array(\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $rows,\n '#empty' => t('No entries available.'),\n );\n // Don't cache this page.\n //$content['#cache']['max-age'] = 0;\n\n return $content;\n }", "function getUsersFormatted(){\r\n $data=new \\Cars\\Data\\Common($this->app);\r\n $output = array();\r\n $char = 'A';\r\n while($char >= 'A' && $char <= 'Z' && strlen($char) == 1){\r\n $output[$char] = $data->getUsersByLastNameInit($char);\r\n $char++;\r\n }\r\n\r\n\r\n return $output;\r\n }", "private function getUsersMailist() {\n $param = array(\n 'where' => 'registered = 1'\n );\n\n $users = $this->mailist->gets($param);\n\n return $users;\n }", "public function getFullAccountList() {\n\t\t$result = $this->db->queryFetch(\"SELECT \"._CLMN_MEMBID_.\", \"._CLMN_USERNM_.\", \"._CLMN_EMAIL_.\" FROM \"._TBL_MI_.\" ORDER BY \"._CLMN_MEMBID_.\" ASC\");\n\t\tif(!is_array($result)) return;\n\t\treturn $result;\n\t}", "public static function getAllNames() {\n\t\t$contactArray = X2Model::model('Contacts')->findAll($condition='visibility=1');\n\t\t$names=array(0=>'None');\n\t\tforeach($contactArray as $user){\n\t\t\t$first = $user->firstName;\n\t\t\t$last = $user->lastName;\n\t\t\t$name = $first . ' ' . $last;\n\t\t\t$names[$user->id]=$name;\n\t\t}\n\t\treturn $names;\n\t}", "function getAllEmails() {\n return getALL('SELECT * FROM mail');\n}", "function visitors_sorted_by_mail($email, $permission){\n\t$flag = true;\n\t$connect = mysqli_connect(\"localhost\", \"root\", \"\", \"commitment_wall\");\n\tmysqli_query($connect, \"SET NAMES UTF8\");\n\t$sql = 'SELECT * FROM visitors WHERE email=\"'.$email.'\"ORDER BY id DESC;';\n\t$result = mysqli_query($connect, $sql);\n\t$output = getTableString($permission);\n\tif(mysqli_num_rows($result) > 0) {\n\t\twhile($row = mysqli_fetch_array($result)) {\n\t\t\t$output .= getTableDataString($permission, $row);\n\t\t}\n\t} \n\telse {\n\t\t$output .= getEmptyDataString();\n\t}\n\t$output .= '</table>\n\t\t\t\t\t</div>';\n\techo $output;\n}", "function pms_get_users_non_members( $args = array() ) {\r\n\r\n global $wpdb;\r\n\r\n $defaults = array(\r\n 'orderby' => 'ID',\r\n 'offset' => '',\r\n 'limit' => ''\r\n );\r\n\r\n $args = apply_filters( 'pms_get_users_non_members_args', wp_parse_args( $args, $defaults ), $args, $defaults );\r\n\r\n // Start query string\r\n $query_string = \"SELECT {$wpdb->users}.ID \";\r\n\r\n // Query string sections\r\n $query_from = \"FROM {$wpdb->users} \";\r\n $query_join = \"LEFT JOIN {$wpdb->prefix}pms_member_subscriptions ON {$wpdb->users}.ID = {$wpdb->prefix}pms_member_subscriptions.user_id \";\r\n $query_where = \"WHERE {$wpdb->prefix}pms_member_subscriptions.user_id is null \";\r\n\r\n $query_limit = '';\r\n if( !empty( $args['limit'] ) )\r\n $query_limit = \"LIMIT \" . $args['limit'] . \" \";\r\n\r\n $query_offset = '';\r\n if( !empty( $args['offset'] ) )\r\n $query_offset = \"OFFSET \" . $args['offset'] . \" \";\r\n\r\n\r\n // Concatenate the sections into the full query string\r\n $query_string .= $query_from . $query_join . $query_where . $query_limit . $query_offset;\r\n\r\n $results = $wpdb->get_results( $query_string, ARRAY_A );\r\n\r\n $users = array();\r\n\r\n if( !empty( $results ) ) {\r\n foreach( $results as $result ) {\r\n $users[] = new WP_User( $result['ID'] );\r\n }\r\n }\r\n\r\n return apply_filters( 'pms_get_users_non_members', $users, $args );\r\n\r\n }", "function get_all_online_contacts() {\n //get the table and select everything.\n $task = Doctrine_Query::create()\n ->from('Zim_Model_User user')\n ->where('user.status != 0')\n ->andWhere('user.status != 3')\n ->andWhere('user.timedout != 1');\n $exec = $task->execute();\n $contacts = $exec->toArray();\n\n foreach ($contacts as $key => $contact) {\n //if the contacts username is not set then get it from Zikula\n if (!isset($contact['uname']) || empty($contact['uname'])) {\n $contacts[$key]['uname'] = UserUtil::getVar('uname', $contact['uid']);\n }\n }\n\n //return the array of contacts\n return $contacts;\n }", "public function findOrderBySearchingEmail($search)\n {\n return $this->createQueryBuilder('o')\n ->andWhere('o.email LIKE :email')\n ->setParameter(\"email\",$search.'%')\n ->orderBy('o.email' ,'DESC');\n }", "public function get_user_by_email($arg){\n\n return $this->db->query(\"SELECT * FROM admins WHERE email= ?\", $arg)->row_array();\n \n }", "public static function getAllNames() {\n $contactArray = X2Model::model('Contacts')->findAll($condition = 'visibility=1');\n $names = array(0 => 'None');\n foreach ($contactArray as $user) {\n $first = $user->firstName;\n $last = $user->lastName;\n $name = $first . ' ' . $last;\n $names[$user->id] = $name;\n }\n return $names;\n }", "public function get_members() {\r\n $this->db->select('user.id, user.username, user.email, user.first_name, user.last_name, user.date_registered,\r\n user.last_login, user.active, user.banned, role.name as role_name');\r\n $this->db->from('user');\r\n $this->db->join('role', 'role.id = user.role_id');\r\n\r\n $query = $this->db->get();\r\n\r\n $members = \"Username|E-mail address|First name|Last name|Registration date|Last login|Active?|Banned?|Role\\r\\n\";\r\n\r\n if ($query->num_rows() > 0) {\r\n foreach($query->result() as $row) {\r\n $members .= $row->username .\"|\". $row->email .\"|\". $row->first_name .\"|\".$row->last_name .\"|\". $row->date_registered .\r\n \"|\". $row->last_login .\"|\". $row->active .\"|\". $row->banned .\"|\". $row->role_name .\"\\r\\n\";\r\n }\r\n }else{\r\n $members = \"no results\";\r\n }\r\n\r\n return $members;\r\n }", "function get_users(){\n global $conf;\n global $LDAP_CON;\n\n $sr = ldap_list($LDAP_CON,$conf['usertree'],\"ObjectClass=inetOrgPerson\");\n $result = ldap_get_binentries($LDAP_CON, $sr);\n $users = array();\n if(count($result)){\n foreach ($result as $entry){\n if(!empty($entry['sn'][0])){\n $users[$entry['dn']] = $entry['givenName'][0].\" \".$entry['sn'][0];\n }\n }\n }\n return $users;\n}", "public function get_organisers(){\n $sql = \"SELECT DISTINCT * from members WHERE members.id IN \"\n .\"(SELECT organiserID FROM tournamentOrganisers WHERE tournamentID=$this->id)\";\n return Member::find_by_sql($sql);\n }", "public function getPartinUsersList(){\n return $this->_get(2);\n }", "public function findUsers(): iterable;", "function get_members($gid, $limit = NULL, $approved = NULL) {\n global $db;\n\n $app_query = \"\";\n if ($approved)\n $app_query = \" AND \" . tbl($this->gp_mem_tbl) . \".active='$approved'\";\n\n //List of fields we need from a user table\n $user_fields = get_user_fields();\n\n $user_fields = apply_filters($user_fields, 'get_group_members');\n\n $fields_query = '';\n\n foreach ($user_fields as $field)\n $fields_query .= ',' . tbl('users') . '.' . $field;\n\n $result = $db->select(tbl($this->gp_mem_tbl)\n . \" LEFT JOIN \" . tbl('users')\n . \" ON \" . tbl($this->gp_mem_tbl)\n . \".userid=\" . tbl('users') . \".userid\"\n , tbl($this->gp_mem_tbl) . \".*\" . $fields_query\n , \" group_id='$gid' $app_query\", $limit);\n\n\n\n if ($db->num_rows > 0)\n return $result;\n else\n return false;\n }", "function find_all_user(){\n global $db;\n $results = array();\n $sql = \"SELECT u.id,u.name,u.username,u.user_level,u.status,u.last_login,email,\";\n $sql .=\"g.group_name \";\n $sql .=\"FROM users u \";\n $sql .=\"LEFT JOIN user_groups g \";\n $sql .=\"ON g.group_level=u.user_level ORDER BY u.name ASC\";\n $result = find_by_sql($sql);\n return $result;\n }", "public function testListMembers()\n {\n }", "function GetUsers($strRole='A',$strValue='',$strOrder='name')\n{\n global $oDB;\n \n $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE role=\"A\" ORDER BY '.$strOrder;\n\n if ( $strRole=='M' ) $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE role=\"A\" OR role=\"M\" ORDER BY '.$strOrder;\n if ( $strRole=='M-' ) $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE role=\"M\" ORDER BY '.$strOrder;\n if ( $strRole=='name') $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE name=\"'.$strValue.'\" ORDER BY '.$strOrder;\n if ( substr($strRole,-1,1)=='*' )\n {\n $like = 'LIKE'; if ( $oDB->type=='pg' ) $like = 'ILIKE';\n $strQ = 'SELECT id,name FROM '.TABUSER.' WHERE name '.$like.' \"'.substr($strRole,0,-1).'%\" ORDER BY '.$strOrder;\n }\n\n $oDB->Query($strQ);\n\n $arrUsers = array();\n $i=1;\n while ($row=$oDB->Getrow())\n {\n $arrUsers[$row['id']]=$row['name'];\n $i++;\n if ( $i>200 ) break;\n }\n return $arrUsers;\n}", "public function getall($args)\n {\n\n $items = array();\n\n // do not show the account links if Profile is not the Profile manager\n $profilemodule = System::getVar('profilemodule', '');\n if ($profilemodule != 'Profile') {\n return $items;\n }\n\n $uname = isset($args['uname']) ? $args['uname'] : null;\n if (!$uname && UserUtil::isLoggedIn()) {\n $uname = UserUtil::getVar('uname');\n }\n\n // Create an array of links to return\n if (!empty($uname)) {\n $uid = UserUtil::getIdFromName($uname);\n $items['0'] = array('url' => ModUtil::url('Profile', 'user', 'view', array('uid' => $uid)),\n 'module' => 'Profile',\n //! account panel link\n 'title' => $this->__('Personal info'),\n 'icon' => 'admin.png');\n\n if (SecurityUtil::checkPermission('Profile:Members:', '::', ACCESS_READ)) {\n $items['1'] = array('url' => ModUtil::url('Profile', 'user', 'viewmembers'),\n 'module' => 'Profile',\n 'title' => $this->__('Registered users list'),\n 'icon' => 'members.png');\n }\n }\n\n // Return the items\n return $items;\n }", "public function get_all()\n {\n // Array untuk data member\n $member = array();\n // Siapkan SQL\n $sql = \"SELECT *\n FROM member\n ORDER BY id DESC\";\n // Query data member\n $res = mysqli_query($this->db, $sql);\n // Ambil data satu persatu\n while ($r = mysqli_fetch_assoc($res)) {\n $member[] = $r;\n }\n // Return data member\n return $member;\n }", "function facebook_get_members($id_member, $by_id_facebook = false)\r\n{\r\n\t$members = array();\r\n\r\n\t// Let's try to see if we got some cached\r\n\tif ($by_id_facebook)\r\n\t\t$cache_key = 'fb_id_facebook_';\r\n\telse\r\n\t\t$cache_key = 'fb_id_member_';\r\n\tforeach ((array) $id_member as $k => $id)\r\n\t{\r\n\t\t$cache_data = cache_get_data($cache_key . $id, 86400);\r\n\r\n\t\tif ($cache_data !== null && !empty($cache_data['id_member']))\r\n\t\t{\r\n\t\t\tif (is_array($id_member))\r\n\t\t\t\tunset($id_member[$k]);\r\n\t\t\telse\r\n\t\t\t\treturn $cache_data;\r\n\r\n\t\t\t$members[$cache_data['id_member']] = $cache_data;\r\n\t\t}\r\n\t}\r\n\r\n\tif (!empty($id_member))\r\n\t{\r\n\t\t// Let's fetch the members for the Facebook IDs/fields\r\n\t\t$request = wesql::query('\r\n\t\t\tSELECT id_member, facebook_id, facebook_fields\r\n\t\t\tFROM {db_prefix}members\r\n\t\t\tWHERE ' . ($by_id_facebook ? 'facebook_id' : 'id_member') . ' IN ({array_string:ids})',\r\n\t\t\tarray(\r\n\t\t\t\t'ids' => (array) $id_member,\r\n\t\t\t)\r\n\t\t);\r\n\t\twhile ($row = wesql::fetch_assoc($request))\r\n\t\t{\r\n\t\t\t$members[$row['id_member']] = array(\r\n\t\t\t\t'id' => $row['id_member'],\r\n\t\t\t\t'fbid' => $row['facebook_id'],\r\n\t\t\t\t'fields' => explode(',', $row['facebook_fields']),\r\n\t\t\t);\r\n\r\n\t\t\tcache_put_data($cache_key . ($by_id_facebook ? $row['facebook_id'] : $row['id_member']), $members[$row['id_member']], 86400);\r\n\t\t}\r\n\t\twesql::free_result($request);\r\n\t}\r\n\r\n\tif (!is_array($id_member))\r\n\t\treturn $members[$id_member];\r\n\treturn $members;\r\n}", "public function OrganisationMembers() {\n\t\t$memberIDs = $this->RelatedMembers()\n\t\t\t->filter(['Type.Code' => ['MJO', 'MRO', 'MEM', 'MCO']])\n\t\t\t->column('FromModelID');\n\n\t\t$uniquemembers = Member::get()->filter(['ID' => $memberIDs])->distinct(true)->setQueriedColumns(array('ID'));\n\n\t\treturn $uniquemembers;\n\t}", "public function getMembers()\n {\n \t$companyId = session('company_id');\n \t$userRepo = $this->em->getRepository('App\\Entity\\Management\\User');\n \t$users = $userRepo->getUsersByCompany($companyId);\n\n echo json_encode($users);\n\n }", "function contactsByUserName( $name, $order ){\r\n\t\t$name = str_replace(' ', '%', $name);\r\n\t\t$return = array();\r\n\t\t$query = \"SELECT distinct c.ID, c.* from users u, contacts c, `contacts-users` cu WHERE\r\n\t\t\t\tu.id = cu.userid and\r\n\t\t\t\tcu.contactid = c.id and\r\n\t\t\t\tCONCAT(u.FirstName, ' ', u.MiddleIn, ' ', u.LastName) LIKE '%$name%'\";\r\n// Michael Thompson * 12/07/2005 * Added Below line to tack order onto sql sentence\r\n if ($order != \"\") $query .= \" ORDER BY $order\";\r\n\t\t$result = mysql_query($query);\r\n\t\twhile( $row = mysql_fetch_assoc($result) ) {\r\n\t\t\tarray_push( $return, $row );\r\n\t\t}\r\n\t\treturn $return;\r\n\t}", "public function getUsersList()\n {\n }", "function get_user_by_email($email)\n {\n }", "public function getUsers();", "public function getUsers();", "public function getUsers();", "public function getUserMails()\r\n\t{\r\n\t\t$userDir = __DIR__ . '/../../settings/users';\r\n\t\t\t\t\r\n\t\t/* check if users directory exists */\r\n\t\tif(!is_dir($userDir)){ return array(); }\r\n\t\t\r\n\t\t/* get all user files */\r\n\t\t$users = array_diff(scandir($userDir), array('..', '.'));\r\n\t\t\r\n\t\t$usermails\t= array();\r\n\r\n\t\tforeach($users as $key => $user)\r\n\t\t{\r\n\t\t\tif($user == '.logins'){ continue; }\r\n\r\n\t\t\t$contents \t= file_get_contents($userDir . DIRECTORY_SEPARATOR . $user);\r\n\r\n\t\t\tif($contents === false){ continue; }\r\n\r\n\t\t\t$searchfor \t= 'email:';\r\n\r\n\t\t\t# escape special characters in the query\r\n\t\t\t$pattern \t= preg_quote($searchfor, '/');\r\n\t\t\t\r\n\t\t\t# finalise the regular expression, matching the whole line\r\n\t\t\t$pattern \t= \"/^.*$pattern.*\\$/m\";\r\n\r\n\t\t\t# search, and store first occurence in $matches\r\n\t\t\tif(preg_match($pattern, $contents, $match)){\r\n\t\t\t\t$usermails[] = trim(str_replace(\"email:\", \"\", $match[0]));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $usermails;\r\n\t}", "public function getMembers(){\n $this->db->select('*');\n $this->db->from('users');\n $query = $this->db->get();\n \n return $query->result_array();\n\t\t}", "public function SearchAppUser($Email, $sortBy, $sortDirection, $PageSize, $PageIndex)\n\t\t{\n\t\t\t$this->logger->debug(\"START\");\n\t\t\t$this->mysqli = $this->getMySQLI();\n\t\t\t$appuserSQL = new AppUserSQL($this->userInfo, $this->mysqli);\n\t\t\t$query = $appuserSQL->SearchAppUser($Email, $sortBy, $sortDirection, $PageSize, $PageIndex);\n\t\t\t$this->logger->debug($query);\n\t\t\t$result = $this->mysqli->query($query);\n\t\t\t$appUserAssembler = new AppUserAssembler($this->userInfo);\n\t\t\t$list = $appUserAssembler->AssemblePaginatedList($result, $PageSize, $PageIndex, $sortBy, $sortDirection);\n\t\t\t$this->logger->debug(\"END\");\n\t\t\treturn $list;\n\t\t}", "function getMemberContractList() {\n $sql = \"SELECT b.* \n FROM user_contract a INNER JOIN contract b ON a.contract_id = b.id \n WHERE a.user_type = 'member' AND a.uid = ? \n ORDER BY b.id DESC\";\n return getAll($sql, [getLogin()['mid']]);\n}", "public function all($limit = null, $offset = 0) {\n return $this->_collect_users($this->_user()->membership()->getMembers($this->_user()));\n }", "function _getListMembers($ac_token, $screen_name, $slug, $cursor = -1) {\n $api = 'https://api.twitter.com/1/lists/members.json';\n $data = array('cursor' => $cursor, 'slug' => $slug, 'owner_screen_name' => $screen_name);\n return $this->_execTwApi($ac_token, $api, $data, 'get');\n }", "public function memberList()\n {\n return User::where('status', 1)->where('role_id', 2)->get();\n }", "public function listMembers() {\n\t\t/*\n\t\t\tActions should be added to the array like so:\n\t\t\t\t[actions] =>\n\t\t\t\t\t\t[n]\n\t\t\t\t\t\t\t[title] => action title\n\t\t\t\t\t\t\t[controller] => action controller\n\t\t\t\t\t\t\t[action] => action name\n\t\t\t\t\t\t\t[params] => array of params\n\t\t*/\n\t\t$this->__paginateMemberList($this->Member->getMemberSummaryAll(true));\n\t}", "static function getAllUsers($order = 'id', $begin = 0)\r\n {\r\n $tableUser = DatabaseManager::getNameTable('TABLE_USER');\r\n $tableChurch = DatabaseManager::getNameTable('TABLE_CHURCH');\r\n\r\n $query = \"SELECT $tableUser.* \r\n FROM $tableUser\r\n JOIN $tableChurch \r\n ON $tableUser.idChurch = $tableChurch.id\";\r\n\r\n if ($order == 'username')\r\n {\r\n $query = $query . \" ORDER BY $tableUser.username\";\r\n }\r\n else if ($order == 'nameChurch')\r\n {\r\n $query = $query . \" ORDER BY $tableChurch.name\";\r\n }\r\n else\r\n {\r\n $query = $query . \" ORDER BY $tableUser.id DESC\";\r\n }\r\n\r\n if ($begin !== -1)\r\n {\r\n $query = $query. \" LIMIT \" . strval($begin * 10) . \", 11 \";\r\n }\r\n\r\n $arrayUsers = DatabaseManager::multiFetchAssoc($query);\r\n $users = array();\r\n\r\n if ($arrayUsers !== NULL)\r\n {\r\n $i = 0;\r\n foreach ($arrayUsers as $user) \r\n {\r\n if ($i == 10)\r\n {\r\n continue;\r\n }\r\n\r\n $users[] = self::ArrayToUser($user);\r\n $i++;\r\n }\r\n\r\n return $users;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }", "public function getUserslistToInvite()\n\t{\n\t\t//get current login user session\n\t\t$results = array();\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\t\t\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t//get allsection setting sections for same course\n\t\t$sections_list = $this->__allSections();\n\t\t$options = array('course'=>$course_name,'section'=>$sections_list,'userName !='=>$user);\n\t\t$results = $this->PleUser->find('all',array('conditions'=>$options,'fields'=>array('userName','name'),'order' => array('PleUser.name ASC')));\n\t\tif ($results) {\n\t\t\treturn $results;\n\t\t}\n\t\treturn $results;\n\t}", "function admin_mail_list( string $search = '' ) : array\n{\n // Only moderators and above can see this\n user_restrict_to_moderators();\n\n // Check if the required files have been included\n require_included_file('functions_time.inc.php');\n\n // Sanitize the search data\n $search = sanitize($search, 'string');\n\n // Fetch the private messages\n $qmessages = \" SELECT users_private_messages.id AS 'pm_id' ,\n users_private_messages.title AS 'pm_title' ,\n users_private_messages.sent_at AS 'pm_sent' ,\n users_private_messages.read_at AS 'pm_read' ,\n users_private_messages.fk_users_recipient AS 'pm_recipient' ,\n recipient.username AS 'ur_nick' ,\n users_private_messages.fk_users_sender AS 'us_id' ,\n sender.username AS 'us_nick' ,\n users_private_messages.fk_parent_message AS 'pm_parent'\n FROM users_private_messages\n LEFT JOIN users AS sender\n ON users_private_messages.fk_users_sender = sender.id\n LEFT JOIN users AS recipient\n ON users_private_messages.fk_users_recipient = recipient.id\n WHERE users_private_messages.hide_from_admin_mail = 0\n AND ( users_private_messages.fk_users_recipient = 0\n OR users_private_messages.fk_users_sender = 0 ) \";\n\n // Execute the search\n if($search)\n $qmessages .= \" AND ( users_private_messages.title LIKE '%$search%'\n OR sender.username LIKE '%$search%'\n OR recipient.username LIKE '%$search%' ) \";\n\n // Hide admin mail from moderators\n if(!user_is_administrator())\n $qmessages .= \" AND users_private_messages.is_admin_only_message = 0 \";\n\n // Sort the results\n $qmessages .= \" ORDER BY users_private_messages.sent_at DESC \";\n\n // Run the query\n $qmessages = query($qmessages);\n\n // Prepare the data\n for($i = 0; $row = mysqli_fetch_array($qmessages); $i++)\n {\n $data[$i]['id'] = sanitize_output($row['pm_id']);\n $data[$i]['display'] = (!$row['pm_recipient']);\n $data[$i]['title'] = sanitize_output($row['pm_title']);\n $data[$i]['read'] = ($row['pm_read']);\n $data[$i]['recipient'] = $row['pm_recipient'];\n $sender_username = $row['us_id'] ? sanitize_output($row['us_nick']) : sanitize_output($row['ur_nick']);\n $data[$i]['sender'] = (!$row['us_id'] && !$row['pm_recipient']) ? __('nobleme') : $sender_username;\n $data[$i]['sent'] = sanitize_output(time_since($row['pm_sent']));\n $data[$i]['parent'] = $row['pm_parent'];\n $parent_ids[$i] = $row['pm_parent'];\n }\n\n // Add the number of rows to the data\n $data['rows'] = $i;\n\n // Initialize the unread message counter\n $data['unread'] = 0;\n\n // Loop through the messages to identify the top level ones (latest message of a message chain)\n for($i = 0; $i < $data['rows']; $i++)\n {\n $data[$i]['top_level'] = !in_array($data[$i]['id'], $parent_ids);\n $data['unread'] += ($data[$i]['display'] && $data[$i]['top_level'] && !$data[$i]['read']);\n }\n\n // Return the prepared data\n return $data;\n}", "function getEmails() {\n\treturn db_query(\"SELECT email FROM Emails\");\n}", "function &getUsers($uids)\n {\n $criteria = new CriteriaCompo();\n $criteria->add(new Criteria('uid', '(' . implode(',', $uids) . ')', 'IN'));\n $criteria->setSort('uid');\n\n $member_handler =& xoops_gethandler('member');\n $users =& $member_handler->getUsers($criteria, true);\n return $users;\n }", "function getMemberListAdmin() {\n $sql = \"SELECT d.*\n FROM admin_building a,\n condo_building b,\n member_condo c,\n member d \n WHERE a.admin_id=? AND a.building_id = b.building_id AND b.condo_id= c.condo_id AND c.member_id = d.id AND b.building_id=? ORDER BY d.id ASC\";\n \n return getAll($sql, [getLogin()['uid'], getLogin()['bid']]);\n}", "public function getMemberObjs()\n {\n if (!empty($this->members_objs) && ($this->members_objs[0] instanceof User)) {\n return $this->members_objs;\n }\n }", "function getUsernames(){\n $arr = array();\n for($x=0;$x<count($this->names);$x++){\n array_push($arr,$this->names[$x]);\n }\n return $arr;\n }", "public function getModeratorEmails() {\n $moderatorNames = $this->get('moderators');\n $moderatorNames = explode(',',$moderatorNames);\n $moderators = array();\n foreach ($moderatorNames as $name) {\n $c = $this->xpdo->newQuery('modUser');\n $c->innerJoin('modUserProfile','Profile');\n $c->select(array('modUser.id','Profile.email'));\n $c->where(array('username' => $name));\n $user = $this->xpdo->getObject('modUser',$c);\n if ($user) {\n $moderators[] = $user->get('email');\n }\n }\n\n /* now get usergroup moderators */\n $moderatorGroup = $this->get('moderator_group');\n $c = $this->xpdo->newQuery('modUserProfile');\n $c->innerJoin('modUser','User');\n $c->innerJoin('modUserGroupMember','UserGroupMembers','User.id = UserGroupMembers.member');\n $c->innerJoin('modUserGroup','UserGroup','UserGroup.id = UserGroupMembers.user_group');\n $c->where(array(\n 'UserGroup.name' => $moderatorGroup,\n ));\n $members = $this->xpdo->getCollection('modUserProfile',$c);\n foreach ($members as $member) {\n $email = $member->get('email');\n if (!empty($email)) array_push($moderators,$email);\n }\n $moderators = array_unique($moderators);\n\n return $moderators;\n }", "function getByEmail($email);", "public static function listMembers($db){\r\n\t\t//query for all users\r\n\t\t$query = \"SELECT FirstName, LastName, Email FROM Member\";\r\n\t\t$result = $db->query($query);\r\n\t\t//check if ok\r\n\t\tif (!$result){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//get number of rows returned\r\n\t\t$num_results = $result->num_rows;\r\n\t\t$info = '<p><table border=\"1\">\r\n\t\t<tr><th>First Name</th><th>Last Name</th><th>Email</th></tr>';//<th>Select</th></tr>';\r\n\t\tif ($num_results > 0){\r\n\t\t\tfor ($i=0; $i<$num_results; $i++){\r\n\t\t\t\t//read back one row at a time\r\n\t\t\t\t$row = $result->fetch_assoc(); //retrieves a row from the result\r\n\t\t\t\t$info .= \r\n\t\t\t\t'<tr>'\r\n\t\t\t\t. '<td>'. $row['FirstName'] . '</td>'\r\n\t\t\t\t. '<td>'. $row['LastName'] . '</td>'\r\n\t\t\t\t. '<td>'. $row['Email'] . '</td>'\r\n\t\t\t\t.'</tr>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$info .= '</table></p>';\r\n return $info;\r\n\t}", "function nameWithMail () {\n\t$link = $this->unitDB();\n\t\n\t$res = $link->prepare(\"SELECT * FROM mails m INNER JOIN users u ON u.id=m.users_name\");\n\t$res->execute();\n\t$row = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\n\treturn $row;\n}", "function get_all_teammember()\n {\n $this->db->order_by('TeamMemberId', 'desc');\n return $this->db->get('TeamMember')->result_array();\n }", "public function getAll()\n {\n return $this->appUser->orderBy('first_name')->get()->toArray();\n }" ]
[ "0.6982297", "0.6784908", "0.6771729", "0.67627305", "0.66539663", "0.66304535", "0.6611295", "0.6608954", "0.6534582", "0.6517538", "0.64622706", "0.64320946", "0.6405431", "0.635035", "0.62861454", "0.62181765", "0.6167801", "0.6157976", "0.6145509", "0.6107058", "0.6099372", "0.6045586", "0.6040196", "0.60371506", "0.60344374", "0.5978554", "0.5975535", "0.5971757", "0.5955547", "0.5954371", "0.5946754", "0.59416014", "0.5931117", "0.59248304", "0.5907487", "0.58997446", "0.58884674", "0.58839506", "0.5864766", "0.586234", "0.58495015", "0.5849021", "0.5841201", "0.58349437", "0.5826946", "0.5824764", "0.5812478", "0.58116317", "0.58110654", "0.5810606", "0.5804251", "0.57841516", "0.57680327", "0.5766823", "0.576612", "0.5758858", "0.5751179", "0.57468563", "0.57424074", "0.57418215", "0.5737308", "0.5732788", "0.57312334", "0.57116", "0.57088", "0.57072335", "0.57004625", "0.5699648", "0.56959575", "0.568952", "0.5688912", "0.56879276", "0.5686785", "0.5685961", "0.56757396", "0.567257", "0.5670728", "0.5670728", "0.5670728", "0.5667676", "0.5667209", "0.56658244", "0.5659389", "0.5658118", "0.5657113", "0.56548005", "0.56491876", "0.56455404", "0.56429446", "0.563605", "0.5629767", "0.56224424", "0.56209135", "0.5617188", "0.5616486", "0.5615294", "0.56087756", "0.5602482", "0.5601738", "0.5596974", "0.5594004" ]
0.0
-1
Test case for making sure that XML_RSS extends from XML_Parser
function testIsXML_Parser() { $rss = new XML_RSS(); $this->assertTrue(is_a($rss, "XML_Parser")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function html_type_rss()\n {\n }", "function testBug2310() {\n $rss = new XML_RSS(\"\", null, \"utf-8\");\n $this->assertEquals($rss->tgtenc, \"utf-8\");\n\n $rss = new XML_RSS(\"\", \"utf-8\", \"iso-8859-1\");\n $this->assertEquals($rss->srcenc, \"utf-8\");\n $this->assertEquals($rss->tgtenc, \"iso-8859-1\");\n }", "function do_feed_rss()\n {\n }", "function XmlLoader($strXml) {\r\n\t$module = 'rssreader';\r\n\t//set_error_handler( 'HandleXmlError' );\r\n\tset_error_handler( $GLOBALS['modules'][$module]['functions']['HandleXmlError'] );\r\n\t$dom = new DOMDocument( );\r\n\t$dom->loadXml( $strXml );\r\n\trestore_error_handler();\r\n\treturn $dom;\r\n}", "public function __construct() {\n\n\t\t$this->supportedFeedTypes = array('RSS1', 'RSS2', 'ATOM');\n\t\t$this->type = 'RSS2';\n\t\t\n\t\t$this->db = new DBCex();\n\t\t$this->parser = new Parser();\n\t\t\n\t\t$this->type = $type;\n\t\t$this->feedElements = array();\n\n\t\t//default values for channel\n\t\t$this->addChannelTag('title', $this->type . 'Feed');\n//\t\t$this->addChannelTag('link', 'http://www.buero-hahn.de');\n\n\t\t//Tag elements that we need to CDATA encode\n\t\t$this->feedElements['CDATAEncoded'] = array('description', 'content:encoded', 'summary');\n\t}", "public function testXmlParser() {\n $xmlElement = new SimpleDOM('<?xml version=\"1.0\"?><test/>');\n $xml = $xmlElement->asXML();\n $this->assertNotFalse($xml);\n }", "private static function provideRSSContent()\n\t{\n\t\treturn simplexml_load_file(self::RSS_FEED_URL);\n\t}", "public function testRequestRssUrl()\n {\n $this->testRequestSearchUrl(self::RSS_URL);\n }", "function CardinalXMLParser() {\n\t\t $this->xml_parser = xml_parser_create();\n\t\t}", "function _init() {\n\t\t$total = $this->node->childCount;\n\t\t$itemCounter = 0;\n\t\t$categoryCounter = 0;\n\t\t\n\t\tfor ($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\t\t\t\n\t\t\tswitch($tagName) {\n\t\t\t\tcase DOMIT_RSS_ELEMENT_ITEM:\n\t\t\t\t\t$this->domit_rss_items[$itemCounter] =& new xml_domit_rss_item($currNode);\n\t\t\t\t\t$itemCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CATEGORY:\n\t\t\t\t\t$this->domit_rss_categories[$categoryCounter] =& new xml_domit_rss_category($currNode);\n\t\t\t\t\t$categoryCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_IMAGE:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_image($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CLOUD:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_cloud($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TEXTINPUT:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_textinput($currNode);\n\t\t\t\t\tbreak;\n case DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_LANGUAGE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_COPYRIGHT:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_MANAGINGEDITOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_WEBMASTER:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_PUBDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_LASTBUILDDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_GENERATOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_DOCS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TTL:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_RATING:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPHOURS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPDAYS:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t\t//$this->DOMIT_RSS_indexer[$tagName] =& $currNode;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($itemCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_ITEMS] =& $this->domit_rss_items;\n\t\t}\n\t\t\n\t\tif ($categoryCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CATEGORIES] =& $this->domit_rss_categories;\n\t\t}\n\t}", "public static function detectType($feed, $specOnly = false)\n {\n if ($feed instanceof Zend_Feed_Reader_FeedInterface) {\n $dom = $feed->getDomDocument();\n } elseif($feed instanceof DOMDocument) {\n $dom = $feed;\n } elseif(is_string($feed) && !empty($feed)) {\n //$oldValue = libxml_disable_entity_loader(true);\n $dom = new DOMDocument;\n try {\n $dom = Zend_Xml_Security::scan($feed, $dom);\n } catch (Zend_Xml_Exception $e) {\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception(\n $e->getMessage()\n );\n }\n //libxml_disable_entity_loader($oldValue);\n if (!$dom) {\n $err = error_get_last();\n $phpErrormsg = isset($err) ? $err['message'] : null;\n if (!isset($phpErrormsg)) {\n if (function_exists('xdebug_is_enabled')) {\n $phpErrormsg = '(error message not available, when XDebug is running)';\n } else {\n $phpErrormsg = '(error message not available)';\n }\n }\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception(\"DOMDocument cannot parse XML: $phpErrormsg\");\n }\n } else {\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception('Invalid object/scalar provided: must'\n . ' be of type Zend_Feed_Reader_FeedInterface, DomDocument or string');\n }\n $xpath = new DOMXPath($dom);\n\n if ($xpath->query('/rss')->length) {\n $type = self::TYPE_RSS_ANY;\n $version = $xpath->evaluate('string(/rss/@version)');\n\n if (strlen($version) > 0) {\n switch($version) {\n case '2.0':\n $type = self::TYPE_RSS_20;\n break;\n\n case '0.94':\n $type = self::TYPE_RSS_094;\n break;\n\n case '0.93':\n $type = self::TYPE_RSS_093;\n break;\n\n case '0.92':\n $type = self::TYPE_RSS_092;\n break;\n\n case '0.91':\n $type = self::TYPE_RSS_091;\n break;\n }\n }\n\n return $type;\n }\n\n $xpath->registerNamespace('rdf', self::NAMESPACE_RDF);\n\n if ($xpath->query('/rdf:RDF')->length) {\n $xpath->registerNamespace('rss', self::NAMESPACE_RSS_10);\n\n if ($xpath->query('/rdf:RDF/rss:channel')->length\n || $xpath->query('/rdf:RDF/rss:image')->length\n || $xpath->query('/rdf:RDF/rss:item')->length\n || $xpath->query('/rdf:RDF/rss:textinput')->length\n ) {\n return self::TYPE_RSS_10;\n }\n\n $xpath->registerNamespace('rss', self::NAMESPACE_RSS_090);\n\n if ($xpath->query('/rdf:RDF/rss:channel')->length\n || $xpath->query('/rdf:RDF/rss:image')->length\n || $xpath->query('/rdf:RDF/rss:item')->length\n || $xpath->query('/rdf:RDF/rss:textinput')->length\n ) {\n return self::TYPE_RSS_090;\n }\n }\n\n $type = self::TYPE_ATOM_ANY;\n $xpath->registerNamespace('atom', self::NAMESPACE_ATOM_10);\n\n if ($xpath->query('//atom:feed')->length) {\n return self::TYPE_ATOM_10;\n }\n\n if ($xpath->query('//atom:entry')->length) {\n if ($specOnly == true) {\n return self::TYPE_ATOM_10;\n } else {\n return self::TYPE_ATOM_10_ENTRY;\n }\n }\n\n $xpath->registerNamespace('atom', self::NAMESPACE_ATOM_03);\n\n if ($xpath->query('//atom:feed')->length) {\n return self::TYPE_ATOM_03;\n }\n\n return self::TYPE_ANY;\n }", "public function __construct($start_article = 0) {\n parent::__construct(self::RSS_URI, $start_article);\n }", "function customRSS() {\n add_feed('active_plugins', 'createPluginRssFeed');\n}", "function _init() {\n\t\t$total = $this->node->documentElement->childCount;\n\t\t$itemCounter = 0;\n\t\t$channelCounter = 0;\n\t\t$categoryCounter = 0;\n\t\t\n\t\tfor ($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->documentElement->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\n\t\t\tswitch ($tagName) {\n\t\t\t\tcase DOMIT_RSS_ELEMENT_ITEM:\t\t\t\t\t\n\t\t\t\t\t$this->domit_rss_items[$itemCounter] =& new xml_domit_rss_item($currNode);\n\t\t\t\t\t$itemCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CHANNEL:\n\t\t\t\t\t$this->domit_rss_channels[$channelCounter] =& new xml_domit_rss_channel($currNode);\n\t\t\t\t\t$channelCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CATEGORY:\n\t\t\t\t\t$this->domit_rss_categories[$categoryCounter] =& new xml_domit_rss_category($currNode);\n\t\t\t\t\t$categoryCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_IMAGE:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_image($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CLOUD:\n\t\t\t\t\t$this->indexer[$tagName] =& new xml_domit_rss_cloud($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TEXTINPUT:\n\t\t\t\t\t$this->indexer[$tagName] =& new xml_domit_rss_textinput($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_LANGUAGE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_COPYRIGHT:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_MANAGINGEDITOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_WEBMASTER:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_PUBDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_LASTBUILDDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_GENERATOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_DOCS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TTL:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_RATING:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPHOURS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPDAYS:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t\t//$this->indexer[$tagName] =& $currNode;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($itemCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_ITEMS] =& $this->domit_rss_items;\n\t\t}\n\t\t\n\t\tif ($channelCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CHANNELS] =& $this->domit_rss_channels;\n\t\t}\n\t\t\n\t\tif ($categoryCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CATEGORIES] =& $this->domit_rss_categories;\n\t\t}\n\t\t\n\t\t$this->handleChannelElementsEmbedded();\n\t}", "function _response_to_rss ($resp) {\n $rss = new MagpieRSS( $resp->results, MAGPIE_OUTPUT_ENCODING, MAGPIE_INPUT_ENCODING, MAGPIE_DETECT_ENCODING );\n \n // if RSS parsed successfully \n if ( $rss and !$rss->ERROR) {\n \n // find Etag, and Last-Modified\n foreach($resp->headers as $h) {\n // 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug \"Undefined offset: 1\"\n if (strpos($h, \": \")) {\n list($field, $val) = explode(\": \", $h, 2);\n }\n else {\n $field = $h;\n $val = \"\";\n }\n \n if ( $field == 'ETag' ) {\n $rss->etag = $val;\n }\n \n if ( $field == 'Last-Modified' ) {\n $rss->last_modified = $val;\n }\n }\n \n return $rss; \n } // else construct error message\n else {\n $errormsg = \"Failed to parse RSS file.\";\n \n if ($rss) {\n $errormsg .= \" (\" . $rss->ERROR . \")\";\n }\n error($errormsg);\n \n return false;\n } // end if ($rss and !$rss->error)\n}", "function rssreader_lastnews($where, $who, $site) {\r\n\t$module = 'rssreader';\r\n\t$data = html_entity_decode( file_get_contents( $site ) );\r\n\t//$data = mb_convert_encoding( $data, 'utf-8', 'utf-8,iso-8859-1,iso-8859-15' );\r\n\t$data = mb_convert_encoding( $data, 'utf-8' );\r\n\t$data = utf8_decode( $data );\r\n\t$data = str_replace('&','&amp;',str_replace('&amp;','&',$data));\r\n\t$data = preg_replace('#<([^@ :/?]+@[^>]+)>#i','\"$1\"',$data);\r\n\t$data = preg_replace('#<([^@ :/?]+) at ([^@ :/?]+) dot ([^>]+)>#i','\"$1@$2.$3\"',$data);\r\n\t$data = preg_replace('#<([^@ :/?]+) at ([^>]+)>#i','\"$1@$2.$3\"',$data);\r\n\t$valid = true;\r\n\ttry {\r\n\t\t$dom = $GLOBALS['modules'][$module]['functions']['XmlLoader']( $data );\r\n\t}\r\n\tcatch( DOMException $e ) {\r\n\t\tprint($e.\"\\n\");\r\n\t\t$valid = false;\r\n\t}\r\n\tvar_dump( $valid );\r\n\tif( $valid === false ) {\r\n\t\tsay( $where, $who, 'xml non valide' );\r\n\t\treturn false;\r\n\t}\r\n\t$allitems = $dom->getElementsByTagName( 'item' );\r\n\tsay( $where, $who, $allitems->item( 0 )->getElementsByTagName( 'title' )->item( 0 )->nodeValue . \"\\r\\n\" );\r\n\treturn true;\r\n}", "function wp_widget_rss_process($widget_rss, $check_feed = \\true)\n {\n }", "public function init() {\n\t RSSFeed::linkToFeed($this->Link() . \"rss\"); \n\t parent::init();\n\t}", "function rss()\n\t{\n\t\t// Header\n\t\theader(\"Content-Type: application/rss+xml\");\n\t\t$xml = '<?xml version=\"1.0\" encoding=\"utf-8\"?>';\n\t\t$xml .= \"\\n\".'<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">';\n\t\t$xml .= \"\\n\".'<channel>';\n\t\t$xml .= \"\\n\".'<atom:link href=\"'.SITEURL.'?rss\" rel=\"self\" type=\"application/rss+xml\" />';\n\n\t\t$last_edit = $this->find('page', null, null, 1, SORT_DESC, 'date', true);\n\t\t$last_edit = $this->get('page', $last_edit, 'date');\n\n\t\t// Channel description\n\t\t$xml .= \"\\n\".'<title>' . $this->setting('site_title') . '</title>';\n\t\t$xml .= \"\\n\".'<link>' . SITEURL . '</link>';\n\t\t$xml .= \"\\n\".'<description>' . $this->setting('site_description') . '</description>';\n\t\t$xml .= \"\\n\".'<lastBuildDate>' . date('r', intval($last_edit)) . '</lastBuildDate>';\n\t\t$xml .= \"\\n\".'<language>' . $this->language() . '</language>';\n\n\t\t// Items\n\t\tforeach($this->get('page') as $name => $page) {\n\t\t\t$url = $this->page_url($name);\n\n\t\t\t$content = $this->parse($page['content'], false);\n\t\t\t$content = $this->markup_del($content, false);\n\t\t\t$content = $this->excerpt($content, 300, '...');\n\t\t\t$content = html_entity_decode(strip_tags($content), ENT_QUOTES, 'UTF-8');\n\n\t\t\t$xml .= \"\\n\".'<item>';\n\t\t\t$xml .= \"\\n\\t\".'<title>' . html_entity_decode($this->page_title($name), ENT_QUOTES, 'UTF-8'). '</title>';\n\t\t\t$xml .= \"\\n\\t\".'<link>' . $url . '</link>';\n\t\t\t$xml .= \"\\n\\t\".'<guid>' . $url . '</guid>';\n\t\t\t$xml .= \"\\n\\t\".'<pubDate>' . $page['date'] . '</pubDate>';\n\t\t\t$xml .= \"\\n\\t\".'<description>' . $content . '</description>';\n\t\t\t$xml .= \"\\n\".'</item>';\n\t\t}\n\t\t$xml .= '</channel></rss>';\n\t\treturn $xml;\n\t}", "private static function _checkXmlParser()\n {\n if (!function_exists('simplexml_load_string') || !class_exists('SimpleXMLElement')) {\n throw new AllopassApiMissingXMLFeatureException();\n }\n }", "private static function _checkXmlParser()\n {\n if (!function_exists('simplexml_load_string') || !class_exists('SimpleXMLElement')) {\n throw new AllopassApiMissingXMLFeatureException();\n }\n }", "function rssreader_last5news($where, $who, $site) {\r\n\t$module = 'rssreader';\r\n\t$data = html_entity_decode( file_get_contents( $site ) );\r\n\t//$data = mb_convert_encoding( $data, 'utf-8', 'utf-8,iso-8859-1,iso-8859-15' );\r\n\t$data = mb_convert_encoding( $data, 'utf-8' );\r\n\t$data = utf8_decode( $data );\r\n\t$data = str_replace('&','&amp;',str_replace('&amp;','&',$data));\r\n\t$data = preg_replace('#<([^@ :/?]+@[^>]+)>#i','\"$1\"',$data);\r\n\t$data = preg_replace('#<([^@ :/?]+) at ([^@ :/?]+) dot ([^>]+)>#i','\"$1@$2.$3\"',$data);\r\n\t$data = preg_replace('#<([^@ :/?]+) at ([^>]+)>#i','\"$1@$2.$3\"',$data);\r\n\t$valid = true;\r\n\ttry {\r\n\t\t$dom = $GLOBALS['modules'][$module]['functions']['XmlLoader']( $data );\r\n\t}\r\n\tcatch( DOMException $e ) {\r\n\t\tprint($e.\"\\n\");\r\n\t\t$valid = false;\r\n\t}\r\n\tif( $valid === false ) {\r\n\t\tsay( $where, $who, 'xml non valide' );\r\n\t\treturn false;\r\n\t}\r\n\t$allitems = $dom->getElementsByTagName( 'item' );\r\n\tfor($i = 0 ; $i < 5 && $i < $allitems->length ; $i++) {\r\n\t\tsay( $where, $who, $allitems->item( $i )->getElementsByTagName( 'title' )->item( 0 )->nodeValue . \"\\r\\n\" );\r\n\t}\r\n\treturn true;\r\n}", "public function __construct($uri = null, $element = null)\n {\n if (!($element instanceof DOMElement)) {\n if ($element) {\n // Load the feed as an XML DOMDocument object\n $doc = new DOMDocument();\n $doc = @Zend_Xml_Security::scan($element, $doc);\n\n if (!$doc) {\n $err = error_get_last();\n $phpErrormsg = isset($err) ? $err['message'] : null;\n // prevent the class to generate an undefined variable notice (ZF-2590)\n if (!isset($phpErrormsg)) {\n if (function_exists('xdebug_is_enabled')) {\n $phpErrormsg = '(error message not available, when XDebug is running)';\n } else {\n $phpErrormsg = '(error message not available)';\n }\n }\n\n /**\n * @see Zend_Feed_Exception\n */\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception(\"DOMDocument cannot parse XML: $phpErrormsg\");\n }\n\n $element = $doc->getElementsByTagName($this->_rootElement)->item(0);\n if (!$element) {\n /**\n * @see Zend_Feed_Exception\n */\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception('No root <' . $this->_rootElement . '> element found, cannot parse feed.');\n }\n } else {\n $doc = new DOMDocument('1.0', 'utf-8');\n if ($this->_rootNamespace !== null) {\n $element = $doc->createElementNS(Zend_Feed::lookupNamespace($this->_rootNamespace), $this->_rootElement);\n } else {\n $element = $doc->createElement($this->_rootElement);\n }\n }\n }\n\n parent::__construct($element);\n }", "function ting_openformat_feed_set_rss_items($xml,$query) {\n $items = ting_openformat_feed_parse_result($xml);\n $title = $query;\n $description = t('feed_from_bibliotek',array(),array('context'=>'feeds'));\n $url = url(NULL, array('absolute'=>TRUE));\n $link = $url;\n if(empty($items)){\n return NULL;\n }\n return theme('ting_openformat_rss_feed', array('items' => $items, 'title' => $title, 'description' => $description, 'link' => $link));\n}", "private function newFeedClass()\n\t{\n\t\tif ( $this->feed_type == 'search' ){\n\t\t\ttry {\n\t\t\t\t$this->feed = new $this->feed_class;\t\n\t\t\t} catch ( \\Exception $e ){\n\t\t\t\treturn $this->sendError($e->getMessage());\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t$this->feed = ( $this->feed_format == 'unformatted' ) ? new $this->feed_class($this->post_id) : new $this->feed_class('single', $this->post_id);\n\t\t\t} catch ( \\Exception $e ){\n\t\t\t\treturn $this->sendError($e->getMessage());\n\t\t\t}\n\t\t}\n\t}", "private function initRss()\n\t{\n\t\t$config = Cms::GetInstance() -> GetConfiguration();\n\t\t$user = Cms::GetInstance() -> GetUser() -> GetProperties();\n\t\t$rssfile = new RSSBuilder(\t$config -> Get('newsfeed/encoding'), \n\t\t\t\t\t\t\t\t\t$this -> head_link, \n\t\t\t\t\t\t\t\t\t$this -> head_titel, \n\t\t\t\t\t\t\t\t\t$this -> head_description, \n\t\t\t\t\t\t\t\t\t$this -> head_image,\n\t\t\t\t\t\t\t\t\t'', \n\t\t\t\t\t\t\t\t\tfalse);\n\t\n\t\t$data = null;\n\t\ttry \n\t\t{\n\t\t\t$data = SqlManager::GetInstance() -> Select('modnews', array('name', 'text', 'id', 'time'), 'newsfeed=\\'1\\'');\n\t\t}\n\t\tcatch (SqlManagerException $ex)\n\t\t{\n\t\t\tthrow new CMSException('SQL-Abfrage der Newsfeed-Items fehlgeschlagen', CMSException::T_MODULEERROR, $ex );\n\t\t}\n\t\t\n\t\t$c = count($data);\n\t\tfor($i=0; $i<$c; $i++)\n\t\t{\n\t\t\t$rssfile -> addRSSItem(\t$this -> head_titel, \n\t\t\t\t\t\t\t\t\t$data[$i]['name'], \n\t\t\t\t\t\t\t\t\t$this->GetLink($data['id']), \n\t\t\t\t\t\t\t\t\t$data[$i]['text'], \n\t\t\t\t\t\t\t\t\t$data[$i]['name'], \n\t\t\t\t\t\t\t\t\t$data[$i]['time'], \n\t\t\t\t\t\t\t\t\t$user['name'], \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\tmd5($data[$i]['id']));\t\n\t\t}\n\n\t\tif($this -> rss091)\n\t\t{\n\t\t\t$rssfile->saveRSS('0.91', $this -> enddir . $this -> prefix . '091.xml');\n\t\t}\n\t\tif($this -> rss10)\n\t\t{\n\t\t\t$rssfile->saveRSS('1.0', $this -> enddir . $this -> prefix . '1.xml');\n\t\t}\n\t\tif($this -> rss20)\n\t\t{\n\t\t\t$rssfile->saveRSS('2.0', $this -> enddir . $this -> prefix . '2.xml');\n\t\t}\n\t}", "public function testXmlUri()\n {\n $dom = Dom::createFromUri('http://localhost:1349/books.xml');\n $this->assertInstanceOf(DOMDocument::class, $dom);\n $this->assertEquals('catalog', $dom->documentElement->localName);\n }", "public function isXml() {}", "function create_rss(){\r\n global $sql;\r\n \t\t\t\t\t\t\tglobal $aj;\r\n\t\t\t\t\t\t\t\tif(!is_object($aj)) $aj = new textparse;\r\n setlocale (LC_TIME, CORE_LC);\r\n $pubdate = strftime(\"%a, %d %b %Y %I:%M:00 GMT\", time());\r\n $sitebutton = (strstr(SITEBUTTON, \"http:\") ? SITEBUTTON : SITEURL.str_replace(\"../\", \"\", e_IMAGE).SITEBUTTON);\r\n $sitedisclaimer = ereg_replace(\"<br />|\\n\", \"\", SITEDISCLAIMER);\r\n\r\n $rss = \"<?xml version=\\\"1.0\\\" encoding=\\\"\".CHARSET.\"\\\"?>\r\n<rss version=\\\"2.0\\\">\r\n<channel>\r\n <title>\".$this->make_xml_compatible(SITENAME).\"</title>\r\n <link>http://\".$_SERVER['HTTP_HOST'].e_HTTP.\"index.php</link>\r\n <description>\".$this->make_xml_compatible(SITEDESCRIPTION).\"</description>\r\n <language>\".CORE_LC.\"-\".CORE_LC2.\"</language>\r\n <copyright>\".$this->make_xml_compatible($sitedisclaimer).\"</copyright>\r\n <managingEditor>\".$this->make_xml_compatible(SITEADMIN).\" - \".SITEADMINEMAIL.\"</managingEditor>\r\n <webMaster>\".SITEADMINEMAIL.\"</webMaster>\r\n <pubDate>$pubdate</pubDate>\r\n <lastBuildDate>$pubdate</lastBuildDate>\r\n <docs>http://backend.userland.com/rss</docs>\r\n <generator>e107 website system (http://e107.org)</generator>\r\n <ttl>60</ttl>\r\n\r\n <image>\r\n <title>\".$this->make_xml_compatible(SITENAME).\"</title>\r\n <url>\".$sitebutton.\"</url>\r\n <link>http://\".$_SERVER['HTTP_HOST'].e_HTTP.\"index.php</link>\r\n <width>88</width>\r\n <height>31</height>\r\n <description>\".$this->make_xml_compatible(SITETAG).\"</description>\r\n </image>\r\n\r\n <textInput>\r\n <title>Search</title>\r\n <description>Search \".$this->make_xml_compatible(SITENAME).\"</description>\r\n <name>query</name>\r\n <link>\".SITEURL.(substr(SITEURL, -1) == \"/\" ? \"\" : \"/\").\"search.php</link>\r\n </textInput>\r\n \";\r\n\r\n $sql2 = new db;\r\n\r\n $sql -> db_Select(\"news\", \"*\", \"news_class=0 AND (news_start=0 || news_start < \".time().\") AND (news_end=0 || news_end>\".time().\") ORDER BY news_datestamp DESC LIMIT 0, 10\");\r\n while($row = $sql -> db_Fetch()){\r\n extract($row);\r\n $sql2 -> db_Select(\"news_category\", \"*\", \"category_id='$news_category' \");\r\n $row = $sql2 -> db_Fetch(); extract($row);\r\n $sql2 -> db_Select(\"user\", \"user_name, user_email\", \"user_id=$news_author\");\r\n $row = $sql2 -> db_Fetch(); extract($row);\r\n $tmp = explode(\" \", $news_body);\r\n unset($nb);\r\n for($a=0; $a<=100; $a++){\r\n $nb .= $tmp[$a].\" \";\r\n }\r\n if($tmp[($a-2)]){ $nb .= \" [more ...]\"; }\r\n //$nb = $this->make_xml_compatible($nb);\r\n // Code from Lisa\r\n //$search = array();\r\n //$replace = array();\r\n //$search[0] = \"/\\<a href=\\\"(.*?)\\\">(.*?)<\\/a>/si\";\r\n //$replace[0] = '\\\\2';\r\n //$search[1] = \"/\\<a href='(.*?)'>(.*?)<\\/a>/si\";\r\n //$replace[1] = '\\\\2';\r\n //$search[2] = \"/\\<a href='(.*?)'>(.*?)<\\/a>/si\";\r\n //$replace[2] = '\\\\2';\r\n //$search[3] = \"/\\<a href=&quot;(.*?)&quot;>(.*?)<\\/a>/si\";\r\n //$replace[3] = '\\\\2';\r\n //$news_title = preg_replace($search, $replace, $news_title);\r\n // End of code from Lisa\r\n $wlog .= strip_tags($aj -> tpa($news_title)).\"\\n\".SITEURL.\"comment.php?comment.news.\".$news_id.\"\\n\\n\";\r\n $itemdate = strftime(\"%a, %d %b %Y %I:%M:00 GMT\", $news_datestamp);\r\n\r\n $rss .= \"<item>\r\n <title>\".$this->make_xml_compatible(strip_tags($aj -> tpa($news_title))).\"</title>\r\n <link>http://\".$_SERVER['HTTP_HOST'].e_HTTP.\"comment.php?comment.news.\".$news_id.\"</link>\r\n <description>\".$this->make_xml_compatible($nb).\"</description>\r\n <category domain=\\\"\".SITEURL.\"\\\">$category_name</category>\r\n <comments>http://\".$_SERVER['HTTP_HOST'].e_HTTP.\"comment.php?comment.news.\".$news_id.\"</comments>\r\n <author>\".$this->make_xml_compatible($user_name).\" - $user_email</author>\r\n <pubDate>$itemdate</pubDate>\r\n <guid isPermaLink=\\\"true\\\">http://\".$_SERVER['HTTP_HOST'].e_HTTP.\"comment.php?comment.news.\".$news_id.\"</guid>\r\n </item>\r\n \";\r\n\r\n }\r\n\r\n\r\n $rss .= \"</channel>\r\n</rss>\";\r\n $rss = str_replace(\"&nbsp;\", \" \", $rss);\r\n $fp = fopen(e_FILE.\"backend/news.xml\",\"w\");\r\n @fwrite($fp, $rss);\r\n fclose($fp);\r\n $fp = fopen(e_FILE.\"backend/news.txt\",\"w\");\r\n @fwrite($fp, $wlog);\r\n fclose($fp);\r\n if(!fwrite){\r\n $text = \"<div style='text-align:center'>\".LAN_19.\"</div>\";\r\n $ns -> tablerender(\"<div style='text-align:center'>\".LAN_20.\"</div>\", $text);\r\n }\r\n}", "function parseRSS($string)\n{\n //PARSE RSS FEED\n $parser = xml_parser_create();\n xml_parse_into_struct($parser, $string, $valueals, $index);\n xml_parser_free($parser);\n\n #return $valueals;\n\n //CONSTRUCT ARRAY\n foreach($valueals as $keyey => $valueal)\n {\n if($valueal['type'] != 'cdata')\n {\n $item[$keyey] = $valueal;\n }\n }\n\n $i = 0;\n\n foreach($item as $key => $value)\n {\n if($value['type'] == 'open')\n {\n $i++;\n $itemame[$i] = strtolower($value['tag']);\n\n }\n elseif($value['type'] == 'close')\n {\n $feed = $values[$i];\n $item = $itemame[$i];\n $i--;\n\n if(count($values[$i])>1)\n {\n $values[$i][$item][] = $feed;\n }\n else\n {\n $values[$i][$item] = $feed;\n }\n\n }\n else\n {\n $values[$i][strtolower($value['tag'])] = $value['value'];\n }\n }\n\n //RETURN ARRAY VALUES\n return $values[0];\n}", "protected function checkLibXmlBug() {}", "function rss($url, $params) {\n global $lang;\n global $conf;\n\n require_once(DOKU_INC.'inc/FeedParser.php');\n $feed = new FeedParser();\n $feed->set_feed_url($url);\n\n //disable warning while fetching\n if(!defined('DOKU_E_LEVEL')) {\n $elvl = error_reporting(E_ERROR);\n }\n $rc = $feed->init();\n if(isset($elvl)) {\n error_reporting($elvl);\n }\n\n if($params['nosort']) $feed->enable_order_by_date(false);\n\n //decide on start and end\n if($params['reverse']) {\n $mod = -1;\n $start = $feed->get_item_quantity() - 1;\n $end = $start - ($params['max']);\n $end = ($end < -1) ? -1 : $end;\n } else {\n $mod = 1;\n $start = 0;\n $end = $feed->get_item_quantity();\n $end = ($end > $params['max']) ? $params['max'] : $end;\n }\n\n $this->doc .= '<ul class=\"rss\">';\n if($rc) {\n for($x = $start; $x != $end; $x += $mod) {\n $item = $feed->get_item($x);\n $this->doc .= '<li><div class=\"li\">';\n // support feeds without links\n $lnkurl = $item->get_permalink();\n if($lnkurl) {\n // title is escaped by SimplePie, we unescape here because it\n // is escaped again in externallink() FS#1705\n $this->externallink(\n $item->get_permalink(),\n html_entity_decode($item->get_title(), ENT_QUOTES, 'UTF-8')\n );\n } else {\n $this->doc .= ' '.$item->get_title();\n }\n if($params['author']) {\n $author = $item->get_author(0);\n if($author) {\n $name = $author->get_name();\n if(!$name) $name = $author->get_email();\n if($name) $this->doc .= ' '.$lang['by'].' '.hsc($name);\n }\n }\n if($params['date']) {\n $this->doc .= ' ('.$item->get_local_date($conf['dformat']).')';\n }\n if($params['details']) {\n $this->doc .= '<div class=\"detail\">';\n if($conf['htmlok']) {\n $this->doc .= $item->get_description();\n } else {\n $this->doc .= strip_tags($item->get_description());\n }\n $this->doc .= '</div>';\n }\n\n $this->doc .= '</div></li>';\n }\n } else {\n $this->doc .= '<li><div class=\"li\">';\n $this->doc .= '<em>'.$lang['rssfailed'].'</em>';\n $this->externallink($url);\n if($conf['allowdebug']) {\n $this->doc .= '<!--'.hsc($feed->error).'-->';\n }\n $this->doc .= '</div></li>';\n }\n $this->doc .= '</ul>';\n }", "public function testConstructValidXML()\n {\n $parser = new Parser($this->createTwig(), '<?xml version=\"1.0\"?><test><name>Pedro</name></test>');\n $this->assertArrayHasKey('0', $parser->getReports());\n\n $parser = new Parser($this->createTwig(), __DIR__ . '/../phpunit.xml');\n $this->assertArrayHasKey('0', $parser->getReports());\n\n $parser = new Parser($this->createTwig());\n $parser->addXmlContent('<?xml version=\"1.0\"?><test><name>Pedro</name></test>');\n $this->assertArrayHasKey('0', $parser->getReports());\n\n $parser = new Parser($this->createTwig());\n $parser->addFileContent(__DIR__ . '/../phpunit.xml');\n $this->assertArrayHasKey('0', $parser->getReports());\n }", "protected function setUp()\n\t{\n\t\t$rss_content = self::provideRSSContent();\n\t\t\n\t\t$this->entry_collection_object = EntryCollection::buildFromRSSContent($rss_content);\n\t\t$this->entry_collection_reflection = new ReflectionClass('EntryCollection');\n\t}", "function _loadRSS($url){\n require_once(DOKU_INC.'inc/FeedParser.php');\n $feed = new FeedParser();\n $feed->set_feed_url($url);\n $feed->init();\n $files = array();\n\n // base url to use for broken feeds with non-absolute links\n $main = parse_url($url);\n $host = $main['scheme'].'://'.\n $main['host'].\n (($main['port'])?':'.$main['port']:'');\n $path = dirname($main['path']).'/';\n\n foreach($feed->get_items() as $item){\n if ($enclosure = $item->get_enclosure()){\n // skip non-image enclosures\n if($enclosure->get_type()){\n if(substr($enclosure->get_type(),0,5) != 'image') continue;\n }else{\n if(!preg_match('/\\.(jpe?g|png|gif)(\\?|$)/i',\n $enclosure->get_link())) continue;\n }\n\n // non absolute links\n $ilink = $enclosure->get_link();\n if(!preg_match('/^https?:\\/\\//i',$ilink)){\n if($ilink{0} == '/'){\n $ilink = $host.$ilink;\n }else{\n $ilink = $host.$path.$ilink;\n }\n }\n $link = $item->link;\n if(!preg_match('/^https?:\\/\\//i',$link)){\n if($link{0} == '/'){\n $link = $host.$link;\n }else{\n $link = $host.$path.$link;\n }\n }\n\n $files[] = array(\n 'id' => $ilink,\n 'isimg' => true,\n 'file' => basename($ilink),\n // decode to avoid later double encoding\n 'title' => htmlspecialchars_decode($enclosure->get_title(),ENT_COMPAT),\n 'desc' => strip_tags(htmlspecialchars_decode($enclosure->get_description(),ENT_COMPAT)),\n 'width' => $enclosure->get_width(),\n 'height' => $enclosure->get_height(),\n 'mtime' => $item->get_date('U'),\n 'ctime' => $item->get_date('U'),\n 'detail' => $link,\n );\n }\n }\n return $files;\n }", "public function isRss() {\n $isRss = false;\n $settings = $this->getContainerSettings();\n $feedAppendage = $this->xpdo->getOption('rssAlias',$settings,'feed.rss,rss');\n $feedAppendage = explode(',',$feedAppendage);\n $fullUri = $this->xpdo->context->getOption('base_url',null,MODX_BASE_URL).$this->get('uri');\n\n $hasQuery = strpos($_SERVER['REQUEST_URI'],'?');\n $requestUri = !empty($hasQuery) ? substr($_SERVER['REQUEST_URI'],0,$hasQuery) : $_SERVER['REQUEST_URI'];\n if (strpos($requestUri,$fullUri) === 0 && strlen($fullUri) != strlen($requestUri)) {\n $appendage = rtrim(str_replace($fullUri,'',$requestUri),'/');\n if (in_array($appendage,$feedAppendage)) {\n $isRss = true;\n }\n }\n return $isRss;\n }", "public function testEventFeedToAndFromString()\n {\n $entryCount = 0;\n foreach ($this->eventFeed as $entry) {\n $entryCount++;\n $this->assertTrue($entry instanceof Zend_Gdata_Calendar_EventEntry);\n }\n $this->assertTrue($entryCount > 0);\n\n /* Grab XML from $this->eventFeed and convert back to objects */\n $newEventFeed = new Zend_Gdata_Calendar_EventFeed(\n $this->eventFeed->saveXML()\n );\n $newEntryCount = 0;\n foreach ($newEventFeed as $entry) {\n $newEntryCount++;\n $this->assertTrue($entry instanceof Zend_Gdata_Calendar_EventEntry);\n }\n $this->assertEquals($entryCount, $newEntryCount);\n }", "public static function importString($string)\n {\n // Load the feed as an XML DOMDocument object\n @ini_set('track_errors', 1);\n $doc = new DOMDocument();\n $success = @$doc->loadXML($string);\n @ini_restore('track_errors');\n\n if (! $success) {\n throw new Zend_Feed_Exception(\"DOMDocument cannot parse XML: $php_errormsg\");\n }\n\n // Try to find the base feed element or a single <entry> of an Atom feed\n if ($doc->getElementsByTagName('feed')->item(0) ||\n $doc->getElementsByTagName('entry')->item(0)) {\n // return a newly created Zend_Feed_Atom object\n return new Zend_Feed_Atom(null, $string);\n }\n\n // Try to find the base feed element of an RSS feed\n if ($doc->getElementsByTagName('channel')->item(0)) {\n // return a newly created Zend_Feed_Rss object\n return new Zend_Feed_Rss(null, $string);\n }\n\n // $string does not appear to be a valid feed of the supported types\n throw new Zend_Feed_Exception('Invalid or unsupported feed format');\n }", "public function rss() {\n\t $rss = new RSSFeed($this->Children(), $this->Link(), \"The coolest news around\");\n\t //interesting as you can now add news/rss and get a new rss page, without actually creating the page..\n\t return $rss->outputToBrowser();\n\t}", "function frontpage_news_rss($url) {\n $obj = simplexml_load_file($url);\n\n // If an RSS feed:\n if(!empty($obj->channel)) {\n $description = \"description\";\n $pubDate = \"pubDate\";\n $collect = $obj->channel->item;\n // Else an Atom feed\n } else {\n $description = \"content\";\n $pubDate = \"published\";\n $collect = $obj->entry;\n }\n\n foreach($collect as $item) {\n $news .= \"<div style='border:1px solid #CCC;margin:4px;padding:4px;-moz-border-radius-topright:12px;border-radius-topright:12px;'>\n <a href='\".$item->link.\"'>\".$item->title.\"</a><br />\n <span style='font-size:10px;'>\".date(\"h:i A M jS\",strtotime($item->$pubDate)).\"</span>\n <p>\".$item->$description.\"</p></div>\";\n }\n\n return $news;\n}", "private static function xmlCheck($feed_url) {\n $xml = new \\XMLReader();\n $xml->open($feed_url);\n $xml->setParserProperty(\\XMLReader::VALIDATE, true);\n if( $xml->isValid()) {\n\n if( @simplexml_load_file($feed_url)) {\n return true;\n }\n else{\n return false;\n }\n }\n else{\n return false;\n }\n }", "function ssiXML($url)\n{\n $curl_handle=curl_init();\n curl_setopt($curl_handle,CURLOPT_URL,$url);\n curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);\n curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);\n $data = curl_exec($curl_handle);\n curl_close($curl_handle);\n \n $xml = new SimpleXmlElement($data, LIBXML_NOCDATA);\n\n return $xml;\n\n// Adapted from http://ditio.net/2008/06/19/using-php-curl-to-read-rss-feed-xml/\n}", "function clean_feeds() {\r\n\t\t//var_dump($this->file);\r\n\t\tif(strpos($this->code, '<feed xmlns=\"http://www.w3.org/2005/Atom\"') === false && strpos($this->code, '<feed xmlns=\"https://www.w3.org/2005/Atom\"') === false) { // this is not a feed file\r\n\t\t\r\n\t\t} else {\r\n\t\t\tinclude_once('feed_generator' . DS . 'FeedWriter.php');\r\n\t\t\t//include('feed_generator' . DS . 'FeedWriter.php');\r\n\t\t\t$changed_feed_file = false;\r\n\t\t\t$TestFeed = new FeedWriter(ATOM);\r\n\t\t\t\r\n\t\t\t$feed_pos = strpos($this->code, '<feed');\r\n\t\t\t$first_entry_pos = strpos($this->code, '<entry');\r\n\t\t\t$header_code = substr($this->code, $feed_pos, $first_entry_pos - $feed_pos);\r\n\t\t\tpreg_match_all('/<id[^<>]*?>(.*?)<\\/id>/is', $header_code, $id_matches);\r\n\t\t\t//print('$id_matches: ');var_dump($id_matches);exit(0);\r\n\t\t\tif(sizeof($id_matches[0]) === 1) {\r\n\t\t\t\t$current_id = $id_matches[1][0];\r\n\t\t\t} else {\r\n\t\t\t\tprint('Found other than one ID in Atom RSS header...');var_dump($header_code);exit(0);\r\n\t\t\t}\r\n\t\t\tpreg_match_all('/<link[^<>]*? href=\"([^\"]*?)\"[^<>]*?>(.*?)<\\/link>/is', $header_code, $link_matches);\r\n\t\t\tif(sizeof($id_matches[0]) === 1) {\r\n\t\t\t\t$current_link = $link_matches[1][0];\r\n\t\t\t} else { // we have to be a bit more clever\r\n\t\t\t\t$found_default_link = false;\r\n\t\t\t\tforeach($link_matches[0] as $index => $value) {\r\n\t\t\t\t\tif(strpos($link_matches[0][$index], 'rel=\"self\"') !== false) {\r\n\t\t\t\t\t\t$found_default_link = true;\r\n\t\t\t\t\t\t$current_link = $link_matches[1][$index];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif($found_default_link) {\r\n\t\t\t\t\tprint('Could not find default link for Atom RSS feed file...');var_dump($header_code);exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$generated_id = $TestFeed->uuid($current_link, 'urn:uuid:');\r\n\t\t\tif($generated_id !== $current_id) {\r\n\t\t\t\t$this->code = str_replace($current_id, $generated_id, $this->code);\r\n\t\t\t\t$this->logMsg('Feed file ID with link: ' . $current_link . ' was changed.');\r\n\t\t\t\t$changed_feed_file = true;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tpreg_match_all('/<entry(.*?)<\\/entry>/is', $this->code, $entry_matches);\r\n\t\t\t$counter = sizeof($entry_matches[0]) - 1;\r\n\t\t\twhile($counter > -1) {\r\n\t\t\t\t$entry_match = $initial_entry_match = $entry_matches[0][$counter];\r\n\t\t\t\tpreg_match_all('/<id[^<>]*?>(.*?)<\\/id>/is', $entry_match, $id_matches);\r\n\t\t\t\tif(sizeof($id_matches[0]) === 1) {\r\n\t\t\t\t\t$current_id = $id_matches[1][0];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprint('Found other than one ID in an Atom RSS entry...');var_dump($entry_match);exit(0);\r\n\t\t\t\t}\r\n\t\t\t\tpreg_match_all('/<link[^<>]*? href=\"([^\"]*?)\"[^<>]*?>(.*?)<\\/link>/is', $entry_match, $link_matches);\r\n\t\t\t\tif(sizeof($id_matches[0]) === 1) {\r\n\t\t\t\t\t$current_link = $link_matches[1][0];\r\n\t\t\t\t} else { // we have to be a bit more clever\r\n\t\t\t\t\t$found_default_link = false;\r\n\t\t\t\t\tforeach($link_matches[0] as $index => $value) {\r\n\t\t\t\t\t\tif(strpos($link_matches[0][$index], 'rel=\"self\"') !== false) {\r\n\t\t\t\t\t\t\t$found_default_link = true;\r\n\t\t\t\t\t\t\t$current_link = $link_matches[1][$index];\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\tif($found_default_link) {\r\n\t\t\t\t\t\tprint('Could not find default link for an Atom RSS entry...');var_dump($entry_match);exit(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$generated_id = $TestFeed->uuid($current_link, 'urn:uuid:');\r\n\t\t\t\tif($generated_id !== $current_id) {\r\n\t\t\t\t\t//var_dump($generated_id, $current_id);\r\n\t\t\t\t\t//print('current_id: ');var_dump($current_id);\r\n\t\t\t\t\t//print('generated_id: ');var_dump($generated_id);\r\n\t\t\t\t\t$entry_match = str_replace($current_id, $generated_id, $entry_match);\r\n\t\t\t\t\t$this->logMsg('ID on entry with link: ' . $current_link . ' was changed.');\r\n\t\t\t\t}/* else {\r\n\t\t\t\t\tprint('hi3740650056<br>');\r\n\t\t\t\t}*/\r\n\t\t\t\t//print('here37485969707<br>');\r\n\t\t\t\tif($entry_match != $initial_entry_match) {\r\n\t\t\t\t\t//print('here37485969708<br>');\r\n\t\t\t\t\t$this->code = str_replace($initial_entry_match, $entry_match, $this->code);\r\n\t\t\t\t\t$changed_feed_file = true;\r\n\t\t\t\t}\r\n\t\t\t\t$counter--;\r\n\t\t\t}\r\n\t\t\t//print('here37485969709<br>');\r\n\t\t\tif($changed_feed_file) {\r\n\t\t\t\t//print('here37485969710<br>');\r\n\t\t\t\t//var_dump(date(\"Y-m-d\"), time(\"Y-m-d\"));\r\n\t\t\t\t$this->code = preg_replace('/<feed([^<>]*?)>(.*?)<updated>([0-9]{4})\\-([0-9]{2})\\-([0-9]{2})([^<>]*?)<\\/updated>/is', '<feed$1>$2<updated>' . date(\"Y-m-d\") . '$6</updated>', $this->code);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected function parseXmlFile() {}", "private static function setXml($feed_url){\n $content = file_get_contents($feed_url);\n if( $xml = new \\SimpleXmlElement($content)) return $xml;\n return false;\n }", "function import_wpxrss() {\n $dry_run = false;\n\n $serendipity['noautodiscovery'] = 1;\n $uri = $this->data['url'];\n require_once S9Y_PEAR_PATH . 'HTTP/Request2.php';\n serendipity_request_start();\n $options = array('follow_redirects' => true, 'max_redirects' => 5);\n if (version_compare(PHP_VERSION, '5.6.0', '<')) {\n // On earlier PHP versions, the certificate validation fails. We deactivate it on them to restore the functionality we had with HTTP/Request1\n $options['ssl_verify_peer'] = false;\n }\n $req = new HTTP_Request2($uri, HTTP_Request2::METHOD_GET, $options);\n try {\n $res = $req->send();\n if ($res->getStatus() != '200') {\n throw new HTTP_Request2_Exception('could not fetch url: status != 200');\n }\n } catch (HTTP_Request2_Exception $e) {\n serendipity_request_end();\n echo '<span class=\"block_level\">' . IMPORT_FAILED . ': ' . serendipity_specialchars($this->data['url']) . '</span>';\n return false;\n }\n\n $fContent = $res->getBody();\n serendipity_request_end();\n echo '<span class=\"block_level\">' . strlen($fContent) . \" Bytes</span>\";\n\n if (version_compare(PHP_VERSION, '5.0') === -1) {\n echo '<span class=\"block_level\">';\n printf(UNMET_REQUIREMENTS, 'PHP >= 5.0');\n echo \"</span>\";\n return false;\n }\n\n $xml = simplexml_load_string($fContent);\n unset($fContent);\n\n\n /* ************* USERS **********************/\n $_s9y_users = serendipity_fetchUsers();\n $s9y_users = array();\n if (is_array($s9y_users)) {\n foreach ($_s9y_users as $v) {\n $s9y_users[$v['realname']] = $v;\n }\n }\n\n /* ************* CATEGORIES **********************/\n $_s9y_cat = serendipity_fetchCategories('all');\n $s9y_cat = array();\n if (is_array($s9y_cat)) {\n foreach ($_s9y_cat as $v) {\n $s9y_cat[$v['category_name']] = $v['categoryid'];\n }\n }\n\n $wp_ns = 'http://wordpress.org/export/1.0/';\n $dc_ns = 'http://purl.org/dc/elements/1.1/';\n $content_ns = 'http://purl.org/rss/1.0/modules/content/';\n\n $wp_core = $xml->channel->children($wp_ns);\n foreach($wp_core->category AS $idx => $cat) {\n //TODO: Parent generation unknown.\n $cat_name = (string)$cat->cat_name;\n if (!isset($s9y_cat[$cat_name])) {\n $cat = array('category_name' => $cat_name,\n 'category_description' => '',\n 'parentid' => 0,\n 'category_left' => 0,\n 'category_right' => 0);\n echo '<span class=\"block_level\">';\n printf(CREATE_CATEGORY, serendipity_specialchars($cat_name));\n echo \"</span>\";\n if ($dry_run) {\n $s9y_cat[$cat_name] = time();\n } else {\n serendipity_db_insert('category', $cat);\n $s9y_cat[$cat_name] = serendipity_db_insert_id('category', 'categoryid');\n }\n }\n }\n\n /* ************* ITEMS **********************/\n foreach($xml->channel->item AS $idx => $item) {\n $wp_items = $item->children($wp_ns);\n $dc_items = $item->children($dc_ns);\n $content_items = $item->children($content_ns);\n\n // TODO: Attachments not handled\n if ((string)$wp_items->post_type == 'attachment' OR (string)$wp_items->post_type == 'page') {\n continue;\n }\n\n $entry = array(\n 'title' => (string)$item->title,\n 'isdraft' => ((string)$wp_items->status == 'publish' ? 'false' : 'true'),\n 'allow_comments' => ((string)$wp_items->comment_status == 'open' ? true : false),\n 'categories' => array(),\n 'body' => (string)$content_items->encoded\n );\n\n if (preg_match('@^([0-9]{4})\\-([0-9]{2})\\-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})$@', (string)$wp_items->post_date, $timematch)) {\n $entry['timestamp'] = mktime($timematch[4], $timematch[5], $timematch[6], $timematch[2], $timematch[3], $timematch[1]);\n } else {\n $entry['timestamp'] = time();\n }\n\n if (isset($item->category[1])) {\n foreach($item->category AS $idx => $category) {\n $cstring=(string)$category;\n if (!isset($s9y_cat[$cstring])) {\n echo \"<span class='msg_error'>WARNING: $category unset!</span>\";\n } else {\n $entry['categories'][] = $s9y_cat[$cstring];\n }\n }\n } else {\n $cstring = (string)$item->category;\n $entry['categories'][] = $s9y_cat[$cstring];\n }\n\n $wp_user = (string)$dc_items->creator;\n if (!isset($s9y_users[$wp_user])) {\n if ($dry_run) {\n $s9y_users[$wp_user]['authorid'] = time();\n } else {\n $s9y_users[$wp_user]['authorid'] = serendipity_addAuthor($wp_user, md5(time()), $wp_user, '', USERLEVEL_EDITOR);\n }\n echo '<span class=\"block_level\">';\n printf(CREATE_AUTHOR, serendipity_specialchars($wp_user));\n echo \"</span>\";\n }\n\n $entry['authorid'] = $s9y_users[$wp_user]['authorid'];\n\n if ($dry_run) {\n $id = time();\n } else {\n $id = serendipity_updertEntry($entry);\n }\n\n $s9y_cid = array(); // Holds comment ids to s9y ids association.\n $c_i = 0;\n foreach($wp_items->comment AS $comment) {\n $c_i++;\n $c_id = (string)$comment->comment_id;\n $c_pid = (string)$comment->comment_parent;\n $c_type = (string)$comment->comment_type;\n if ($c_type == 'pingback') {\n $c_type2 = 'PINGBACK';\n } elseif ($c_type == 'trackback') {\n $c_type2 = 'TRACKBACK';\n } else {\n $c_type2 = 'NORMAL';\n }\n\n $s9y_comment = array('entry_id ' => $id,\n 'parent_id' => $s9y_cid[$c_pd],\n 'author' => (string)$comment->comment_author,\n 'email' => (string)$comment->comment_author_email,\n 'url' => (string)$comment->comment_author_url,\n 'ip' => (string)$comment->comment_author_IP,\n 'status' => (empty($comment->comment_approved) || $comment->comment_approved == '1') ? 'approved' : 'pending',\n 'subscribed'=> 'false',\n 'body' => (string)$comment->comment_content,\n 'type' => $c_type2);\n\n if (preg_match('@^([0-9]{4})\\-([0-9]{2})\\-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})$@', (string)$comment->comment_date, $timematch)) {\n $s9y_comment['timestamp'] = mktime($timematch[4], $timematch[5], $timematch[6], $timematch[2], $timematch[3], $timematch[1]);\n } else {\n $s9y_comment['timestamp'] = time();\n }\n\n if ($dry_run) {\n $cid = time();\n } else {\n serendipity_db_insert('comments', $s9y_comment);\n $cid = serendipity_db_insert_id('comments', 'id');\n if ($s9y_comment['status'] == 'approved') {\n serendipity_approveComment($cid, $id, true);\n }\n }\n $s9y_cid[$c_id] = $cid;\n }\n\n echo \"<span class='msg_notice'>Entry '\" . serendipity_specialchars($entry['title']) . \"' ($c_i comments) imported.</span>\";\n }\n return true;\n }", "function parseRSS($url) { \n \n\t//PARSE RSS FEED\n $feedeed = implode('', file($url));\n $parser = xml_parser_create();\n xml_parse_into_struct($parser, $feedeed, $valueals, $index);\n xml_parser_free($parser);\n \n\t//CONSTRUCT ARRAY\n foreach($valueals as $keyey => $valueal){\n if($valueal['type'] != 'cdata') {\n $item[$keyey] = $valueal;\n\t\t\t}\n }\n \n $i = 0;\n \n foreach($item as $key => $value){\n \n if($value['type'] == 'open') {\n \n $i++;\n $itemame[$i] = $value['tag'];\n \n } elseif($value['type'] == 'close') {\n \n $feed = $values[$i];\n $item = $itemame[$i];\n $i--;\n \n if(count($values[$i])>1){\n $values[$i][$item][] = $feed;\n } else {\n $values[$i][$item] = $feed;\n }\n \n } else {\n $values[$i][$value['tag']] = $value['value']; \n }\n }\n \n\t//RETURN ARRAY VALUES\n return $values[0];\n\t}", "public function hasRss($context = null);", "function comments_rss()\n {\n }", "public function rss() {\n $this->response->type('application/rss+xml');\n $result = $this->searchPlace();\n $this->set('result', $result);\n }", "function wp_widget_rss_output($rss, $args = array())\n {\n }", "public function loadXml($xml)\n\t{\n\t\t$doc = DOMDocument::loadXml($xml);\n\n\t\t$this->setTitle($doc->getElementsByTagName('title')->item(0)->nodeValue);\n\t\t$this->setLink($doc->getElementsByTagName('link')->item(0)->nodeValue);\t\t\n\t\t$this->setDescription($doc->getElementsByTagName('description')->item(0)->nodeValue);\t\n\n\t\tforeach ($doc->getElementsByTagName('item') as $entries)\n\t\t{\n\t\t\t$entry = array();\n\n\t\t\tforeach ($entries->getElementsByTagName('*') as $element)\n\t\t\t{\n\t\t\t\t$entry[$element->nodeName] = $element->nodeValue;\n\t\t\t}\n\t\t\t\n\t\t\t$this->addElement(Feed_Element_Rss::importArray($entry));\n\t\t}\n\t}", "abstract protected function newParser();", "public function getRSSFeed($url){\n\t// username and password to use\n\t$usr = 'ipgemea\\intranet.service';\n\t$pwd = '1nterpublicIU';\n\t//Initialize a cURL session\n\t$curl = curl_init();\n\t//Return the transfer as a string of the return value of curl_exec() instead of outputting it out directly\n\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t//Set URL to fetch\n\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t//Force HTTP version 1.1\n\tcurl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);\n\t//Use NTLM for HTTP authentication\n\tcurl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_NTLM);\n\t//Username:password to use for the connection\n\tcurl_setopt($curl, CURLOPT_USERPWD, $usr . ':' . $pwd);\n\t//Stop cURL from verifying the peer�s certification\n\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\t//Execute cURL session\n\t$result = curl_exec($curl);\n\t//Close cURL session\n\tcurl_close($curl);\n\t\n\t$xml = simplexml_load_string($result);\n\treturn $xml;\n\t\n\t}", "function register_block_core_rss()\n {\n }", "function XML(){\n\t\t$this->__construct();\n\t\t$this->Set_Template( 'header', 'rss/header-xml.php' );\n\t\t$this->Set_Template( 'footer', 'rss/footer-xml.php' );\n\t}", "function run_plugins_rss_feed() {\n\n\t$plugin = new Plugins_rss_feed();\n\t$plugin->run();\n\n\tadd_action( 'init', 'customRSS' );\n\tadd_filter( 'feed_content_type', 'authenticateRSS', 10, 2 );\n\tadd_action( 'customRSS', 'my_check_feed_auth', 1 );\n\n}", "protected function parse($filename = false, $content = false)\n {\n if (!empty($content)) {\n $rss_content = &$content;\n } else {\n // Opening the given file impossibe\n if (!@is_readable($filename)) {\n return false;\n }\n $rss_content = file_get_contents($filename);\n }\n // Parse document encoding\n $result['encoding'] = $this->rss_preg_match('!encoding=[\\'\\\"](.*?)[\\'\\\"]!si', $rss_content);\n // This id used by $this->rss_preg_match\n $this->rssenc = ($result['encoding'] != '') ? $result['encoding'] : $this->default_enc;\n //\n // Parse CHANNEL info\n //\n preg_match('!<(channel|feed).*?>(.*?)</\\1>!si', $rss_content, $out_channel);\n\n // It's intended to not just parse anything into an array, but have semantic parsing instead:\n // Since RSS / Atom feeds usually contain the same fields (author, title, content, ...),\n // it seems sensible to parse these into named fields and return them in an normalized\n // fashion. This makes upstream code leaner and less erroneous.\n\n // Go parsing\n foreach ($this->channeltags as $channeltag) {\n $channeltag = preg_quote($channeltag, '!');\n $temp = $this->rss_preg_match('!<'.$channeltag.'.*?>(.*?)</'.$channeltag.'>!si', $out_channel[2]);\n if ($temp != '') {\n $result[$channeltag] = $temp; // Set only if not empty\n if ($this->strip_html) {\n $result[$channeltag] = strip_tags($this->unhtmlentities(strip_tags($result[$channeltag])));\n }\n }\n }\n if (!empty($result['updated'])) {\n $result['lastBuildDate'] = $result['updated'];\n } elseif (!empty($result['pubDate'])) {\n $result['lastBuildDate'] = $result['pubDate'];\n }\n\n // If date_format is specified and lastBuildDate is valid\n if ($this->date_format != '' && ($timestamp = strtotime($result['lastBuildDate'])) !== -1) {\n // convert lastBuildDate to specified date format\n $result['lastBuildDate'] = date($this->date_format, $timestamp);\n }\n // Parse TEXTINPUT info\n preg_match('!<textinput(|[^>]*[^/])>(.*?)</textinput>!si', $rss_content, $out_textinfo);\n // This a little strange regexp means:\n // Look for tag <textinput> with or without any attributes, but skip truncated version <textinput />\n // (it's not beggining tag)\n if (isset($out_textinfo[2])) {\n foreach ($this->textinputtags as $textinputtag) {\n $temp = $this->rss_preg_match('!<'.$textinputtag.'.*?>(.*?)</'.$textinputtag.'>!si', $out_textinfo[2]);\n if ($temp != '') {\n $result['textinput_'.$textinputtag] = $temp; // Set only if not empty\n }\n }\n }\n // Parse IMAGE info\n preg_match('!<image.*?>(.*?)</image>!si', $rss_content, $out_imageinfo);\n if (isset($out_imageinfo[1])) {\n foreach ($this->imagetags as $imagetag) {\n $temp = $this->rss_preg_match('!<'.$imagetag.'.*?>(.*?)</'.$imagetag.'>!si', $out_imageinfo[1]);\n if ($temp != '') {\n $result['image_'.$imagetag] = $temp; // Set only if not empty\n }\n }\n }\n //\n // Parse ITEMS\n //\n preg_match_all('!<(item|entry)(| .*?)>(.*?)</\\1>!si', $rss_content, $items);\n\n print_r($items);\n\n $rss_items = $items[2];\n $i = 0;\n $result['items'] = array(); // create array even if there are no items\n foreach ($rss_items as $rss_item) {\n // If number of items is lower then limit: Parse one item\n if ($i < $this->items_limit || $this->items_limit == 0) {\n foreach ($this->itemtags as $itemtag) {\n $temp = $this->rss_preg_match('!<'.$itemtag.'.*?>(.*?)</'.$itemtag.'>!si', $rss_item);\n if ($temp != '') {\n $result['items'][$i][$itemtag] = $temp; // Set only if not empty\n }\n }\n if (preg_match('!<link href=\"(.+)\" />!Usi', $rss_item, $found)) {\n $result['items'][$i]['link'] = $found[1];\n }\n\n // Strip HTML tags and other bullshit from DESCRIPTION\n if ($this->strip_html && isset($result['items'][$i]['description']) && $result['items'][$i]['description']) {\n $result['items'][$i]['description'] = strip_tags(strip_tags($result['items'][$i]['description']));\n }\n // Strip HTML tags and other bullshit from TITLE\n if ($this->strip_html && isset($result['items'][$i]['title']) && $result['items'][$i]['title']) {\n $result['items'][$i]['title'] = strip_tags($this->unhtmlentities(strip_tags($result['items'][$i]['title'])));\n }\n\n if (!empty($result['items'][$i]['updated'])) {\n $result['items'][$i]['pubDate'] = $result['items'][$i]['updated'];\n }\n\n // If date_format is specified and pubDate is valid\n if ($this->date_format != '' && isset($result['items'][$i]['pubDate'])\n && ($timestamp = strtotime($result['items'][$i]['pubDate'])) !== -1) {\n // convert pubDate to specified date format\n $result['items'][$i]['pubDate'] = date($this->date_format, $timestamp);\n }\n // Item counter\n $i++;\n }\n }\n $result['items_count'] = $i;\n return $result;\n }", "private function parseItem( ezcFeedEntryElement $element, DOMElement $xml )\n {\n foreach ( $xml->childNodes as $itemChild )\n {\n if ( $itemChild->nodeType === XML_ELEMENT_NODE )\n {\n $tagName = $itemChild->tagName;\n\n switch ( $tagName )\n {\n case 'id':\n $element->$tagName = $itemChild->textContent;\n break;\n\n case 'title':\n $this->parseTextNode( $element, $itemChild, 'title' );\n break;\n\n case 'rights':\n $this->parseTextNode( $element, $itemChild, 'copyright' );\n break;\n\n case 'summary':\n $this->parseTextNode( $element, $itemChild, 'description' );\n break;\n\n case 'updated':\n case 'published':\n $element->$tagName = $itemChild->textContent;\n break;\n\n case 'author':\n case 'contributor':\n $subElement = $element->add( $tagName );\n foreach ( $itemChild->childNodes as $subChild )\n {\n if ( $subChild->nodeType === XML_ELEMENT_NODE )\n {\n $subTagName = $subChild->tagName;\n if ( in_array( $subTagName, array( 'name', 'email', 'uri' ) ) )\n {\n $subElement->$subTagName = $subChild->textContent;\n }\n }\n }\n break;\n\n case 'content':\n $type = $itemChild->getAttribute( 'type' );\n $src = $itemChild->getAttribute( 'src' );\n $subElement = $element->add( $tagName );\n\n switch ( $type )\n {\n case 'xhtml':\n $nodes = $itemChild->childNodes;\n if ( $nodes instanceof DOMNodeList )\n {\n for ( $i = 0; $i < $nodes->length; $i++ )\n {\n if ( $nodes->item( $i ) instanceof DOMElement )\n {\n break;\n }\n }\n\n $contentNode = $nodes->item( $i );\n $subElement->text = $contentNode->nodeValue;\n }\n $subElement->type = $type;\n break;\n\n case 'html':\n $subElement->text = $itemChild->textContent;\n $subElement->type = $type;\n break;\n\n case 'text':\n $subElement->text = $itemChild->textContent;\n $subElement->type = $type;\n break;\n\n case null:\n $subElement->text = $itemChild->textContent;\n break;\n\n default:\n if ( preg_match( '@[+/]xml$@i', $type ) !== 0 )\n {\n foreach ( $itemChild->childNodes as $node )\n {\n if ( $node->nodeType === XML_ELEMENT_NODE )\n {\n $doc = new DOMDocument( '1.0', 'UTF-8' );\n $copyNode = $doc->importNode( $node, true );\n $doc->appendChild( $copyNode );\n $subElement->text = $doc->saveXML();\n $subElement->type = $type;\n break;\n }\n }\n }\n else if ( substr_compare( $type, 'text/', 0, 5, true ) === 0 )\n {\n $subElement->text = $itemChild->textContent;\n $subElement->type = $type;\n break;\n }\n else // base64\n {\n $subElement->text = base64_decode( $itemChild->textContent );\n $subElement->type = $type;\n }\n break;\n }\n\n if ( !empty( $src ) )\n {\n $subElement->src = $src;\n }\n\n $language = $itemChild->getAttribute( 'xml:lang' );\n if ( !empty( $language ) )\n {\n $subElement->language = $language;\n }\n\n break;\n\n case 'link':\n $subElement = $element->add( $tagName );\n\n $attributes = array( 'href' => 'href', 'rel' => 'rel', 'hreflang' => 'hreflang',\n 'type' => 'type', 'title' => 'title', 'length' => 'length' );\n\n foreach ( $attributes as $name => $alias )\n {\n if ( $itemChild->hasAttribute( $name ) )\n {\n $subElement->$alias = $itemChild->getAttribute( $name );\n }\n }\n break;\n\n case 'category':\n $subElement = $element->add( $tagName );\n\n $attributes = array( 'term' => 'term', 'scheme' => 'scheme', 'label' => 'label' );\n foreach ( $attributes as $name => $alias )\n {\n if ( $itemChild->hasAttribute( $name ) )\n {\n $subElement->$alias = $itemChild->getAttribute( $name );\n }\n }\n break;\n\n case 'source':\n $subElement = $element->add( $tagName );\n $this->parseSource( $subElement, $itemChild );\n break;\n\n default:\n $this->parseModules( $element, $itemChild, $tagName );\n break;\n }\n }\n }\n\n if ( $xml->hasAttribute( 'xml:lang' ) )\n {\n $element->language = $xml->getAttribute( 'xml:lang' );\n }\n }", "public function rssGet($d, $xml){\r\n\t\r\n\t$i = 0;\r\n\t\r\n\tif(!is_null($xml) && $xml !== false && is_object($xml))\r\n\t{ \r\n\t\r\n\t\tif(is_object($xml->channel->item) && count($xml->channel->item)>0)\r\n\t\t{\r\n\t\t\tforeach($xml->channel->item as $item)\r\n\t\t\t{\r\n\t\t\t\t$title = null;\r\n\t\t\t\t$date = time();\r\n\t\t\t\t$link = null;\r\n\t\t\t\t$description = null;\r\n\t\t\t\t$token = null;\r\n\t\t\t\t\r\n\t\t\t\tif(\r\n\t\t\t\t\t$this->valid($item->title) === true\r\n\t\t\t\t\t// && ( $this->valid($item->pubDate) === true || $this->valid($item->date) === true )\r\n\t\t\t\t\t && $this->valid($item->link) === true\r\n\t\t\t\t)\r\n\t\t\t\t{\r\n\t\t\t\t\tif($this->valid($item->pubDate) === true || $this->valid($item->date) === true )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$date_public = $this->valid($item->pubDate) === true ? strtotime($item->pubDate): strtotime($item->date);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$date_public = $date;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$title = (string)$item->title;\r\n\t\t\t\t\t$link =htmlspecialchars($item->link);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($this->valid($item->description) === true){\r\n\t\t\t\t\t\t$description = $item->description;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$token = System::hash($title.' '.$link.' '.$date_public);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($this->articleExists($token) === false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$uq = \"INSERT INTO \"._SQLPREFIX_.\"_mm_articles \r\n\t\t\t\t\t\t\t\t(title, date_public, data, link, token, id_public, id_source, date_ins)\r\n\t\t\t\t\t\t\t\tVALUES \r\n\t\t\t\t\t\t\t\t('\".Db::escapeField($title).\"', \r\n\t\t\t\t\t\t\t\t'\".(int)$date_public.\"', \r\n\t\t\t\t\t\t\t\t'\".Db::escapeField($description).\"', \r\n\t\t\t\t\t\t\t\t'\".Db::escapeField($link).\"', \r\n\t\t\t\t\t\t\t\t'\".Db::escapeField($token).\"',\r\n\t\t\t\t\t\t\t\t1,\r\n\t\t\t\t\t\t\t\t'\".(int)$d['id_source'].\"',\r\n\t\t\t\t\t\t\t\t'\".time().\"' \r\n\t\t\t\t\t\t\t\t) \r\n\t\t\t\t\t\t\t\t\";\r\n\t\t\t\t\t\tDb::query($uq);\r\n\t\t\t\t\t\t$i++;\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\tDb::query(\"UPDATE \"._SQLPREFIX_.\"_mm_sources SET last_update = '\".time().\"' WHERE id_source = '\".(int)$d['id_source'].\"' \");\r\n\t\t}\r\n\r\n\t}\r\n\t\r\n\treturn $i;\r\n\t\r\n}", "public function parseFromXml($strXml)\n {\n throw new OssException(\"Not implemented.\");\n }", "function the_content_rss($more_link_text = '(more...)', $stripteaser = 0, $more_file = '', $cut = 0, $encode_html = 0)\n {\n }", "public function testImport()\n {\n $document = $this->loadXML('FeedDocument.xml');\n\n $feed = new Feed($this->createFakeNode(), $document->documentElement);\n static::assertEquals('Author 1, Author 2', implode(', ', $feed->getAuthors()));\n static::assertEquals('urn:feed:1', (string) $feed->getId());\n static::assertEquals('http://example.com/atom/feed', $feed->getLink('self'));\n $value = $feed->getTitle();\n static::assertEquals('text', $value->getType());\n static::assertEquals('Feed Title', $value);\n static::assertEquals('http://example.com/feed-icon.png', (string) $feed->getIcon());\n static::assertEquals('http://example.com/feed-logo.png', (string) $feed->getLogo());\n\n $value = $feed->getGenerator();\n static::assertEquals('Generator', (string) $value);\n static::assertEquals('http://example.com/generator', $value->getUri());\n static::assertEquals('1.0', $value->getVersion());\n\n $value = $feed->getSubtitle();\n static::assertEquals('text', $value->getType());\n static::assertEquals('Feed Subtitle', (string) $value);\n\n static::assertEquals(\n '2016-01-23 11:22:33',\n $feed->getUpdated()->getDate()->format('Y-m-d H:i:s')\n );\n $entries = $feed->getEntries();\n static::assertCount(3, $entries);\n static::assertInstanceOf(Entry::class, $entries[0]);\n static::assertEquals('Entry 3 Title', (string) $entries[0]->getTitle());\n }", "function parseXML() {\n \n $xml_parser = xml_parser_create($this->encoding);\n xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 1);\n\n xml_set_object($xml_parser, $this);\n xml_set_element_handler($xml_parser, 'startElement', 'endElement');\n xml_set_character_data_handler($xml_parser, 'cDataHandler');\n\n xml_set_external_entity_ref_handler($xml_parser, 'externalEntityRefHandler');\n xml_set_processing_instruction_handler($xml_parser, 'piHandler');\n xml_set_unparsed_entity_decl_handler($xml_parser, 'unparsedEntityDeclHandler');\n xml_set_notation_decl_handler($xml_parser, 'entityDeclHandler');\n xml_set_default_handler($xml_parser, 'defaultHandler');\n \n if (!xml_parse($xml_parser, $this->contentBuffer, true)) {\n ($this->currentFile != '') ? $inFile = \"in file $this->currentFile\" : $inFile = '';\n if ($GLOBALS['SM_develState']) {\n echo \"XML dump: \\n\".$this->contentBuffer;\n }\n $this->fatalErrorPage(sprintf(get_class($this).\": XML error: %s at line %d $inFile\",\n xml_error_string(xml_get_error_code($xml_parser)),\n xml_get_current_line_number($xml_parser)));\n }\n\n xml_parser_free($xml_parser);\n\n }", "public function testClassInstantiation()\n {\n $object = new FileBasedParser(RoboFile::SOURCE_ROOT);\n $this->assertInstanceOf(\n 'WPCoreBootstrap\\DocumentationParser\\Parser',\n $object\n );\n }", "function addSubscription($xml, $tags) {\n\t\t\t// Optional attributes: title, htmlUrl, language, title, version\n\t\t\tif ($xml['type'] != 'rss' && $xml['type'] != 'atom') {\n\t\t\t\t$title = (string) $xml['text'];\n\t\t\t\techo \"RSS type not supported for: $title<br>\";\n\t\t\t} else {\n\n\t\t\t\t// description\n\t\t\t\t$title = (string) $xml['text'];\n\n\t\t\t\t// RSS URL\n\t\t\t\t$data['url'] = (string) $xml['xmlUrl'];\n\n\t\t\t\t//check if feed_name already exists in database\n\t\t\t\t$database->query(\"SELECT count(*) as count FROM t_feeds WHERE feed_name = :name\");\n\t\t\t\t$database->bind(':name', $title);\n\t\t\t\t$row = $database->single();\n\t\t\t\t$count = $row['count'];\n\n\t\t\t\tif ($count > 0) {\n\t\t\t\t\techo \"SKIPPED: $title<br>\";\n\t\t\t\t} else {\n\t\t\t\t\techo \"ADDED: $title $data[url] <br>\";\n\n\t\t\t\t\t//Get favoicon for each rss feed\n\t\t\t\t\tif(isset($_POST['favoicon'])) { \n\t\t\t\t\t\t$getfavoicon = htmlspecialchars($_POST['favoicon']); \n\t\t\t\t\t} else { \n\t\t\t\t\t\t$getfavoicon = NULL; \n\t\t\t\t\t\t$favicon = NULL; \n\t\t\t\t\t}\n\n\t\t\t\t\t//get favoicon\n\t\t\t\t\tif($getfavoicon == 'Yes') {\n\t\t\t\t\t\t$feed = new SimplePie($data[url]);\n\t\t\t\t\t\t$feed->init();\n\t\t\t\t\t\t$feed->handle_content_type();\n\t\t\t\t\t\t$favicon = $feed->get_favicon();\n\t\t\t\t\t}\n\t\t\t\t \n\t\t\t\t\t$database->beginTransaction();\n\t\t\t\t\t$database->query(\"INSERT INTO t_feeds (feed_name, url, favicon) VALUES (:feed_name, :url, :favicon)\");\n\t\t\t\t\t$database->bind(':feed_name', $title);\n\t\t\t\t\t$database->bind(':url', $data['url']);\n\t\t\t\t\t$database->bind(':favicon', $favicon);\n\t\t\t\t\t$database->execute();\n\t\t\t\t\t$database->endTransaction();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static function importString($string)\n {\n $dom = new DOMDocument;\n try {\n $dom = Zend_Xml_Security::scan($string, $dom);\n } catch (Zend_Xml_Exception $e) {\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception(\n $e->getMessage()\n );\n }\n if (!$dom) {\n // Build error message\n $error = libxml_get_last_error();\n if ($error && $error->message) {\n $errormsg = \"DOMDocument cannot parse XML: {$error->message}\";\n } else {\n $errormsg = \"DOMDocument cannot parse XML: Please check the XML document's validity\";\n }\n\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception($errormsg);\n }\n\n $type = self::detectType($dom);\n\n self::_registerCoreExtensions();\n\n if (substr($type, 0, 3) == 'rss') {\n $reader = new Zend_Feed_Reader_Feed_Rss($dom, $type);\n } elseif (substr($type, 8, 5) == 'entry') {\n $reader = new Zend_Feed_Reader_Entry_Atom($dom->documentElement, 0, Zend_Feed_Reader::TYPE_ATOM_10);\n } elseif (substr($type, 0, 4) == 'atom') {\n $reader = new Zend_Feed_Reader_Feed_Atom($dom, $type);\n } else {\n require_once 'Zend/Feed/Exception.php';\n throw new Zend_Feed_Exception('The URI used does not point to a '\n . 'valid Atom, RSS or RDF feed that Zend_Feed_Reader can parse.');\n }\n return $reader;\n }", "function the_excerpt_rss()\n {\n }", "function rss()\n\t{\n\t\tglobal $prefs,$txpac;\n\t\textract($prefs);\n\t\tob_start();\n\n\t\textract(doSlash(gpsa(array('category','section','limit','area'))));\n\n\t\t// send a 304 if nothing has changed since the last visit\n\t\n\t\t$last = fetch('unix_timestamp(val)','txp_prefs','name','lastmod');\n\t\t$last = gmdate(\"D, d M Y H:i:s \\G\\M\\T\",$last);\n\t\theader(\"Last-Modified: $last\");\n\t\t$hims = serverset('HTTP_IF_MODIFIED_SINCE');\n\t\tif ($hims == $last) {\n\t\t\theader(\"HTTP/1.1 304 Not Modified\"); exit; \n\t\t}\n\t\t\n\t\t$area = gps('area');\n\n\t\t$sitename .= ($section) ? ' - '.$section : '';\n\t\t$sitename .= ($category) ? ' - '.$category : '';\n\n\t\t$out[] = tag(doSpecial($sitename),'title');\n\t\t$out[] = tag('http://'.$siteurl.$path_from_root,'link');\n\t\t$out[] = tag(doSpecial($site_slogan),'description');\n\n\t\tif (!$area or $area=='article') {\n\t\t\t\t\t\n\t\t\t$sfilter = ($section) ? \"and Section = '\".$section.\"'\" : '';\n\t\t\t$cfilter = ($category) \n\t\t\t\t? \"and (Category1='\".$category.\"' or Category2='\".$category.\"')\":'';\n\t\t\t$limit = ($limit) ? $limit : '5';\n\t\t\n\t\t\t\t$frs = safe_column(\"name\", \"txp_section\", \"in_rss != '1'\");\n\t\t\t\tif ($frs) foreach($frs as $f) $query[] = \"and Section != '\".$f.\"'\";\n\t\t\t$query[] = $sfilter;\n\t\t\t$query[] = $cfilter;\n\t\t\t\n\t\t\t$rs = safe_rows(\n\t\t\t\t\"*\", \n\t\t\t\t\"textpattern\", \n\t\t\t\t\"Status = 4 \".join(' ',$query).\n\t\t\t\t\"and Posted < now() order by Posted desc limit $limit\"\n\t\t\t);\n\t\t\t\t\n\t\t\tif($rs) {\n\t\t\t\tforeach ($rs as $a) {\n\t\t\t\t\textract($a);\n\t\t\t\t\t$Body = (!$txpac['syndicate_body_or_excerpt']) ? $Body_html : $Excerpt;\n\t\t\t\t\t$Body = (!trim($Body)) ? $Body_html : $Body;\n\t\t\t\t\t$Body = str_replace('href=\"/','href=\"http://'.$siteurl.'/',$Body);\n\t\t\t\t\t$Body = htmlspecialchars($Body,ENT_NOQUOTES);\n\t\n\t\t\t\t\t$link = ($url_mode==0)\n\t\t\t\t\t?\t'http://'.$siteurl.$path_from_root.'index.php?id='.$ID\n\t\t\t\t\t:\t'http://'.$siteurl.$path_from_root.$Section.'/'.$ID.'/';\n\t\t\n\t\t\t\t\tif ($txpac['show_comment_count_in_feed']) {\n\t\t\t\t\t\t$dc = getCount('txp_discuss', \"parentid=$ID and visible=1\");\n\t\t\t\t\t\t$count = ($dc > 0) ? ' ['.$dc.']' : '';\n\t\t\t\t\t} else $count = '';\n\n\t\t\t\t\t$Title = doSpecial($Title).$count;\n\n\t\t\t\t\t$item = tag(strip_tags($Title),'title').n.\n\t\t\t\t\t\ttag($Body,'description').n.\n\t\t\t\t\t\ttag($link,'link');\n\t\n\t\t\t\t\t$out[] = tag($item,'item');\n\t\t\t\t}\n\t\n\t\t\theader(\"Content-Type: text/xml\"); \n\t\t\treturn '<rss version=\"0.92\">'.tag(join(n,$out),'channel').'</rss>';\n\t\t\t}\n\t\t} elseif ($area=='link') {\n\t\t\t\t\n\t\t\t$cfilter = ($category) ? \"category='$category'\" : '1';\n\t\t\t$limit = ($limit) ? $limit : 15;\n\n\t\t\t$rs = safe_rows(\"*\", \"txp_link\", \"$cfilter order by date desc limit $limit\");\n\t\t\n\t\t\tif ($rs) {\n\t\t\t\tforeach($rs as $a) {\n\t\t\t\t\textract($a);\n\t\t\t\t\t$item = \n\t\t\t\t\t\ttag(doSpecial($linkname),'title').n.\n\t\t\t\t\t\ttag(doSpecial($description),'description').n.\n\t\t\t\t\t\ttag($url,'link');\n\t\t\t\t\t$out[] = tag($item,'item');\n\t\t\t\t}\n\t\t\t\theader(\"Content-Type: text/xml\"); \n\t\t\t\treturn '<rss version=\"0.92\">'.tag(join(n,$out),'channel').'</rss>';\n\t\t\t}\n\t\t}\n\t\treturn 'no articles recorded yet';\n\t}", "function _init(){\n\t\t$total = $this->node->childCount;\n\n\t\tfor($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\n\t\t switch ($tagName) {\n case DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_URL:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_WIDTH:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_HEIGHT:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t //$this->DOMIT_RSS_indexer[$tagName] =& $currNode;\n\t\t }\n\t\t}\n\t}", "function permalink_single_rss($deprecated = '')\n {\n }", "function the_permalink_rss()\n {\n }", "function _init(){\n\t\t$total = $this->node->childCount;\n\t\t$categoryCounter = 0;\n\t\t\n\t\tfor($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\t\t\n\t\t switch ($tagName) {\n\t\t case DOMIT_RSS_ELEMENT_CATEGORY:\n\t\t $this->categories[$categoryCounter] =& new xml_domit_rss_category($currNode);\n\t\t\t\t\t$categoryCounter++;\n\t\t break;\n case DOMIT_RSS_ELEMENT_ENCLOSURE:\n $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_enclosure($currNode);\n\t\t break;\n case DOMIT_RSS_ELEMENT_SOURCE:\n $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_source($currNode);\n\t\t break;\n case DOMIT_RSS_ELEMENT_GUID:\n $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_guid($currNode);\n\t\t break;\n case DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_AUTHOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_COMMENTS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_PUBDATE:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t //$this->DOMIT_RSS_indexer[$tagName] =& $currNode;\n\t\t }\n\t\t}\n\t\t\n\t\tif ($categoryCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CATEGORIES] =& $this->domit_rss_categories;\n\t\t}\n\t}", "function APP_RSS_GET_FEED($URL,$terminal)\n\t{\n\trequire_once 'rss_php.php';\n\t$rss = new rss_php;\n\t$rss->load($URL);\n\t$items = $rss->getItems(); #returns all RSS items\n\t#print_r($items);\n\treturn $items;\n\t}", "function _init(){\n\t\t$total = $this->node->childCount;\n\n\t\tfor($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\n\t\t switch ($tagName) {\n case DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_NAME:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t //$this->DOMIT_RSS_indexer[$tagName] =& $currNode;\n\t\t }\n\t\t}\n\t}", "public static function importFeed(Zend_Feed_Abstract $feed)\n {\n $dom = $feed->getDOM()->ownerDocument;\n $type = self::detectType($dom);\n self::_registerCoreExtensions();\n if (substr($type, 0, 3) == 'rss') {\n $reader = new Zend_Feed_Reader_Feed_Rss($dom, $type);\n } else {\n $reader = new Zend_Feed_Reader_Feed_Atom($dom, $type);\n }\n\n return $reader;\n }", "public static function canParse( DOMDocument $xml )\n {\n if ( $xml->documentElement->tagName !== 'feed' )\n {\n return false;\n }\n\n return true;\n }", "function make_xml($base, $structure)\r\t{\r\tglobal $CFG;\r\trequire_once($CFG->libdir.'/filelib.php');\r\r\tunset($r);\r\t$r = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\t<rss xmlns:itunes=\"http://www.itunes.com/DTDs/Podcast-1.0.dtd\" version=\"2.0\">\r\t<channel>\r\t<lastBuildDate>'.podcast_date_format().' '.date('O').'</lastBuildDate>\r\t<title>'.utf8_encode(stripslashes($base->name)).'</title>\r\t<itunes:author>'.utf8_encode(stripslashes($base->author)).'</itunes:author>\r\t<link>'.$base->image_url.'</link>\r\t<description>'.utf8_encode(stripslashes($base->intro)).'</description>\r\t<itunes:summary>'.utf8_encode(stripslashes($base->intro)).'</itunes:summary>\r\t<image>\r\t\t<url>'.$base->image_img.'</url>\r\t\t<title>'.utf8_encode(stripslashes($base->name)).'</title>\r\t\t<link>'.$base->image_url.'</link>\r\t</image>\r\t<language>'.$base->lang.'</language>\r\t<category>'.utf8_encode($base->category).'</category>\r\t<itunes:category text=\"'.utf8_encode(stripslashes($base->category)).'\"></itunes:category>\r\t<copyright>'.utf8_encode(stripslashes($base->copyright)).'</copyright>\r\t<itunes:owner>\r\t\t<itunes:name>'.utf8_encode(stripslashes($base->owner)).'</itunes:name>\r\t\t<itunes:email>'.$base->owner_email.'</itunes:email>\r\t</itunes:owner>\r\t<itunes:image href=\"'.$base->image_url.'\" />\r\t<itunes:explicit>clean</itunes:explicit>';\r\tforeach($structure as $item) {\r\t\t$r = $r.'<item>\r\t\t<title>'.utf8_encode(stripslashes($item->title)).'</title>\r\t\t<itunes:author>'.utf8_encode(stripslashes($base->author)).'</itunes:author>\r\t\t<link>'.$CFG->wwwroot.\"/mod/podcast/media/\".$base->course.\"/\".$base->id.\"/\".$item->lien.'</link>\r\t\t<description>'.utf8_encode(stripslashes($item->intro)).'</description>\r\t\t<guid>'.$CFG->wwwroot.\"/mod/podcast/media/\".$base->course.\"/\".$base->id.\"/\".$item->lien.'</guid>\r\t\t<pubDate>'.$item->pubdate.'</pubDate>\r\t\t<enclosure url=\"'.$CFG->wwwroot.\"/mod/podcast/media/\".$base->course.\"/\".$base->id.\"/\".$item->lien.'\" length=\"'.$item->length.'\" type=\"'.mimeinfo(\"type\",$item->lien).'\" />\r\t\t<itunes:duration>'.$item->duration.'</itunes:duration>\r\t\t<itunes:subtitle />\r\t\t<itunes:summary>'.utf8_encode(stripslashes($item->intro)).'</itunes:summary>\r\t\t</item>';\r\t}\r\t$r = $r.'</channel>\r\t</rss>';\r\r\treturn ($r);\r\t}", "public function rssAction() {\n header(\"Content-Type: application/xml;\");\n $out = $this->feed->export('rss');\n echo $out;\n exit;\n }", "function do_feed_rss2($for_comments)\n {\n }", "function rss_enclosure()\n {\n }", "private function _doRssJob($parameters) {\n\t\trequire(wgPaths::getModulePath().'actions/class.rss.php');\n\t\t$class = new newsActionsRss();\n\t\tif ((bool) $class->init()) { wgError::add('actionok', 2);\n\t\t\treturn true;\n\t\t}\n\t\telse { wgError::add('actionfailed');\n\t\t\treturn false;\n\t\t}\n\t}", "public function rssAction()\r\n {\r\n if (Mage::helper('mageplaza_betterblog/category')->isRssEnabled()) {\r\n $this->getResponse()->setHeader('Content-type', 'text/xml; charset=UTF-8');\r\n $this->loadLayout(false);\r\n $this->renderLayout();\r\n } else {\r\n $this->getResponse()->setHeader('HTTP/1.1', '404 Not Found');\r\n $this->getResponse()->setHeader('Status', '404 File not found');\r\n $this->_forward('nofeed', 'index', 'rss');\r\n }\r\n }", "public function __construct()\n {\n $this->handler = new XMLReader();\n }", "function ReadRssXMLByCurl()\r\n\t{\r\n\t\t$curl_handle=curl_init();\r\n\t\tcurl_setopt($curl_handle, CURLOPT_URL,self::$_rssUrl);\r\n\t\tcurl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 5);\r\n\t\tcurl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1);\r\n\t\tcurl_setopt($curl_handle, CURLOPT_HEADER, 0);\t\r\n\t\tcurl_setopt($curl_handle, CURLOPT_BINARYTRANSFER, true);\r\n\t\tcurl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, FALSE);\t\t\t\r\n\t\tcurl_setopt($curl_handle, CURLOPT_USERAGENT, 'user');\r\n\t\t$xmlcontent = curl_exec($curl_handle);\r\n\t\tcurl_close($curl_handle);\r\n\t\t\r\n\t\tself::$_doc = new \\DOMDocument();\t\t\r\n\t\t@self::$_doc = dom_import_simplexml(simplexml_load_string($xmlcontent));\t\t\r\n\t\tself::$_loaded = TRUE;\r\n\t\t\r\n\t\t\r\n\t\t$ch = self::$_doc->getElementsByTagName('channel')->item(0);\r\n\t\t\r\n\t\t$result = array();\t\t\r\n\t\tif ( ! is_null($ch))\r\n\t\t{\r\n\t\t\t\tif ($ch->hasChildNodes())\r\n\t\t\t\t{\r\n\t\t\t\t\t$i = 0;\r\n\t\t\t\t\tforeach ($ch->getElementsByTagName('item') as $tag)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$result['item_'.$i] = array();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tforeach ($tag->getElementsByTagName('*') as $item)\r\n\t\t\t\t\t\t\t$result['item_'.$i][$item->tagName] = html_entity_decode($item->nodeValue, ENT_QUOTES, 'UTF-8') ;\r\n\r\n\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn $result;\r\n\t}", "protected function _getParser() {}", "function __construct()\n\t{\n\t\t// Load the XML Helper\n\t\tee()->load->helper('xml');\n\t}", "public function is_feed($feeds = '')\n {\n }", "public function isRssEnabled()\n {\n return Mage::getStoreConfigFlag('rss/config/active') &&\n Mage::getStoreConfigFlag('komaks_newsedit/author/rss');\n }", "protected function setUp() {\n $this->object = new XmlFile(__DIR__.'/rss-techcrunch.xml');\n }", "public function __construct()\n\t{\n\t\t$this->parser = xml_parser_create('UTF-8');\n\t\txml_set_object($this->parser,$this);\n\t\txml_set_element_handler($this->parser, 'tag_open', 'tag_close');\n\t\txml_set_character_data_handler($this->parser, 'cdata');\n\t\txml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);\n\t\t\n\t\t$this->removeTags(\n\t\t\t'applet','base','basefont','body','center','dir','font',\n\t\t\t'frame','frameset','head','html','isindex',\n\t\t\t'link','menu','meta','noframes','script','style'\n\t\t);\n\t\t\n\t\t$this->removeAttributes(\n\t\t\t'onclick','ondblclick','onfocus','onkeydown','onkeypress',\n\t\t\t'onkeyup','onload','onmousedown','onmousemove','onmouseout',\n\t\t\t'onmouseover','onmouseup','onreset','onselect','onsubmit',\n\t\t\t'onunload'\n\t\t);\n\t}", "function rss() {\n require_once ANGIE_PATH . '/classes/feed/init.php';\n \n $archive_url = assemble_url('status_updates');\n \t\n \t$selected_user = $this->request->get('user_id');\n \tif ($selected_user) {\n if (!in_array($selected_user, $this->logged_user->visibleUserIds())) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n \t \n \t $user = Users::findById($selected_user);\n \t if (!instance_of($user, 'User')) {\n \t $this->httpError(HTTP_ERR_NOT_FOUND);\n \t } // if\n \t \n \t $archive_url = assemble_url('status_updates', array(\n \t 'user_id' => $user->getId(),\n \t ));\n \t $latest_status_updates = StatusUpdates::findByUser($user, 20);\n \t $feed = new Feed($user->getDisplayName(). ': '.lang('Status Updates'), $archive_url);\n \t} else {\n \t$latest_status_updates = StatusUpdates::findVisibleForUser($this->logged_user, 20);\n \t$feed = new Feed(lang('Status Updates'), $archive_url);\n \t} // if\n \t\n \tif(is_foreachable($latest_status_updates)) {\n \t foreach ($latest_status_updates as $status_update) {\n \t $item = new FeedItem($status_update->getCreatedByName().': '.str_excerpt($status_update->getMessage(), 20), $status_update->getViewUrl(), $status_update->getMessage(), $status_update->getCreatedOn());\n \t $item->setId($status_update->getId());\n \t $feed->addItem($item);\n \t } // foreach\n \t} // if\n \t\n print render_rss_feed($feed);\n die();\n }", "function the_title_rss()\n {\n }", "public function BuildFeed() {\r\n\t$xml = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\r\n<channel>\r\n\r\n';\r\n\t// build channel title\r\n\tfor($iterator = $this->FeedTitle->getIterator();\r\n\t\t$iterator->valid();\r\n\t\t$iterator->next()) {\r\n\t\t$xml .= '<'.$iterator->key().'>'.$iterator->current().'</'.$iterator->key().'>'.\"\\n\";\r\n\t\tif ('title' == $iterator->key()) {\r\n\t\t $xml .= $this->BuildFeedAtom();\r\n\t\t}\r\n\t}\r\n\t// build channel items\r\n\t$iterator = new RecursiveArrayIterator($this->FeedItems);\r\n\twhile($iterator->hasChildren()) {\r\n\t $xml .= '<item>'.\"\\n\";\r\n\t for($sub_iterator = $iterator->current()->getIterator();\r\n\t\t$sub_iterator->valid();\r\n\t\t$sub_iterator->next()) {\r\n\t\tif ('guid' == $sub_iterator->key()) {\r\n\t\t $xml .= '<'.$sub_iterator->key().' isPermaLink =\"'.(\r\n\t\t\t$sub_iterator->offsetGet('isPermaLink')\r\n\t\t\t? 'true'\r\n\t\t\t: 'false' ).'\">'.\r\n\t\t $sub_iterator->current().'</'.$sub_iterator->key().'>'.\"\\n\";\r\n\t\t}\r\n\t\telseif ('isPermaLink' != $sub_iterator->key()) {\r\n\t\t $xml .= '<'.$sub_iterator->key().'>'.$sub_iterator->current().'</'.$sub_iterator->key().'>'.\"\\n\";\r\n\t\t}\r\n\t }\r\n\t $xml .= '</item>'.\"\\n\";\r\n\t $iterator->next();\r\n\t}\r\n\t$xml .= '</channel>\r\n</rss>';\r\n\treturn $xml;\r\n }", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'rss_widget', // Base ID\n\t\t\tesc_html__( 'RSS Widget', 'rss-widget' ), // Name\n\t\t\tarray( 'description' => esc_html__( 'A Wiget To Display RSS Feeds', 'rss-widget' ), ) // Args\n\t\t);\n\t}", "function forum_rss_feed($forum) {\n\n global $CFG;\n\n $status = true;\n\n //Check CFG->enablerssfeeds\n if (empty($CFG->enablerssfeeds)) {\n debugging(\"DISABLED (admin variables)\");\n //Check CFG->forum_enablerssfeeds\n } else if (empty($CFG->forum_enablerssfeeds)) {\n debugging(\"DISABLED (module configuration)\");\n //It's working so we start...\n } else {\n //Check the forum has rss activated\n if (!empty($forum->rsstype) && !empty($forum->rssarticles)) {\n //Depending of the forum->rsstype, we are going to execute, different sqls\n if ($forum->rsstype == 1) { //Discussion RSS\n $items = forum_rss_feed_discussions($forum);\n } else { //Post RSS\n $items = forum_rss_feed_posts($forum);\n\n }\n //Now, if items, we begin building the structure\n if (!empty($items)) {\n //First all rss feeds common headers\n $header = rss_standard_header(strip_tags(format_string($forum->name,true)),\n $CFG->wwwroot.\"/mod/forum/view.php?f=\".$forum->id,\n format_string($forum->intro,true));\n //Now all the rss items\n if (!empty($header)) {\n $articles = rss_add_items($items);\n }\n //Now all rss feeds common footers\n if (!empty($header) && !empty($articles)) {\n $footer = rss_standard_footer();\n }\n //Now, if everything is ok, concatenate it\n if (!empty($header) && !empty($articles) && !empty($footer)) {\n $status = $header.$articles.$footer;\n } else {\n $status = false;\n }\n } else {\n $status = false;\n }\n }\n }\n return $status;\n }", "function getType() {\n\t\treturn $this->getAttribute(DOMIT_RSS_ATTR_TYPE);\n\t}", "public static function isXml($str) {}", "public function testValidateDocumentXmlValidation()\n {\n }", "function comment_author_rss()\n {\n }" ]
[ "0.6420601", "0.6220844", "0.61872935", "0.61256105", "0.6060497", "0.6049352", "0.6001759", "0.5883809", "0.5866639", "0.58597237", "0.5825549", "0.5824453", "0.581698", "0.5805962", "0.57808346", "0.5771245", "0.5729607", "0.5678873", "0.5668966", "0.56379014", "0.56379014", "0.5625264", "0.56157124", "0.5591653", "0.5584056", "0.55798393", "0.55240583", "0.5522678", "0.5521757", "0.55140126", "0.5499091", "0.54974604", "0.54629225", "0.54467297", "0.54460156", "0.5444482", "0.5434585", "0.54306483", "0.5413883", "0.5405357", "0.53923726", "0.5375375", "0.5371189", "0.53647035", "0.5360512", "0.53575927", "0.53532356", "0.5348482", "0.5336771", "0.53345996", "0.5324684", "0.52811086", "0.5272922", "0.5269686", "0.52655005", "0.5254541", "0.52527213", "0.5241938", "0.52406466", "0.52152073", "0.52082485", "0.52033794", "0.520165", "0.5181115", "0.51804453", "0.5177394", "0.51752424", "0.5143351", "0.51428854", "0.51302207", "0.5117517", "0.5114035", "0.5113364", "0.5106258", "0.51054114", "0.51034", "0.50951195", "0.50933653", "0.50797147", "0.50722015", "0.5071134", "0.50705725", "0.50578713", "0.5051622", "0.5051346", "0.5048073", "0.5044309", "0.5042814", "0.504273", "0.5037709", "0.5034164", "0.5032726", "0.5032354", "0.50244147", "0.5018585", "0.501623", "0.50156176", "0.5015167", "0.5013315", "0.50029075" ]
0.79881847
0
Test case for bug report 2310
function testBug2310() { $rss = new XML_RSS("", null, "utf-8"); $this->assertEquals($rss->tgtenc, "utf-8"); $rss = new XML_RSS("", "utf-8", "iso-8859-1"); $this->assertEquals($rss->srcenc, "utf-8"); $this->assertEquals($rss->tgtenc, "iso-8859-1"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetChangeIssue()\n {\n }", "protected function test9() {\n\n }", "protected function checkLibXmlBug() {}", "public function test_getDuplicateLegacyLowstockContactById() {\n\n }", "public function testGetDuplicateLowStockById()\n {\n }", "function testBugChtchevaev_2004_11_17() \n {\n $sText = <<<SCRIPT\n<?php\n\\$o->_test1(\\$c-> test2()-> test3());\n?>\nSCRIPT;\n $this->setText($sText);\n $sExpected = <<<SCRIPT\n<?php\n\\$o->_test1(\\$c->test2()->test3());\n?>\nSCRIPT;\n $this->assertEquals($sExpected, $this->oBeaut->get());\n }", "function broken() { }", "public function testGetDuplicatePackingPlanById()\n {\n }", "public function testNonGroupingIntegration() {\n $this->markTestSkipped('Not yet implemented.');\n }", "protected abstract function test();", "protected abstract function test();", "public function testRegistrationValuesTooShort(): void { }", "public function testResolve0()\n{\n\n // Traversed conditions\n // if (!$this->cached) == false (line 193)\n\n $actual = $this->handlerStack->resolve();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "function testInternal2() \n {\n $this->assertTrue(array_key_exists(T_COMMENT, $this->oBeaut->aTokenFunctions));\n }", "public function testResolve1()\n{\n\n // Traversed conditions\n // if (!$this->cached) == true (line 193)\n // if (!($prev = $this->handler)) == false (line 194)\n\n $actual = $this->handlerStack->resolve();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testResolve2()\n{\n\n // Traversed conditions\n // if (!$this->cached) == true (line 193)\n // if (!($prev = $this->handler)) == false (line 194)\n\n $actual = $this->handlerStack->resolve();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testGetDuplicateItemSubCategoryById()\n {\n }", "function broken() { return TRUE; }", "public function testGetChangeDuplicates()\n {\n }", "function testBug_rolfhub_2007_02_07_1() \n {\n $sText = <<<SCRIPT\n<?php\n\\$i = 0;\nwhile (++\\$i) {\n switch (\\$i) {\n case 5:\n echo \"At 5<br />\";\n break 1; /* Exit only the switch. */\n case 10:\n echo \"At 10; quitting<br />\";\n break 2; /* Exit the switch and the while. */\n default:\n break;\n }\n}\n?>\nSCRIPT;\n $this->setText($sText);\n $sExpected = <<<SCRIPT\n<?php\n\\$i = 0;\nwhile (++\\$i) {\n switch (\\$i) {\n case 5:\n echo \"At 5<br />\";\n break 1; /* Exit only the switch. */\n case 10:\n echo \"At 10; quitting<br />\";\n break 2; /* Exit the switch and the while. */\n default:\n break;\n }\n}\n?>\nSCRIPT;\n $this->assertEquals($sExpected, $this->oBeaut->get());\n }", "public function testRegistrationValuesTooLong(): void { }", "public function testPingTreeGetItem()\n {\n }", "public function testSupportsSavepoints0()\n{\n\n $actual = $this->grammar->supportsSavepoints();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testReportsSkillv1reportsskillsidgaps()\n {\n\n }", "public function testConstructorErrorLocationNotWriteable()\n {\n return true;\n }", "public function testConstructorErrorLocationNotWriteable()\n {\n return true;\n }", "public function testQuarantineFind()\n {\n\n }", "public function testPingTreePatchItem()\n {\n }", "public function testGetDuplicateExternalShipmentById()\n {\n }", "public function testPreprocessingUnrotate()\n {\n }", "public function fix() {}", "public function fix() {}", "protected function fixSelf() {}", "protected function fixSelf() {}", "function testBug7759() \n {\n $sText = <<<SCRIPT\n<?php\necho 0;\nswitch(1) {\ncase 1:\ncase 5: // 5\necho 1;\nbreak;\ncase 2: //2\necho \"something\";\necho \"something\";\ncase 3: /*3 */ /* 3? */\ncase 4: \ndefault:\necho '2';\nbreak;\n}\necho 1;\n?>\nSCRIPT;\n $this->setText($sText);\n $sExpected = <<<SCRIPT\n<?php\necho 0;\nswitch (1) {\n case 1:\n case 5: // 5\n echo 1;\n break;\n case 2: //2\n echo \"something\";\n echo \"something\";\n case 3: /*3 */ /* 3? */\n case 4:\n default:\n echo '2';\n break;\n}\necho 1;\n?>\nSCRIPT;\n $this->assertEquals($sExpected, $this->oBeaut->get());\n }", "public function test_addLegacyLowstockContactAudit() {\n\n }", "public function origTestFinal()\n {\n $this->assertTrue('true');\n }", "public function testGenerateBarcodeEAN8()\n {\n }", "public function testGetNotaEspelhoPatrimonio()\n {\n }", "public function testDSTIdFillPatch()\n {\n }", "public function testGetDuplicateOrderById()\n {\n }", "function fix() ;", "public function testQuarantineCreateChangeStreamGetQuarantinesChangeStream()\n {\n\n }", "public function testGetDuplicateVendorComplianceSurveyById()\n {\n }", "public function testGenerateBarcodeEAN13()\n {\n }", "public function testGetKeyRevisionHistory()\n {\n }", "public function testGenerateBarcodeUPCE()\n {\n }", "public function test__toString6()\n{\n\n // Traversed conditions\n // if ($this->handler) == true (line 79)\n\n $actual = $this->handlerStack->__toString();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function test__toString7()\n{\n\n // Traversed conditions\n // if ($this->handler) == true (line 79)\n\n $actual = $this->handlerStack->__toString();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function test__toString0()\n{\n\n // Traversed conditions\n // if ($this->handler) == false (line 79)\n\n $actual = $this->handlerStack->__toString();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testSpecial(): void {\n\t}", "public function test_updateLegacyLowstockContact() {\n\n }", "public function testAddLowStockFile()\n {\n }", "public function test__toString0()\n{\n\n $actual = $this->simplePie_Copyright->__toString();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function test__toString3()\n{\n\n // Traversed conditions\n // if ($this->handler) == false (line 79)\n\n $actual = $this->handlerStack->__toString();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testIsInvalid()\n {\n $this->todo('stub');\n }", "public function testRegonLocal0()\n{\n\n // Traversed conditions\n // for (...) == false (line 65)\n // for (...) == false (line 69)\n // if ($checksum == 10) == false (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testGet_attribution0()\n{\n\n // Traversed conditions\n // if ($this->label !== \\null) == false (line 120)\n\n $actual = $this->simplePie_Copyright->get_attribution();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "function testBug2301() \n {\n $sText = <<<SCRIPT\n<?php\nthrow new AccountFindException();\n?>\nSCRIPT;\n $this->setText($sText);\n $sExpected = <<<SCRIPT\n<?php\nthrow new AccountFindException();\n?>\nSCRIPT;\n $this->assertEquals($sExpected, $this->oBeaut->get());\n }", "public function test_addLegacyLowstockContactTag() {\n\n }", "public function testGet_url0()\n{\n\n // Traversed conditions\n // if ($this->url !== \\null) == false (line 103)\n\n $actual = $this->simplePie_Copyright->get_url();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "function testBug_rolfhub_2007_02_07_2() \n {\n $sText = <<<SCRIPT\n<?php\necho (1.0 . \" \" . 2 . 3);\n?>\nSCRIPT;\n $this->setText($sText);\n $sExpected = <<<SCRIPT\n<?php\necho (1.0 . \" \" . 2 . 3);\n?>\nSCRIPT;\n $this->assertEquals($sExpected, $this->oBeaut->get());\n }", "public function testGetParentChanges()\n {\n }", "public function testValidateDocumentMsgValidation()\n {\n }", "public function testGetExpedicao()\n {\n }", "public function testRegonLocal6()\n{\n\n // Traversed conditions\n // for (...) == true (line 65)\n // for (...) == false (line 65)\n // for (...) == true (line 69)\n // for (...) == false (line 69)\n // if ($checksum == 10) == false (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testHasKindsSupport0()\n{\n\n $actual = $this->parserFactory->hasKindsSupport();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testGetPatrimonio()\n {\n }", "public function testGetOrderPackData()\n {\n }", "public function test__toString2()\n{\n\n // Traversed conditions\n // if ($this->handler) == false (line 79)\n\n $actual = $this->handlerStack->__toString();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testGetLowStockFiles()\n {\n }", "public function test__toString5()\n{\n\n // Traversed conditions\n // if ($this->handler) == true (line 79)\n\n $actual = $this->handlerStack->__toString();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testRegonLocal3()\n{\n\n // Traversed conditions\n // for (...) == false (line 65)\n // for (...) == true (line 69)\n // for (...) == false (line 69)\n // if ($checksum == 10) == true (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testRegonLocal4()\n{\n\n // Traversed conditions\n // for (...) == true (line 65)\n // for (...) == false (line 65)\n // for (...) == false (line 69)\n // if ($checksum == 10) == false (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testRegonLocal7()\n{\n\n // Traversed conditions\n // for (...) == true (line 65)\n // for (...) == false (line 65)\n // for (...) == true (line 69)\n // for (...) == false (line 69)\n // if ($checksum == 10) == true (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testProfilePrototypeCountQuarantines()\n {\n\n }", "public function test_addLegacyLowstockContact() {\n\n }", "public function testQuarantinePrototypeGetQuarantined()\n {\n\n }", "public function test__toString4()\n{\n\n // Traversed conditions\n // if ($this->handler) == true (line 79)\n\n $actual = $this->handlerStack->__toString();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testRegonLocal2()\n{\n\n // Traversed conditions\n // for (...) == false (line 65)\n // for (...) == true (line 69)\n // for (...) == false (line 69)\n // if ($checksum == 10) == false (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testValidate3()\n{\n\n // Traversed conditions\n // if (empty($name) && !is_numeric($name)) == false (line 373)\n // if (preg_match('/[\\\\x00-\\\\x20\\\\x22\\\\x28-\\\\x29\\\\x2c\\\\x2f\\\\x3a-\\\\x40\\\\x5c\\\\x7b\\\\x7d\\\\x7f]/', $name)) == true (line 378)\n\n $actual = $this->setCookie->validate();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testGenerateBarcodeUPCA()\n {\n }", "public function testGetDefaultKind0()\n{\n\n // Traversed conditions\n // if ($this->hasKindsSupport()) == false (line 57)\n\n $actual = $this->parserFactory->getDefaultKind();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testRender_content0()\n{\n\n $actual = $this->wP_Customize_Code_Editor_Control->render_content();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testQuarantineExistsHeadQuarantinesid()\n {\n\n }", "public function testGet_url1()\n{\n\n // Traversed conditions\n // if ($this->url !== \\null) == true (line 103)\n\n $actual = $this->simplePie_Copyright->get_url();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function test__toString1()\n{\n\n // Traversed conditions\n // if ($this->handler) == false (line 79)\n\n $actual = $this->handlerStack->__toString();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testValidateDocumentXmlXxeThreatValidation()\n {\n }", "public function testGetPossibleKinds0()\n{\n\n $actual = $this->parserFactory->getPossibleKinds();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testGetChangeParentRevisions()\n {\n }", "public function testGetDomainIssues()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testRegonLocal5()\n{\n\n // Traversed conditions\n // for (...) == true (line 65)\n // for (...) == false (line 65)\n // for (...) == false (line 69)\n // if ($checksum == 10) == true (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testPingTreeGetReferences()\n {\n }", "function testBugs() {\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[onshow;when [a]!=';';block=b]</b>\", array('a'=>';'), \"\", \"test bug #1\");\r\n\t\t// $this->assertEqualMergeFieldStrings(\"<b>[onshow;when [a]=';';block=b]</b>\", array('a'=>';'), \"<b></b>\", \"test bug #2\"); // bug\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[onshow;when '[a]'!=';';block=b]</b>\", array('a'=>';'), \"\", \"test bug #3\");\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[onshow;when '[a]'=';';block=b]</b>\", array('a'=>';'), \"<b></b>\", \"test bug #4\");\r\n\t\t\r\n\t\t// vicious: with a simple quote as value\r\n\t\t//$this->assertEqualMergeFieldStrings(\"<b>[onshow;when [a;htmlconv=esc]!='''';block=b]</b>\", array('a'=>'\\''), \"\", \"test bug #5\");\r\n\t\t//$this->assertEqualMergeFieldStrings(\"<b>[onshow;when [a;htmlconv=esc]='''';block=b]</b>\", array('a'=>'\\''), \"<b></b>\", \"test bug #6\");\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[onshow;when '[a;htmlconv=esc]'!='''';block=b]</b>\", array('a'=>'\\''), \"\", \"test bug #7\");\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[onshow;when '[a;htmlconv=esc]'='''';block=b]</b>\", array('a'=>'\\''), \"<b></b>\", \"test bug #8\");\r\n\t\t\r\n\t\t// vicious: with an ']' as value\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[onshow;when '[a]'!=']';block=b]</b>\", array('a'=>']'), \"\", \"test bug #11\");\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[onshow;when '[a]'=']';block=b]</b>\", array('a'=>']'), \"<b></b>\", \"test bug #12\");\r\n\t}", "public function testRegonLocal1()\n{\n\n // Traversed conditions\n // for (...) == false (line 65)\n // for (...) == false (line 69)\n // if ($checksum == 10) == true (line 73)\n\n $actual = $this->company->regonLocal();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testForgetPushed2()\n{\n\n // Traversed conditions\n // if (\\Illuminate\\Support\\Str::endsWith($key, '_pushed')) == true (line 535)\n\n $actual = $this->dispatcher->forgetPushed();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "function test0()\n {\n $this->assertTrue(true);\n }", "public function testReferenceTooShortNotInteger()\n {\n ProtocolHelper::calculateReference('');\n }", "public function testGet_attribution1()\n{\n\n // Traversed conditions\n // if ($this->label !== \\null) == true (line 120)\n\n $actual = $this->simplePie_Copyright->get_attribution();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "public function testGetRevision()\n {\n }", "public function test_getLegacyLowstockContactTags() {\n\n }" ]
[ "0.6320209", "0.6147688", "0.6138536", "0.5983101", "0.59670955", "0.59246254", "0.5922855", "0.5902898", "0.5865248", "0.5864416", "0.5864416", "0.5822002", "0.5811491", "0.5806199", "0.57453465", "0.57328105", "0.57249814", "0.5711694", "0.5689587", "0.56759876", "0.56593096", "0.5658297", "0.5644818", "0.564082", "0.5632151", "0.5632151", "0.56262237", "0.5623832", "0.5619198", "0.56035197", "0.5602536", "0.56013435", "0.56011724", "0.56011724", "0.5596731", "0.559505", "0.5591263", "0.5588956", "0.5586214", "0.5574654", "0.5573622", "0.55733186", "0.557308", "0.5570246", "0.55696636", "0.55558574", "0.55525315", "0.5552218", "0.55516243", "0.5551388", "0.5549458", "0.554944", "0.5546759", "0.5543474", "0.5542407", "0.5538847", "0.55384827", "0.5538117", "0.5536382", "0.5536176", "0.55318576", "0.55306333", "0.5526957", "0.5524718", "0.5514402", "0.5513786", "0.55096614", "0.55025655", "0.5502131", "0.5498284", "0.54960483", "0.5494878", "0.54928994", "0.54928327", "0.54926586", "0.5489357", "0.5489075", "0.54854804", "0.5485161", "0.5472529", "0.54679096", "0.5467536", "0.5465822", "0.5464421", "0.546386", "0.5463147", "0.54605883", "0.54598796", "0.54542434", "0.54534096", "0.5451766", "0.5451763", "0.54512864", "0.5448901", "0.5447287", "0.544654", "0.5443865", "0.54437727", "0.5443617", "0.5432395", "0.54263425" ]
0.0
-1
return parent::getPontecia(); // Utilizar Alt + Insert (ATALHO)
public function getPotencia() { return 2.0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function AggiornaPrezzi(){\n\t}", "public function inserir()\n {\n }", "public function savePoblacion(){\n \n $data_insert = [\n 'poblacion' =>$this->_poblacion,\n'provincia' =>$this->_provincia,\n'ccaa' =>$this->_ccaa,\n'cod_provincia' =>$this->_cod_provincia,\n'cod_ccaa' =>$this->_cod_ccaa,\n \n ];\n return parent::save($data_insert);\n \n }", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "protected function _insert()\n\t{\n\t}", "public function insertar($pidnomeav, $pnombre, $ptipo, $plongitud, $pnombre_mostrar, $pregex, $visible, $tipocampo, $descripcion)\r\n {\r\n\r\n $this->Instancia();\r\n\r\n //-- verificar que no se repita el campo en la tabla\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n\r\n $result = $query->from('NomCampoestruc ')\r\n ->where(\"idnomeav='$pidnomeav' AND nombre='$pnombre'\")\r\n ->execute()->count();\r\n if ($result > 0)\r\n return false;\r\n\r\n //-- buscar el id del proximo campo\r\n $idCampoNuevo = $this->buscaridproximo();\r\n\r\n //-- insertar los valores\r\n $this->instance->idcampo = $idCampoNuevo;\r\n $this->instance->idnomeav = $pidnomeav;\r\n $this->instance->nombre = $pnombre;\r\n $this->instance->tipo = $ptipo;\r\n $this->instance->longitud = $plongitud;\r\n $this->instance->nombre_mostrar = $pnombre_mostrar;\r\n $this->instance->regex = $pregex;\r\n $this->instance->visible = $visible;\r\n $this->instance->tipocampo = $tipocampo;\r\n $this->instance->descripcion = $descripcion;\r\n\r\n try {\r\n $this->instance->save();\r\n return $idCampoNuevo;\r\n } catch (Doctrine_Exception $ee) {\r\n if (DEBUG_ERP)\r\n echo(__FILE__ . ' ' . __LINE__ . ' ' . $ee->getMessage());\r\n return false;\r\n }\r\n }", "public function get_id_poblacion(){ \n return (isset($this->_id_poblacion)) ? $this->_id_poblacion: null;\n}", "public function getInsert(): string;", "public function insert()\n {\n \n }", "public function nom_alien()\r\n{\r\n return $this->_nom_alien;\r\n}", "public function getPlaca(){ return $this->placa;}", "public function contrato()\r\n\t{\r\n\t}", "function insert()\n\t{\n\t\t$this->edit(true);\n\t}", "public function insert()\n {\n # code...\n }", "function create(){\n //\n //create the insert \n $insert = new insert($this);\n //\n //Execute the the insert\n $insert->query($this->entity->get_parent());\n }", "public function insert()\n {\n }", "public function insert()\n {\n }", "public function insert() {\n \n }", "public function accueil()\n {\n }", "public function insert(){\n\n }", "public function insertPreDetalle(){\n $sql='INSERT INTO predetalle (idCliente, idProducto, cantidad) VALUES (?, ?, ?)';\n $params=array($this->cliente, $this->id, $this->cantidad);\n return Database::executeRow($sql, $params);\n }", "public static function Insert(){\r\n }", "public function insertCattarea()\r\n {\r\n $atributos=array( $this->correlativo , $this->nombre , $this->descripcion , $this->estados , $this->idcatcargo );\r\n //descomentarear la línea siguiente y comentarear la anterior si la llave primaria no es autoincremental\r\n //$atributos=array( $this->idcattarea , $this->correlativo , $this->nombre , $this->descripcion , $this->estados , $this->idcatcargo );\r\n\r\n return $this->conexionCattarea->insertarRegistro($atributos);\r\n }", "protected function saveInsert()\n {\n }", "public function insert($aluno) {\n\t}", "function ajoue_proprietaire($nom,$CA,$debut_contrat,$fin_contrat)\r\n{ $BDD=ouverture_BDD_Intranet_Admin();\r\n\r\n if(exist($BDD,\"proprietaire\",\"nom\",$nom)){echo \"nom deja pris\";return;}\r\n\r\n $SQL=\"INSERT INTO `proprietaire` (`ID`, `nom`, `CA`, `debut_contrat`, `fin_contrat`) VALUES (NULL, '\".$nom.\"', '\".$CA.\"', '\".$debut_contrat.\"', '\".$fin_contrat.\"')\";\r\n\r\n $result = $BDD->query ($SQL);\r\n\r\n if (!$result)\r\n {echo \"<br>SQL : \".$SQL.\"<br>\";\r\n die('<br>Requête invalide ajoue_equipe : ' . mysql_error());}\r\n}", "function insertarRelacionProceso(){\n\n $this->objFunc=$this->create('MODObligacionPago');\n if($this->objParam->insertar('id_relacion_proceso_pago')){\n $this->res=$this->objFunc->insertarRelacionProceso($this->objParam);\n } else{\n $this->res=$this->objFunc->modificarRelacionProceso($this->objParam);\n }\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "function insertarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_ime';\n\t\t$this->transaccion='GEM_GEMETO_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function baseCjenovnik()\n\t{\n\t\t\n\t\t$p = array();\n\t\t$this->red = Cjenovnik::model()->findAll(\"id>0\");\n $this->red1 = TekstCjenovnik::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]));\n\t/*\t$this->period_od = $konj->period_od;\n\t\t$this->period_do = $row->period_do;\n\t\t$this->tip = $row->tip;\n\t\t$this->cjena_km = $row->cjena_km;\n\t\t$this->cjena_eur = $row->cjena_eur;*/\n\t}", "protected function _postInsert()\n\t{\n\t}", "abstract public function getPasiekimai();", "public static function insert()\n {\n }", "function sevenconcepts_pre_insertion($flux){\n if ($flux['args']['table']=='spip_auteurs'){\n include_spip('cextras_pipelines');\n $champs_extras=champs_extras_objet(table_objet_sql('auteur'));\n foreach($champs_extras as $value){\n $flux['data'][$value['options']['nom']]=_request($value['options']['nom']); \n }\n $flux['data']['name']=_request('nom_inscription'); \n }\nreturn $flux;\n}", "public function mostrar_insertar() {\r\n\t\t\t$this -> pantalla_edicion('insertar'); \r\n\t\t }", "function ADD()\n{\n\t//var_dump($this);\n\t//exit();\n if (($this->idpareja <> '')){ // si el atributo clave de la entidad no esta vacio\n\t\t\n\t\t// construimos el sql para buscar esa clave en la tabla\n $sql = \"SELECT * FROM PAREJA WHERE (idpareja = '$this->idpareja')\";\n\n\t\tif (!$result = $this->mysqli->query($sql)){ // si da error la ejecución de la query\n\t\t\treturn 'No se ha podido conectar con la base de datos'; // error en la consulta (no se ha podido conectar con la bd). Devolvemos un mensaje que el controlador manejara\n\t\t}\n\t\telse { // si la ejecución de la query no da error\n\t\t\tif ($result->num_rows == 0){ // miramos si el resultado de la consulta es vacio (no existe el login)\n\t\t\t\t//construimos la sentencia sql de inserción en la bd\n\t\t\t\t$sql = \"INSERT INTO `PAREJA`(`idpareja`, `login1`, `login2`) \n\t\t\t\tVALUES ('$this->idpareja',\n\t\t\t\t\t\t'$this->login1',\n\t\t\t\t\t\t'$this->login2')\";\n\t\t\t\tif (!$this->mysqli->query($sql)) { // si da error en la ejecución del insert devolvemos mensaje\n\t\t\t\t\treturn 'Error en la inserción de la pareja';\n\t\t\t\t}\n\t\t\t\telse{ //si no da error en la insercion devolvemos mensaje de exito\n\t\t\t\t\treturn 'Inserción realizada con éxito'; //operacion de insertado correcta\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse // si ya existe ese valor de clave en la tabla devolvemos el mensaje correspondiente\n\t\t\t\treturn 'Ya existe en la base de datos'; // ya existe\n\t\t}\n }\n else{ // si el atributo clave de la bd es vacio solicitamos un valor en un mensaje\n return 'Introduzca un valor'; // introduzca un valor para el usuario\n\t}\n}", "function ambas()\n {\n print \"Ejecución de la función ambas<br>\";\n # mediante $this-> requerimos la ejecución de metodo prueba\n # de la clase actual\n $this->prueba();\n # al señalar parent:: requerimos la ejecución de metodo prueba\n # de la clase padre\n parent::prueba();\n }", "function insert(){\n\t\t\t$result = $this->consult();\n\t\t\tif(count($result) > 0){\n\t\t\t\t$this->form_data[\"id_paciente\"] = $result[0]->id_paciente;\n\t\t\t\t$this->id_paciente = $result[0]->id_paciente;\n\t\t\t\treturn $this->update();\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\t$this->db->trans_start();\n\t\t\t\t$this->db->insert('paciente', $this->form_data);\n\t\t\t\t$this->db->trans_complete();\n\t\t\t\treturn array(\"message\"=>\"ok\");\n\t\t\t} catch (Exception $e){\n\t\t\t\treturn array(\"message\"=>\"error\");\n\t\t\t}\n\t\t}", "protected function afterInserting()\n {\n }", "public function insert()\n {\n $sql = \"INSERT INTO \" . self::TABLE_NAME . \"(id,\n pro_name,\n pro_slug,\n pro_content,\n pro_size,\n pro_size_info,\n pro_price,\n pro_quantity,\n pro_seo_title,\n pro_seo_description,\n pro_status,\n pro_add_date,\n pro_update_date,\n user_id,\n brand_id\n )\n VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n $stmt = $this->prepare($sql);\n $stmt->bind_param(\"ssssisiississii\",\n $this->getId(),\n $this->getProName(),\n $this->getProSlug(),\n $this->getProContent(),\n $this->getProSize(),\n $this->getProSizeInfo(),\n $this->getProPrice(),\n $this->getProQuantity(),\n $this->getProSeoTitle(),\n $this->getProSeoDescription(),\n $this->getProStatus(),\n $this->getProAddDate(),\n $this->getProUpdateDate(),\n $this->getUserId(),\n $this->getBrandId()\n );\n $result = $stmt->execute();\n $stmt->close();\n return $result;\n }", "function insertarPresupuesto(){\n\t\t$this->procedimiento='pre.ft_presupuesto_ime';\n\t\t$this->transaccion='PRE_PRE_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('descripcion','descripcion','varchar');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('gestion','gestion','int4');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "protected function doInsert() {\n return '';\n }", "public abstract function Insert();", "function aggiungiCatastoTerreni($pratica,$ct){\n $dbh=new PDO(DSN);\n $schema=\"pe\";\n $params = Array(\"foglio\",\"mappale\");\n foreach($params as $key){\n $data[$key]=($ct[$key])?($ct[$key]):(null);\n }\n $data[\"pratica\"]=$pratica;\n utils::debug(utils::debugDir.\"aggiungiTerreni.debug\", $ct);\n $result=Array();\n $sql=\"INSERT INTO $schema.cterreni(pratica,foglio,mappale) VALUES(:pratica,:foglio,:mappale);\";\n $stmt=$dbh->prepare($sql);\n \n if (!$stmt->execute($data)){\n $errors=$stmt->errorInfo();\n utils::debug(utils::debugDir.\"error-aggiungiTerreni.debug\", $errors);\n }\n else{\n $idpartic=$dbh->lastInsertId(\"pe.cterreni_id_seq\");\n }\n \n if ($errors){\n //$dbh->rollBack();\n $result=Array(\"success\"=>\"-1\",\"message\"=>$errors[2]);\n }\n else{\n $result = Array(\"success\"=>1,\"message\"=>\"OK\",\"idpartic\"=>$idpartic);\n }\n return $result;\n}", "public function inserir() {\n $query = '\n insert into tb_atividade(\n id_evento, nome, qntd_part, inscricao, valor, tipo, carga_hr, data_inicio, data_fim\n ) values ( \n :id_evento, \n :nome, \n :qntd_part, \n :inscricao, \n :valor, \n :tipo, \n :carga_hr, \n :data_inicio, \n :data_fim\n )';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id_evento', $this->atividade->__get('id_evento'));\n $stmt->bindValue(':nome', $this->atividade->__get('nome'));\n $stmt->bindValue(':qntd_part', $this->atividade->__get('qntd_part'));\n $stmt->bindValue(':inscricao', $this->atividade->__get('inscricao'));\n $stmt->bindValue(':valor', $this->atividade->__get('valor'));\n $stmt->bindValue(':tipo', $this->atividade->__get('tipo'));\n $stmt->bindValue(':carga_hr', $this->atividade->__get('carga_hr'));\n $stmt->bindValue(':data_inicio', $this->atividade->__get('data_inicio'));\n $stmt->bindValue(':data_fim', $this->atividade->__get('data_fim'));\n\n return $stmt->execute();\n }", "public function insertTipobeca() {\n $atributos = array($this->nOMBRE, $this->vALOR);\n //descomentarear la línea siguiente y comentarear la anterior si la llave primaria no es autoincremental\n //$atributos=array( $this->cODIGO , $this->nOMBRE , $this->vALOR );\n\n return $this->conexionTipobeca->insertarRegistro($atributos);\n }", "public function get_superficie(){ return $this->_superficie;}", "function insertarObligacionCompleta()\n {\n $this->objFunc = $this->create('MODObligacionPago');\n if ($this->objParam->insertar('id_obligacion_pago')) {\n $this->res = $this->objFunc->insertarObligacionCompleta($this->objParam);\n } else {\n //TODO .. trabajar en la edicion\n }\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function insert() {\r\n // Rôle : insérer l'objet courant dans la base de données\r\n // Retour : true / false\r\n // Paramètre : aucun\r\n \r\n // Vérification de l'id\r\n if (!empty($this->getId())) {\r\n debug(get_class($this).\"->insert() : l'objet courant a déjà un id\");\r\n return false;\r\n }\r\n \r\n // Construction de la requête\r\n $sql = \"INSERT INTO `\".$this->getTable().\"` SET \";\r\n $param = [];\r\n $start = true;\r\n \r\n foreach ($this->getChamps() as $nom => $champs) {\r\n if ($nom === $this->getPrimaryKey() or !$champs->getAttribut(\"inBdd\")) {\r\n continue;\r\n }\r\n if ($start) {\r\n $sql .= \"`$nom` = :$nom\";\r\n $start = false;\r\n } else {\r\n $sql .= \", `$nom` = :$nom\";\r\n }\r\n \r\n $param[\":$nom\"] = $champs->getValue();\r\n }\r\n \r\n $sql .= \";\";\r\n \r\n // Préparation de la requête\r\n $req = self::getBdd()->prepare($sql);\r\n \r\n // Exécution de la requête\r\n if (!$req->execute($param)) {\r\n debug(get_class($this).\"->insert() : échec de la requête $sql\");\r\n return false;\r\n }\r\n \r\n // Assignation de l'id\r\n if ($req->rowCount() === 1) {\r\n $this->set($this->getPrimaryKey(), self::getBdd()->lastInsertId());\r\n return true;\r\n } else {\r\n debug(get_class($this).\"->insert() : aucune entrée, ou bien plus d'une entrée, créée\");\r\n return false;\r\n }\r\n }", "public function after_insert() {}", "public function baseSlajderi()\n {\n \n $this->linija = Slajderi::model()->findAllByAttributes(array('jezik'=>Yii::app()->session[\"lang\"]),array('order'=>'id'));\n $this->nalovSlajderi = $this->linija[0] -> naslov;\n \n \n }", "public function cadastrar()\n{\n //DEFINIR A DATA\n $this->data = date('Y-m-d H:i:s');\n\n //INSERIR A VAGA NO BANCO\n $obDatabase = new Database('vagas');\n $obDatabase->insert([\n 'titulo' => $this->titulo,\n 'descricao' => $this->descricao,\n 'ativo' => $this->ativo,\n 'data' => $this->data\n ]);\n //echo \"<pre>\"; print_r($obDatabase); echo \"</pre>\"; exit;\n\n\n //ATRIBUIR O ID DA VAGA NA INSTANCIA\n\n //RETORNAR SUCESSO\n}", "function Forms_arbre_inserer_donnee($id_form,$id_parent,$position=\"fils_cadet\",$c=NULL){\n\tif (!$id_parent>0){\n\t\tif ($res = spip_query(\"SELECT id_donnee FROM spip_forms_donnees WHERE id_form=\"._q($id_form).\" AND statut!='poubelle' LIMIT 0,1\")\n\t\t AND spip_num_rows($res)==0){\n\t\t // pas d'elements existants, c'est la racine, on l'insere toujours\n\t\t\tif ($position=='fils_aine' OR $position=='fils_cadet'){\n\t\t\t\tspip_log(\"Insertion impossible dans un arbre pour un fils sans pere dans table $id_form\");\n\t\t\t\treturn array(0,_L(\"Insertion impossible dans un arbre pour un fils sans pere dans table $id_form\"));\n\t\t\t}\n\t\t\t// premiere insertion\n\t\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>0,'bgch'=>1,'bdte'=>2));\n\t\t}\n\t\telse {\n\t\t\t// Insertion d'un collateral : il faut preciser le 'parent' !\n\t\t\tspip_log(\"Insertion impossible dans un arbre pour un collatéral sans precision du parent dans table $id_form\");\n\t\t\treturn array(0,_L(\"Insertion impossible dans un arbre pour un collatéral sans precision du parent dans table $id_form\"));\n\t\t}\n\t}\n\t// Le parent existe toujours ?\n\t$res = spip_query(\"SELECT * FROM spip_forms_donnees WHERE id_form=\"._q($id_form).\" AND id_donnee=\"._q($id_parent).\" AND statut!='poubelle'\");\n\tif (!($rowp = spip_fetch_array($res))){\n\t\tspip_log(\"Insertion impossible, le parent $id_parent n'existe plus dans table $id_form\");\n\t\treturn array(0,_L(\"Insertion impossible, le parent $id_parent n'existe plus dans table $id_form\"));\n\t}\n\t\n\t// insertion d'un pere\n\tif ($position == 'pere'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>\"._q($rowp['bdte']).\" AND bgch<=\"._q($rowp['bdte']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+2,bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bgch>\"._q($rowp['bdte']))\n\t\t\t// Decalalage ensemble vise vers le bas\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+1,bdte=bdte+1,niveau=niveau+1 WHERE id_form=\"._q($id_form).\" AND bgch>=\"._q($rowp['bgch']).\" AND bdte<=\"._q($rowp['bdte']))\n\t\t)\n\t\t\t// Insertion du nouveau pere\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau'],'bgch'=>$rowp['bgch'],'bdte'=>$rowp['bdte']+2));\n\t}\n\t// Insertion d'un grand frere\n\telseif ($position == 'grand_frere'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>\"._q($rowp['bgch']).\" AND bgch<\"._q($rowp['bgch']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET id_form=\"._q($id_form).\" AND bgch=bgch+2,bdte=bdte+2 WHERE bgch>=\"._q($rowp['bgch']))\n\t\t )\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau'],'bgch'=>$rowp['bgch'],'bdte'=>$rowp['bgch']+1));\n\t}\n\t// Insertion d'un petit frere\n\telseif ($position == 'petit_frere'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>\"._q($rowp['bdte']).\" AND bgch<\"._q($rowp['bdte']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+2,bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bgch>=\"._q($rowp['bdte']))\n\t\t )\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau'],'bgch'=>$rowp['bdte']+1,'bdte'=>$rowp['bdte']+2));\n\t}\n\t// Insertion d'un fils aine\n\telseif ($position == 'fils_aine'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>\"._q($rowp['bgch']).\" AND bgch<=\"._q($rowp['bgch']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+2,bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bgch>\"._q($rowp['bgch']))\n\t\t )\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau']+1,'bgch'=>$rowp['bgch']+1,'bdte'=>$rowp['bgch']+2));\n\t}\n\t// Insertion d'un fils aine\n\telseif ($position == 'fils_cadet'){\n\t\tif (\n\t\t // Decalage de l'ensemble colateral droit\n\t\t spip_query(\"UPDATE spip_forms_donnees SET bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bdte>=\"._q($rowp['bdte']).\" AND bgch<=\"._q($rowp['bdte']))\n\t\t AND spip_query(\"UPDATE spip_forms_donnees SET bgch=bgch+2,bdte=bdte+2 WHERE id_form=\"._q($id_form).\" AND bgch>\"._q($rowp['bdte']))\n\t\t )\n\t\t\treturn Forms_creer_donnee($id_form,$c,array('niveau'=>$rowp['niveau']+1,'bgch'=>$rowp['bdte'],'bdte'=>$rowp['bdte']+1));\n\t}\n\tspip_log(\"Operation inconnue insertion en position $position dans table $id_form\");\n\treturn array(0,_L(\"Operation inconnue insertion en position $position dans table $id_form\"));\n}", "public function alimentar()\n {\n }", "public function tratarDados(){\r\n\t\r\n\t\r\n }", "function Nuevo()\n{\n /**\n * Crear instancia de concesion\n */\n $Titlulo = new Titulo();\n /**\n * Colocar los datos del GET por medio de los metodos SET\n */\n $Titlulo->setId_titulo(filter_input(INPUT_GET, \"id_titulo\"));\n $Titlulo->setUso_id(filter_input(INPUT_GET, \"uso_id\"));\n $Titlulo->setTitular(filter_input(INPUT_GET, \"titular\"));\n $Titlulo->setVol_amparado_total(filter_input(INPUT_GET, \"vol_amparado_total\"));\n $Titlulo->setNum_aprov_superf(filter_input(INPUT_GET, \"num_aprov_superf\"));\n $Titlulo->setVol_aprov_superf(filter_input(INPUT_GET, \"vol_aprov_superf\"));\n $Titlulo->setNum_aprov_subt(filter_input(INPUT_GET, \"num_aprov_subt\"));\n $Titlulo->setVol_aprov_subt(filter_input(INPUT_GET, \"vol_aprov_subt\"));\n $Titlulo->setPuntos_desc(filter_input(INPUT_GET, \"puntos_desc\"));\n $Titlulo->setVol_desc_diario(filter_input(INPUT_GET, \"vol_desc_diario\"));\n $Titlulo->setZonas_fed_amp_titulo(filter_input(INPUT_GET, \"zonas_fed_amp_titulo\"));\n $Titlulo->setSupeficie(filter_input(INPUT_GET, \"supeficie\"));\n $Titlulo->setFecha_reg(filter_input(INPUT_GET, \"fecha_reg\"));\n if ($Titlulo->Insert() != null) {\n echo 'OK';\n } else {\n echo 'Ya se encuentra en la Base de Datos';\n }\n}", "public function getNom()\n{\nreturn $this->Nom;\n}", "function evt__agregar()\n\t{\n\t\t$this->set_pantalla('pant_edicion');\n\t}", "function modificaRuta()\r\n\t{\r\n\t\t$query = \"UPDATE \" . self::TABLA . \" SET Ruta='\".$this->Ruta.\"'\tWHERE IDRuta = \".$this->IdRuta.\";\";\r\n\t\treturn parent::modificaRegistro( $query);\r\n\t}", "function evt__Agregar()\n\t{\n\t\t$this->tabla()->resetear();\n\t\t$this->set_pantalla('pant_edicion');\n\t}", "abstract public function insert();", "function aggiungiCatastoUrbano($pratica,$ct){\n $dbh=new PDO(DSN);\n $schema=\"pe\";\n $params = Array(\"foglio\",\"mappale\",\"sub\");\n foreach($params as $key){\n $data[$key]=($ct[$key])?($ct[$key]):(null);\n }\n $data[\"pratica\"]=$pratica;\n utils::debug(utils::debugDir.\"aggiungiTerreni.debug\", $data);\n $result=Array();\n $sql=\"INSERT INTO $schema.curbano(pratica,foglio,mappale,sub) VALUES(:pratica,:foglio,:mappale,:sub);\";\n $stmt=$dbh->prepare($sql);\n \n if (!$stmt->execute($data)){\n $errors=$stmt->errorInfo();\n utils::debug(utils::debugDir.\"error-aggiungiUrbano.debug\", $errors);\n }\n else{\n $idpartic=$dbh->lastInsertId(\"pe.curbano_id_seq\");\n }\n \n if ($errors){\n //$dbh->rollBack();\n $result=Array(\"success\"=>\"-1\",\"message\"=>$errors[2]);\n }\n else{\n $result = Array(\"success\"=>1,\"message\"=>\"OK\",\"idpartic\"=>$idpartic);\n }\n return $result;\n}", "function renderInsert(){\n\t\t$new =[];\n\t\t$pengguna = new ModelPengguna($this->db);\n\t\t$produk = new ModelProduk($this->db);\n\n\t\t$allProduk = $produk->all();\n\t\t$newId = $produk->getMaxIdProduk()[0]['maximum']+1;\n\t\tarray_push($new,$newId);\n\t\t$this->f3->set('sp',$allProduk);\t\n\t\t$ID= $this->f3->get('SESSION.user');\t\n\t\t$pgn = $pengguna->getByID($ID);\n\t\t$role = $this->f3->get('SESSION.role');\n\n\t\t$this->f3->set('pgn',$pengguna);\n\t\t$this->f3->set('newId',$new);\n\t\tif($role==1){\n\t\t\t$template = new Template;\n\t\t\techo $template->render('InsertPage.htm');\n\t\t}\n\t\telse{\n\t\t\t$this->f3->reroute('/pengguna');\n\t\t}\n\t}", "public abstract function insert();", "public function agregar_componente($insert){\n \n $query = $this->db->insert(\"componentes\",$insert);\n \treturn $query; \n }", "function query_tb($new_insert) {\r\n\t\t$pk_serv_val = parent::query_tb ( $new_insert );\r\n\t\tglobal $in;\r\n\t\t$in = $this->session_vars;\r\n\r\n\t\t//G.Tufano 22/07/2010\r\n\t\t//aggiungo questo per poter leggere il valore della sequence\r\n\t\treturn $pk_serv_val;\r\n\t\t\r\n\t}", "function insertarProcesoCompra(){\n\t\t$this->procedimiento='adq.f_proceso_compra_ime';\n\t\t$this->transaccion='ADQ_PROC_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_depto','id_depto','int4');\n\t\t$this->setParametro('num_convocatoria','num_convocatoria','varchar');\n\t\t$this->setParametro('id_solicitud','id_solicitud','int4');\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\n\t\t$this->setParametro('fecha_ini_proc','fecha_ini_proc','date');\n\t\t$this->setParametro('obs_proceso','obs_proceso','varchar');\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\t\t$this->setParametro('num_tramite','num_tramite','varchar');\n\t\t$this->setParametro('codigo_proceso','codigo_proceso','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('num_cotizacion','num_cotizacion','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function getId_Entree()\n{\nreturn $this->Id_Entree;\n}", "function ajouterCommande($idUser,$idAdmin,$montantCommande){\n require(\"./modele/connexionBD.php\");\n $sql_ajt = \"INSERT INTO `commande`(`EtatCommande`, `MontantCommande`, `DateCommande`,`idAdmin`, `idUtilisateur`) \n VALUES ('En cours',:montant,now(),:idAdmin,:idUser);\";\n try {\n $statement = $pdo->prepare($sql_ajt);\n $statement->bindParam(':montant', $montantCommande);\n $statement->bindParam(':idUser', $idUser);\n $statement->bindParam(':idAdmin',$idAdmin);\n $statement->setFetchMode(PDO::FETCH_ASSOC);\n $statement->execute();\n $commandeUser=commandeUserLast($idUser);\n return $commandeUser;\n } catch (PDOException $e) {\n echo utf8_encode(\"Echec de select : \" . $e->getMessage() . \"\\n\");\n die();\n }\n}", "function adicionar($codigo,$descricao,$papeis,$dbhw){\n\tglobal $esquemaadmin;\n\ttry{\n\t\t$dataCol = array(\n\t\t\t\"descricao\" => ''\n\t\t);\n\t\t$id_operacao = i3GeoAdminInsertUnico($dbhw,\"i3geousr_operacoes\",$dataCol,\"descricao\",\"id_operacao\");\n\t\t$retorna = alterar($id_operacao,$codigo,$descricao,$papeis,$dbhw);\n\t\treturn $retorna;\n\t}\n\tcatch (PDOException $e){\n\t\treturn false;\n\t}\n}", "function tInserting($table,$field,$parentTable){\r\n $Xs = superGet('*',$table,\"Lang_ID = 1\");\r\n foreach ($Xs as $x) {\r\n echo '<li><a href=\"'.$_SERVER['PHP_SELF'].'?sRid='.$x['ID'].'&sTable='.$table.'&sField='.$field.'&sText='.$x[$field].'&sParentTable='.$parentTable.'&sParentID='.$x[$parentTable].'\">'.$x[$field].'</a></li>';\r\n } \r\n }", "public function createTrancheOld()\n {\n $uniqueId = str_replace(\".\",\"\",microtime(true)).rand(000,999);\n\n if($this->type == 1){\n\n TranchesPoidsPc::create([\n 'nom' => $this->minPoids.\" - \".$this->maxPoids,\n 'min_poids' => $this->minPoids,\n 'max_poids' => $this->maxPoids,\n 'uid' => \"PP\".$uniqueId,\n ]);\n\n\n\n }else{\n TranchesKgPc::create([\n 'nom' => $this->nom,\n 'uid' => \"KP\".$uniqueId,\n ]);\n\n }\n session()->flash('message', 'Tranche \"'.$this->nom. '\" a été crée ');\n\n\n\n $this->reset(['nom','minPoids','maxPoids']);\n\n $this->emit('saved');\n }", "protected function afterInsert()\n {\n }", "public function insert()\n {\n $db = new Database();\n $db->insert(\n \"INSERT INTO position (poste) VALUES ( ? )\",\n [$this->poste]\n );\n }", "public function Do_insert_Example1(){\n\n\t}", "public function addtrajet(Trajet $trajet)\r\n{\r\n\t try\r\n {\r\n $stmt = $this->_db->prepare(\"INSERT INTO Trajet(Type,Num_Ville1,Num_Ville2,Date_aller,Date_retour,Heure_aller,Heure_retour,Prix,Nombre_place,ID_conducteur,Description) \r\n VALUES(:type, :num_ville1, :num_ville2, :date_aller, :date_retour, :heure_aller, :heure_retour, :prix, :nombre_place,:id_conducteur,:description)\");\r\n\t\t $stmt->bindValue(\":type\", $trajet->type());\r\n\t\t $stmt->bindValue(\":num_ville1\", $trajet->num_ville1());\r\n $stmt->bindValue(\":num_ville2\", $trajet->num_ville2());\r\n $stmt->bindValue(\":date_aller\",$trajet->date_aller()); \r\n\t\t $stmt->bindValue(\":date_retour\",$trajet->date_retour());\r\n $stmt->bindValue(\":heure_aller\", $trajet->heure_aller());\r\n $stmt->bindValue(\":heure_retour\",$trajet->heure_retour());\r\n\t\t $stmt->bindValue(\":prix\",$trajet->prix());\r\n\t\t $stmt->bindValue(\":nombre_place\",$trajet->nombre_place());\r\n\t\t $stmt->bindValue(\":id_conducteur\",$trajet->id_conducteur()); \r\n\t\t $stmt->bindValue(\":description\",$trajet->description()); \r\n $stmt->execute(); \r\n\t\t $trajet->hydrate(array('num_trajet' => $this->_db->lastInsertId()));\r\n \r\n return true; \r\n }\r\n catch(PDOException $e)\r\n {\r\n echo $e->getMessage();\r\n } \r\n }", "protected function editar()\n {\n }", "public function editar()\n {\n }", "public function insert( $objet);", "public function Insert(){\n //Instancia conexao com o PDO\n $pdo = Conecta::getPdo();\n //Cria o sql passa os parametros e etc\n $sql = \"INSERT INTO $this->table (idcidade, cidade) VALUES (?, ?)\";\n $consulta = $pdo->prepare($sql);\n $consulta ->bindValue(1, $this->getIdCidade());\n $consulta ->bindValue(2, $this->getCidade());\n $consulta ->execute();\n $last = $pdo->lastInsertId();\n }", "protected function beforeInserting()\n {\n }", "function insert() {\n\t\t$insert = \"INSERT INTO servicios(nombre_servicio, estado_servicio, descripcion, trabajador_id, fecha_creacion,fecha_modificacion , cliente_id, sucursal_id) VALUES(\n\t\t\t\t\n\t\t\t\t'\".$this->nombre_servicio.\"',\n\t\t\t\t'\".$this->estado_servicio.\"',\n\t\t\t\t'\".$this->descripcion.\"',\n\t\t\t\t'\".$this->trabajador_id.\"',\n\t\t\t\t'\".$this->fecha_creacion.\"',\n\t\t\t\t'\".$this->fecha_modificacion.\"',\n\t\t\t\t'\".$this->cliente_id.\"',\n\t\t\t\t'\".$this->sucursal_id.\"');\";\n\t\t\n\t\treturn $insert;\n\t\n\t}", "function ProcesarPeticion($peticion){\n\t\t\n\t\t$vista= $this->getVista();\t\t\n\t\t$vista->plantillaContenido='contenido/'.$peticion->accion;\t\n\t\t\n\t\t//return $vista->mostrar($layout = 'inicio');\t\t\n\t\treturn $vista->mostrar($layout = 'crud');\t\t\n\t}", "function ProcesarPeticion($peticion){\n\t\t\n\t\t$vista= $this->getVista();\t\t\n\t\t$vista->plantillaContenido='contenido/'.$peticion->accion;\t\n\t\t\n\t\t//return $vista->mostrar($layout = 'inicio');\t\t\n\t\treturn $vista->mostrar($layout = 'crud');\t\t\n\t}", "function ZonaInsert($Nombre, $IdZonaPadre) {\r\n\tglobal $Cfg;\r\n\r\n\t$sql = \"insert $Cfg[SqlPrefix]zonas set\r\n\t\tNombre = '$Nombre',\r\n\t\tIdZonaPadre = $IdZonaPadre\";\r\n\r\n\tDbExecuteUpdate($sql);\r\n\r\n\treturn DbLastId();\r\n}", "public function id_fiche(){ return $this->id_fiche; }", "public function setPrix($prix)\n{\n$this->prix = $prix;\n\nreturn $this;\n}", "function inserisci_citta($nome_citta=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$nome_citta= sistemaTesto($nome_citta);\n\t$q=\"INSERT INTO citta (id_citta, nome) VALUES (null,'$nome_citta')\";\n\t$r=$db->queryInsert($q);\n\t$id_citta=mysql_insert_id();\n\treturn $id_citta;\n}", "function ADD()\n{\n\t//comprobamos que no exista en la base de datos un centro con el código que queremos añadir\n\t//si se cumple la condicion\n\tif ($this->Comprobar_atributos() === true){\n\t\t$sql = \"select * from CENTRO where CODCENTRO = '$this->CODCENTRO'\";\n\t\t//si hay un error en la consulta devuelve un mensaje de error\n\t\t//si se cumple la condicion\n\t\tif (!$result = $this->mysqli->query($sql))\n\t\t{// existe el centro devuelve mensaje de que ya existe\n\t\t\treturn 'Error de gestor de base de datos';\n\t\t}\n\n\t\t//si se cumple la condicion\n\t\tif ($result->num_rows == 1){ // existe el centro devuelve mensaje de que ya existe\n\t\t\t\treturn 'Inserción fallida: el elemento ya existe';//devuelve el mensaje\n\t\t\t}\n\n\t\t$sql = \"INSERT INTO CENTRO (\t\t \t\t\t\n\t\t\t\t\t\tCODCENTRO, \n\t\t\t\t\t\tCODEDIFICIO,\n NOMBRECENTRO,\n DIRECCIONCENTRO,\n RESPONSABLECENTRO) \n\t\t\t\tVALUES (\n\t\t\t\t\t\t'$this->CODCENTRO',\n '$this->CODEDIFICIO',\n '$this->NOMBRECENTRO',\n '$this->DIRECCIONCENTRO',\n '$this->RESPONSABLECENTRO')\";\n//si hay algún error en la consulta muestra mensaje de error\n\t\t//si se cumple la condicion\n\t\tif (!$this->mysqli->query($sql)) {\n\t\t\treturn 'Error de gestor de base de datos';//devuelve el mensaje\n\t\t}\n\t\t//si no\n\t\telse{\n\t\t\treturn 'Inserción realizada con éxito'; //operacion de insertado correcta\n\t\t}\t\n\t}//si no\n\telse{\n\t\treturn $this->erroresdatos;//devuelve el mensaje\n\t}\n}", "public function insertHorarios()\n {\n $atributos=array( $this->nombre , $this->aula );\n //descomentarear la l�nea siguiente y comentarear la anterior si la llave primaria no es autoincremental\n //$atributos=array( $this->codigo , $this->nombre , $this->aula );\n return $this->conexionHorarios->insertarRegistro($atributos);\n }", "function dbInsert($edit)\r\n\t{\r\n\r\n\t}", "public function getNom() {\n return $this->nom;\n}", "function __construct($id=\"\") {\n //echo \"ciao\";\n \n $this->setNometabella(\"localita\");\n $this->tabella= array(\"nome\"=>\"\",\"provincia\"=>\"\",\"cap\"=>\"\",\"codice\"=>\"\",\"solodestinazione\"=>\"\");\n parent::__construct($id);\n}", "public function setId_Entree($Id_Entree)\n{\n$this->Id_Entree = $Id_Entree;\n\nreturn $this;\n}", "function ADD()\n{\n\t//comprobamos que no exista en la base de datos un espacio y un dni igual al que queremos añadir\n\tif ($this->Comprobar_atributos() === true){\n\t\t$sql = \"select * from PROF_ESPACIO where DNI = '\".$this->DNI.\"' AND CODESPACIO = '\".$this->CODESPACIO.\"'\";\n\n\t\t//si hay un error en la consulta devuelve un mensaje de error\n\t\tif (!$result = $this->mysqli->query($sql))\n\t\t{\n\t\t\treturn 'Error de gestor de base de datos';//devuelve el mensaje\n\t\t}\n\n\t\tif ($result->num_rows == 1){ // existe el centro devuelve mensaje de que ya existe\n\t\t\t\treturn 'Inserción fallida: el elemento ya existe';\n\t\t\t}\n\t\t//si hay algún error en la consulta muestra mensaje de error\n\t\t$sql = \"INSERT INTO PROF_ESPACIO (DNI,CODESPACIO) \n\t\t\t\tVALUES (\n\t\t\t\t\t\t'$this->DNI',\n '$this->CODESPACIO'\n )\";\n\n\t\t//si se cumple la condicion\n if (!$this->mysqli->query($sql)) {\n\t\t\treturn 'Error de gestor de base de datos';\n\t\t}\n\t\t//si no\n\t\telse{\n\t\t\treturn 'Inserción realizada con éxito'; //operacion de insertado correcta\n\t\t}\n\t}//si no\n\telse{\n\t\treturn $this->erroresdatos;\n\t}\t\t\n}", "function insert($tabla, $campos, $valores){\n #se forma la instruccion SQL\n $q = 'INSERT INTO '.$tabla.' ('.$campos.') VALUES ('.$valores.')';\necho $q;\n $resultado = $this->consulta($q);\n \n if($resultado) return true;\n else return false;\n}", "private function insertNew() {\n $sth=NULL;\n $array=array();\n $query=\"INSERT INTO table_spectacles (libelle) VALUES (?)\";\n $sth=$this->dbh->prepare($query);\n $array=array($this->libelle);\n $sth->execute($array);\n $this->message=\"\\\"\".$this->getLibelle().\"\\\" enregistré !\";\n $this->blank();\n $this->test=1;\n }", "public function GetCadastroNoticia(){\r\n return $this -> __cadastro; \r\n \r\n }", "public function save() \r\n {\r\n $db = Database::getDatabase();\r\n\r\n if ($this->idPue==null) { \r\n $sql = \"INSERT INTO puesto (nombre, ubicacion, planta, numero)\r\n VALUES ('{$this->nombre}', '{$this->ubicacion}', {$this->planta}, {$this->numero});\";\r\n\r\n if ($db->consulta($sql)) {\r\n $this->idPue = $db->getUltimoId();\r\n }\r\n } else {\r\n $sql=\"UPDATE puesto\r\n SET nombre='{$this->nombre}', ubicacion='{$this->ubicacion}', planta={$this->planta}, numero={$this->numero}\r\n WHERE idPue={$this->idPue};\";\r\n\r\n $db->consulta($sql);\r\n }\r\n \r\n return $this;\r\n }", "function procInsertCtrl($ar){\n $ar['_typecontrol']='insert';\n $_REQUEST['_allfields'] = 1;\n return $this->procCtrl($ar);\n }", "public function insert(){\n\t\t$parametro = func_get_args();\n\t\t$resultado = $this->execSql($this->INSERT,$parametro);\n//\t\t\tdie();\n\t\tif(!$resultado){\n\t\t\t$this->onError(\"COD_INSERT\",$this->INSERT);\n\t\t}\n\t\treturn $resultado;\n\t}" ]
[ "0.697765", "0.6804488", "0.6451328", "0.63967353", "0.63967353", "0.63643265", "0.63486356", "0.6347742", "0.63268846", "0.6320466", "0.63088053", "0.63052624", "0.62994665", "0.62679034", "0.62594575", "0.6250404", "0.62358075", "0.62358075", "0.6205501", "0.61983085", "0.6195258", "0.61774564", "0.6154296", "0.6137879", "0.61061174", "0.610578", "0.6085761", "0.60771173", "0.60316044", "0.60303646", "0.60303426", "0.60242677", "0.6017062", "0.60163283", "0.6014686", "0.5986611", "0.59775925", "0.5973878", "0.59663045", "0.59646213", "0.59638834", "0.5943832", "0.591575", "0.59151053", "0.5903701", "0.59001637", "0.58943754", "0.58933264", "0.5891469", "0.5880636", "0.5880049", "0.587346", "0.5871879", "0.5862953", "0.5854642", "0.5843846", "0.58277774", "0.5826096", "0.5824721", "0.5822193", "0.5815747", "0.5814644", "0.5805766", "0.5802686", "0.58020806", "0.5798706", "0.57952017", "0.57942104", "0.5789084", "0.5784444", "0.5765302", "0.5763019", "0.5759373", "0.57563484", "0.57558256", "0.5749419", "0.57408893", "0.57350355", "0.57348037", "0.5730093", "0.5726319", "0.5720605", "0.57179147", "0.57179147", "0.5713675", "0.57107246", "0.57099503", "0.57067204", "0.57046777", "0.57041246", "0.5703103", "0.5701811", "0.57000947", "0.5699723", "0.56982434", "0.5691566", "0.56899256", "0.5686189", "0.56808585", "0.5679517", "0.56766796" ]
0.0
-1
$ret["active_product_num"] = $this>product_service>get_num_rows(array("hscode_cat_id"=>$hs_cat_id, "status >0"=>null));
public function get_product_num($hs_cat_id) { // $ret["inactive_product_num"] = $this->product_service->get_num_rows(array("hscode_cat_id"=>$hs_cat_id, "status"=>0)); $ret["all_product_num"] = $this->product_service->get_num_rows(array("hscode_cat_id"=>$hs_cat_id)); echo json_encode($ret); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function count_active_pro_list(){\n\t\treturn $this->db->select('count(*)','product_list','status = 1');\n\t}", "function count_new_pro_list(){\n\t\treturn $this->db->select('count(*)','product_list','status = 3');\n\t}", "function getProductCount($cat_id) {\n $ci = & get_instance();\n $query = $ci->db->get_where(ES_PRODUCTS, array('category_id' => $cat_id));\n return $query->num_rows();\n}", "public function get_rows(){ return $count = count($this->prod_id); }", "function get_vintage_count(){\n \n $obj = new vintage();\n $vintage_count = $obj ->row_count();\n \n if(!$vintage_count){\n $var_result['success']=false;\n return $var_result; \n }\n \n $var_result['vintage_count'] = $vintage_count;\n $var_result['success']=true;\n $var_result['data']=$var_result;\n return $var_result;\n\n}", "function count_archived_pro_list(){\n\t\treturn $this->db->select('count(*)','product_list','status = 0');\n\t}", "public function countProduit(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"count\"));\n\t\t\t\t\t }", "function get_note_count(){\n \n $note = new tasting_note();\n $note_count = $note ->row_count();\n \n if(!$note_count){\n $var_result['success']=false;\n return $var_result; \n }\n \n $var_result['note_count'] = $note_count;\n $var_result['success']=true;\n $var_result['data']=$var_result;\n return $var_result; \n \n}", "public function activeClientNum(){\r\n $query = $this->db->get_where('clients', array('is_active' => 1, 'is_approved' => 1));\r\n return $query->num_rows();\r\n }", "function getProductCount($params = array()){\n\t\tMpApi::sleep(); \n\t\treturn json_decode($this->callCurl(MpApi::GET , '/multivendor/product/count.json' , $params ),true);\n\t}", "function jml_product() {\n return $this->db->count_all('tb_transactions');\n }", "public function getProNumRows()\n {\n return $this->db->count_all('products');\n }", "public static function getCountretclose($model,$status)\n { \n //$exp = ($_SESSION >= '0') && ($element <= '7'); \n $sql = \"SELECT COUNT(*) FROM $model WHERE status='$status' AND (CONVERT(masa_retensi, UNSIGNED INTEGER) > 0 AND CONVERT(masa_retensi, UNSIGNED INTEGER) < 7)\";\n $count = Yii::app()->db->createCommand($sql)->queryScalar();\n return $count; \n }", "public function countV_article_en_stock(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"count\"));\n\t\t\t\t\t }", "public static function getTotalProductCount() {\n Db_Actions::DbSelect(\"SELECT COUNT(id) FROM cscart_products\");\n }", "public function countEtat_compte(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n return $this->db->getRows(array(\"return_type\"=>\"count\"));\n\t\t\t\t\t }", "function get_wine_count(){\n \n $wine = new wine();\n $wine_count = $wine ->row_count();\n \n if(!$wine_count){\n $var_result['success']=false;\n return $var_result; \n }\n \n $var_result['wine_count'] = $wine_count;\n $var_result['success']=true;\n $var_result['data']=$var_result;\n return $var_result; \n \n}", "function get_count() {\n\t\t$count=0;\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"select count(pr_id) as num from \".$this->_db_table);\n\t\tif (!$rs) {\n\t\t\tprint $db->ErrorMsg();\n\t\t} else {\n\t\t\t$count = $rs->fields[\"num\"];\n\t\t}\n\t\treturn $count;\n\t}", "static function count_available()//$active=true)\n {\n global $objDatabase;\n\n $query = \"\n SELECT COUNT(*) AS `numof_records`\n FROM `\".DBPREFIX.\"module_shop\".MODULE_INDEX.\"_discount_coupon`\";\n $objResult = $objDatabase->Execute($query);\n if (!$objResult) return self::errorHandler();\n if ($objResult->EOF) return 0;\n return $objResult->fields['numof_records'];\n }", "public function getCountProducts(){\n global $connect;\n $query = $connect->PDO->prepare(\"SELECT count(id) FROM `pagTab`\");\n $query->execute();\n $row = $query->fetchAll();\n return $row;\n }", "public function f_get_hr_comp(){\n\n $sql = $this->db->query(\"select count(*) lv_comp_count \n from td_comp_apply \n where recommendation_status = 1\n and rejection_status = 0\n and approval_status = 0\");\n return $sql->row();\n }", "function getTotalCount( array $a = array() ){\r\n\t\t$where ='';\r\n\t\tif( isset($a['where']) && $a['where'] != '' ){\r\n\t\t\t$where = $a['where'];\r\n\t\t}\r\n\t\t\t$where .= \" AND status!='-1' \";\r\n\t\t\r\n\t\t$this->sSql = \"SELECT count(1) as cnt FROM `pack_mstr` WHERE 1 $where \";\r\n\t\t$res = $this->oMysqli->query( $this->sSql );\r\n\t\tif($res[0]){\r\n\t\t\treturn $res[0]->cnt;\r\n\t\t}else{\r\n\t\t\treturn 0;\t\r\n\t\t}\r\n\t}", "public function countallservice()\r {\r $query=\"select count(*) as `c` from `\".$this->tablename.\"`\";\r $result=mysqli_query($this->conn,$query);\r\t\t\tif($result){\r $value=mysqli_fetch_row($result);\r\t\t\t return $value[0];\r\t\t\t} else \r\t\t\t{ return false; }\r \r }", "public static function getCountret($model,$status)\n { \n $sql = \"SELECT COUNT(*) FROM $model WHERE status='$status'\";\n $count = Yii::app()->db->createCommand($sql)->queryScalar();\n return $count; \n }", "private function getExistProductRecount() {\n return false;\n }", "function get_prodinv_count($st = NULL)\n {\n if ($st == \"NIL\") $st = \"\";\n $sql = \"select * from product where ProdName like '%$st%'\";\n $query = $this->db->query($sql);\n return $query->num_rows();\n }", "public function Microgroup()\r\n{\r\n$objConfig=new Config();//Connects database\r\n//$this->Available=false;\r\n$this->rowCommitted=0;\r\n$this->colUpdated=0;\r\n$this->updateList=\"\";\r\n$sql=\" select count(*) from microgroup\";\r\n$result=mysql_query($sql);\r\n$row=mysql_fetch_array($result);\r\nif (strlen($row[0])>0)\r\n$this->recordCount=$row[0];\r\nelse\r\n$this->recordCount=0;\r\n$this->condString=\"1=1\";\r\n}", "public function count() {\n\n // query to count all product records\n $query = \"SELECT count(*) FROM $this->table_name\";\n\n // prepare query statement\n $stmt = $this->conn->prepare($query);\n\n // execute query\n $stmt->execute();\n\n // get row value\n $rows = $stmt->fetch(PDO::FETCH_NUM);\n\n // return count\n return $rows[0];\n }", "function getNoOfAssocProducts($module, $focus, $seid = '') {\n\tglobal $log, $adb;\n\t$log->debug('> getNoOfAssocProducts '.$module.','.get_class($focus).','.$seid);\n\tif ($module == 'Quotes') {\n\t\t$query='select vtiger_products.productname, vtiger_products.unit_price, vtiger_inventoryproductrel.*\n\t\t\tfrom vtiger_inventoryproductrel\n\t\t\tinner join vtiger_products on vtiger_products.productid=vtiger_inventoryproductrel.productid\n\t\t\twhere id=?';\n\t\t$params = array($focus->id);\n\t} elseif ($module == 'PurchaseOrder') {\n\t\t$query='select vtiger_products.productname, vtiger_products.unit_price, vtiger_inventoryproductrel.*\n\t\t\tfrom vtiger_inventoryproductrel\n\t\t\tinner join vtiger_products on vtiger_products.productid=vtiger_inventoryproductrel.productid\n\t\t\twhere id=?';\n\t\t$params = array($focus->id);\n\t} elseif ($module == 'SalesOrder') {\n\t\t$query='select vtiger_products.productname, vtiger_products.unit_price, vtiger_inventoryproductrel.*\n\t\t\tfrom vtiger_inventoryproductrel\n\t\t\tinner join vtiger_products on vtiger_products.productid=vtiger_inventoryproductrel.productid\n\t\t\twhere id=?';\n\t\t$params = array($focus->id);\n\t} elseif ($module == 'Invoice') {\n\t\t$query='select vtiger_products.productname, vtiger_products.unit_price, vtiger_inventoryproductrel.*\n\t\t\tfrom vtiger_inventoryproductrel\n\t\t\tinner join vtiger_products on vtiger_products.productid=vtiger_inventoryproductrel.productid\n\t\t\twhere id=?';\n\t\t$params = array($focus->id);\n\t} elseif ($module == 'Potentials') {\n\t\t$query='select vtiger_products.productname,vtiger_products.unit_price,vtiger_seproductsrel.*\n\t\t\tfrom vtiger_products\n\t\t\tinner join vtiger_seproductsrel on vtiger_seproductsrel.productid=vtiger_products.productid\n\t\t\twhere crmid=?';\n\t\t$params = array($seid);\n\t} elseif ($module == 'Products') {\n\t\t$crmEntityTable = CRMEntity::getcrmEntityTableAlias('Products');\n\t\t$query=\"select vtiger_products.productname,vtiger_products.unit_price, vtiger_crmentity.*\n\t\t\tfrom vtiger_products\n\t\t\tinner join $crmEntityTable on vtiger_crmentity.crmid=vtiger_products.productid\n\t\t\twhere vtiger_crmentity.deleted=0 and productid=?\";\n\t\t$params = array($seid);\n\t}\n\n\t$result = $adb->pquery($query, $params);\n\t$num_rows=$adb->num_rows($result);\n\t$log->debug('< getNoOfAssocProducts');\n\treturn $num_rows;\n}", "function get_acquisition_count(){\n \n $from_date = $_REQUEST['from_date'];\n $to_date = $_REQUEST['to_date'];\n\n $acquire = new acquire();\n $acquire_count = $acquire->row_count();\n \n if(!$acquire_count){\n $var_result['success']=false;\n return $var_result; \n }\n \n $var_result['acquisition_count'] = $acquire_count;\n $var_result['success']=true;\n $var_result['data']=$var_result;\n return $var_result; \n\n}", "function allposts_count_Detail()\n { \n $query = $this->db->query(\"select a.fc_id,a.fc_branch,a.fc_nopo,a.fc_stock,b.fv_stock,CONCAT(b.fv_size,' | ',b.fv_warna) as variant,c.fv_satuan,rupiah(a.fn_price) as price,a.fn_qty,c.fn_uom,(a.fn_qty * c.fn_uom) as konversi,rupiah(a.fn_total) as total from td_po a LEFT OUTER JOIN v_variant b ON b.fc_stock=a.fc_stock AND b.fc_variant=a.fc_variant LEFT OUTER JOIN v_uom c ON c.fc_uom=a.fc_satuan WHERE a.fc_branch='\".$this->session->userdata('branch').\"' and a.fc_nopo='\".$this->session->userdata('userid').\"'\");\n return $query->num_rows(); \n }", "function jumlah_siswa(){\n $this->db->where('status','1');\n return $this->db->get('tb_siswa')->num_rows();\n }", "public function num_rows($result){\r\n return $result->RecordCount();\r\n /*\r\n\t\t$totalCnt = 0;\r\n $result = $this->db_query('SELECT COUNT(*) as recordcount FROM '. $table_name);\r\n while($row = $this->fetch_array_assoc($result)) {\r\n $totalCnt = $row['recordcount']; \r\n } \r\n \r\n return $totalCnt;\r\n */\r\n\t}", "function tep_count_products_in_category($category_id, $include_inactive = false) {\n $products_count = 0;\n\ttep_get_subcategories($category_list,$category_id);\n\t$category_list[] = $category_id;\n\t$products_sql = \"select count(*) as total from \" . TABLE_PRODUCTS . \" p, \" . TABLE_PRODUCTS_TO_CATEGORIES . \" p2c where p.products_id = p2c.products_id and p2c.categories_id in (\" . join(',',$category_list) . \")\";\n if ($include_inactive == false) {\n\t\t$products_sql.= \" and p.products_status = '1'\";\n }\n\t$products_query = tep_db_query($products_sql);\n $products = tep_db_fetch_array($products_query);\n $products_count = $products['total'];\n\n return $products_count;\n }", "public function getActiveProducts(){\n $product = Product::where('active', 1)->count();\n return $product;\n }", "public static function select_product_count_by_category_id($category_id=null)\n {\n try {\n $query = new Query;\n if($category_id != null)\n {\n $count = $query->select('COUNT(*) as count')->from('core_products')->where(\"category_id = $category_id\")->andWhere(\"product_status = 1\")->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])->All();\n return $count[0]['count'];\n \n }else\n {\n $query = new Query;\n $pending_products_count = $query->select('COUNT(*) as count')->from('core_products')\n ->where(\"product_status = 0\")\n //->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])\n ->All();//pending products count \n $total_count['pending_products_count'] = $pending_products_count[0]['count'];\n\n $query = new Query;\n $count = $query->select('COUNT(*) as count')->from('core_products')\n //->where(\"product_status = 1\")\n //->andWhere(['>=','core_products.product_expires_on',date(\"Y-m-d H:i:s\")])\n ->All();\n $total_count['total_products_count'] = $count[0]['count'];\n return $total_count;\n }\n \n \n \n } catch (ErrorException $e) {\n Yii::warning($e->getMessage());\n }\n \n \n }", "private function count_operation_rows()\n {\n // $license_rows = $license['rows'];\n\n // $constructse = $this->Header_model->get_data_list('license_constructs', array('status' => 1));\n // $constructse_rows = $constructse['rows'];\n\n // return ($license_rows + $constructse_rows);\n }", "function allposts_count_Detail($nopo)\n { \n $query = $this->db->query(\"select a.fc_id,a.fc_branch,a.fc_nopo,a.fc_stock,b.fv_stock,CONCAT(b.fv_size,' | ',b.fv_warna) as variant,c.fv_satuan,rupiah(a.fn_price) as price,a.fn_qty,c.fn_uom,(a.fn_qty * c.fn_uom) as konversi,rupiah(a.fn_total) as total from td_po a LEFT OUTER JOIN v_variant b ON b.fc_stock=a.fc_stock AND b.fc_variant=a.fc_variant LEFT OUTER JOIN v_uom c ON c.fc_uom=a.fc_satuan WHERE a.fc_nopo='\".$nopo.\"'\");\n return $query->num_rows(); \n }", "public function rowcount($numrows){\n$this->row_count = mysqli_num_rows($numrows);\nreturn $this->row_count;\n}", "function countProducts() {\r\n global $tableProducts;\r\n\r\n return countFields($tableProducts);\r\n}", "public function Hpc()\r\n{\r\n$objConfig=new Config();//Connects database\r\n$Available=false;\r\n$rowCommitted=0;\r\n$colUpdated=0;\r\n$updateList=\"\";\r\n$sql=\" select count(*) from hpc\";\r\n$result=mysql_query($sql);\r\n$row=mysql_fetch_array($result);\r\nif (strlen($row[0])>0)\r\n$this->recordCount=$row[0];\r\nelse\r\n$this->recordCount=0;\r\n$this->condString=\"1=1\";\r\n}", "public function get_count_cart1()\n\t{\n\t\t$UserId = $this->input->post('uid');\n\t\tif($UserId!='')\n\t\t{\n\t\t\t$a=$this->db->query(\"select count(*) as count from tb_admin_user_cart where userid='$UserId'\")->row_array();\n\t\t\t$b=$a['count'];\n\t\t\t\n\t\t\t//$b=count($result);\n\t\t\treturn $b;\n\t\t}\n\t\t\n\t}", "public function num_rows($query_result) {\n//\t\t\twhile ( OCIFetchINTO($query_result,$dumy,OCI_ASSOC) ) {\n//\t\t\t\t$i++;\n//\t\t\t}\n//\t\t\t//return ocifetchstatement($query_result,$dumy);\n//\t\t\treturn $i;\n\t\t}", "public function getCountProduct()\n {\n return $this->product_model->countAll();\n }", "function ship_price_count($argWhere = '') {\n\n $arrClms = \"pkpriceid\";\n $argWhr = ($argWhere <> '') ? \" AND \" . $argWhere : '';\n $argWhr.='ORDER BY pkpriceid DESC';\n //$argWhr = ($argWhere <> '') ? $argWhere : '';\n //pre($argWhr);\n $varTable = TABLE_ZONEPRICE;\n $varNum = $this->getNumRows($varTable, $arrClms, $argWhr);\n return $varNum;\n }", "public function num_rows($result_query=''){\n\t\t/**\n\t\t * GDS Interbase no soporta esta funcion (No debe ser usada)\n\t\t */\n\t\treturn false;\n\t}", "public function getNumRows(){\n return $this->numrows;\n }", "function CountActive() {\r\n $conn = conn();\r\n $stmt = $conn->prepare(\"SELECT count(Natregno) val FROM employee WHERE EmpStatus='Active' AND DelFlg='N';\");\r\n $stmt->execute();\r\n $result_array = $stmt->fetchAll();\r\n foreach ($result_array as $value) {\r\n $this->activepersons = $value['val'];\r\n }\r\n return $this->activepersons;\r\n $conn = NULL;\r\n }", "function getCount($module = NULL) {\r\n $__Db = Db::getInstance();\r\n $__Db->query = \"SELECT IFNULL( COUNT(module_orl) , 0) AS count FROM module \";\r\n if (!is_null($module)) $__Db->query .= \" WHERE module = '{$module}' \";\r\n $rs = \t$__Db->object();\r\n return $rs['count'];\r\n }", "public function pendIONFtgsPRCount($emp_code) \n\t\t{\n\t\t\t$condition = \"level_of=4 AND action=0 and action_autho =\" . \"'\" . $emp_code . \"'\";\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('ftgs_action_grid');\n\t\t\t$this->db->where($condition);\n\t\t\t$query = $this->db->get();\n\t\t\tif ($query->num_rows() >= 1) \n\t\t\t{\n\t\t\t\treturn $query;\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}", "function get_wine_count_by_country(){\n \n $obj = new wine();\n $columns = \" tblCountry.country, count(tblWine.wine_id) as qty \";\n $group = \" tblCountry.country \";\n $where = null;\n $sort = \" qty DESC \";\n $limit = '10';\n $rst = $obj ->get_extended($where,$columns,$group,$sort,$limit);\n \n if(!$rst){\n $var_result['success']=false;\n return $var_result; \n }\n \n $var_result['success']=true;\n $var_result['data']=$rst;\n return $var_result; \n \n}", "public function pendItemFtgsPRCount($emp_code) \n\t\t{\n\t\t\t$condition = \"level_of=3 AND action=0 and action_autho =\" . \"'\" . $emp_code . \"'\";\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('ftgs_action_grid');\n\t\t\t$this->db->where($condition);\n\t\t\t$query = $this->db->get();\n\t\t\tif ($query->num_rows() >= 1) \n\t\t\t{\n\t\t\t\treturn $query;\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}", "function countActiveProducts($id){\n\t\t$result = $this->CategoriesProduct->find('count', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'CategoriesProduct.category_id' => $id,\n\t\t\t\t'Product.active' => true\n\t\t\t),\n\t\t\t'contain' => array('Product')\n\t\t));\n\n\t\treturn $result;\n\t}", "function checkExistNo($reqNo)\n{\n global $db;\n $result = [];\n if ($db->connect()) {\n $strSQL = \"SELECT COUNT(*) AS total FROM ga_consumable_purchase where consumable_purchase_no='\" . $reqNo . \"' \";\n $res = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($res)) {\n $count = $rowDb['total'];\n }\n }\n return $count;\n}", "function product_novendor()\n\t{\n\t\tglobal $log;\n\t\t$log->debug(\"Entering product_novendor() method ...\");\n\t\t$query = \"SELECT ec_products.productname, ec_products.deleted\n\t\t\tFROM ec_products\n\t\t\tWHERE ec_products.deleted = 0\n\t\t\tAND ec_products.vendor_id is NULL\";\n\t\t$result=$this->db->query($query);\n\t\t$log->debug(\"Exiting product_novendor method ...\");\n\t\treturn $this->db->num_rows($result);\n\t}", "function countRows($result)\n{\n $rownum = 0;\n while (OCI_Fetch_Array($result, OCI_BOTH)) {\n $rownum++;\n }\n return $rownum;\n}", "function get_count()\n\t{\n\t\treturn $this->__num_rows;\n\t}", "public function approveIONFtgsPRCount($emp_code) \n\t\t{\n\t\t\t$condition = \"level_of=4 AND action=1 and action_autho =\" . \"'\" . $emp_code . \"'\";\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('ftgs_action_grid');\n\t\t\t$this->db->where($condition);\n\t\t\t$query = $this->db->get();\n\t\t\tif ($query->num_rows() >= 1) \n\t\t\t{\n\t\t\t\treturn $query;\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}", "function getCategoryStatusById($cat_id) {\n $ci = & get_instance();\n $category = $ci->crud->get(ES_PRODUCT_CATEGORIES, array('id' => $cat_id));\n if (count($category) > 0) {\n return $category['status'];\n } else {\n return 0;\n }\n}", "public function getInactiveProducts(){\n $product = Product::where('active', 0)->count();\n return $product;\n }", "function count_product_by($conds = array()){\n\t\t$this->custom_conds();\n\t\t//where clause\n\t\t$this->db->select('rt_products.*, count(rt_touches.type_id) as t_count'); \n \t\t$this->db->from('rt_products');\n \t\t$this->db->join('rt_touches', 'rt_products.id = rt_touches.type_id');\n \t\t$this->db->where('rt_touches.type_name','product');\n \t\t$this->db->where('rt_products.status',1);\n \t\t$this->db->where('rt_touches.shop_id',$conds['shop_id']);\n\n \t\tif ( isset( $conds['cat_id'] )) {\n\t\t\tif ($conds['cat_id'] != \"\" ) {\n\t\t\t\tif ($conds['cat_id'] != '0') {\n\t\t\t\t\t$this->db->where( 'rt_products.cat_id', $conds['cat_id'] );\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t// sub category id condition \n\t\tif ( isset( $conds['sub_cat_id'] )) {\n\t\t\tif ($conds['sub_cat_id'] != \"\" ) {\n\t\t\t\tif ($conds['sub_cat_id'] != '0') {\n\t\t\t\t\t$this->db->where( 'rt_products.sub_cat_id', $conds['sub_cat_id'] );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\tif ( isset( $conds['search_term'] ) || isset( $conds['date'] ) ) {\n\t\t\t$dates = $conds['date'];\n\n\t\t\tif ($dates != \"\") {\n\t\t\t\t$vardate = explode('-',$dates,2);\n\n\t\t\t\t$temp_mindate = $vardate[0];\n\t\t\t\t$temp_maxdate = $vardate[1];\t\t\n\n\t\t\t\t$temp_startdate = new DateTime($temp_mindate);\n\t\t\t\t$mindate = $temp_startdate->format('Y-m-d');\n\n\t\t\t\t$temp_enddate = new DateTime($temp_maxdate);\n\t\t\t\t$maxdate = $temp_enddate->format('Y-m-d');\n\t\t\t} else {\n\t\t\t\t$mindate = \"\";\n\t\t\t \t$maxdate = \"\";\n\t\t\t}\n\t\t\t\n\t\t\tif ($conds['search_term'] == \"\" && $mindate != \"\" && $maxdate != \"\") {\n\t\t\t\t//got 2dates\n\t\t\t\tif ($mindate == $maxdate ) {\n\n\t\t\t\t\t$this->db->where(\"rt_touches.added_date BETWEEN DATE('\".$mindate.\"' - INTERVAL 1 DAY) AND DATE('\". $maxdate.\"' + INTERVAL 1 DAY)\");\n\n\t\t\t\t} else {\n\t\t\t\t\t$this->db->where( 'rt_touches.added_date >=', $mindate );\n \t\t\t\t\t$this->db->where( 'rt_touches.added_date <=', $maxdate );\n\n\t\t\t\t}\n\t\t\t\t$this->db->like( '(name', $conds['search_term'] );\n\t\t\t\t$this->db->or_like( 'name)', $conds['search_term'] );\n\t\t\t} else if ($conds['search_term'] != \"\" && $mindate != \"\" && $maxdate != \"\") {\n\t\t\t\t//got name and 2dates\n\t\t\t\tif ($mindate == $maxdate ) {\n\n\t\t\t\t\t$this->db->where(\"rt_touches.added_date BETWEEN DATE('\".$mindate.\"' - INTERVAL 1 DAY) AND DATE('\". $maxdate.\"' + INTERVAL 1 DAY)\");\n\n\t\t\t\t} else {\n\t\t\t\t\t$this->db->where( 'rt_touches.added_date >=', $mindate );\n \t\t\t\t\t$this->db->where( 'rt_touches.added_date <=', $maxdate );\n\n\t\t\t\t}\n\t\t\t\t$this->db->group_start();\n\t\t\t\t$this->db->like( 'name', $conds['search_term'] );\n\t\t\t\t$this->db->or_like( 'name', $conds['search_term'] );\n\t\t\t\t$this->db->group_end();\n\t\t\t} else {\n\t\t\t\t//only name \n\t\t\t\t$this->db->group_start();\n\t\t\t\t$this->db->like( 'name', $conds['search_term'] );\n\t\t\t\t$this->db->or_like( 'name', $conds['search_term'] );\n\t\t\t\t$this->db->group_end();\n\t\t\t\t\n\t\t\t}\n\t\t\t \n\t }\n \t\t$this->db->group_by('rt_touches.type_id');\n \t\t$this->db->order_by('t_count', \"DESC\");\n\n\n \t\treturn $this->db->count_all_results();\n\t}", "function exeGetTotalEmp() { \n $exeGetTotalEmp = $this->db->query(\"SELECT *\n FROM employees\n WHERE status = 1\n ORDER BY firstname ASC, lastname ASC\");\n \n return $exeGetTotalEmp->num_rows(); \n }", "function getDeployedCount()\n {\n $this->db->select('*');\n $this->db->from('tbl_user');\n $this->db->where('status', 1);\n $qresult = $this->db->count_all_results();\n return $qresult;\n }", "public function product_counter($product_id)\n\t{\t\t\n\t\t$this->db->select('DISTINCT(product_id)'); \n\t $this->db->from('stock_history');\n\t\t\tif(!empty($product_id))\n\t\t\t{$this->db->where('product_id =',$product_id); }\n\t $query=$this->db->get(); \n\t return $query->num_rows();\n\t}", "public function get_count_cart()\n\t{\n\t\t$UserId = $this->input->post('uid');\n\t\tif($UserId!='')\n\t\t{\n\t\t\t$a=$this->db->query(\"select count(*) as count from tb_admin_cart where userid='$UserId'\")->row_array();\n\t\t\t$b=$a['count'];\n\t\t\t\n\t\t\t//$b=count($result);\n\t\t\treturn $b;\n\t\t}\n\t\t\n\t}", "public function pendingFtgsPRCount($emp_code) \n\t\t{\n\t\t\t$condition = \"ftgs_pr_owner_code =\" . \"'\" . $emp_code . \"' and ftgs_pr_status = 1 \";\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('ftgs_pr_master');\n\t\t\t$this->db->where($condition);\n\t\t\t$query = $this->db->get();\n\t\t\tif ($query->num_rows() >= 1) \n\t\t\t{\n\t\t\t\treturn $query;\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}", "private function count()\n\t\t{\n\t\t\t$query = \"\tSELECT count(1) AS 'total'\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t`\".$this->tree_node.\"` `MTN`\n\t\t\t\t\t\tWHERE 1 = 1\n\t\t\t\t\t\t\tAND `MTN`.`application_release`\t= '\".$this->application_release.\"'\n\t\t\t\t\t\";\n\t\t\t$result = $this->link_mt->query($query);\n\n\t\t\t$row = $result->fetch_array(MYSQLI_ASSOC);\t\n\t\t\treturn $row['total'];\t\t\n\t\t}", "function count_purchased_product_by($conds = array()){\n\t\t$this->custom_conds();\n\t\t//where clause\t\t\n\t\t$this->db->select('rt_products.*, count(rt_transactions_counts.product_id) as t_count'); \n \t\t$this->db->from('rt_products');\n \t\t$this->db->join('rt_transactions_counts', 'rt_products.id = rt_transactions_counts.product_id');\n \t\t$this->db->where('rt_products.status',1);\n \t\t$this->db->where('rt_transactions_counts.shop_id',$conds['shop_id']);\n\n \t\tif ( isset( $conds['cat_id'] )) {\n\t\t\tif ($conds['cat_id'] != \"\" ) {\n\t\t\t\tif ($conds['cat_id'] != '0') {\n\t\t\t\t\t$this->db->where( 'rt_products.cat_id', $conds['cat_id'] );\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t// sub category id condition \n\t\tif ( isset( $conds['sub_cat_id'] )) {\n\t\t\tif ($conds['sub_cat_id'] != \"\" ) {\n\t\t\t\tif ($conds['sub_cat_id'] != '0') {\n\t\t\t\t\t$this->db->where( 'rt_products.sub_cat_id', $conds['sub_cat_id'] );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\n \t\tif ( isset( $conds['search_term'] ) || isset( $conds['date'] ) ) {\n\t\t\t$dates = $conds['date'];\n\n\t\t\tif ($dates != \"\") {\n\t\t\t\t$vardate = explode('-',$dates,2);\n\n\t\t\t\t$temp_mindate = $vardate[0];\n\t\t\t\t$temp_maxdate = $vardate[1];\t\t\n\n\t\t\t\t$temp_startdate = new DateTime($temp_mindate);\n\t\t\t\t$mindate = $temp_startdate->format('Y-m-d');\n\n\t\t\t\t$temp_enddate = new DateTime($temp_maxdate);\n\t\t\t\t$maxdate = $temp_enddate->format('Y-m-d');\n\t\t\t} else {\n\t\t\t\t$mindate = \"\";\n\t\t\t \t$maxdate = \"\";\n\t\t\t}\n\t\t\t\n\n\t\t\tif ($conds['search_term'] == \"\" && $mindate != \"\" && $maxdate != \"\") {\n\t\t\t\t//got 2dates\t\t\t\t\n\t\t\t\tif ($mindate == $maxdate ) {\n\n\t\t\t\t\t$this->db->where(\"rt_transactions_counts.added_date BETWEEN DATE('\".$mindate.\"' - INTERVAL 1 DAY) AND DATE('\". $maxdate.\"' + INTERVAL 1 DAY)\");\n\n\t\t\t\t} else {\n\t\t\t\t\t$this->db->where( 'rt_transactions_counts.added_date >=', $mindate );\n \t\t\t\t\t$this->db->where( 'rt_transactions_counts.added_date <=', $maxdate );\n\n\t\t\t\t}\n\t\t\t\t$this->db->like( '(name', $conds['search_term'] );\n\t\t\t\t$this->db->or_like( 'name)', $conds['search_term'] );\n\t\t\t} else if ($conds['search_term'] != \"\" && $mindate != \"\" && $maxdate != \"\") {\n\t\t\t\t//got name and 2dates\n\t\t\t\tif ($mindate == $maxdate ) {\n\n\t\t\t\t\t$this->db->where(\"rt_transactions_counts.added_date BETWEEN DATE('\".$mindate.\"' - INTERVAL 1 DAY) AND DATE('\". $maxdate.\"' + INTERVAL 1 DAY)\");\n\n\t\t\t\t} else {\n\t\t\t\t\t$this->db->where( 'rt_transactions_counts.added_date >=', $mindate );\n \t\t\t\t\t$this->db->where( 'rt_transactions_counts.added_date <=', $maxdate );\n\n\t\t\t\t}\n\t\t\t\t$this->db->group_start();\n\t\t\t\t$this->db->like( 'name', $conds['search_term'] );\n\t\t\t\t$this->db->or_like( 'name', $conds['search_term'] );\n\t\t\t\t$this->db->group_end();\n\t\t\t} else {\n\t\t\t\t//only name \n\t\t\t\t$this->db->group_start();\n\t\t\t\t$this->db->like( 'name', $conds['search_term'] );\n\t\t\t\t$this->db->or_like( 'name', $conds['search_term'] );\n\t\t\t\t$this->db->group_end();\n\t\t\t}\n\t\t\t \n\t }\n\n \t\t$this->db->group_by('rt_transactions_counts.product_id');\n \t\t$this->db->order_by('t_count', \"DESC\");\n\n\n \t\treturn $this->db->count_all_results();\n\t}", "public function ProductCount()\n {\n return Products::count();\n }", "public function product_counter($product_id,$date)\n\t{\t\t\n\t\t\t$this->db->select(\"\n\t\t\t\ta.product_name,\n\t\t\t\ta.unit,\n\t\t\t\ta.product_id,\n\t\t\t\ta.price,\n\t\t\t\ta.supplier_price,\n\t\t\t\ta.product_model,\n\t\t\t\tc.category_name,\n\t\t\t\tsum(b.quantity) as totalPurchaseQnty,\n\t\t\t\te.purchase_date as purchase_date,\n\t\t\t\te.purchase_id,\n\t\t\t\tf.unit_name\n\t\t\t\");\n\n\t\t$this->db->from('product_information a');\n\t\t$this->db->join('product_purchase_details b','b.product_id = a.product_id','left');\n\t\t$this->db->join('product_category c' ,'c.category_id = a.category_id');\n\t\t$this->db->join('product_purchase e','e.purchase_id = b.purchase_id');\n\t\t$this->db->join('unit f','f.unit_id = a.unit','left');\n\t\t$this->db->join('variant g','g.variant_id = b.variant_id','left');\n\t\t$this->db->join('store_set h','h.store_id = b.store_id');\n\t\t$this->db->where('b.store_id !=',null);\n\t\t$this->db->group_by('a.product_id');\n\t\t$this->db->order_by('a.product_name','asc');\n\n\t\tif(empty($product_id))\n\t\t{\n\t\t\t$this->db->where(array('a.status'=>1));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Single product information \n\t\t\t$this->db->where(array('a.status'=>1,'e.purchase_date <= ' => $date,'a.product_id'=>$product_id));\t\n\t\t}\n\t\t$query = $this->db->get();\n\t\treturn $query->num_rows();\n\t}", "public function display_out_of_stocks_product_count(){\n // if(env(\"DB_CONNECTION\") == \"pgsql\"){\n // $getOutOfStocksProduct = DB::select(\"SELECT COUNT(*) as data FROM stocks WHERE quantity < threshold\");\n // }else{\n // $getOutOfStocksProduct = DB::select('SELECT COUNT(*) as data FROM stocks WHERE quantity < threshold');\n // }\n \n // return response()->json([\n // 'count' => $getOutOfStocksProduct[0],\n // 'status' => 200\n // ]);\n\n $getOutOfStocksProduct = DB::table('product_stocks')->where('quantity', 0)->get()->count();\n\n \n return response()->json([\n 'count' => $getOutOfStocksProduct,\n 'status' => 200\n ]);\n }", "function count_all($category_id){\n\t\t\t\t\t$sql= 'SELECT COUNT( * ) AS numrows\n\t\t\t\t\tFROM customize_apparel_product\t\t\t\t\t\n\t\t\t\t\tWHERE customize_apparel_product.customize_apparel_category_id = '.$category_id.'';\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$Q = $this-> db-> query($sql);\n\t\t\t\t\treturn $Q->row ()->numrows;\n\t\t\t\t}", "public function pendPHFtgsPRCount($emp_code) \n\t\t{\n\t\t\t$condition = \"level_of=2 AND action=0 and action_autho =\" . \"'\" . $emp_code . \"'\";\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('ftgs_action_grid');\n\t\t\t$this->db->where($condition);\n\t\t\t$query = $this->db->get();\n\t\t\tif ($query->num_rows() >= 1) \n\t\t\t{\n\t\t\t\treturn $query;\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}", "public function findCountProd($id){\n return Product::where('id',$id)->first()->count;\n }", "public function approvedFtgsPRCount($emp_code) \n\t\t{\n\t\t\t$condition = \"ftgs_pr_owner_code =\" . \"'\" . $emp_code . \"' and ftgs_pr_status = 3 \";\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('ftgs_pr_master');\n\t\t\t$this->db->where($condition);\n\t\t\t$query = $this->db->get();\n\t\t\tif ($query->num_rows() >= 1) \n\t\t\t{\n\t\t\t\treturn $query;\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}", "public function CountRow()\n\t{\n\treturn HDB::hus()->Hcount(\"mtrbundle\");\n\t}", "function getRowCount() {\n\t\t$saleData = $this->getProducts();\n\t\t$saleSize = sizeof($saleData);\n\t\treturn $saleSize -=1;\n\t}", "public function count_Row($columnCount,$condition,$table){\n\n if($condition != \"\"){\n\n\t\t\t\t $stmt = $this->dbstatus->prepare(\"Select \".$columnCount.\" From \".$table.\" WHERE \".$condition.\"\");\n\n\t\t\t $stmt->execute();\n\n\t\t\t if($stmt->rowCount() > 0){\n\n\t\t\t $get = $stmt->fetchObject();\n\n\t\t\t\t return $get->$columnCount;\n\n\t\t\t }else{\n\n\t\t\t\t return 0;\n\n\t\t\t }\n\n\n\t\t}else{\n\n\t\t\t $stmt = $this->dbstatus->prepare(\"Select \".$columnCount.\" From \".$table.\"\");\n\n\t\t\t $stmt->execute();\n\n\t\t\t if($stmt->rowCount() > 0){\n\n\t\t\t\t $get = $stmt->fetchObject();\n\n\t\t\t\t return $get->$columnCount;\n\n\t\t\t }else{\n\n\t\t\t\t return 0;\n\n\t\t\t }\n\n\t\t}\n\n}", "function count_search_product_result($conditions_array=array()){\n\t\t$this->db->where($conditions_array);\n\t\t$this->db->like('product', $this->input->post('search_text'));\n\t\t$this->db->or_like('description', $this->input->post('search_text'));\n\t\treturn $this->db->count_all_results('red_support_product as rsp');\n\t}", "function board_health($prj,$status=1){\n $query = \"select box.rname,count(box_cont.cid) from box join box_cont on box.id = box_cont.fkid and box.fbid = '\".$prj.\"' and box_cont.status = '\".$status.\"' group by box.id;\";\n $result = mysql_query($query);\n $the_count = null;\n while($row = mysql_fetch_array($result)){\n $the_count = $the_count + $row[1];\n }\n if($the_count==0){$the_count = 0;}\n return $the_count;\n}", "public static function getCountrettindakan($model,$status)\n { \n $act = '0'; \n $sql = \"SELECT COUNT(*) FROM $model WHERE status='$status' AND c_action='$act'\";\n $count = Yii::app()->db->createCommand($sql)->queryScalar();\n return $count; \n }", "function row_count($result)\r\n{\r\n // global $dataBaseConnection;\r\n $result = mysqli_num_rows($result);\r\n return $result;\r\n}", "public function showProductQty(){\n $sId = session_id();\n $query = \"SELECT * FROM tbl_cart WHERE sId = '$sId'\";\n $select_result = $this->db->select($query);\n\n if ($select_result) {\n $row = mysqli_num_rows($select_result);\n return $row;\n //return $select_result;\n }else {\n return 0;\n }\n\n }", "function countRows($result) {\n global $checkuser, $checkusername, $checkuseremail, $checkuserphone;\n $i=0;\n while ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n $i = $i + 1;\n $checkuser = $row[0];\n $checkusername = $row[1];\n\t $checkuseremail = $row[3];\n $checkuserphone = $row[4];\n\n }\n return $i;\n \n}", "public function pendDHFtgsPRCount($emp_code) \n\t\t{\n\t\t\t$condition = \"level_of=1 AND action=0 and action_autho =\" . \"'\" . $emp_code . \"'\";\n\t\t\t$this->db->select('*');\n\t\t\t$this->db->from('ftgs_action_grid');\n\t\t\t$this->db->where($condition);\n\t\t\t$query = $this->db->get();\n\t\t\tif ($query->num_rows() >= 1) \n\t\t\t{\n\t\t\t\treturn $query;\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}", "function sql_num_rows($res)\n {\n // DELETE, INSERT, UPDATE\n // do not use : SELECT\n return $res->rowCount();\n }", "public function getNumProducts()\n {\n return $this->numProducts;\n }", "function getCount($p=array())\n {\n $p['count'] = true;\n $count = $this->getList($p);\n if (empty($count) or count($count) == 0) { \n return 0; \n } else {\n return (int) $count[0]['nb_items'];\n }\n }", "function fetchrequestAllStock($id)\r{\r $link = parent::connectToDB();\r$query=\"select * from stock where stock_id=$id\";\r$result8 = mysqli_query($link, $query);\r$result11=mysqli_num_rows($result8);\r \rif($result11!=0)\r{\r//echo \"asdfgh\";\rreturn $result8;\r}\relse\r{\r//echo \"not\";\rreturn false;\r}\r\r}", "public function view_stock_ListCount($id,$product,$added_by)\n\t{\n\t\t$query = $this->db->where('product',$product,'added_by',$added_by)->count_all_results('smb_stock'); \n\t\t\n return $query;\n\t}", "function checkAvailableProduct($prodNum )\n\t\t{\n\t\t\t$db = dbConnect::getInstance();\n \t\t $mysqli = $db->getConnection();\n\t\t\t$query = \" select * from products_tb where id= '\".$prodNum.\"' and status ='1' \"; \n $res = $mysqli->query($query) or die (mysqli_error($mysqli));\n\t\t\tif(mysqli_num_rows($res) > 0)\n\t\t\t{\n\t\t\t\treturn true;\t\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}", "function getTotalRecord(){\n include \"../model/db_connect.php\";\n $query = \"select* from `product`\";\n $runQuery = mysqli_query($connect, $query);\n $numRows = mysqli_num_rows($runQuery);\n mysqli_close($connect);\n return $numRows;\n }", "function getActiveUserCount(){\n $dbobj = DB::connect();\n $sql = \"SELECT count(usr_status) FROM tbl_users WHERE usr_status=1\";\n $result = $dbobj->query($sql);\n if($dbobj->errno){\n echo(\"SQL Error : \" .$dbobj->error);\n exit;\n }\n $rec = $result->fetch_array();\n echo ($rec[0]);\n\n $dbobj->close();\n}", "public function f_get_hr_recom(){\n\n $sql = $this->db->query(\"select count(*) lv_count \n from td_leaves_trans \n where recommendation_status = 1\n and rejection_status = 0\n and approval_status = 0\");\n return $sql->row();\n }", "public function countProduct(){\n return count(Product::all());\n }", "function _alkategoriak_szama($update_id)\n{\n $query = $this->get_where_custom('szulo_kategoria_id', $update_id);\n $num_rows = $query->num_rows();\n return $num_rows;\n}", "public function getCountCarManufacturer(){\r\n\t\t$this->countManufacturer = getValue(\"SELECT active FROM tbl_user WHERE user_id=\".$this->getCarOwnerID());\r\n\t\treturn $this->countManufacturer;\r\n\t}", "function tep_products_in_category_count($categories_id, $include_deactivated = false) {\n $products_count = 0;\n\n if ($include_deactivated) {\n $products_query = tep_db_query(\"select count(*) as total from \" . TABLE_PRODUCTS . \" p, \" . TABLE_PRODUCTS_TO_CATEGORIES . \" p2c where p.products_id = p2c.products_id and p2c.categories_id = '\" . $categories_id . \"'\");\n } else {\n //$products_query = tep_db_query(\"select count(*) as total from \" . TABLE_PRODUCTS . \" p, \" . TABLE_PRODUCTS_TO_CATEGORIES . \" p2c where p.products_id = p2c.products_id and p.products_status != '0' and p2c.categories_id = '\" . $categories_id . \"'\");\n $products_query = tep_db_query(\"select count(*) as total from \" . TABLE_PRODUCTS . \" p, \" . TABLE_PRODUCTS_TO_CATEGORIES . \" p2c where p.products_id = p2c.products_id and p2c.categories_id = '\" . $categories_id . \"'\");\n }\n\n $products = tep_db_fetch_array($products_query);\n\n $products_count += $products['total'];\n\n $childs_query = tep_db_query(\"select categories_id from \" . TABLE_CATEGORIES . \" where parent_id = '\" . $categories_id . \"'\");\n if (tep_db_num_rows($childs_query)) {\n while ($childs = tep_db_fetch_array($childs_query)) {\n $products_count += tep_products_in_category_count($childs['categories_id'], $include_deactivated);\n }\n }\n\n return $products_count;\n}", "function allposts_count($tabel)\n { \n $query = $this->db->where(array(\"fc_status\" => \"F\",\"fc_approve\" => \"0\"))->get($tabel);\n return $query->num_rows(); \n }", "public function get_count()\n {\n $penggunaID = $this->session->userdata['id'];\n $query = \"SELECT COUNT(*) AS `numrows` FROM\n ( SELECT o.`id` AS id_ortu FROM tb_siswa s\n JOIN `tb_orang_tua` o\n ON s.id=o.`siswaID`\n WHERE s.penggunaID=$penggunaID) AS os\n JOIN `tb_laporan_ortu` l\n WHERE l.read_status_siswa='0' AND os.id_ortu = l.`id_ortu`\";\n $result = $this->db->query($query);\n return $result->result_array()[0]['numrows'];\n }" ]
[ "0.76401514", "0.73647857", "0.72429425", "0.70866895", "0.692201", "0.6771638", "0.66964895", "0.66814744", "0.6656777", "0.6651174", "0.65957224", "0.6460973", "0.64398265", "0.63841265", "0.63289696", "0.63180566", "0.6300397", "0.62822735", "0.6268286", "0.62536085", "0.6248678", "0.62281096", "0.62130076", "0.62083733", "0.6207601", "0.61869216", "0.6186077", "0.61713016", "0.61633265", "0.61600554", "0.61406744", "0.6131235", "0.612851", "0.6125449", "0.6123088", "0.6122822", "0.6115767", "0.6100578", "0.60995746", "0.6093705", "0.60784155", "0.60766333", "0.6076319", "0.60640436", "0.60638046", "0.60427743", "0.6035129", "0.6033857", "0.6031562", "0.60187113", "0.6013138", "0.6011655", "0.60069585", "0.59966993", "0.59919196", "0.5990379", "0.59881806", "0.5985913", "0.5984112", "0.5982783", "0.59783477", "0.59759", "0.5972262", "0.5969055", "0.59671813", "0.59638673", "0.5955546", "0.595494", "0.5954924", "0.5946305", "0.5943966", "0.59424525", "0.5942393", "0.59421015", "0.59295344", "0.59212226", "0.5919707", "0.5916084", "0.5915462", "0.5913702", "0.5912884", "0.59112775", "0.5909428", "0.59049696", "0.59042597", "0.5902181", "0.5901234", "0.59010875", "0.5899707", "0.5894942", "0.5894101", "0.5889772", "0.588878", "0.5886553", "0.5886355", "0.5883791", "0.58760935", "0.58746296", "0.58711475", "0.5871088" ]
0.72548336
2
Default component settings. Supported types: subscribe, newsletter Supported themes: light, medium, dark
public function default_settings() : array { return [ 'layout' => 'block', 'newsletter' => '', 'theme' => 'light', 'type' => 'subscribe', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setChannelTemplates(){\n if ($this->channel == self::$WTSORDER_SOURCE_SITE_MOBILE){\n $this->defaultStepTemplates = $this->mobileDefaultStepTemplates;\n } elseif($this->customerIsPro()){\n $this->defaultStepTemplates = $this->proDefaultStepTemplates;\n } \n }", "function simplenews_admin_settings_newsletter($form, &$form_state) {\n $address_default = variable_get('site_mail', ini_get('sendmail_from'));\n $form = array();\n\n $form['simplenews_default_options'] = array(\n '#type' => 'fieldset',\n '#title' => t('Default newsletter options'),\n '#collapsible' => FALSE,\n '#description' => t('These options will be the defaults for new newsletters, but can be overridden in the newsletter editing form.'),\n );\n $links = array('!mime_mail_url' => 'http://drupal.org/project/mimemail', '!html_url' => 'http://drupal.org/project/htmlmail');\n $description = t('Default newsletter format. Install <a href=\"!mime_mail_url\">Mime Mail</a> module or <a href=\"!html_url\">HTML Mail</a> module to send newsletters in HTML format.', $links);\n $form['simplenews_default_options']['simplenews_format'] = array(\n '#type' => 'select',\n '#title' => t('Format'),\n '#options' => simplenews_format_options(),\n '#description' => $description,\n '#default_value' => variable_get('simplenews_format', 'plain'),\n );\n // @todo Do we need these master defaults for 'priority' and 'receipt'?\n $form['simplenews_default_options']['simplenews_priority'] = array(\n '#type' => 'select',\n '#title' => t('Priority'),\n '#options' => simplenews_get_priority(),\n '#description' => t('Note that email priority is ignored by a lot of email programs.'),\n '#default_value' => variable_get('simplenews_priority', SIMPLENEWS_PRIORITY_NONE),\n );\n $form['simplenews_default_options']['simplenews_receipt'] = array(\n '#type' => 'checkbox',\n '#title' => t('Request receipt'),\n '#default_value' => variable_get('simplenews_receipt', 0),\n '#description' => t('Request a Read Receipt from your newsletters. A lot of email programs ignore these so it is not a definitive indication of how many people have read your newsletter.'),\n );\n $form['simplenews_default_options']['simplenews_send'] = array(\n '#type' => 'radios',\n '#title' => t('Default send action'),\n '#options' => array(\n SIMPLENEWS_COMMAND_SEND_TEST => t('Send one test newsletter to the test address'),\n SIMPLENEWS_COMMAND_SEND_NOW => t('Send newsletter'),\n ),\n '#default_value' => variable_get('simplenews_send', 0),\n );\n $form['simplenews_test_address'] = array(\n '#type' => 'fieldset',\n '#title' => t('Test addresses'),\n '#collapsible' => FALSE,\n '#description' => t('Supply a comma-separated list of email addresses to be used as test addresses. The override function allows to override these addresses in the newsletter editing form.'),\n );\n $form['simplenews_test_address']['simplenews_test_address'] = array(\n '#type' => 'textfield',\n '#title' => t('Email address'),\n '#size' => 60,\n '#maxlength' => 128,\n '#default_value' => variable_get('simplenews_test_address', $address_default),\n );\n $form['simplenews_test_address']['simplenews_test_address_override'] = array(\n '#type' => 'checkbox',\n '#title' => t('Allow test address override'),\n '#default_value' => variable_get('simplenews_test_address_override', 0),\n );\n $form['simplenews_sender_info'] = array(\n '#type' => 'fieldset',\n '#title' => t('Sender information'),\n '#collapsible' => FALSE,\n '#description' => t('Default sender address that will only be used for confirmation emails. You can specify sender information for each newsletter separately on the newsletter\\'s settings page.'),\n );\n $form['simplenews_sender_info']['simplenews_from_name'] = array(\n '#type' => 'textfield',\n '#title' => t('From name'),\n '#size' => 60,\n '#maxlength' => 128,\n '#default_value' => variable_get('simplenews_from_name', variable_get('site_name', 'Drupal')),\n );\n $form['simplenews_sender_info']['simplenews_from_address'] = array(\n '#type' => 'textfield',\n '#title' => t('From email address'),\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => TRUE,\n '#default_value' => variable_get('simplenews_from_address', $address_default),\n );\n\n return system_settings_form($form);\n}", "function createWidgetConfig() {\n // Add the emotion Komponent\n $component = $this->createEmotionComponent(\n array(\n 'name' => 'Social Media Widget',\n 'template' => 'emotion_socialmedia',\n 'description' => 'Bindet Socialmedia Buttons als Widget in den Einkaufswelten ein. Die URLs werden in der Pluginkonfiguration hinterlegt (Pluginmanager)'\n )\n );\n $component->createCheckboxField(\n array(\n 'name' => 'additional_styles',\n 'fieldLabel' => 'Border Box',\n 'supportText' => 'Zusätzliche Styles hinzufügen?',\n 'helpTitle' => 'Border Box',\n 'helpText' => 'Hier können sie dem widget einen optischen Rand verpassen um es optisch an das SW5 Responsive Theme anzupassen',\n 'defaultValue' => true\n ) \n );\n $component->createCheckboxField(\n array(\n 'name' => 'icons_round',\n 'fieldLabel' => 'Runde Icons',\n 'supportText' => 'Icons rund oder Eckig?',\n 'helpTitle' => 'Runde Icons',\n 'helpText' => 'Hier legen sie die Form der Socialmedia Icons fest: Rund oder Eckig',\n 'defaultValue' => true\n ) \n );\n // Facebook\n $component->createCheckboxField(\n array(\n 'name' => 'facebook_active',\n 'fieldLabel' => 'Facebook',\n 'supportText' => 'Facebook Button anzeigen',\n 'defaultValue' => false\n )\n );\n\n // Google Plus\n $component->createCheckboxField(\n array(\n 'name' => 'google_active',\n 'fieldLabel' => 'GooglePlus',\n 'supportText' => 'GooglePlus Button anzeigen',\n 'defaultValue' => false\n )\n );\n\n // Twitter\n $component->createCheckboxField(\n array(\n 'name' => 'twitter_active',\n 'fieldLabel' => 'Twitter',\n 'supportText' => 'Twitter Button anzeigen',\n 'defaultValue' => false\n )\n );\n\n // Youtube\n $component->createCheckboxField(\n array(\n 'name' => 'youtube_active',\n 'fieldLabel' => 'YouTube',\n 'supportText' => 'YouTube Button anzeigen',\n 'defaultValue' => false\n )\n );\n }", "function _bellcom_collect_theme_settings() {\n $settings = array();\n\n // Contact information\n $settings['contact_information']['business_owner_name'] = theme_get_setting('business_owner_name');\n $settings['contact_information']['business_startup_year'] = theme_get_setting('business_startup_year');\n $settings['contact_information']['address'] = theme_get_setting('address');\n $settings['contact_information']['zipcode'] = theme_get_setting('zipcode');\n $settings['contact_information']['city'] = theme_get_setting('city');\n $settings['contact_information']['phone_system'] = theme_get_setting('phone_system');\n $settings['contact_information']['phone_readable'] = theme_get_setting('phone_readable');\n $settings['contact_information']['email'] = theme_get_setting('email');\n $settings['contact_information']['working_hours'] = theme_get_setting('working_hours');\n\n // Social links\n $settings['social_links']['facebook']['active'] = theme_get_setting('facebook');\n $settings['social_links']['facebook']['url'] = theme_get_setting('facebook_url');\n $settings['social_links']['facebook']['tooltip'] = t(theme_get_setting('facebook_tooltip'));\n $settings['social_links']['twitter']['active'] = theme_get_setting('twitter');\n $settings['social_links']['twitter']['url'] = theme_get_setting('twitter_url');\n $settings['social_links']['twitter']['tooltip'] = t(theme_get_setting('twitter_tooltip'));\n $settings['social_links']['googleplus']['active'] = theme_get_setting('googleplus');\n $settings['social_links']['googleplus']['url'] = theme_get_setting('googleplus_url');\n $settings['social_links']['googleplus']['tooltip'] = t(theme_get_setting('googleplus_tooltip'));\n $settings['social_links']['instagram']['active'] = theme_get_setting('instagram');\n $settings['social_links']['instagram']['url'] = theme_get_setting('instagram_url');\n $settings['social_links']['instagram']['tooltip'] = t(theme_get_setting('instagram_tooltip'));\n $settings['social_links']['linkedin']['active'] = theme_get_setting('linkedin');\n $settings['social_links']['linkedin']['url'] = theme_get_setting('linkedin_url');\n $settings['social_links']['linkedin']['tooltip'] = t(theme_get_setting('linkedin_tooltip'));\n $settings['social_links']['pinterest']['active'] = theme_get_setting('pinterest');\n $settings['social_links']['pinterest']['url'] = theme_get_setting('pinterest_url');\n $settings['social_links']['pinterest']['tooltip'] = t(theme_get_setting('pinterest_tooltip'));\n $settings['social_links']['vimeo']['active'] = theme_get_setting('vimeo');\n $settings['social_links']['vimeo']['url'] = theme_get_setting('vimeo_url');\n $settings['social_links']['vimeo']['tooltip'] = t(theme_get_setting('vimeo_tooltip'));\n $settings['social_links']['youtube']['active'] = theme_get_setting('youtube');\n $settings['social_links']['youtube']['url'] = theme_get_setting('youtube_url');\n $settings['social_links']['youtube']['tooltip'] = t(theme_get_setting('youtube_tooltip'));\n\n // Layout\n $settings['layout']['copyright'] = ($settings['contact_information']['business_startup_year'] < date('Y') AND $settings['contact_information']['business_startup_year'] !== NULL) ? $settings['contact_information']['business_startup_year'] . '-' . date('Y') : date('Y');\n $settings['layout']['footer']['show_social_links'] = theme_get_setting('footer_show_social_links');\n $settings['layout']['sidebar']['show_social_links'] = theme_get_setting('sidebar_show_social_links');\n\n return $settings;\n}", "function page_builder_settings() {\n\n\t\t$settings = parent::page_builder_settings();\n\n\t\treturn array_merge( $settings, array(\n\t\t\t'name' => __( 'News Ticker', 'publisher' ),\n\t\t\t\"id\" => $this->id,\n\t\t\t\"weight\" => 10,\n\t\t\t\"wrapper_height\" => 'full',\n\t\t\t'icon_url' => PUBLISHER_THEME_URI . 'images/better-newsticker.png',\n\n\t\t\t\"category\" => publisher_white_label_get_option( 'publisher' ),\n\t\t) );\n\t}", "function defaultOptions() {\n $defaults = array(\n 'version' => WPXSMARTSHOP_VERSION,\n\n 'settings' => array(\n\n 'general' => array(\n 'shop_open' => 'n',\n 'shop_name' => '',\n 'shop_logo' => '',\n 'shop_address' => '',\n 'shop_country' => '',\n 'shop_email' => '',\n 'shop_info' => '',\n\n 'measures_weight' => 'gr',\n 'measures_size' => 'mm',\n 'measures_volume' => 'm'\n ),\n\n 'wp_integration' => array(\n 'checkout_permalink' => __( 'checkout', WPXSMARTSHOP_TEXTDOMAIN ),\n 'payment_permalink' => __( 'payment', WPXSMARTSHOP_TEXTDOMAIN ),\n 'receipt_permalink' => __( 'receipt', WPXSMARTSHOP_TEXTDOMAIN ),\n 'error_permalink' => __( 'error', WPXSMARTSHOP_TEXTDOMAIN ),\n\n\n 'store_permalink' => '',\n\n 'shopping_cart_display_for_user_logon_only' => 'y',\n 'shopping_cart_display_empty_button' => 'y',\n\n 'product_picker_post_types' => null,\n 'product_picker_hide_empty_product_type' => 'n',\n 'product_picker_number_of_items' => 10\n ),\n\n 'products' => array(\n 'tab-price' => 'y',\n // every visible\n 'tab-appearance' => 'y',\n 'tab-purchasable' => 'y',\n 'tab-shipping' => 'y',\n 'tab-warehouse' => 'y',\n 'tab-membership' => 'y',\n 'tab-coupons' => 'y',\n 'tab-digital' => 'y',\n 'price_includes_vat' => 'y',\n 'price_display_with_vat' => 'y',\n 'price_display_vat_information' => 'y',\n 'price_display_currency_simbol' => 'y',\n ),\n\n 'orders' => array(\n 'count_pending' => 'n',\n 'defunct_status' => WPXSMARTSHOP_ORDER_STATUS_DEFUNCT,\n 'defunct_status_after' => 1,\n 'defunct_status_after_type' => 'months'\n ),\n\n 'shipments' => array( 'default_carrier' => '', ),\n\n 'payment_gateways' => array(\n 'list_enabled' => WPSmartShopPaymentGateway::listPaymentGateways(),\n 'display_mode' => 'combo-menu'\n ),\n\n 'showcase' => array(\n 'theme_page' => 'page',\n // page | single | custom\n 'theme_header' => 'y',\n 'theme_footer' => 'y',\n 'theme_sidebar' => 'n',\n 'theme_sidebar_id' => '',\n 'theme_markup_header' => base64_encode( WPSmartShopShowcase::markupHeader() ),\n 'theme_markup_footer' => base64_encode( WPSmartShopShowcase::markupFooter() )\n ),\n\n 'product_card' => array(\n 'thumbnail' => 'y',\n 'thumbnail_size' => kWPSmartShopThumbnailSizeMediumKey,\n 'permalink' => 'y',\n 'display_permalink_button' => 'y',\n 'price' => 'y',\n 'excerpt' => 'n',\n 'display_add_to_cart' => 'n',\n 'product_types' => 'y',\n 'product_types_tree' => 'y',\n ),\n\n ),\n );\n return $defaults;\n }", "function set_theme($params)\n\t{\n\n\t\t(object) $theme = array_to_object($params);\n\n \t/**\n \t * ----------------------------------------------------------------------\n\t\t * The YoteyoteUI Main Configuration data array.\n\t\t * ----------------------------------------------------------------------\n\t\t */\n/*\n\t\t$data = array(\n\t\t\t'template' => array(\n \t\t\t'name' => 'Yoteyote',\n\t\t\t 'version' => '1.0',\n\t\t\t 'author' => 'Yoteyote',\n\t\t\t 'title' => 'YoteyoteUI - Premium Web App and Admin Template',\n\t\t\t 'description' => 'YoteyoteUI is a Premium Web App and Admin Template',\n\t\t\t\t'keywords' => 'Yoteyote',\n\n\t\t\t // '' empty to remove full width from the page (< 992px: 100%, > 992px: 95%, 1440px max width)\n\t\t\t // 'full-width' for a full width page (100%, 1920px max width)\n\t\t\t 'page' => 'full-width',\n\n\t\t\t // 'navbar-default' for a light header\n\t\t\t // 'navbar-inverse' for a dark header\n\t\t\t 'header_navbar' => 'navbar-default',\n\n\t\t\t // 'navbar-fixed-top' for a top fixed header\n\t\t\t // 'navbar-fixed-bottom' for a bottom fixed header\n\t\t\t 'header' => 'navbar-fixed-top',\n\n\t\t\t // '' left sidebar will open only from the top left toggle button (better website performance)\n\t\t\t // 'enable-hover' will make a small portion of left sidebar visible, so that it can be opened with a mouse hover (> 1200px) (may affect website performance)\n\t\t\t 'sidebar_left' => 'enable-hover',\n\n\t\t\t // '' right sidebar will open only from the top right toggle button (better website performance)\n\t\t\t // 'enable-hover' will make a small portion of right sidebar visible, so that it can be opened with a mouse hover (> 1200px) (may affect website performance)\n\t\t\t 'sidebar_right' => '',\n\n\t\t\t // '' empty for default behavior\n\t\t\t // 'sidebar-left-pinned' for a left pinned sidebar (always visible > 1200px)\n\t\t\t // 'sidebar-right-pinned' for a right pinned sidebar (always visible > 1200px)\n\t\t\t // 'sidebar-left-pinned sidebar-right-pinned' for both sidebars pinned (always visible > 1200px)\n\t\t\t 'navigation' => '',\n\n\t\t\t // All effects apply in resolutions larger than 1200px width\n\t\t\t // 'fx-none' remove all effects from main content when one of the sidebars are open (better website performance)\n\t\t\t // 'fx-opacity' opacity effect\n\t\t\t // 'fx-move' move effect\n\t\t\t // 'fx-push' push effect\n\t\t\t // 'fx-rotate' rotate effect\n\t\t\t // 'fx-push-move' push-move effect\n\t\t\t // 'fx-push-rotate' push-rotate effect\n\t\t\t 'content_fx' => 'fx-opacity',\n\n\t\t\t // Available themes: 'river', 'amethyst' , 'dragon', 'emerald', 'grass' or '' leave empty for the default fresh orange\n\t\t\t 'theme' => 'dragon',\n\t\t\t //'theme' => $this->input->cookie('theme_cookie', TRUE),\n\n\t\t\t //'active_page' => basename($_SERVER['PHP_SELF']),\n\t\t\t 'active_page' => current_url($page), // To get the CI current page.\n\t\t\t),\n\t\t);\n*/\n\n\t\t$data = array(\n\t\t\t'template' => array(\n \t\t\t'name' => $theme->name,\n\t\t\t 'version' => $theme->version,\n\t\t\t 'author' => $theme->author,\n\t\t\t 'title' => $theme->title,\n\t\t\t 'description' => $theme->description,\n\t\t\t\t'keywords' => $theme->keywords,\n\t\t\t 'page' => $theme->page,\n\t\t\t 'header_navbar' => $theme->header_navbar,\n\t\t\t 'header' => $theme->header,\n\t\t\t 'sidebar_left' => $theme->sidebar_left,\n\t\t\t 'sidebar_right' => $theme->sidebar_right,\n\t\t\t 'navigation' => $theme->navigation,\n\t\t\t 'content_fx' => $theme->content_fx,\n\t\t\t 'theme' => $theme->theme,\n\t\t\t 'active_page' => $theme->active_page,\n\t\t\t),\n\t\t);\n\n\t\treturn $data;\n\t}", "function bdpp_default_settings() {\n\t\n\tglobal $bdpp_options;\n\t\n\t$bdpp_options = array(\n\t\t\t\t\t'post_types'\t\t\t=> array(0 => 'post'),\n\t\t\t\t\t'trend_post_types'\t\t=> array(),\n\t\t\t\t\t'sharing_enable'\t\t=> 0,\n\t\t\t\t\t'sharing'\t\t\t\t=> array(),\n\t\t\t\t\t'sharing_lbl'\t\t\t=> esc_html__('Share this', 'blog-designer-pack'),\n\t\t\t\t\t'sharing_design'\t\t=> 'design-1',\n\t\t\t\t\t'sharing_post_types'\t=> array(),\n\t\t\t\t\t'disable_font_awsm_css'\t=> 0,\n\t\t\t\t\t'disable_owl_css'\t\t=> 0,\n\t\t\t\t\t'custom_css'\t\t\t=> '',\n\t\t\t\t);\n\n\t$default_options = apply_filters('bdpp_default_options_values', $bdpp_options );\n\n\t// Update default options\n\tupdate_option( 'bdpp_opts', $default_options );\n\t\n\t// Overwrite global variable when option is update\n\t$bdpp_options = bdpp_get_settings();\n}", "public function testAdaptiveFormAndInteractiveCommunicationWebChannelThemeConfigur()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/Adaptive Form and Interactive Communication Web Channel Theme Configuration';\n\n $crawler = $client->request('POST', $path);\n }", "function load_defaults(){\n\t\t\n\t\t$this->choices = array(\n\t\t\t'yes' => __('Enable', 'wa_wcc_txt'),\n\t\t\t'no' => __('Disable', 'wa_wcc_txt')\n\t\t);\n\n\t\t$this->loading_places = array(\n\t\t\t'header' => __('Header', 'wa_wcc_txt'),\n\t\t\t'footer' => __('Footer', 'wa_wcc_txt')\n\t\t);\n\n\t\t$this->tabs = array(\n\t\t\t'general-settings' => array(\n\t\t\t\t'name' => __('General', 'wa_wcc_txt'),\n\t\t\t\t'key' => 'wa_wcc_settings',\n\t\t\t\t'submit' => 'save_wa_wcc_settings',\n\t\t\t\t'reset' => 'reset_wa_wcc_settings',\n\t\t\t),\n 'configuration' => array(\n 'name' => __('Advanced', 'wa_wcc_txt'),\n 'key' => 'wa_wcc_configuration',\n 'submit' => 'save_wa_wcc_configuration',\n 'reset' => 'reset_wa_wcc_configuration'\n )\n\t\t);\n\t}", "public function set_defaults() {\n\n\t\t// Retrieve the stylesheet option to set the proper defaults\n\t\t$style_option = tribe_get_option( 'stylesheetOption', 'tribe' );\n\n\t\tswitch ( $style_option ) {\n\t\t\tcase 'full': // Full styles\n\t\t\t\t$this->defaults = array(\n\t\t\t\t\t'table_bg_color' => '#fff',\n\t\t\t\t\t'highlight_color' => '#666',\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'skeleton': // Skeleton styles\n\t\t\tdefault: // tribe styles is the default so add full and theme (tribe)\n\t\t\t\t$this->defaults = array(\n\t\t\t\t\t'table_bg_color' => '#f9f9f9',\n\t\t\t\t\t'highlight_color' => '#21759b',\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t}\n\t}", "private function defaultSettings()\n {\n\t\t$default_config = array(\n 'Plugins.Keypic.SigninEnabled' => false,\n\t\t\t 'Plugins.Keypic.SignupEnabled' => true,\n\t\t\t 'Plugins.Keypic.PostEnabled' => true,\n\t\t\t 'Plugins.Keypic.CommentEnabled' => true,\n\t\t\t 'Plugins.Keypic.SigninWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.PostWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.CommentWidthHeight' => '1x1',\n\t\t\t 'Plugins.Keypic.SignupRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.SigninRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.PostRequestType' => 'getScript',\n\t\t\t 'Plugins.Keypic.CommentRequestType' => 'getScript',\n\t\t );\n\t\t \n\t\tSaveToConfig($default_config);\n }", "function blueauthentic_theme_settings() {\n\tadd_settings_section(\n\t\t'social_section',\n\t\t'Social Media Account Links/URLs',\n\t\t'blueauthentic_social_section_description',\n\t\t'theme-options-section-social'\n\t);\n\n\tadd_option( 'social_facebook_option', 1 );\n\tadd_settings_field(\n\t\t'social_facebook_option',\n\t\t'Facebook Account',\n\t\t'social_facebook_option_callback',\n\t\t'theme-options-section-social',\n\t\t'social_section'\n\t);\n\tregister_setting( 'theme-options-group-social', 'social_facebook_option' );\n\n\tadd_option( 'social_twitter_option', 2 );\n\tadd_settings_field(\n\t\t'social_twitter_option',\n\t\t'Twitter Account',\n\t\t'social_twitter_option_callback',\n\t\t'theme-options-section-social',\n\t\t'social_section'\n\t);\n\tregister_setting( 'theme-options-group-social', 'social_twitter_option' );\n\n\tadd_option( 'social_youtube_option', 3 );\n\tadd_settings_field(\n\t\t'social_youtube_option',\n\t\t'Youtube Account',\n\t\t'social_youtube_option_callback',\n\t\t'theme-options-section-social',\n\t\t'social_section'\n\t);\n\tregister_setting( 'theme-options-group-social', 'social_youtube_option' );\n}", "function bb_mystique_default_settings() {\r\n\t$defaults = array(\r\n\t\t'twitter_id' => '_GautamGupta_', // your twitter id\r\n\t\t'twitter_count' => '5', // number of tweets to display\r\n\t\t'background' => '', // background image url\r\n\t\t'background_color' => '000000', // background color\r\n\t\t'color_scheme' => 'green', // green or red or blue or grey\r\n\t\t'page_width' => 'fixed', // fixed or fluid\r\n\t\t'font_style' => 0, // check the codes in bb_mystique_font_styles function\r\n\t\t'logo' => '', // logo url\r\n\t\t'logo_size' => '', //eg 500x200 where 500 = width, 200 = height\r\n\t\t'user_css' => '', // custom css\r\n\t\t/* Don't change anything below this, for now */\r\n\t\t'theme_version' => BB_MYSTIQUE_THEME_VERSION,\r\n\t\t'jquery' => 1\r\n\t\t);\r\n\r\n\t$defaults = apply_filters( 'bb_mystique_default_settings', $defaults ); // check for new default setting entries from extensions\r\n\treturn $defaults;\r\n}", "public function setDefaultDesignTheme();", "function julia_kaya_customizer_settings() \r\n\t{\r\n\t\tadd_theme_page( esc_html__('Customizer Import','julia'), esc_html__('Customizer Import','julia'), 'edit_theme_options', 'import', array( $this,'julia_kaya_customize_import_option_page'));\r\n add_theme_page( esc_html__('Customizer Export','julia'), esc_html__('Customizer Export','julia'), 'edit_theme_options', 'export', array( $this,'julia_kaya_customize_export_option_page'));\r\n }", "public static function getDefaultWidgetSettings(){\n return array(\n 'ChatBox' => array(\n 'chatboxHeight' => 300,\n 'chatmessageHeight' => 50,\n ),\n 'NoteBox' => array(\n 'noteboxHeight' => 200,\n 'notemessageHeight' => 50,\n ),\n 'DocViewer' => array(\n 'docboxHeight' => 200,\n ),\n 'TopSites' => array(\n 'topsitesHeight' => 200,\n 'urltitleHeight' => 10,\n ),\n 'MediaBox' => array(\n 'mediaBoxHeight' => 150,\n 'hideUsers' => array(),\n ),\n 'TimeZone' => array(\n 'clockType' => 'analog'\n ),\n 'SmallCalendar' => array(\n 'justMe' => 'false'\n ),\n 'FilterControls' => array(\n 'order' => array()\n )\n );\n }", "protected function admin_fields_settings() {\n\n $settings_fields = array(\n\n 'wcsales_general_tabs' => array(),\n \n 'wcsales_settings_tabs' => array(\n\n array(\n 'name' => 'enableresalenotification',\n 'label' => __( 'Enable / Disable Sale Notification', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Enable', 'wc-sales-notification-pro' ),\n 'type' => 'checkbox',\n 'default' => 'off',\n 'class'=>'woolentor_table_row',\n ),\n\n array(\n 'name' => 'notification_content_type',\n 'label' => __( 'Notification Content Type', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Select Content Type', 'wc-sales-notification-pro' ),\n 'type' => 'radio',\n 'default' => 'actual',\n 'options' => array(\n 'actual' => __('Real','wc-sales-notification-pro'),\n 'fakes' => __('Fakes','wc-sales-notification-pro'),\n )\n ),\n\n array(\n 'name' => 'notification_pos',\n 'label' => __( 'Position', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Sale Notification Position on frontend.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'bottomleft',\n 'options' => array(\n 'topleft' =>__( 'Top Left','wc-sales-notification-pro' ),\n 'topright' =>__( 'Top Right','wc-sales-notification-pro' ),\n 'bottomleft' =>__( 'Bottom Left','wc-sales-notification-pro' ),\n 'bottomright' =>__( 'Bottom Right','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_layout',\n 'label' => __( 'Image Position', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Layout.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'imageleft',\n 'options' => array(\n 'imageleft' =>__( 'Image Left','wc-sales-notification-pro' ),\n 'imageright' =>__( 'Image Right','wc-sales-notification-pro' ),\n ),\n 'class' => 'notification_real'\n ),\n\n array(\n 'name' => 'notification_loadduration',\n 'label' => __( 'Loading Time', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Loading duration.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '3',\n 'options' => array(\n '2' =>__( '2 seconds','wc-sales-notification-pro' ),\n '3' =>__( '3 seconds','wc-sales-notification-pro' ),\n '4' =>__( '4 seconds','wc-sales-notification-pro' ),\n '5' =>__( '5 seconds','wc-sales-notification-pro' ),\n '6' =>__( '6 seconds','wc-sales-notification-pro' ),\n '7' =>__( '7 seconds','wc-sales-notification-pro' ),\n '8' =>__( '8 seconds','wc-sales-notification-pro' ),\n '9' =>__( '9 seconds','wc-sales-notification-pro' ),\n '10' =>__( '10 seconds','wc-sales-notification-pro' ),\n '20' =>__( '20 seconds','wc-sales-notification-pro' ),\n '30' =>__( '30 seconds','wc-sales-notification-pro' ),\n '40' =>__( '40 seconds','wc-sales-notification-pro' ),\n '50' =>__( '50 seconds','wc-sales-notification-pro' ),\n '60' =>__( '1 minute','wc-sales-notification-pro' ),\n '90' =>__( '1.5 minutes','wc-sales-notification-pro' ),\n '120' =>__( '2 minutes','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_time_int',\n 'label' => __( 'Time Interval', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Time between notifications.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '4',\n 'options' => array(\n '2' =>__( '2 seconds','wc-sales-notification-pro' ),\n '4' =>__( '4 seconds','wc-sales-notification-pro' ),\n '5' =>__( '5 seconds','wc-sales-notification-pro' ),\n '6' =>__( '6 seconds','wc-sales-notification-pro' ),\n '7' =>__( '7 seconds','wc-sales-notification-pro' ),\n '8' =>__( '8 seconds','wc-sales-notification-pro' ),\n '9' =>__( '9 seconds','wc-sales-notification-pro' ),\n '10' =>__( '10 seconds','wc-sales-notification-pro' ),\n '20' =>__( '20 seconds','wc-sales-notification-pro' ),\n '30' =>__( '30 seconds','wc-sales-notification-pro' ),\n '40' =>__( '40 seconds','wc-sales-notification-pro' ),\n '50' =>__( '50 seconds','wc-sales-notification-pro' ),\n '60' =>__( '1 minute','wc-sales-notification-pro' ),\n '90' =>__( '1.5 minutes','wc-sales-notification-pro' ),\n '120' =>__( '2 minutes','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_limit',\n 'label' => __( 'Limit', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Order Limit for notification.', 'wc-sales-notification-pro' ),\n 'min' => 1,\n 'max' => 100,\n 'default' => '5',\n 'step' => '1',\n 'type' => 'number',\n 'sanitize_callback' => 'number',\n 'class' => 'notification_real',\n ),\n\n array(\n 'name' => 'notification_uptodate',\n 'label' => __( 'Order Upto', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Do not show purchases older than.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => '7',\n 'options' => array(\n '1' =>__( '1 day','wc-sales-notification-pro' ),\n '2' =>__( '2 days','wc-sales-notification-pro' ),\n '3' =>__( '3 days','wc-sales-notification-pro' ),\n '4' =>__( '4 days','wc-sales-notification-pro' ),\n '5' =>__( '5 days','wc-sales-notification-pro' ),\n '6' =>__( '6 days','wc-sales-notification-pro' ),\n '7' =>__( '1 week','wc-sales-notification-pro' ),\n '10' =>__( '10 days','wc-sales-notification-pro' ),\n '14' =>__( '2 weeks','wc-sales-notification-pro' ),\n '21' =>__( '3 weeks','wc-sales-notification-pro' ),\n '28' =>__( '4 weeks','wc-sales-notification-pro' ),\n '35' =>__( '5 weeks','wc-sales-notification-pro' ),\n '42' =>__( '6 weeks','wc-sales-notification-pro' ),\n '49' =>__( '7 weeks','wc-sales-notification-pro' ),\n '56' =>__( '8 weeks','wc-sales-notification-pro' ),\n ),\n 'class' => 'notification_real',\n ),\n\n array(\n 'name' => 'notification_inanimation',\n 'label' => __( 'Animation In', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Enter Animation.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'fadeInLeft',\n 'options' => array(\n 'bounce' =>__( 'bounce','wc-sales-notification-pro' ),\n 'flash' =>__( 'flash','wc-sales-notification-pro' ),\n 'pulse' =>__( 'pulse','wc-sales-notification-pro' ),\n 'rubberBand' =>__( 'rubberBand','wc-sales-notification-pro' ),\n 'shake' =>__( 'shake','wc-sales-notification-pro' ),\n 'swing' =>__( 'swing','wc-sales-notification-pro' ),\n 'tada' =>__( 'tada','wc-sales-notification-pro' ),\n 'wobble' =>__( 'wobble','wc-sales-notification-pro' ),\n 'jello' =>__( 'jello','wc-sales-notification-pro' ),\n 'heartBeat' =>__( 'heartBeat','wc-sales-notification-pro' ),\n 'bounceIn' =>__( 'bounceIn','wc-sales-notification-pro' ),\n 'bounceInDown' =>__( 'bounceInDown','wc-sales-notification-pro' ),\n 'bounceInLeft' =>__( 'bounceInLeft','wc-sales-notification-pro' ),\n 'bounceInRight' =>__( 'bounceInRight','wc-sales-notification-pro' ),\n 'bounceInUp' =>__( 'bounceInUp','wc-sales-notification-pro' ),\n 'fadeIn' =>__( 'fadeIn','wc-sales-notification-pro' ),\n 'fadeInDown' =>__( 'fadeInDown','wc-sales-notification-pro' ),\n 'fadeInDownBig' =>__( 'fadeInDownBig','wc-sales-notification-pro' ),\n 'fadeInLeft' =>__( 'fadeInLeft','wc-sales-notification-pro' ),\n 'fadeInLeftBig' =>__( 'fadeInLeftBig','wc-sales-notification-pro' ),\n 'fadeInRight' =>__( 'fadeInRight','wc-sales-notification-pro' ),\n 'fadeInRightBig' =>__( 'fadeInRightBig','wc-sales-notification-pro' ),\n 'fadeInUp' =>__( 'fadeInUp','wc-sales-notification-pro' ),\n 'fadeInUpBig' =>__( 'fadeInUpBig','wc-sales-notification-pro' ),\n 'flip' =>__( 'flip','wc-sales-notification-pro' ),\n 'flipInX' =>__( 'flipInX','wc-sales-notification-pro' ),\n 'flipInY' =>__( 'flipInY','wc-sales-notification-pro' ),\n 'lightSpeedIn' =>__( 'lightSpeedIn','wc-sales-notification-pro' ),\n 'rotateIn' =>__( 'rotateIn','wc-sales-notification-pro' ),\n 'rotateInDownLeft' =>__( 'rotateInDownLeft','wc-sales-notification-pro' ),\n 'rotateInDownRight' =>__( 'rotateInDownRight','wc-sales-notification-pro' ),\n 'rotateInUpLeft' =>__( 'rotateInUpLeft','wc-sales-notification-pro' ),\n 'rotateInUpRight' =>__( 'rotateInUpRight','wc-sales-notification-pro' ),\n 'slideInUp' =>__( 'slideInUp','wc-sales-notification-pro' ),\n 'slideInDown' =>__( 'slideInDown','wc-sales-notification-pro' ),\n 'slideInLeft' =>__( 'slideInLeft','wc-sales-notification-pro' ),\n 'slideInRight' =>__( 'slideInRight','wc-sales-notification-pro' ),\n 'zoomIn' =>__( 'zoomIn','wc-sales-notification-pro' ),\n 'zoomInDown' =>__( 'zoomInDown','wc-sales-notification-pro' ),\n 'zoomInLeft' =>__( 'zoomInLeft','wc-sales-notification-pro' ),\n 'zoomInRight' =>__( 'zoomInRight','wc-sales-notification-pro' ),\n 'zoomInUp' =>__( 'zoomInUp','wc-sales-notification-pro' ),\n 'hinge' =>__( 'hinge','wc-sales-notification-pro' ),\n 'jackInTheBox' =>__( 'jackInTheBox','wc-sales-notification-pro' ),\n 'rollIn' =>__( 'rollIn','wc-sales-notification-pro' ),\n 'rollOut' =>__( 'rollOut','wc-sales-notification-pro' ),\n ),\n ),\n\n array(\n 'name' => 'notification_outanimation',\n 'label' => __( 'Animation Out', 'wc-sales-notification-pro' ),\n 'desc' => __( 'Notification Out Animation.', 'wc-sales-notification-pro' ),\n 'type' => 'select',\n 'default' => 'fadeOutRight',\n 'options' => array(\n 'bounce' =>__( 'bounce','wc-sales-notification-pro' ),\n 'flash' =>__( 'flash','wc-sales-notification-pro' ),\n 'pulse' =>__( 'pulse','wc-sales-notification-pro' ),\n 'rubberBand' =>__( 'rubberBand','wc-sales-notification-pro' ),\n 'shake' =>__( 'shake','wc-sales-notification-pro' ),\n 'swing' =>__( 'swing','wc-sales-notification-pro' ),\n 'tada' =>__( 'tada','wc-sales-notification-pro' ),\n 'wobble' =>__( 'wobble','wc-sales-notification-pro' ),\n 'jello' =>__( 'jello','wc-sales-notification-pro' ),\n 'heartBeat' =>__( 'heartBeat','wc-sales-notification-pro' ),\n 'bounceOut' =>__( 'bounceOut','wc-sales-notification-pro' ),\n 'bounceOutDown' =>__( 'bounceOutDown','wc-sales-notification-pro' ),\n 'bounceOutLeft' =>__( 'bounceOutLeft','wc-sales-notification-pro' ),\n 'bounceOutRight' =>__( 'bounceOutRight','wc-sales-notification-pro' ),\n 'bounceOutUp' =>__( 'bounceOutUp','wc-sales-notification-pro' ),\n 'fadeOut' =>__( 'fadeOut','wc-sales-notification-pro' ),\n 'fadeOutDown' =>__( 'fadeOutDown','wc-sales-notification-pro' ),\n 'fadeOutDownBig' =>__( 'fadeOutDownBig','wc-sales-notification-pro' ),\n 'fadeOutLeft' =>__( 'fadeOutLeft','wc-sales-notification-pro' ),\n 'fadeOutLeftBig' =>__( 'fadeOutLeftBig','wc-sales-notification-pro' ),\n 'fadeOutRight' =>__( 'fadeOutRight','wc-sales-notification-pro' ),\n 'fadeOutRightBig' =>__( 'fadeOutRightBig','wc-sales-notification-pro' ),\n 'fadeOutUp' =>__( 'fadeOutUp','wc-sales-notification-pro' ),\n 'fadeOutUpBig' =>__( 'fadeOutUpBig','wc-sales-notification-pro' ),\n 'flip' =>__( 'flip','wc-sales-notification-pro' ),\n 'flipOutX' =>__( 'flipOutX','wc-sales-notification-pro' ),\n 'flipOutY' =>__( 'flipOutY','wc-sales-notification-pro' ),\n 'lightSpeedOut' =>__( 'lightSpeedOut','wc-sales-notification-pro' ),\n 'rotateOut' =>__( 'rotateOut','wc-sales-notification-pro' ),\n 'rotateOutDownLeft' =>__( 'rotateOutDownLeft','wc-sales-notification-pro' ),\n 'rotateOutDownRight' =>__( 'rotateOutDownRight','wc-sales-notification-pro' ),\n 'rotateOutUpLeft' =>__( 'rotateOutUpLeft','wc-sales-notification-pro' ),\n 'rotateOutUpRight' =>__( 'rotateOutUpRight','wc-sales-notification-pro' ),\n 'slideOutUp' =>__( 'slideOutUp','wc-sales-notification-pro' ),\n 'slideOutDown' =>__( 'slideOutDown','wc-sales-notification-pro' ),\n 'slideOutLeft' =>__( 'slideOutLeft','wc-sales-notification-pro' ),\n 'slideOutRight' =>__( 'slideOutRight','wc-sales-notification-pro' ),\n 'zoomOut' =>__( 'zoomOut','wc-sales-notification-pro' ),\n 'zoomOutDown' =>__( 'zoomOutDown','wc-sales-notification-pro' ),\n 'zoomOutLeft' =>__( 'zoomOutLeft','wc-sales-notification-pro' ),\n 'zoomOutRight' =>__( 'zoomOutRight','wc-sales-notification-pro' ),\n 'zoomOutUp' =>__( 'zoomOutUp','wc-sales-notification-pro' ),\n 'hinge' =>__( 'hinge','wc-sales-notification-pro' ),\n ),\n ),\n \n array(\n 'name' => 'background_color',\n 'label' => __( 'Background Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Background Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'heading_color',\n 'label' => __( 'Heading Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Heading Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'content_color',\n 'label' => __( 'Content Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Content Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color',\n ),\n\n array(\n 'name' => 'cross_color',\n 'label' => __( 'Cross Icon Color', 'wc-sales-notification-pro' ),\n 'desc' => wp_kses_post( 'Notification Cross Icon Color.', 'wc-sales-notification-pro' ),\n 'type' => 'color'\n ),\n\n ),\n\n 'wcsales_fakes_data_tabs' => array(),\n 'wcsales_plugins_tabs' => array(),\n\n );\n \n return array_merge( $settings_fields );\n }", "public function settings() {\n\n\t\tif (function_exists('acf_add_options_page')) {\n\t\t\tacf_add_options_page([\n\t\t\t\t'page_title' => 'Message Bar',\n\t\t\t\t'menu_title' => 'Message Bar',\n\t\t\t\t'menu_slug' => 'vtl-message-bar',\n\t\t\t\t'parent_slug' => 'options-general.php',\n\t\t\t\t'update_button' => 'Save',\n\t\t\t\t'updated_message' => 'Settings Saved.',\n\t\t\t\t'capability' => 'edit_posts',\n\t\t\t\t'redirect' => false,\n\t\t\t]);\n\t\t}\n\n\t\tif (function_exists('acf_add_local_field_group')) {\n\t\t\tacf_add_local_field_group([\n\t\t\t\t'key' => 'group_vtlmb_settings',\n\t\t\t\t'title' => 'Message Bar',\n\t\t\t\t'fields' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_wuy83TqopJge',\n\t\t\t\t\t\t'label' => 'Content',\n\t\t\t\t\t\t'name' => 'vtlmb_tab1',\n\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t'placement' => 'top',\n\t\t\t\t\t\t'endpoint' => 0,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_UHSBFNxFi7NI',\n\t\t\t\t\t\t'label' => 'Active',\n\t\t\t\t\t\t'name' => 'vtlmb_active',\n\t\t\t\t\t\t'type' => 'true_false',\n\t\t\t\t\t\t'default_value' => 0,\n\t\t\t\t\t\t'ui' => 1,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_YrDYLFOGn1G5',\n\t\t\t\t\t\t'label' => 'Message Text',\n\t\t\t\t\t\t'name' => 'vtlmb_msg_text',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'required' => 1,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_a8LoztxeAYk3',\n\t\t\t\t\t\t'label' => 'Message Link',\n\t\t\t\t\t\t'name' => 'vtlmb_msg_link',\n\t\t\t\t\t\t'type' => 'link',\n\t\t\t\t\t\t'return_format' => 'array',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_NkTXVtvoVfa7',\n\t\t\t\t\t\t'label' => 'Colors',\n\t\t\t\t\t\t'name' => 'vtlmb_tab2',\n\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t'placement' => 'top',\n\t\t\t\t\t\t'endpoint' => 0,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_87uUvYh0uao6',\n\t\t\t\t\t\t'label' => 'Text Color',\n\t\t\t\t\t\t'name' => 'vtlmb_text_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#ffffff',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_p6oUdVBsfBGD',\n\t\t\t\t\t\t'label' => 'Background Color',\n\t\t\t\t\t\t'name' => 'vtlmb_bg_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#000000',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_aLsZN5CX3Yrt',\n\t\t\t\t\t\t'label' => 'Link Text Color',\n\t\t\t\t\t\t'name' => 'vtlmb_link_text_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#000000',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_ewp2unznstTj',\n\t\t\t\t\t\t'label' => 'Link Background Color',\n\t\t\t\t\t\t'name' => 'vtlmb_link_bg_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#ffffff',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_2r9DHwtfnruQ',\n\t\t\t\t\t\t'label' => 'Link Hover/Focus Text Color',\n\t\t\t\t\t\t'name' => 'vtlmb_link_focus_text_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#ffffff',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_2eED3wM93qki',\n\t\t\t\t\t\t'label' => 'Link Hover/Focus Background Color',\n\t\t\t\t\t\t'name' => 'vtlmb_link_focus_bg_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#aaaaaa',\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_pK7BL9moCKXY',\n\t\t\t\t\t\t'label' => 'Dismiss Button Color',\n\t\t\t\t\t\t'name' => 'vtlmb_dismiss_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#ffffff',\n\t\t\t\t\t\t'conditional_logic' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'field' => 'field_vtlmb_bXRGjXDVjHub',\n\t\t\t\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t\t\t\t'value' => 1,\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\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_OTwWHHbPTAeL',\n\t\t\t\t\t\t'label' => 'Dismiss Button Hover/Focus Color',\n\t\t\t\t\t\t'name' => 'vtlmb_dismiss_focus_color',\n\t\t\t\t\t\t'type' => 'color_picker',\n\t\t\t\t\t\t'default_value' => '#aaaaaa',\n\t\t\t\t\t\t'conditional_logic' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'field' => 'field_vtlmb_bXRGjXDVjHub',\n\t\t\t\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t\t\t\t'value' => 1,\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\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_czp6fHA6kG3T',\n\t\t\t\t\t\t'label' => 'Settings',\n\t\t\t\t\t\t'name' => 'vtlmb_tab3',\n\t\t\t\t\t\t'type' => 'tab',\n\t\t\t\t\t\t'placement' => 'top',\n\t\t\t\t\t\t'endpoint' => 0,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_PuZcPuB3nIp7',\n\t\t\t\t\t\t'label' => 'Make bar sticky',\n\t\t\t\t\t\t'name' => 'vtlmb_sticky',\n\t\t\t\t\t\t'type' => 'true_false',\n\t\t\t\t\t\t'instructions' => 'Pins bar to the top of the page when scrolling',\n\t\t\t\t\t\t'default_value' => 0,\n\t\t\t\t\t\t'ui' => 1,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_bXRGjXDVjHub',\n\t\t\t\t\t\t'label' => 'Allow bar to be dismissed?',\n\t\t\t\t\t\t'name' => 'vtlmb_dismissable',\n\t\t\t\t\t\t'type' => 'true_false',\n\t\t\t\t\t\t'default_value' => 1,\n\t\t\t\t\t\t'ui' => 1,\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'key' => 'field_vtlmb_tt0f6K03EFHE',\n\t\t\t\t\t\t'label' => 'Cookie Expiration Time',\n\t\t\t\t\t\t'name' => 'vtlmb_cookie_expires',\n\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t'instructions' => 'Message bar dismissal cookie expiration time in seconds. Cookie will expire with browser session if left blank.',\n\t\t\t\t\t\t'default_value' => 86400,\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'step' => 1,\n\t\t\t\t\t\t'append' => 'seconds',\n\t\t\t\t\t\t'conditional_logic' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'field' => 'field_vtlmb_bXRGjXDVjHub',\n\t\t\t\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t\t\t\t'value' => 1,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'location' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'param' => 'options_page',\n\t\t\t\t\t\t\t'operator' => '==',\n\t\t\t\t\t\t\t'value' => 'vtl-message-bar',\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'style' => 'seamless',\n\t\t\t\t'label_placement' => 'top',\n\t\t\t\t'instruction_placement' => 'label',\n\t\t\t\t'active' => 1,\n\t\t\t]);\n\t\t}\n\n\t}", "function ac_nl_settings_page() {\n\t?>\n\t<div class=\"wrap\">\n\t\t<h2>Newsletter Subscription plugin settings</h2>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t <?php settings_fields( 'ac-nl-settings-group' ); ?>\n\t\t <?php do_settings_sections( 'ac-nl-settings-group' ); ?>\n\t\t <table class=\"form-table\">\n\t\t <tr valign=\"top\">\n\t\t\t <th scope=\"row\">API Key</th>\n\t\t\t <td><input type=\"text\" name=\"ac_nl_api_key\" value=\"<?php echo esc_attr( get_option( 'ac_nl_api_key' ) ); ?>\" /></td>\n\t\t </tr> \n\t\t <tr valign=\"top\">\n\t\t\t <th scope=\"row\">List ID</th>\n\t\t\t <td><input type=\"number\" name=\"ac_nl_list_id\" value=\"<?php echo esc_attr( get_option( 'ac_nl_list_id' ) ); ?>\" /></td>\n\t\t </tr>\n\t\t </table> \n\t\t <?php submit_button(); ?>\n\t\t</form>\n\t</div>\n<?php }", "function theme_tvchat_admin_page($flags, $default_flags) \n{\n $output = '<p>' . t('TV Chat 프로그램에 대한 각종 설정을 관리합니다.').'</p>';\n\n $output .= drupal_get_form( 'tvchat_config_form');\n return $output;\n}", "function tsc_theme_options() {\n\tadd_theme_page( 'Theme Options', 'Theme Options', 'edit_theme_options', 'theme_options', 'tsc_theme_options_page' );\n}", "function get_settings() {\n\n $defaults = [\n 'general' => [\n 'label' => __( 'General', 'fwp' ),\n 'fields' => [\n 'license_key' => [\n 'label' => __( 'License Key', 'fwp' ),\n 'html' => $this->get_field_html( 'license_key' )\n ],\n 'gmaps_api_key' => [\n 'label' => __( 'Google Maps API Key', 'fwp' ),\n 'html' => $this->get_field_html( 'gmaps_api_key' )\n ],\n 'separators' => [\n 'label' => __( 'Separators', 'fwp' ),\n 'html' => $this->get_field_html( 'separators' )\n ],\n 'loading_animation' => [\n 'label' => __( 'Loading Animation', 'fwp' ),\n 'html' => $this->get_field_html( 'loading_animation', 'dropdown', [\n 'choices' => [ 'fade' => __( 'Fade', 'fwp' ), '' => __( 'Spin', 'fwp' ), 'none' => __( 'None', 'fwp' ) ]\n ] )\n ],\n 'prefix' => [\n 'label' => __( 'URL Prefix', 'fwp' ),\n 'html' => $this->get_field_html( 'prefix', 'dropdown', [\n 'choices' => [ 'fwp_' => 'fwp_', '_' => '_' ]\n ] )\n ],\n 'debug_mode' => [\n 'label' => __( 'Debug Mode', 'fwp' ),\n 'html' => $this->get_field_html( 'debug_mode', 'toggle', [\n 'true_value' => 'on',\n 'false_value' => 'off'\n ] )\n ]\n ]\n ],\n 'woocommerce' => [\n 'label' => __( 'WooCommerce', 'fwp' ),\n 'fields' => [\n 'wc_enable_variations' => [\n 'label' => __( 'Support product variations?', 'fwp' ),\n 'notes' => __( 'Enable if your store uses variable products.', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_enable_variations', 'toggle' )\n ],\n 'wc_index_all' => [\n 'label' => __( 'Include all products?', 'fwp' ),\n 'notes' => __( 'Show facet choices for out-of-stock products?', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_index_all', 'toggle' )\n ]\n ]\n ],\n 'backup' => [\n 'label' => __( 'Backup', 'fwp' ),\n 'fields' => [\n 'export' => [\n 'label' => __( 'Export', 'fwp' ),\n 'html' => $this->get_field_html( 'export' )\n ],\n 'import' => [\n 'label' => __( 'Import', 'fwp' ),\n 'html' => $this->get_field_html( 'import' )\n ]\n ]\n ]\n ];\n\n if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) {\n unset( $defaults['woocommerce'] );\n }\n\n return apply_filters( 'facetwp_settings_admin', $defaults, $this );\n }", "function page_builder_settings() {\n\n\t\t$settings = parent::page_builder_settings();\n\n\t\treturn array_merge( $settings, array(\n\t\t\t'name' => __( 'Social Share Buttons', 'publisher' ),\n\t\t\t\"base\" => $this->id,\n\t\t\t\"weight\" => 1,\n\t\t\t\"wrapper_height\" => 'full',\n\t\t\t\"category\" => publisher_white_label_get_option( 'publisher' ),\n\t\t\t'icon_url' => PUBLISHER_THEME_URI . 'images/shortcodes/bs-social-share.png',\n\t\t) );\n\t}", "function kalmanhosszu_settings($saved_settings, $subtheme_defaults = array()) {\n\n $form = array();\n\n // Get the default values from the .info file.\n $themes = list_themes();\n $defaults = $themes['kalmanhosszu']->info['settings'];\n\n // Allow a subtheme to override the default values.\n $defaults = array_merge($defaults, $subtheme_defaults);\n\n // Merge the saved variables and their default values.\n $settings = array_merge($defaults, $saved_settings);\n\n // Create the form\n $form['community'] = array(\n '#type' => 'fieldset',\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#title' => t('Community buttons'),\n '#description' => t('Header left side community buttons.'),\n );\n\n $form['community']['kalmanhosszu_rss_feed_url'] = array(\n '#type' => 'textfield',\n '#title' => t('RSS URL'),\n '#default_value' => $settings['kalmanhosszu_rss_feed_url'],\n );\n\n $form['community']['kalmanhosszu_linked_in_url'] = array(\n '#type' => 'textfield',\n '#title' => t('LinkedIn URL'),\n '#default_value' => $settings['kalmanhosszu_linked_in_url'],\n );\n\n $form['community']['kalmanhosszu_twitter_url'] = array(\n '#type' => 'textfield',\n '#title' => t('Twitter URL'),\n '#default_value' => $settings['kalmanhosszu_twitter_url'],\n );\n\n $form['share'] = array(\n '#type' => 'fieldset',\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n '#title' => t('Share buttons'),\n );\n\n $form['share']['kalmanhosszu_show_facebook_share'] = array(\n '#type' => 'checkbox',\n '#title' => t('Show facebook share button'),\n '#default_value' => $settings['kalmanhosszu_show_facebook_share'],\n );\n\n $form['share']['kalmanhosszu_show_iwiw_share'] = array(\n '#type' => 'checkbox',\n '#title' => t('Show iwiw share button'),\n '#default_value' => $settings['kalmanhosszu_show_iwiw_share'],\n '#description' => t('IWIW is a Hungarian social media site like facebook.')\n );\n\n $form['share']['kalmanhosszu_show_twitter_share'] = array(\n '#type' => 'checkbox',\n '#title' => t('Show twitter share button'),\n '#default_value' => $settings['kalmanhosszu_show_twitter_share'],\n );\n\n $form['share']['kalmanhosszu_twitter_acc'] = array(\n '#type' => 'textfield',\n '#title' => t('Twitter account'),\n '#default_value' => $settings['kalmanhosszu_twitter_acc'],\n '#description' => t('If You add yout twitter account name, it will shows in shared tweets.')\n );\n\n return $form;\n}", "protected function applyCustomSettings()\n {\n $this->disable(array('read_counter', 'edit_counter', 'deleted_at', 'version', 'creator_user_id', 'created_at'));\n \n $this['updated_at']->setMetaWidgetClassName('ullMetaWidgetDate');\n \n //configure subject\n $this['subject']\n ->setLabel('Subject')\n ->setWidgetAttribute('size', 50)\n ->setMetaWidgetClassName('ullMetaWidgetLink');\n \n //configure body\n $this['body']\n ->setMetaWidgetClassName('ullMetaWidgetFCKEditor')\n ->setLabel('Text');\n \n // configure access level\n $this['ull_wiki_access_level_id']->setLabel(__('Access level', null, 'ullWikiMessages'));\n \n $this['is_outdated']->setLabel(__('Is outdated', null, 'ullWikiMessages'));\n \n // configure tags\n $this['duplicate_tags_for_search']\n ->setLabel('Tags')\n ->setMetaWidgetClassName('ullMetaWidgetTaggable');\n \n if ($this->isCreateOrEditAction())\n {\n $this->disable(array('id', 'updator_user_id', 'updated_at'));\n } \n\n if ($this->isListAction())\n {\n $this->disableAllExcept(array('id', 'subject'));\n $this->enable(array('updator_user_id', 'updated_at'));\n } \n }", "private static function initialize_defaults() {\r\n\t\t\tself::$default_settings['credentials'] = array();\r\n\r\n\t\t\tself::$default_settings['has_first_question'] = 'no';\r\n\r\n\t\t\t// We want the Urtaks to appear by default, so let's append them\r\n\t\t\tself::$default_settings['placement'] = 'append';\r\n\r\n\t\t\t// We want to default post types to 'post' and 'page'\r\n\t\t\tself::$default_settings['post-types'] = array('page', 'post');\r\n\r\n\t\t\t// We want users to be able to start Urtaks by default\r\n\t\t\tself::$default_settings['user-start'] = 'yes';\r\n\r\n\t\t\t// We want Urtaks to support community moderation by default so that we get more questions and responses\r\n\t\t\tself::$default_settings['moderation'] = 'community';\r\n\r\n\t\t\t// Auto height and width\r\n\t\t\tself::$default_settings['height'] = '';\r\n\t\t\tself::$default_settings['width'] = '';\r\n\r\n\t\t\t// Counter settings\r\n\t\t\tself::$default_settings['counter-icon'] = 'yes';\r\n\t\t\tself::$default_settings['counter-responses'] = 'yes';\r\n\r\n\t\t\t// Profanity\r\n\t\t\tself::$default_settings['blacklisting'] = 'no';\r\n\t\t\tself::$default_settings['blacklist_override'] = 'no';\r\n\t\t\tself::$default_settings['blacklist_words'] = '';\r\n\t\t}", "function custom_theme_options()\n{\n\tif ( ! defined( 'UNCODE_SLIM' ) ) {\n\t\treturn;\n\t}\n\n\tglobal $wpdb, $uncode_colors, $uncode_post_types;\n\n\tif (!isset($uncode_post_types)) $uncode_post_types = uncode_get_post_types();\n\t/**\n\t * Get a copy of the saved settings array.\n\t */\n\t$saved_settings = get_option(ot_settings_id() , array());\n\n\t/**\n\t * Custom settings array that will eventually be\n\t * passes to the OptionTree Settings API Class.\n\t */\n\n\tif (!function_exists('ot_filter_measurement_unit_types'))\n\t{\n\t\tfunction ot_filter_measurement_unit_types($array, $field_id)\n\t\t{\n\t\t\treturn array(\n\t\t\t\t'px' => 'px',\n\t\t\t\t'%' => '%'\n\t\t\t);\n\t\t}\n\t}\n\n\tadd_filter('ot_measurement_unit_types', 'ot_filter_measurement_unit_types', 10, 2);\n\n\tfunction run_array_to($array, $key = '', $value = '')\n\t{\n\t\t$array[$key] = $value;\n\t\treturn $array;\n\t}\n\n\t$stylesArrayMenu = array(\n\t\tarray(\n\t\t\t'value' => 'light',\n\t\t\t'label' => esc_html__('Light', 'uncode') ,\n\t\t\t'src' => ''\n\t\t) ,\n\t\tarray(\n\t\t\t'value' => 'dark',\n\t\t\t'label' => esc_html__('Dark', 'uncode') ,\n\t\t\t'src' => ''\n\t\t)\n\t);\n\n\t$menus = get_terms( 'nav_menu', array( 'hide_empty' => true ) );\n\t$menus_array = array();\n\t$menus_array[] = array(\n\t\t'value' => '',\n\t\t'label' => esc_html__('Inherit', 'uncode')\n\t);\n\tforeach ($menus as $menu)\n\t{\n\t\t$menus_array[] = array(\n\t\t\t'value' => $menu->slug,\n\t\t\t'label' => $menu->name\n\t\t);\n\t}\n\n\t$uncodeblock = array(\n\t\t'value' => 'header_uncodeblock',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t);\n\n\t$uncodeblocks = array(\n\t\tarray(\n\t\t\t'value' => '','label' => esc_html__('Inherit', 'uncode')\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'none','label' => esc_html__('None', 'uncode')\n\t\t)\n\t);\n\n\t$blocks_query = new WP_Query( 'post_type=uncodeblock&posts_per_page=-1&post_status=publish&orderby=title&order=ASC' );\n\n\tforeach ($blocks_query->posts as $block) {\n\t\t$uncodeblocks[] = array(\n\t\t\t'value' => $block->ID,\n\t\t\t'label' => $block->post_title,\n\t\t\t'postlink' => get_edit_post_link($block->ID),\n\t\t);\n\t}\n\n\tif ($blocks_query->post_count === 0) {\n\t\t$uncodeblocks[] = array(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('No Content Blocks found', 'uncode')\n\t\t);\n\t}\n\n\t$uncodeblock_404 = array(\n\t\t'id' => '_uncode_404_body',\n\t\t'label' => esc_html__('404 content', 'uncode') ,\n\t\t'desc' => esc_html__('Specify a content for the 404 page.', 'uncode'),\n\t\t'std' => '',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Default', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'body_uncodeblock',\n\t\t\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t\t),\n\t\t),\n\t\t'section' => 'uncode_404_section',\n\t);\n\n\t$uncodeblocks_404 = array(\n\t\t'id' => '_uncode_404_body_block',\n\t\t'label' => esc_html__('404 Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Specify a content for the 404 page.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => $uncodeblocks,\n\t\t'section' => 'uncode_404_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_404_body:is(body_uncodeblock)',\n\t);\n\n\tif ( class_exists( 'RevSliderFront' ) )\n\t{\n\n\t\t$revslider = array(\n\t\t\t'value' => 'header_revslider',\n\t\t\t'label' => esc_html__('Revolution Slider', 'uncode') ,\n\t\t);\n\n\t\t$rs = $wpdb->get_results(\"SELECT id, title, alias FROM \" . $wpdb->prefix . \"revslider_sliders WHERE type != 'template' ORDER BY id ASC LIMIT 999\");\n\t\t$revsliders = array();\n\t\tif ($rs)\n\t\t{\n\t\t\tforeach ($rs as $slider)\n\t\t\t{\n\t\t\t\t$revsliders[] = array(\n\t\t\t\t\t'value' => $slider->alias,\n\t\t\t\t\t'label' => $slider->title,\n\t\t\t\t\t'postlink' => admin_url( 'admin.php?page=revslider&view=slider&id=' . $slider->id ),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$revsliders[] = array(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('No Revolution Sliders found', 'uncode')\n\t\t\t);\n\t\t}\n\t}\n\telse $revslider = $revsliders = '';\n\n\tif ( class_exists( 'LS_Config' ) )\n\t{\n\n\t\t$layerslider = array(\n\t\t\t'value' => 'header_layerslider',\n\t\t\t'label' => esc_html__('LayerSlider', 'uncode') ,\n\t\t);\n\n\t\t$ls = $wpdb->get_results(\"SELECT id, name FROM \" . $wpdb->prefix . \"layerslider WHERE flag_deleted != '1' ORDER BY id ASC LIMIT 999\");\n\t\t$layersliders = array();\n\t\tif ($ls)\n\t\t{\n\t\t\tforeach ($ls as $slider)\n\t\t\t{\n\t\t\t\t$layersliders[] = array(\n\t\t\t\t\t'value' => $slider->id,\n\t\t\t\t\t'label' => $slider->name,\n\t\t\t\t\t'postlink' => admin_url( 'admin.php?page=layerslider&action=edit&id=' . $slider->id ),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$layersliders[] = array(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('No LayerSliders found', 'uncode')\n\t\t\t);\n\t\t}\n\t}\n\telse $layerslider = $layersliders = '';\n\n\t$title_size = array(\n\t\tarray(\n\t\t\t'value' => 'h1',\n\t\t\t'label' => esc_html__('h1', 'uncode')\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h2',\n\t\t\t'label' => esc_html__('h2', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h3',\n\t\t\t'label' => esc_html__('h3', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h4',\n\t\t\t'label' => esc_html__('h4', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h5',\n\t\t\t'label' => esc_html__('h5', 'uncode'),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 'h6',\n\t\t\t'label' => esc_html__('h6', 'uncode'),\n\t\t),\n\t);\n\n\t$font_sizes = ot_get_option('_uncode_heading_font_sizes');\n\tif (!empty($font_sizes)) {\n\t\tforeach ($font_sizes as $key => $value) {\n\t\t\t$title_size[] = array(\n\t\t\t\t'value' => $value['_uncode_heading_font_size_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$title_size[] = array(\n\t\t'value' => 'bigtext',\n\t\t'label' => esc_html__('BigText', 'uncode'),\n\t);\n\n\t$title_height = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\")\n\t\t),\n\t);\n\n\t$font_heights = ot_get_option('_uncode_heading_font_heights');\n\tif (!empty($font_heights)) {\n\t\tforeach ($font_heights as $key => $value) {\n\t\t\t$title_height[] = array(\n\t\t\t\t'value' => $value['_uncode_heading_font_height_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$title_spacing = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\")\n\t\t),\n\t);\n\n\t$btn_letter_spacing = $title_spacing;\n\t$btn_letter_spacing[] = array(\n\t\t'value' => 'uncode-fontspace-zero',\n\t\t'label' => esc_html__('Letter Spacing 0', \"uncode\")\n\t);\n\n\t$font_spacings = ot_get_option('_uncode_heading_font_spacings');\n\tif (!empty($font_spacings)) {\n\t\tforeach ($font_spacings as $key => $value) {\n\t\t\t$btn_letter_spacing[] = $title_spacing[] = array(\n\t\t\t\t'value' => $value['_uncode_heading_font_spacing_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$fonts = get_option('uncode_font_options');\n\t$title_font = array();\n\n\tif (isset($fonts['font_stack']) && $fonts['font_stack'] !== '[]')\n\t{\n\t\t$font_stack_string = $fonts['font_stack'];\n\t\t$font_stack = json_decode(str_replace('&quot;', '\"', $font_stack_string) , true);\n\n\t\tforeach ($font_stack as $font)\n\t\t{\n\t\t\tif ($font['source'] === 'Font Squirrel')\n\t\t\t{\n\t\t\t\t$variants = explode(',', $font['variants']);\n\t\t\t\t$label = (string)$font['family'] . ' - ';\n\t\t\t\t$weight = array();\n\t\t\t\tforeach ($variants as $variant)\n\t\t\t\t{\n\t\t\t\t\tif (strpos(strtolower($variant) , 'hairline') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 100;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'light') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 200;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'regular') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 400;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'semibold') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 500;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'bold') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 600;\n\t\t\t\t\t}\n\t\t\t\t\telse if (strpos(strtolower($variant) , 'black') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$weight[] = 800;\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$weight[] = 400;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$label.= implode(',', $weight);\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode((string)$font['family']),\n\t\t\t\t\t'label' => $label\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if ($font['source'] === 'Google Web Fonts')\n\t\t\t{\n\t\t\t\t$label = (string)$font['family'] . ' - ' . $font['variants'];\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode((string)$font['family']),\n\t\t\t\t\t'label' => $label\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if ($font['source'] === 'Adobe Fonts' || $font['source'] === 'Typekit' )\n\t\t\t{\n\t\t\t\t$label = (string)$font['family'] . ' - ';\n\t\t\t\t$variants = explode(',', $font['variants']);\n\t\t\t\tforeach ($variants as $key => $variant) {\n\t\t\t\t\tif ( $variants[$key] !== '' ) {\n\t\t\t\t\t\tpreg_match(\"|\\d+|\", $variants[$key], $weight);\n\t\t\t\t\t\t$variants[$key] = $weight[0] . '00';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$label.= implode(',', $variants);\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode(str_replace('\"', '', (string)$font['stub'])),\n\t\t\t\t\t'label' => $label\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$title_font[] = array(\n\t\t\t\t\t'value' => urlencode((string)$font['family']),\n\t\t\t\t\t'label' => (string)$font['family']\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t$title_font = array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('No fonts activated.', \"uncode\"),\n\t\t\t)\n\t\t);\n\t}\n\n\t$title_font[] = array(\n\t\t'value' => 'manual',\n\t\t'label' => esc_html__('Manually entered','uncode')\n\t);\n\n\t$custom_fonts = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\"),\n\t\t)\n\t);\n\n\t$custom_fonts_array = ot_get_option('_uncode_font_groups');\n\tif (!empty($custom_fonts_array)) {\n\t\tforeach ($custom_fonts_array as $key => $value) {\n\t\t\t$custom_fonts[] = array(\n\t\t\t\t'value' => $value['_uncode_font_group_unique_id'],\n\t\t\t\t'label' => $value['title'],\n\t\t\t);\n\t\t}\n\t}\n\n\t$title_weight = array(\n\t\tarray(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Default CSS', \"uncode\"),\n\t\t),\n\t\tarray(\n\t\t\t'value' => 100,\n\t\t\t'label' => '100',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 200,\n\t\t\t'label' => '200',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 300,\n\t\t\t'label' => '300',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 400,\n\t\t\t'label' => '400',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 500,\n\t\t\t'label' => '500',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 600,\n\t\t\t'label' => '600',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 700,\n\t\t\t'label' => '700',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 800,\n\t\t\t'label' => '800',\n\t\t),\n\t\tarray(\n\t\t\t'value' => 900,\n\t\t\t'label' => '900',\n\t\t)\n\t);\n\n\t$menu_section_title = array(\n\t\t'id' => '_uncode_%section%_menu_block_title',\n\t\t'label' => ' <i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu = array(\n\t\t'id' => '_uncode_%section%_menu',\n\t\t'label' => esc_html__('Menu', 'uncode') ,\n\t\t'desc' => esc_html__('Override the primary menu created in \\'Appearance -> Menus\\'.','uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => $menus_array,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_width = array(\n\t\t'id' => '_uncode_%section%_menu_width',\n\t\t'label' => esc_html__('Menu width', 'uncode') ,\n\t\t'desc' => esc_html__('Override the menu width.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_opaque = array(\n\t\t'id' => '_uncode_%section%_menu_opaque',\n\t\t'label' => esc_html__('Remove transparency', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Override to remove the transparency eventually declared in \\'Customize -> Light/Dark skin\\'.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_no_padding = array(\n\t\t'id' => '_uncode_%section%_menu_no_padding',\n\t\t'label' => esc_html__('Remove menu content padding', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Remove the additional menu padding in the header.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$menu_no_padding_mobile = array(\n\t\t'id' => '_uncode_%section%_menu_no_padding_mobile',\n\t\t'label' => esc_html__('Remove menu content padding on mobile', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Remove the additional menu padding in the header on mobile.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$title_archive_custom_activate = array(\n\t\t'id' => '_uncode_%section%_custom_title_activate',\n\t\t'label' => esc_html__('Activate custom title and subtitle', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate this to enable the custom title and subtitle.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$title_archive_custom_text = array(\n\t\t'id' => '_uncode_%section%_custom_title_text',\n\t\t'label' => esc_html__('Custom title', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'desc' => esc_html__('Insert your custom main archive page title.', 'uncode') ,\n\t\t'std' => '',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_custom_title_activate:is(on)',\n\t);\n\n\t$subtitle_archive_custom_text = array(\n\t\t'id' => '_uncode_%section%_custom_subtitle_text',\n\t\t'label' => esc_html__('Custom subtitle', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'desc' => esc_html__('Insert your custom main archive page subtitle.', 'uncode') ,\n\t\t'std' => '',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_custom_title_activate:is(on)',\n\t);\n\n\t$header_section_title = array(\n\t\t'id' => '_uncode_%section%_header_block_title',\n\t\t'label' => '<i class=\"fa fa-columns2\"></i> ' . esc_html__('Header', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_type = array(\n\t\t'id' => '_uncode_%section%_header',\n\t\t'label' => esc_html__('Type', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the header type.', 'uncode'),\n\t\t'std' => 'none',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'none',\n\t\t\t\t'label' => esc_html__('Select…', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header_basic',\n\t\t\t\t'label' => esc_html__('Basic', 'uncode') ,\n\t\t\t) ,\n\t\t\t$uncodeblock,\n\t\t\t$revslider,\n\t\t\t$layerslider,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_uncode_block = array(\n\t\t'id' => '_uncode_%section%_blocks',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the Content Block.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'condition' => '_uncode_%section%_header:is(header_uncodeblock)',\n\t\t'operator' => 'or',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_revslider = array(\n\t\t'id' => '_uncode_%section%_revslider',\n\t\t'label' => esc_html__('Revslider', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the RevSlider.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_revslider)',\n\t\t'operator' => 'or',\n\t\t'choices' => $revsliders,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_layerslider = array(\n\t\t'id' => '_uncode_%section%_layerslider',\n\t\t'label' => esc_html__('LayerSlider', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the LayerSlider.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_layerslider)',\n\t\t'operator' => 'or',\n\t\t'choices' => $layersliders,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title = array(\n\t\t'label' => esc_html__('Title in header', 'uncode') ,\n\t\t'id' => '_uncode_%section%_header_title',\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate to show title in the header.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_title_text = array(\n\t\t'id' => '_uncode_%section%_header_title_text',\n\t\t'label' => esc_html__('Custom text', 'uncode') ,\n\t\t'desc' => esc_html__('Add custom text for the header. Every newline in the field is a new line in the title.', 'uncode') ,\n\t\t'type' => 'textarea-simple',\n\t\t'rows' => '15',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t);\n\n\t$header_style = array(\n\t\t'id' => '_uncode_%section%_header_style',\n\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the header text skin.', 'uncode') ,\n\t\t'std' => 'light',\n\t\t'type' => 'select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'and',\n\t\t'choices' => $stylesArrayMenu\n\t);\n\n\t$header_width = array(\n\t\t'id' => '_uncode_%section%_header_width',\n\t\t'label' => esc_html__('Header width', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'desc' => esc_html__('Override the header width.', 'uncode') ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:contains(header)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_content_width = array(\n\t\t'id' => '_uncode_%section%_header_content_width',\n\t\t'label' => esc_html__('Content full width', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate to expand the header content to full width.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'and',\n\t);\n\n\t$header_custom_width = array(\n\t\t'id' => '_uncode_%section%_header_custom_width',\n\t\t'label' => esc_html__('Custom inner width','uncode'),\n\t\t'desc' => esc_html__('Adjust the inner content width in %.', 'uncode') ,\n\t\t'std' => '100',\n\t\t'type' => 'numeric-slider',\n\t\t'min_max_step' => '0,100,1',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'and',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_align = array(\n\t\t'id' => '_uncode_%section%_header_align',\n\t\t'label' => esc_html__('Content alignment', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the text/content alignment.', 'uncode') ,\n\t\t'std' => 'center',\n\t\t'type' => 'select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'left',\n\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'center',\n\t\t\t\t'label' => esc_html__('Center', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'right',\n\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t)\n\t\t)\n\t);\n\n\t$header_height = array(\n\t\t'id' => '_uncode_%section%_header_height',\n\t\t'label' => esc_html__('Height', 'uncode') ,\n\t\t'desc' => esc_html__('Define the height of the header in px or in % (relative to the window height).', 'uncode') ,\n\t\t'type' => 'measurement',\n\t\t'std' => array(\n\t\t\t'60',\n\t\t\t'%'\n\t\t) ,\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_min_height = array(\n\t\t'id' => '_uncode_%section%_header_min_height',\n\t\t'label' => esc_html__('Minimal height', 'uncode') ,\n\t\t'desc' => esc_html__('Enter a minimun height for the header in pixel.', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'std' => '300',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_position = array(\n\t\t'id' => '_uncode_%section%_header_position',\n\t\t'label' => esc_html__('Position', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the position of the header content inside the container.', 'uncode') ,\n\t\t'std' => 'header-center header-middle',\n\t\t'type' => 'select',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'header-left header-top',\n\t\t\t\t'label' => esc_html__('Left Top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-left header-center',\n\t\t\t\t'label' => esc_html__('Left Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-left header-bottom',\n\t\t\t\t'label' => esc_html__('Left Bottom', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-center header-top',\n\t\t\t\t'label' => esc_html__('Center Top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-center header-middle',\n\t\t\t\t'label' => esc_html__('Center Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-center header-bottom',\n\t\t\t\t'label' => esc_html__('Center Bottom', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-right header-top',\n\t\t\t\t'label' => esc_html__('Right Top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-right header-center',\n\t\t\t\t'label' => esc_html__('Right Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'header-right header-bottom',\n\t\t\t\t'label' => esc_html__('Right Bottom', 'uncode') ,\n\t\t\t) ,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_font = array(\n\t\t'id' => '_uncode_%section%_header_title_font',\n\t\t'label' => esc_html__('Title font family', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the font for the title.', 'uncode') ,\n\t\t'std' => 'font-555555',\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $custom_fonts,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_size = array(\n\t\t'id' => '_uncode_%section%_header_title_size',\n\t\t'label' => esc_html__('Title font size', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the font size for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_size,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_height = array(\n\t\t'id' => '_uncode_%section%_header_title_height',\n\t\t'label' => esc_html__('Title line height', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the line height for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_height,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_spacing = array(\n\t\t'id' => '_uncode_%section%_header_title_spacing',\n\t\t'label' => esc_html__('Title letter spacing', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the letter spacing for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_spacing,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_weight = array(\n\t\t'id' => '_uncode_%section%_header_title_weight',\n\t\t'label' => esc_html__('Title font weight', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the font weight for the title.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => $title_weight,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_title_italic = array(\n\t\t'id' => '_uncode_%section%_header_title_italic',\n\t\t'label' => esc_html__('Title italic', 'uncode') ,\n\t\t'desc' => esc_html__('Activate the font style italic for the title.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t);\n\n\t$header_title_transform = array(\n\t\t'id' => '_uncode_%section%_header_title_transform',\n\t\t'label' => esc_html__('Title text transform', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the title text transformation.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Default CSS', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'uppercase',\n\t\t\t\t'label' => esc_html__('Uppercase', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'lowercase',\n\t\t\t\t'label' => esc_html__('Lowercase', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'capitalize',\n\t\t\t\t'label' => esc_html__('Capitalize', 'uncode') ,\n\t\t\t) ,\n\t\t)\n\t);\n\n\t$header_text_animation = array(\n\t\t'id' => '_uncode_%section%_header_text_animation',\n\t\t'label' => esc_html__('Text animation', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the entrance animation of the title text.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on)',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Select…', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'top-t-bottom',\n\t\t\t\t'label' => esc_html__('Top to bottom', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'left-t-right',\n\t\t\t\t'label' => esc_html__('Left to right', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'right-t-left',\n\t\t\t\t'label' => esc_html__('Right to left', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'bottom-t-top',\n\t\t\t\t'label' => esc_html__('Bottom to top', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'zoom-in',\n\t\t\t\t'label' => esc_html__('Zoom in', 'uncode') ,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'value' => 'zoom-out',\n\t\t\t\t'label' => esc_html__('Zoom out', 'uncode') ,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'value' => 'alpha-anim',\n\t\t\t\t'label' => esc_html__('Alpha', 'uncode') ,\n\t\t\t)\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_animation_delay = array(\n\t\t'id' => '_uncode_%section%_header_animation_delay',\n\t\t'label' => esc_html__('Animation delay', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the entrance animation delay of the title text in milliseconds.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on),_uncode_%section%_header_text_animation:not()',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '100',\n\t\t\t\t'label' => esc_html__('ms 100', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '200',\n\t\t\t\t'label' => esc_html__('ms 200', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '300',\n\t\t\t\t'label' => esc_html__('ms 300', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '400',\n\t\t\t\t'label' => esc_html__('ms 400', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '500',\n\t\t\t\t'label' => esc_html__('ms 500', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '600',\n\t\t\t\t'label' => esc_html__('ms 600', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '700',\n\t\t\t\t'label' => esc_html__('ms 700', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '800',\n\t\t\t\t'label' => esc_html__('ms 800', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '900',\n\t\t\t\t'label' => esc_html__('ms 900', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1000',\n\t\t\t\t'label' => esc_html__('ms 1000', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1100',\n\t\t\t\t'label' => esc_html__('ms 1100', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1200',\n\t\t\t\t'label' => esc_html__('ms 1200', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1300',\n\t\t\t\t'label' => esc_html__('ms 1300', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1400',\n\t\t\t\t'label' => esc_html__('ms 1400', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1500',\n\t\t\t\t'label' => esc_html__('ms 1500', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1600',\n\t\t\t\t'label' => esc_html__('ms 1600', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1700',\n\t\t\t\t'label' => esc_html__('ms 1700', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1800',\n\t\t\t\t'label' => esc_html__('ms 1800', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1900',\n\t\t\t\t'label' => esc_html__('ms 1900', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '2000',\n\t\t\t\t'label' => esc_html__('ms 2000', 'uncode') ,\n\t\t\t) ,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_animation_speed = array(\n\t\t'id' => '_uncode_%section%_header_animation_speed',\n\t\t'label' => esc_html__('Animation speed', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the entrance animation speed of the title text in milliseconds.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header_title:is(on),_uncode_%section%_header_text_animation:not()',\n\t\t'operator' => 'and',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Default (400)', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '100',\n\t\t\t\t'label' => esc_html__('ms 100', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '200',\n\t\t\t\t'label' => esc_html__('ms 200', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '300',\n\t\t\t\t'label' => esc_html__('ms 300', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '400',\n\t\t\t\t'label' => esc_html__('ms 400', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '500',\n\t\t\t\t'label' => esc_html__('ms 500', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '600',\n\t\t\t\t'label' => esc_html__('ms 600', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '700',\n\t\t\t\t'label' => esc_html__('ms 700', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '800',\n\t\t\t\t'label' => esc_html__('ms 800', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '900',\n\t\t\t\t'label' => esc_html__('ms 900', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '1000',\n\t\t\t\t'label' => esc_html__('ms 1000', 'uncode') ,\n\t\t\t) ,\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$header_featured = array(\n\t\t'label' => esc_html__('Featured media in header', 'uncode') ,\n\t\t'id' => '_uncode_%section%_header_featured',\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate to use the featured image in the header.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_background = array(\n\t\t'id' => '_uncode_%section%_header_background',\n\t\t'label' => esc_html__('Background', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the background media and color.', 'uncode') ,\n\t\t'type' => 'background',\n\t\t'std' => array(\n\t\t\t'background-color' => 'color-gyho',\n\t\t\t'background-repeat' => '',\n\t\t\t'background-attachment' => '',\n\t\t\t'background-position' => '',\n\t\t\t'background-size' => '',\n\t\t\t'background-image' => '',\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_parallax = array(\n\t\t'id' => '_uncode_%section%_header_parallax',\n\t\t'label' => esc_html__('Parallax', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'desc' => esc_html__('Activate the background parallax effect.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_kburns = array(\n\t\t'id' => '_uncode_%section%_header_kburns',\n\t\t'label' => esc_html__('Zoom Effect', 'uncode') ,\n\t\t'desc' => esc_html__('Select the background zoom effect you prefer.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'on',\n\t\t\t\t'label' => esc_html__('Ken Burns', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'zoom',\n\t\t\t\t'label' => esc_html__('Zoom Out', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_overlay_color = array(\n\t\t'id' => '_uncode_%section%_header_overlay_color',\n\t\t'label' => esc_html__('Overlay color', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the overlay background color.', 'uncode') ,\n\t\t'type' => 'uncode_color',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_overlay_color_alpha = array(\n\t\t'id' => '_uncode_%section%_header_overlay_color_alpha',\n\t\t'label' => esc_html__('Overlay color opacity', 'uncode') ,\n\t\t'desc' => esc_html__('Set the overlay opacity.', 'uncode') ,\n\t\t'std' => '100',\n\t\t'min_max_step' => '0,100,1',\n\t\t'type' => 'numeric-slider',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_scroll_opacity = array(\n\t\t'id' => '_uncode_%section%_header_scroll_opacity',\n\t\t'label' => esc_html__('Scroll opacity', 'uncode') ,\n\t\t'desc' => esc_html__('Activate alpha animation when scrolling down.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:is(header_basic),_uncode_%section%_header:is(header_uncodeblock)',\n\t\t'operator' => 'or',\n\t);\n\n\t$header_scrolldown = array(\n\t\t'id' => '_uncode_%section%_header_scrolldown',\n\t\t'label' => esc_html__('Scroll down arrow', 'uncode') ,\n\t\t'desc' => esc_html__('Activate the scroll down arrow button.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'std' => 'off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_header:not(none)',\n\t\t'operator' => 'or',\n\t);\n\n\t$show_breadcrumb = array(\n\t\t'id' => '_uncode_%section%_breadcrumb',\n\t\t'label' => esc_html__('Show breadcrumb', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the navigation breadcrumb.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$breadcrumb_align = array(\n\t\t'id' => '_uncode_%section%_breadcrumb_align',\n\t\t'label' => esc_html__('Breadcrumb align', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the breadcrumb alignment','uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'center',\n\t\t\t\t'label' => esc_html__('Center', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'left',\n\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_breadcrumb:is(on)',\n\t\t'operator' => 'or',\n\t);\n\n\t$show_title = array(\n\t\t'id' => '_uncode_%section%_title',\n\t\t'label' => esc_html__('Show title', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the title in the content area.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'or'\n\t);\n\n\t$remove_pagination = array(\n\t\t'id' => '_uncode_%section%_remove_pagination',\n\t\t'label' => esc_html__('Remove pagination', 'uncode') ,\n\t\t'desc' => esc_html__('Activate this to remove the pagination (useful when you use a custom Content Block with Pagination or Load More options).', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'or'\n\t);\n\n\t$products_per_page = array(\n\t\t'id' => '_uncode_%section%_ppp',\n\t\t'label' => esc_html__('Number of products', 'uncode') ,\n\t\t'desc' => esc_html__('Set the number of items to display on product archives. \\'Inherit\\' inherits the WordPress Settings > Readings > Blog Number of Posts', 'uncode') ,\n\t\t'std' => '0',\n\t\t'min_max_step' => '0,100,1',\n\t\t'type' => 'numeric-slider',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_media = array(\n\t\t'id' => '_uncode_%section%_media',\n\t\t'label' => esc_html__('Show media', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the medias in the content area.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_featured_media = array(\n\t\t'id' => '_uncode_%section%_featured_media',\n\t\t'label' => esc_html__('Show featured image', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the featured image in the content area.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'condition' => '_uncode_%section%_media:not(on)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_tags = array(\n\t\t'id' => '_uncode_%section%_tags',\n\t\t'label' => esc_html__('Show tags', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the tags and choose visbility by post to post bases.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_tags_align = array(\n\t\t'id' => '_uncode_%section%_tags_align',\n\t\t'label' => esc_html__('Tags alignment', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the tags alignment.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'left',\n\t\t\t\t'label' => esc_html__('Left align', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'center',\n\t\t\t\t'label' => esc_html__('Center align', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'right',\n\t\t\t\t'label' => esc_html__('Right align', 'uncode') ,\n\t\t\t\t'src' => ''\n\t\t\t)\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_tags:is(on)',\n\t\t'operator' => 'or',\n\t);\n\n\t$show_comments = array(\n\t\t'id' => '_uncode_%section%_comments',\n\t\t'label' => esc_html__('Show comments', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the comments and choose visbility by post to post bases.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$show_share = array(\n\t\t'id' => '_uncode_%section%_share',\n\t\t'label' => esc_html__('Show share', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the share module.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$image_layout = array(\n\t\t'id' => '_uncode_%section%_image_layout',\n\t\t'label' => esc_html__('Media layout', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the layout mode for the product images section.', 'uncode') ,\n\t\t'std' => '',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Standard', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'stack',\n\t\t\t\t'label' => esc_html__('Stack', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$media_size = array(\n\t\t'id' => '_uncode_%section%_media_size',\n\t\t'label' => esc_html__('Media layout size', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the size of the media layout area.', 'uncode') ,\n\t\t'std' => '6',\n\t\t'min_max_step' => '1,11,1',\n\t\t'type' => 'numeric-slider',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$enable_sticky_desc = array(\n\t\t'id' => '_uncode_%section%_sticky_desc',\n\t\t'label' => esc_html__('Sticky content', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to enable sticky effect for product description.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_image_layout:is(stack)',\n\t);\n\n\t$enable_woo_zoom = array(\n\t\t'id' => '_uncode_%section%_enable_zoom',\n\t\t'label' => esc_html__('Zoom', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to enable drag zoom effect on product image.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$thumb_cols = array(\n\t\t'id' => '_uncode_%section%_thumb_cols',\n\t\t'label' => esc_html__('Thumbnails columns', 'uncode') ,\n\t\t'desc' => esc_html__('Specify how many columns to display for your product gallery thumbs.', 'uncode') ,\n\t\t'std' => '',\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '2',\n\t\t\t\t'label' => '2',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => '3',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '4',\n\t\t\t\t'label' => '4',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '5',\n\t\t\t\t'label' => '5',\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '6',\n\t\t\t\t'label' => '6',\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_image_layout:is()',\n\t);\n\n\t$enable_woo_slider = array(\n\t\t'id' => '_uncode_%section%_enable_slider',\n\t\t'label' => esc_html__('Thumbnails carousel', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to enable carousel slider when you click gallery thumbs.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_image_layout:is()',\n\t);\n\n\t$body_section_title = array(\n\t\t'id' => '_uncode_%section%_body_title',\n\t\t'label' => '<i class=\"fa fa-layout\"></i> ' . esc_html__('Content', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block = array(\n\t\t'id' => '_uncode_%section%_content_block',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use. NB. Select \"Inherit\" to use the default template.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => $uncodeblocks,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block_before = array(\n\t\t'id' => '_uncode_%section%_content_block_before',\n\t\t'label' => esc_html__('Content Block - Before Content', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block_after_pre = array(\n\t\t'id' => '_uncode_%section%_content_block_after_pre',\n\t\t'label' => esc_html__('After Content (ex: Author Profile)', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_uncode_block_after = array(\n\t\t'id' => '_uncode_%section%_content_block_after',\n\t\t'label' => esc_html__('After Content (ex: Related Posts)', 'uncode') ,\n\t\t'desc' => esc_html__('Define the Content Block to use.', 'uncode') ,\n\t\t'type' => 'custom-post-type-select',\n\t\t'post_type' => 'uncodeblock',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_layout_width = array(\n\t\t'id' => '_uncode_%section%_layout_width',\n\t\t'label' => esc_html__('Content width', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the content width.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_layout_width_custom = array(\n\t\t'id' => '_uncode_%section%_layout_width_custom',\n\t\t'label' => esc_html__('Custom width', 'uncode') ,\n\t\t'desc' => esc_html__('Define the custom width for the content area in px or in %. This option takes effect with normal contents (not Page Builder).', 'uncode') ,\n\t\t'type' => 'measurement',\n\t\t'condition' => '_uncode_%section%_layout_width:is(limit)',\n\t\t'operator' => 'or',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_single_post_width = array(\n\t\t'id' => '_uncode_%section%_single_width',\n\t\t'label' => esc_html__('Single post width', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the single post width from 1 to 12.', 'uncode'),\n\t\t'type' => 'select',\n\t\t'std' => '4',\n\t\t'condition' => '_uncode_%section%_content_block:is(),_uncode_%section%_content_block:is(none)',\n\t\t'operator' => 'or',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '1',\n\t\t\t\t'label' => '1' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '2',\n\t\t\t\t'label' => '2' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '3',\n\t\t\t\t'label' => '3' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '4',\n\t\t\t\t'label' => '4' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '5',\n\t\t\t\t'label' => '5' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '6',\n\t\t\t\t'label' => '6' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '7',\n\t\t\t\t'label' => '7' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '8',\n\t\t\t\t'label' => '8' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '9',\n\t\t\t\t'label' => '9' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '10',\n\t\t\t\t'label' => '10' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '11',\n\t\t\t\t'label' => '11' ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => '12',\n\t\t\t\t'label' => '12' ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$body_single_text_lenght = array(\n\t\t'id' => '_uncode_%section%_single_text_length',\n\t\t'label' => esc_html__('Single teaser text length', 'uncode') ,\n\t\t'desc' => esc_html__('Enter the number of words you want for the teaser. If nothing in entered the full content will be showed.', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_content_block:is(),_uncode_%section%_content_block:is(none)',\n\t\t'operator' => 'or',\n\t);\n\n\t$sidebar_section_title = array(\n\t\t'id' => '_uncode_%section%_sidebar_title',\n\t\t'label' => '<i class=\"fa fa-content-right\"></i> ' . esc_html__('Sidebar', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_activate = array(\n\t\t'id' => '_uncode_%section%_activate_sidebar',\n\t\t'label' => esc_html__('Activate the sidebar', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the sidebar.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_widget = array(\n\t\t'id' => '_uncode_%section%_sidebar',\n\t\t'label' => esc_html__('Sidebar', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the sidebar.', 'uncode') ,\n\t\t'type' => 'sidebar-select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$sidebar_position = array(\n\t\t'id' => '_uncode_%section%_sidebar_position',\n\t\t'label' => esc_html__('Position', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the position of the sidebar.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => 'sidebar_right',\n\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'sidebar_left',\n\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_size = array(\n\t\t'id' => '_uncode_%section%_sidebar_size',\n\t\t'label' => esc_html__('Size', 'uncode') ,\n\t\t'desc' => esc_html__('Set the size of the sidebar.', 'uncode') ,\n\t\t'std' => '4',\n\t\t'min_max_step' => '1,11,1',\n\t\t'type' => 'numeric-slider',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_sticky = array(\n\t\t'id' => '_uncode_%section%_sidebar_sticky',\n\t\t'label' => esc_html__('Sticky sidebar', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to have a sticky sidebar.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$sidebar_style = array(\n\t\t'id' => '_uncode_%section%_sidebar_style',\n\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t'desc' => esc_html__('Override the sidebar text skin color.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', \"uncode\") ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'light',\n\t\t\t\t'label' => esc_html__('Light', \"uncode\") ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'dark',\n\t\t\t\t'label' => esc_html__('Dark', \"uncode\") ,\n\t\t\t)\n\t\t),\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$sidebar_bgcolor = array(\n\t\t'id' => '_uncode_%section%_sidebar_bgcolor',\n\t\t'label' => esc_html__('Background color', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the sidebar background color.', 'uncode') ,\n\t\t'type' => 'uncode_color',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'condition' => '_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$sidebar_fill = array(\n\t\t'id' => '_uncode_%section%_sidebar_fill',\n\t\t'label' => esc_html__('Sidebar filling space', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to remove padding around the sidebar and fill the height.', 'uncode') ,\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'std' => 'off',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_sidebar_bgcolor:not(),_uncode_%section%_activate_sidebar:not(off)',\n\t);\n\n\t$navigation_section_title = array(\n\t\t'id' => '_uncode_%section%_navigation_title',\n\t\t'label' => '<i class=\"fa fa-location\"></i> ' . esc_html__('Navigation', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$navigation_activate = array(\n\t\t'id' => '_uncode_%section%_navigation_activate',\n\t\t'label' => esc_html__('Navigation bar', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the navigation bar.', 'uncode') ,\n\t\t'std' => 'on',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$navigation_page_index = array(\n\t\t'id' => '_uncode_%section%_navigation_index',\n\t\t'label' => esc_html__('Navigation index', 'uncode') ,\n\t\t'desc' => esc_html__('Specify the page you want to use as index.', 'uncode'),\n\t\t'type' => 'page-select',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_navigation_activate:not(off)',\n\t);\n\n\t$navigation_index_label = array(\n\t\t'id' => '_uncode_%section%_navigation_index_label',\n\t\t'label' => esc_html__('Index custom label', 'uncode') ,\n\t\t'desc' => esc_html__('Enter a custom label for the index button.', 'uncode') ,\n\t\t'type' => 'text',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_navigation_activate:not(off)',\n\t);\n\n\t$navigation_nextprev_title = array(\n\t\t'id' => '_uncode_%section%_navigation_nextprev_title',\n\t\t'label' => esc_html__('Navigation titles', 'uncode') ,\n\t\t'desc' => esc_html__('Activate to show the next/prev post title.', 'uncode') ,\n\t\t'std' => 'off',\n\t\t'type' => 'on-off',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'operator' => 'and',\n\t\t'condition' => '_uncode_%section%_navigation_activate:not(off)',\n\t);\n\n\t$footer_section_title = array(\n\t\t'id' => '_uncode_%section%_footer_block_title',\n\t\t'label' => '<i class=\"fa fa-ellipsis\"></i> ' . esc_html__('Footer', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$footer_uncode_block = array(\n\t\t'id' => '_uncode_%section%_footer_block',\n\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t'desc' => esc_html__('Override the Content Block.', 'uncode') ,\n\t\t'type' => 'select',\n\t\t'choices' => $uncodeblocks,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$footer_width = array(\n\t\t'id' => '_uncode_%section%_footer_width',\n\t\t'label' => esc_html__('Footer width', 'uncode') ,\n\t\t'desc' => esc_html__('Override the footer width.' ,'uncode'),\n\t\t'type' => 'select',\n\t\t'choices' => array(\n\t\t\tarray(\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => esc_html__('Inherit', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'full',\n\t\t\t\t'label' => esc_html__('Full', 'uncode') ,\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'value' => 'limit',\n\t\t\t\t'label' => esc_html__('Limit', 'uncode') ,\n\t\t\t) ,\n\t\t) ,\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$custom_fields_section_title = array(\n\t\t'id' => '_uncode_%section%_cf_title',\n\t\t'label' => '<i class=\"fa fa-pencil3\"></i> ' . esc_html__('Custom fields', 'uncode') ,\n\t\t'desc' => '' ,\n\t\t'type' => 'textblock-titled',\n\t\t'class' => 'section-title',\n\t\t'section' => 'uncode_%section%_section',\n\t);\n\n\t$custom_fields_list = array(\n\t\t'id' => '_uncode_%section%_custom_fields',\n\t\t'class' => 'uncode-custom-fields-list',\n\t\t'label' => esc_html__('Custom fields', 'uncode') ,\n\t\t'desc' => esc_html__('Create here all the custom fields that can be used inside the posts module.', 'uncode') ,\n\t\t'type' => 'list-item',\n\t\t'section' => 'uncode_%section%_section',\n\t\t'settings' => array(\n\t\t\tarray(\n\t\t\t\t'id' => '_uncode_cf_unique_id',\n\t\t\t\t'class' => 'unique_id',\n\t\t\t\t'std' => 'detail-',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => esc_html__('Unique custom field ID','uncode') ,\n\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t),\n\t\t)\n\t);\n\n\t$portfolio_cpt_name = ot_get_option('_uncode_portfolio_cpt');\n\tif ($portfolio_cpt_name == '') $portfolio_cpt_name = 'portfolio';\n\n\t$cpt_single_sections = array();\n\t$cpt_index_sections = array();\n\t$cpt_single_options = array();\n\t$cpt_index_options = array();\n\n\tif (count($uncode_post_types) > 0) {\n\t\tforeach ($uncode_post_types as $key => $value) {\n\t\t\tif ($value !== 'portfolio' && $value !== 'product') {\n\t\t\t\t$cpt_obj = get_post_type_object($value);\n\n\t\t\t\tif ( is_object($cpt_obj) ) {\n\t\t\t\t\t$cpt_name = $cpt_obj->labels->name;\n\t\t\t\t\t$cpt_sing_name = $cpt_obj->labels->singular_name;\n\t\t\t\t\t$cpt_single_sections[] = array(\n\t\t\t\t\t\t'id' => 'uncode_'.$value.'_section',\n\t\t\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . ucfirst($cpt_sing_name) . '</span>',\n\t\t\t\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t\t\t\t);\n\t\t\t\t\t$cpt_index_sections[] = array(\n\t\t\t\t\t\t'id' => 'uncode_'.$value.'_index_section',\n\t\t\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . ucfirst($cpt_name) . '</span>',\n\t\t\t\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t\t\t\t);\n\t\t\t\t} elseif ( $value == 'author' ) {\n\t\t\t\t\t$cpt_index_sections[] = array(\n\t\t\t\t\t\t'id' => 'uncode_'.$value.'_index_section',\n\t\t\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Authors', 'uncode') . '</span>',\n\t\t\t\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tforeach ($uncode_post_types as $key => $value) {\n\t\t\tif ($value !== 'portfolio' && $value !== 'product' && $value !== 'author') {\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $menu_opaque);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_type);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_uncode_block);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_revslider);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_layerslider);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_height);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_min_height);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_style);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_content_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_custom_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_align);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_position);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_font);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_size);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_height);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_spacing);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_weight);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_transform);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_title_italic);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_text_animation);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_animation_speed);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_animation_delay);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_featured);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_background);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_parallax);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_kburns);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_overlay_color);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_overlay_color_alpha);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_scroll_opacity);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $header_scrolldown);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_layout_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_layout_width_custom);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_breadcrumb);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $breadcrumb_align);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, run_array_to($show_title, 'std', 'on'));\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_media);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_featured_media);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_comments);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $show_share);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $image_layout);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $media_size);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $enable_sticky_desc);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $enable_woo_zoom);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $thumb_cols);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $enable_woo_slider);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_uncode_block_after_pre);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $body_uncode_block_after);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_activate);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_widget);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_position);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_size);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_sticky);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_style);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_bgcolor);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $sidebar_fill);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_activate);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_page_index);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_index_label);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $navigation_nextprev_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $footer_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $footer_uncode_block);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $footer_width);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $custom_fields_section_title);\n\t\t\t\t$cpt_single_options[] = str_replace('%section%', $value, $custom_fields_list);\n\t\t\t}\n\t\t}\n\t\tforeach ($uncode_post_types as $key => $value) {\n\t\t\tif ($value !== 'portfolio' && $value !== 'product') {\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_opaque);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', run_array_to($header_type, 'std', 'header_basic'));\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_uncode_block);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_revslider);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_layerslider);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_height);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_min_height);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_style);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_content_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_custom_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_align);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_position);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_font);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_size);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_height);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_spacing);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_weight);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_transform);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_title_italic);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_text_animation);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_animation_speed);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_animation_delay);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_featured);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_background);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_parallax);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_kburns);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_overlay_color);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_overlay_color_alpha);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_scroll_opacity);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $header_scrolldown);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_no_padding);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $menu_no_padding_mobile);\n\t\t\t\tif ($value !== 'author') {\n\t\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $title_archive_custom_activate);\n\t\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $title_archive_custom_text);\n\t\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $subtitle_archive_custom_text);\n\t\t\t\t}\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $show_breadcrumb);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $breadcrumb_align);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_uncode_block);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_layout_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_single_post_width);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $body_single_text_lenght);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $show_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $remove_pagination);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', run_array_to($sidebar_activate, 'std', 'on'));\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_widget);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_position);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_size);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_sticky);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_style);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_bgcolor);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $sidebar_fill);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $footer_section_title);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $footer_uncode_block);\n\t\t\t\t$cpt_index_options[] = str_replace('%section%', $value . '_index', $footer_width);\n\t\t\t}\n\t\t}\n\t}\n\n\t$custom_settings_section_one = array(\n\t\tarray(\n\t\t\t'id' => 'uncode_header_section',\n\t\t\t'title' => '<i class=\"fa fa-heart3\"></i> ' . esc_html__('Navbar', 'uncode'),\n\t\t\t'group' => esc_html__('General', 'uncode'),\n\t\t\t'group_icon' => 'fa-layout'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_main_section',\n\t\t\t'title' => '<i class=\"fa fa-layers\"></i> ' . esc_html__('Layout', 'uncode'),\n\t\t\t'group' => esc_html__('General', 'uncode'),\n\t\t) ,\n\t\t// array(\n\t\t// \t'id' => 'uncode_header_section',\n\t\t// \t'title' => '<i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode'),\n\t\t// \t'group' => esc_html__('General', 'uncode')\n\t\t// ) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_footer_section',\n\t\t\t'title' => '<i class=\"fa fa-ellipsis\"></i> ' . esc_html__('Footer', 'uncode'),\n\t\t\t'group' => esc_html__('General', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_post_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . esc_html__('Post', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode'),\n\t\t\t'group_icon' => 'fa-file2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_page_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . esc_html__('Page', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_portfolio_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . ucfirst($portfolio_cpt_name) . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t) ,\n\t);\n\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $cpt_single_sections );\n\n\t$custom_settings_section_two = array(\n\t\tarray(\n\t\t\t'id' => 'uncode_post_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Posts', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode'),\n\t\t\t'group_icon' => 'fa-archive2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_page_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Pages', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_portfolio_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . ucfirst($portfolio_cpt_name) . 's</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t) ,\n\t);\n\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $custom_settings_section_two );\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $cpt_index_sections );\n\n\t$custom_settings_section_three = array(\n\t\tarray(\n\t\t\t'id' => 'uncode_search_index_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Search', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Archives', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_404_section',\n\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-help\"></i> ' . esc_html__('404', 'uncode') . '</span>',\n\t\t\t'group' => esc_html__('Single', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_colors_section',\n\t\t\t'title' => '<i class=\"fa fa-drop\"></i> ' . esc_html__('Palette', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode'),\n\t\t\t'group_icon' => 'fa-eye2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_typography_section',\n\t\t\t'title' => '<i class=\"fa fa-font\"></i> ' . esc_html__('Typography', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_customize_section',\n\t\t\t'title' => '<i class=\"fa fa-box\"></i> ' . esc_html__('Customize', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_extra_section',\n\t\t\t'title' => esc_html__('Extra', 'uncode'),\n\t\t\t'group' => esc_html__('Visual', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_sidebars_section',\n\t\t\t'title' => '<i class=\"fa fa-content-right\"></i> ' . esc_html__('Sidebars', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode'),\n\t\t\t'group_icon' => 'fa-cog2'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_connections_section',\n\t\t\t'title' => '<i class=\"fa fa-share2\"></i> ' . esc_html__('Socials', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_gmaps_section',\n\t\t\t'title' => '<i class=\"fa fa-map-o\"></i> ' . esc_html__('Google Maps', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_redirect_section',\n\t\t\t'title' => '<i class=\"fa fa-reply2\"></i> ' . esc_html__('Redirect', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_cssjs_section',\n\t\t\t'title' => '<i class=\"fa fa-code\"></i> ' . esc_html__('CSS & JS', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => 'uncode_performance_section',\n\t\t\t'title' => '<i class=\"fa fa-loader\"></i> ' . esc_html__('Performance', 'uncode'),\n\t\t\t'group' => esc_html__('Utility', 'uncode')\n\t\t) ,\n\t);\n\n\t$custom_settings_section_one = array_merge( $custom_settings_section_one, $custom_settings_section_three );\n\n\t$custom_settings_one = array(\n\t\tarray(\n\t\t\t'id' => '_uncode_general_block_title',\n\t\t\t'label' => '<i class=\"fa fa-globe3\"></i> ' . esc_html__('General', 'uncode') ,\n\t\t\t'desc' => '',\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_main_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_main_width',\n\t\t\t'label' => esc_html__('Site width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter the width of your site.', 'uncode') ,\n\t\t\t'std' => array(\n\t\t\t\t'1200',\n\t\t\t\t'px'\n\t\t\t) ,\n\t\t\t'type' => 'measurement',\n\t\t\t'section' => 'uncode_main_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_main_align',\n\t\t\t'label' => esc_html__('Site layout align', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the alignment of the content area when is less then 100% width.', 'uncode') ,\n\t\t\t'std' => 'center',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'center',\n\t\t\t\t\t'label' => esc_html__('Center align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_boxed',\n\t\t\t'label' => esc_html__('Boxed', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate for the boxed layout.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_main_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_border',\n\t\t\t'label' => esc_html__('Body frame', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the thickness of the frame around the body', 'uncode') ,\n\t\t\t'std' => '0',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0,36,9',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_border_color',\n\t\t\t'label' => esc_html__('Body frame color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body frame color.', 'uncode') ,\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off),_uncode_body_border:not(0)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tstr_replace('%section%', 'main', run_array_to($header_section_title, 'condition', '_uncode_boxed:is(off)')),\n\t\tarray(\n\t\t\t'id' => '_uncode_header_full',\n\t\t\t'label' => esc_html__('Container full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to expand the header container to full width.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tstr_replace('%section%', 'main', run_array_to($body_section_title, 'condition', '_uncode_boxed:is(off)')),\n\t\tarray(\n\t\t\t'id' => '_uncode_body_full',\n\t\t\t'label' => esc_html__('Content area full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to expand the content area to full width.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_main_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_logo_block_title',\n\t\t\t'label' => '<i class=\"fa fa-heart3\"></i> ' . esc_html__('Logo', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_switch',\n\t\t\t'label' => esc_html__('Switchable logo', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to upload different logo for each skin.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo',\n\t\t\t'label' => esc_html__('Logo', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo. You can use Images, SVG code or HTML code.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_switch:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_light',\n\t\t\t'label' => esc_html__('Logo - Light', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo for the light skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_dark',\n\t\t\t'label' => esc_html__('Logo - Dark', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo for the dark skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile_switch',\n\t\t\t'label' => esc_html__('Different Logo Mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to upload different logo for mobile devices.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile',\n\t\t\t'label' => esc_html__('Logo Mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo for mobile. You can use Images, SVG code or HTML code.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_mobile_switch:is(on),_uncode_logo_switch:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile_light',\n\t\t\t'label' => esc_html__('Logo Mobile - Light', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo mobile for the light skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_mobile_switch:is(on),_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_mobile_dark',\n\t\t\t'label' => esc_html__('Logo Mobile - Dark', 'uncode') ,\n\t\t\t'desc' => esc_html__('Upload a logo mobile for the dark skin.', 'uncode') ,\n\t\t\t'type' => 'upload',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_logo_mobile_switch:is(on),_uncode_logo_switch:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_height',\n\t\t\t'label' => esc_html__('Logo height', 'uncode'),\n\t\t\t'desc' => esc_html__('Enter the height of the logo in px.', 'uncode') ,\n\t\t\t'std' => '20',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_height_mobile',\n\t\t\t'label' => esc_html__('Logo height mobile', 'uncode'),\n\t\t\t'desc' => esc_html__('Enter the height of the logo in px for mobile version.', 'uncode') ,\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_headers_block_title',\n\t\t\t'label' => '<i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_headers',\n\t\t\t'desc' => esc_html__('Specify the menu layout.', 'uncode') ,\n\t\t\t'label' => '' ,\n\t\t\t'std' => 'hmenu-right',\n\t\t\t'type' => 'radio-image',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_hmenu_position',\n\t\t\t'label' => esc_html__('Menu horizontal position', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the horizontal position of the menu.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_position',\n\t\t\t'label' => esc_html__('Menu horizontal position', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the horizontal position of the menu.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_v_position',\n\t\t\t'label' => esc_html__('Menu vertical alignment', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the vertical alignment of the menu.', 'uncode') ,\n\t\t\t'std' => 'middle',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'top',\n\t\t\t\t\t'label' => esc_html__('Top', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'middle',\n\t\t\t\t\t'label' => esc_html__('Middle', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'bottom',\n\t\t\t\t\t'label' => esc_html__('Bottom', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_align',\n\t\t\t'label' => esc_html__('Menu horizontal alignment', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the horizontal alignment of the menu.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left Align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'center',\n\t\t\t\t\t'label' => esc_html__('Center Align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right Align', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_vmenu_width',\n\t\t\t'label' => esc_html__('Vertical menu width','uncode') ,\n\t\t\t'desc' => esc_html__('Vertical menu width in px', 'uncode') ,\n\t\t\t'std' => '252',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'rows' => '',\n\t\t\t'post_type' => '',\n\t\t\t'taxonomy' => '',\n\t\t\t'min_max_step' => '108,504,12',\n\t\t\t'class' => '',\n\t\t\t'condition' => '_uncode_headers:contains(vmenu)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_accordion_active',\n\t\t\t'label' => esc_html__('Vertical menu open', 'uncode') ,\n\t\t\t'desc' => esc_html__('Open the accordion menu at the current item menu on page loading.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:is(vmenu)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_full',\n\t\t\t'label' => esc_html__('Menu full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to expand the menu to full width. (Only for the horizontal menus).', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_visuals_block_title',\n\t\t\t'label' => '<i class=\"fa fa-eye2\"></i> ' . esc_html__('Visuals', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_shadows',\n\t\t\t'label' => esc_html__('Menu divider shadow', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the menu divider shadow.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_shadows',\n\t\t\t'label' => esc_html__('Menu dropdown shadow', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this for the shadow effect on menu dropdown on desktop view. NB. this option works for horizontal menus only.', 'uncode') ,\n\t\t\t'std' => 'none',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'std' => '',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'xs',\n\t\t\t\t\t'label' => esc_html__('Extra Small', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sm',\n\t\t\t\t\t'label' => esc_html__('Small', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'std',\n\t\t\t\t\t'label' => esc_html__('Standard', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'lg',\n\t\t\t\t\t'label' => esc_html__('Large', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'xl',\n\t\t\t\t\t'label' => esc_html__('Extra Large', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t),\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(vmenu-offcanvas),_uncode_headers:is(menu-overlay)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_darker_shadows',\n\t\t\t'label' => esc_html__('Menu dropdown darker shadow', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this for the dark shadow effect on menu dropdown on desktop view.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_submenu_shadows:not()',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_borders',\n\t\t\t'label' => esc_html__('Menu borders', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the menu borders.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_no_arrows',\n\t\t\t'label' => esc_html__('Hide dropdown arrows', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to hide the dropdow arrows.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_transparency',\n\t\t\t'label' => esc_html__('Menu mobile transparency', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the menu transparency when possible.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_custom_padding',\n\t\t\t'label' => esc_html__('Custom vertical padding', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate custom padding above and below the logo.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_custom_padding_desktop',\n\t\t\t'label' => esc_html__('Padding on desktop', 'uncode') ,\n\t\t\t'desc' => esc_html__('Set custom padding on desktop devices.', 'uncode') ,\n\t\t\t'std' => '27',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0,36,9',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_custom_padding:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_custom_padding_mobile',\n\t\t\t'label' => esc_html__('Padding on mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Set custom padding on mobile devices.', 'uncode') ,\n\t\t\t'std' => '27',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0,36,9',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_custom_padding:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_animation_block_title',\n\t\t\t'label' => '<i class=\"fa fa-fast-forward2\"></i> ' . esc_html__('Animation', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t// 'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(vmenu-offcanvas),_uncode_headers:is(menu-overlay)',\n\t\t\t// 'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_sticky',\n\t\t\t'label' => esc_html__('Menu sticky', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the sticky menu. This is a menu that is locked into place so that it does not disappear when the user scrolls down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(vmenu-offcanvas),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_sticky_mobile',\n\t\t\t'label' => esc_html__('Menu sticky mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the sticky menu on mobile devices. This is a menu that is locked into place so that it does not disappear when the user scrolls down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_centered',\n\t\t\t'label' => esc_html__('Menu centered mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the centered style for mobile menu. NB. You need to have the Menu Sticky Mobile active.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_sticky_mobile:is(on)',\n\t\t\t'operator' => 'and',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_hide',\n\t\t\t'label' => esc_html__('Menu hide', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the autohide menu. This is a menu that is hiding after the user have scrolled down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center),_uncode_headers:is(vmenu-offcanvas)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_hide_mobile',\n\t\t\t'label' => esc_html__('Menu hide mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the autohide menu on mobile devices. This is a menu that is hiding after the user have scrolled down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_shrink',\n\t\t\t'label' => esc_html__('Menu shrink', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the shrink menu. This is a menu where the logo shrinks after the user have scrolled down the page.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:contains(hmenu),_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center),_uncode_headers:is(vmenu-offcanvas)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_li_animation',\n\t\t\t'label' => esc_html__('Menu sub-levels animated', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the animation for menu sub-levels. NB. this option works for horizontal menus only.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:not(vmenu)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_animation',\n\t\t\t'label' => esc_html__('Menu open items animation', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu items animation when opening.', 'uncode') ,\n\t\t\t'std' => 'none',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_sticky_mobile:is(on),_uncode_menu_hide_mobile:is(on)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'none',\n\t\t\t\t\t'label' => esc_html__('None', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'scale',\n\t\t\t\t\t'label' => esc_html__('Scale', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_overlay_animation',\n\t\t\t'label' => esc_html__('Menu overlay animation', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the overlay menu animation when opening and closing.', 'uncode') ,\n\t\t\t'std' => 'sequential',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '3d',\n\t\t\t\t\t'label' => esc_html__('3D', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sequential',\n\t\t\t\t\t'label' => esc_html__('Flat', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_min_logo',\n\t\t\t'label' => esc_html__('Minimum logo height', 'uncode'),\n\t\t\t'desc' => esc_html__('Enter the minimal height of the shrinked logo in <b>px</b>.', 'uncode') ,\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_shrink:is(on),_uncode_headers:not(vmenu)',\n\t\t\t'operator' => 'and',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_add_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square-plus\"></i> ' . esc_html__('Additionals', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_no_secondary',\n\t\t\t'label' => esc_html__('Hide secondary menu', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to hide the secondary menu.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_no_cta',\n\t\t\t'label' => esc_html__('Hide Call To Action menu', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to hide the Call To Action menu.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secondary_padding',\n\t\t\t'label' => esc_html__('Secondary menu padding', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to increase secondary menu padding.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_menu_no_secondary:is(off)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_socials',\n\t\t\t'label' => esc_html__('Social icons', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the social connection icons in the menu bar.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_search',\n\t\t\t'label' => esc_html__('Search icon', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the search icon in the menu bar.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_search_animation',\n\t\t\t'label' => esc_html__('Search overlay animation', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the search overlay animation when opening and closing.', 'uncode') ,\n\t\t\t'std' => 'sequential',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '3d',\n\t\t\t\t\t'label' => esc_html__('3D', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sequential',\n\t\t\t\t\t'label' => esc_html__('Flat', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t) ,\n\t\t\t'condition' => '_uncode_menu_search:is(on)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_woocommerce_cart',\n\t\t\t'label' => esc_html__('Woocommerce cart', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the Woocommerce icon in the menu bar.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_woocommerce_cart_desktop',\n\t\t\t'label' => esc_html__('Woocommerce cart on menu bar', 'uncode') ,\n\t\t\t'desc' => esc_html__('Show the cart icon in the menu bar when layout is on desktop mode (only for Overlay and Offcanvas menu).', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_woocommerce_cart:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_woocommerce_cart_mobile',\n\t\t\t'label' => esc_html__('Woocommerce cart on menu bar for mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Show the cart icon in the menu bar when layout is on mobile mode.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_woocommerce_cart:is(on)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bloginfo',\n\t\t\t'label' => esc_html__('Top line text', 'uncode') ,\n\t\t\t'desc' => esc_html__('Insert additional text on top of the menu.','uncode') ,\n\t\t\t'type' => 'textarea',\n\t\t\t'section' => 'uncode_header_section',\n\t\t\t'condition' => '_uncode_headers:is(hmenu-right),_uncode_headers:is(hmenu-left),_uncode_headers:is(hmenu-justify),_uncode_headers:is(hmenu-center),_uncode_headers:is(hmenu-center-split)',\n\t\t\t'operator' => 'or'\n\t\t) ,\n\t\t//////////////////////\n\t\t// Post Single\t\t///\n\t\t//////////////////////\n\t\tstr_replace('%section%', 'post', $menu_section_title),\n\t\tstr_replace('%section%', 'post', $menu),\n\t\tstr_replace('%section%', 'post', $menu_width),\n\t\tstr_replace('%section%', 'post', $menu_opaque),\n\t\tstr_replace('%section%', 'post', $header_section_title),\n\t\tstr_replace('%section%', 'post', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'post', $header_uncode_block),\n\t\tstr_replace('%section%', 'post', $header_revslider),\n\t\tstr_replace('%section%', 'post', $header_layerslider),\n\n\t\tstr_replace('%section%', 'post', $header_width),\n\t\tstr_replace('%section%', 'post', $header_height),\n\t\tstr_replace('%section%', 'post', $header_min_height),\n\t\tstr_replace('%section%', 'post', $header_title),\n\t\tstr_replace('%section%', 'post', $header_style),\n\t\tstr_replace('%section%', 'post', $header_content_width),\n\t\tstr_replace('%section%', 'post', $header_custom_width),\n\t\tstr_replace('%section%', 'post', $header_align),\n\t\tstr_replace('%section%', 'post', $header_position),\n\t\tstr_replace('%section%', 'post', $header_title_font),\n\t\tstr_replace('%section%', 'post', $header_title_size),\n\t\tstr_replace('%section%', 'post', $header_title_height),\n\t\tstr_replace('%section%', 'post', $header_title_spacing),\n\t\tstr_replace('%section%', 'post', $header_title_weight),\n\t\tstr_replace('%section%', 'post', $header_title_transform),\n\t\tstr_replace('%section%', 'post', $header_title_italic),\n\t\tstr_replace('%section%', 'post', $header_text_animation),\n\t\tstr_replace('%section%', 'post', $header_animation_speed),\n\t\tstr_replace('%section%', 'post', $header_animation_delay),\n\t\tstr_replace('%section%', 'post', $header_featured),\n\t\tstr_replace('%section%', 'post', $header_background),\n\t\tstr_replace('%section%', 'post', $header_parallax),\n\t\tstr_replace('%section%', 'post', $header_kburns),\n\t\tstr_replace('%section%', 'post', $header_overlay_color),\n\t\tstr_replace('%section%', 'post', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'post', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'post', $header_scrolldown),\n\n\t\tstr_replace('%section%', 'post', $body_section_title),\n\t\tstr_replace('%section%', 'post', $body_layout_width),\n\t\tstr_replace('%section%', 'post', $body_layout_width_custom),\n\t\tstr_replace('%section%', 'post', $show_breadcrumb),\n\t\tstr_replace('%section%', 'post', $breadcrumb_align),\n\t\t// str_replace('%section%', 'post', $body_uncode_block_before),\n\t\tstr_replace('%section%', 'post', $show_title),\n\t\tstr_replace('%section%', 'post', $show_media),\n\t\tstr_replace('%section%', 'post', $show_featured_media),\n\t\tstr_replace('%section%', 'post', $show_comments),\n\t\tstr_replace('%section%', 'post', $show_share),\n\t\tstr_replace('%section%', 'post', $show_tags),\n\t\tstr_replace('%section%', 'post', $show_tags_align),\n\t\tstr_replace('%section%', 'post', $body_uncode_block_after_pre),\n\t\tstr_replace('%section%', 'post', $body_uncode_block_after),\n\t\tstr_replace('%section%', 'post', $sidebar_section_title),\n\t\tstr_replace('%section%', 'post', run_array_to($sidebar_activate, 'std', 'on')),\n\t\tstr_replace('%section%', 'post', $sidebar_widget),\n\t\tstr_replace('%section%', 'post', $sidebar_position),\n\t\tstr_replace('%section%', 'post', $sidebar_size),\n\t\tstr_replace('%section%', 'post', $sidebar_sticky),\n\t\tstr_replace('%section%', 'post', $sidebar_style),\n\t\tstr_replace('%section%', 'post', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'post', $sidebar_fill),\n\n\t\tstr_replace('%section%', 'post', $navigation_section_title),\n\t\tstr_replace('%section%', 'post', $navigation_activate),\n\t\tstr_replace('%section%', 'post', $navigation_page_index),\n\t\tstr_replace('%section%', 'post', $navigation_index_label),\n\t\tstr_replace('%section%', 'post', $navigation_nextprev_title),\n\t\tstr_replace('%section%', 'post', $footer_section_title),\n\t\tstr_replace('%section%', 'post', $footer_uncode_block),\n\t\tstr_replace('%section%', 'post', $footer_width),\n\t\tstr_replace('%section%', 'post', $custom_fields_section_title),\n\t\tstr_replace('%section%', 'post', $custom_fields_list),\n\t\t///////////////\n\t\t// Page\t\t///\n\t\t///////////////\n\t\tstr_replace('%section%', 'page', $menu_section_title),\n\t\tstr_replace('%section%', 'page', $menu),\n\t\tstr_replace('%section%', 'page', $menu_width),\n\t\tstr_replace('%section%', 'page', $menu_opaque),\n\t\tstr_replace('%section%', 'page', $header_section_title),\n\t\tstr_replace('%section%', 'page', $header_type),\n\t\tstr_replace('%section%', 'page', $header_uncode_block),\n\t\tstr_replace('%section%', 'page', $header_revslider),\n\t\tstr_replace('%section%', 'page', $header_layerslider),\n\n\t\tstr_replace('%section%', 'page', $header_width),\n\t\tstr_replace('%section%', 'page', $header_height),\n\t\tstr_replace('%section%', 'page', $header_min_height),\n\t\tstr_replace('%section%', 'page', $header_title),\n\t\tstr_replace('%section%', 'page', $header_style),\n\t\tstr_replace('%section%', 'page', $header_content_width),\n\t\tstr_replace('%section%', 'page', $header_custom_width),\n\t\tstr_replace('%section%', 'page', $header_align),\n\t\tstr_replace('%section%', 'page', $header_position),\n\t\tstr_replace('%section%', 'page', $header_title_font),\n\t\tstr_replace('%section%', 'page', $header_title_size),\n\t\tstr_replace('%section%', 'page', $header_title_height),\n\t\tstr_replace('%section%', 'page', $header_title_spacing),\n\t\tstr_replace('%section%', 'page', $header_title_weight),\n\t\tstr_replace('%section%', 'page', $header_title_transform),\n\t\tstr_replace('%section%', 'page', $header_title_italic),\n\t\tstr_replace('%section%', 'page', $header_text_animation),\n\t\tstr_replace('%section%', 'page', $header_animation_speed),\n\t\tstr_replace('%section%', 'page', $header_animation_delay),\n\t\tstr_replace('%section%', 'page', $header_featured),\n\t\tstr_replace('%section%', 'page', $header_background),\n\t\tstr_replace('%section%', 'page', $header_parallax),\n\t\tstr_replace('%section%', 'page', $header_kburns),\n\t\tstr_replace('%section%', 'page', $header_overlay_color),\n\t\tstr_replace('%section%', 'page', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'page', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'page', $header_scrolldown),\n\t\tstr_replace('%section%', 'page', $body_section_title),\n\t\tstr_replace('%section%', 'page', $body_layout_width),\n\t\tstr_replace('%section%', 'page', $body_layout_width_custom),\n\t\tstr_replace('%section%', 'page', $show_breadcrumb),\n\t\tstr_replace('%section%', 'page', $breadcrumb_align),\n\t\tstr_replace('%section%', 'page', run_array_to($show_title, 'std', 'on')),\n\t\tstr_replace('%section%', 'page', $show_media),\n\t\tstr_replace('%section%', 'page', $show_featured_media),\n\t\tstr_replace('%section%', 'page', $show_comments),\n\t\tstr_replace('%section%', 'page', $body_uncode_block_after),\n\t\tstr_replace('%section%', 'page', $sidebar_section_title),\n\t\tstr_replace('%section%', 'page', $sidebar_activate),\n\t\tstr_replace('%section%', 'page', $sidebar_widget),\n\t\tstr_replace('%section%', 'page', $sidebar_position),\n\t\tstr_replace('%section%', 'page', $sidebar_size),\n\t\tstr_replace('%section%', 'page', $sidebar_sticky),\n\t\tstr_replace('%section%', 'page', $sidebar_style),\n\t\tstr_replace('%section%', 'page', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'page', $sidebar_fill),\n\t\tstr_replace('%section%', 'page', $footer_section_title),\n\t\tstr_replace('%section%', 'page', $footer_uncode_block),\n\t\tstr_replace('%section%', 'page', $footer_width),\n\t\tstr_replace('%section%', 'page', $custom_fields_section_title),\n\t\tstr_replace('%section%', 'page', $custom_fields_list),\n\t\t///////////////////////////\n\t\t// Portfolio Single\t\t///\n\t\t///////////////////////////\n\t\tstr_replace('%section%', 'portfolio', $menu_section_title),\n\t\tstr_replace('%section%', 'portfolio', $menu),\n\t\tstr_replace('%section%', 'portfolio', $menu_width),\n\t\tstr_replace('%section%', 'portfolio', $menu_opaque),\n\t\tstr_replace('%section%', 'portfolio', $header_section_title),\n\t\tstr_replace('%section%', 'portfolio', $header_type),\n\t\tstr_replace('%section%', 'portfolio', $header_uncode_block),\n\t\tstr_replace('%section%', 'portfolio', $header_revslider),\n\t\tstr_replace('%section%', 'portfolio', $header_layerslider),\n\n\t\tstr_replace('%section%', 'portfolio', $header_width),\n\t\tstr_replace('%section%', 'portfolio', $header_height),\n\t\tstr_replace('%section%', 'portfolio', $header_min_height),\n\t\tstr_replace('%section%', 'portfolio', $header_title),\n\t\tstr_replace('%section%', 'portfolio', $header_style),\n\t\tstr_replace('%section%', 'portfolio', $header_content_width),\n\t\tstr_replace('%section%', 'portfolio', $header_custom_width),\n\t\tstr_replace('%section%', 'portfolio', $header_align),\n\t\tstr_replace('%section%', 'portfolio', $header_position),\n\t\tstr_replace('%section%', 'portfolio', $header_title_font),\n\t\tstr_replace('%section%', 'portfolio', $header_title_size),\n\t\tstr_replace('%section%', 'portfolio', $header_title_height),\n\t\tstr_replace('%section%', 'portfolio', $header_title_spacing),\n\t\tstr_replace('%section%', 'portfolio', $header_title_weight),\n\t\tstr_replace('%section%', 'portfolio', $header_title_transform),\n\t\tstr_replace('%section%', 'portfolio', $header_title_italic),\n\t\tstr_replace('%section%', 'portfolio', $header_text_animation),\n\t\tstr_replace('%section%', 'portfolio', $header_animation_speed),\n\t\tstr_replace('%section%', 'portfolio', $header_animation_delay),\n\t\tstr_replace('%section%', 'portfolio', $header_featured),\n\t\tstr_replace('%section%', 'portfolio', $header_background),\n\t\tstr_replace('%section%', 'portfolio', $header_parallax),\n\t\tstr_replace('%section%', 'portfolio', $header_kburns),\n\t\tstr_replace('%section%', 'portfolio', $header_overlay_color),\n\t\tstr_replace('%section%', 'portfolio', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'portfolio', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'portfolio', $header_scrolldown),\n\n\t\tstr_replace('%section%', 'portfolio', $body_section_title),\n\t\tstr_replace('%section%', 'portfolio', $body_layout_width),\n\t\tstr_replace('%section%', 'portfolio', $body_layout_width_custom),\n\t\tstr_replace('%section%', 'portfolio', $show_breadcrumb),\n\t\tstr_replace('%section%', 'portfolio', $breadcrumb_align),\n\t\tstr_replace('%section%', 'portfolio', run_array_to($show_title, 'std', 'on')),\n\t\tstr_replace('%section%', 'portfolio', $show_media),\n\t\tstr_replace('%section%', 'portfolio', $show_featured_media),\n\t\tstr_replace('%section%', 'portfolio', run_array_to($show_comments, 'std', 'off')),\n\t\tstr_replace('%section%', 'portfolio', $show_share),\n\t\tstr_replace('%section%', 'portfolio', $body_uncode_block_after),\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_details_title',\n\t\t\t'label' => '<i class=\"fa fa-briefcase3\"></i> ' . esc_html__('Details', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_details',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('details', 'uncode') ,\n\t\t\t'desc' => sprintf(esc_html__('Create here all the %s details label that you need.', 'uncode') , $portfolio_cpt_name) ,\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_portfolio_detail_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'detail-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => sprintf(esc_html__('Unique %s detail ID','uncode') , $portfolio_cpt_name) ,\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_position',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('details layout', 'uncode') ,\n\t\t\t'desc' => sprintf(esc_html__('Specify the layout template for all the %s posts.', 'uncode') , $portfolio_cpt_name) ,\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Select…', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'portfolio_top',\n\t\t\t\t\t'label' => esc_html__('Details on the top', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sidebar_right',\n\t\t\t\t\t'label' => esc_html__('Details on the right', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'portfolio_bottom',\n\t\t\t\t\t'label' => esc_html__('Details on the bottom', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'sidebar_left',\n\t\t\t\t\t'label' => esc_html__('Details on the left', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_sidebar_size',\n\t\t\t'label' => esc_html__('Sidebar size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Set the sidebar size.', 'uncode') ,\n\t\t\t'std' => '4',\n\t\t\t'min_max_step' => '1,12,1',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_portfolio_position:not(),_uncode_portfolio_position:contains(sidebar)',\n\t\t) ,\n\t\tstr_replace('%section%', 'portfolio', run_array_to($sidebar_sticky, 'condition', '_uncode_portfolio_position:not(),_uncode_portfolio_position:contains(sidebar)')),\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_style',\n\t\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the sidebar text skin color.', 'uncode') ,\n\t\t\t'type' => 'select',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Inherit', \"uncode\") ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'light',\n\t\t\t\t\t'label' => esc_html__('Light', \"uncode\") ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'dark',\n\t\t\t\t\t'label' => esc_html__('Dark', \"uncode\") ,\n\t\t\t\t)\n\t\t\t),\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'condition' => '_uncode_portfolio_position:not()',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_bgcolor',\n\t\t\t'label' => esc_html__('Sidebar color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the sidebar background color.', 'uncode') ,\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'condition' => '_uncode_portfolio_position:not()',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_sidebar_fill',\n\t\t\t'label' => esc_html__('Sidebar filling space', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to remove padding around the sidebar and fill the height.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_portfolio_section',\n\t\t\t'std' => 'off',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_portfolio_position:not(),_uncode_portfolio_sidebar_bgcolor:not(),_uncode_portfolio_position:contains(sidebar)',\n\t\t),\n\t\tstr_replace('%section%', 'portfolio', $navigation_section_title),\n\t\tstr_replace('%section%', 'portfolio', $navigation_activate),\n\t\tstr_replace('%section%', 'portfolio', $navigation_page_index),\n\t\tstr_replace('%section%', 'portfolio', $navigation_index_label),\n\t\tstr_replace('%section%', 'portfolio', $navigation_nextprev_title),\n\t\tstr_replace('%section%', 'portfolio', $footer_section_title),\n\t\tstr_replace('%section%', 'portfolio', $footer_uncode_block),\n\t\tstr_replace('%section%', 'portfolio', $footer_width),\n\t\tstr_replace('%section%', 'portfolio', $custom_fields_section_title),\n\t\tstr_replace('%section%', 'portfolio', $custom_fields_list),\n\t);\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $cpt_single_options );\n\n\t$custom_settings_two = array(\n\t\t///////////////////\n\t\t// Page 404\t\t///\n\t\t///////////////////\n\t\tstr_replace('%section%', '404', $menu_section_title),\n\t\tstr_replace('%section%', '404', $menu),\n\t\tstr_replace('%section%', '404', $menu_width),\n\t\tstr_replace('%section%', '404', $menu_opaque),\n\t\tstr_replace('%section%', '404', $header_section_title),\n\t\tstr_replace('%section%', '404', $header_type),\n\t\tstr_replace('%section%', '404', $header_uncode_block),\n\t\tstr_replace('%section%', '404', $header_revslider),\n\t\tstr_replace('%section%', '404', $header_layerslider),\n\n\t\tstr_replace('%section%', '404', $header_width),\n\t\tstr_replace('%section%', '404', $header_height),\n\t\tstr_replace('%section%', '404', $header_min_height),\n\t\tstr_replace('%section%', '404', $header_title),\n\t\tstr_replace('%section%', '404', $header_title_text),\n\t\tstr_replace('%section%', '404', $header_style),\n\t\tstr_replace('%section%', '404', $header_content_width),\n\t\tstr_replace('%section%', '404', $header_custom_width),\n\t\tstr_replace('%section%', '404', $header_align),\n\t\tstr_replace('%section%', '404', $header_position),\n\t\tstr_replace('%section%', '404', $header_title_font),\n\t\tstr_replace('%section%', '404', $header_title_size),\n\t\tstr_replace('%section%', '404', $header_title_height),\n\t\tstr_replace('%section%', '404', $header_title_spacing),\n\t\tstr_replace('%section%', '404', $header_title_weight),\n\t\tstr_replace('%section%', '404', $header_title_transform),\n\t\tstr_replace('%section%', '404', $header_title_italic),\n\t\tstr_replace('%section%', '404', $header_text_animation),\n\t\tstr_replace('%section%', '404', $header_animation_speed),\n\t\tstr_replace('%section%', '404', $header_animation_delay),\n\t\tstr_replace('%section%', '404', $header_background),\n\t\tstr_replace('%section%', '404', $header_parallax),\n\t\tstr_replace('%section%', '404', $header_kburns),\n\t\tstr_replace('%section%', '404', $header_overlay_color),\n\t\tstr_replace('%section%', '404', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', '404', $header_scroll_opacity),\n\t\tstr_replace('%section%', '404', $header_scrolldown),\n\n\t\tstr_replace('%section%', '404', $body_section_title),\n\t\tstr_replace('%section%', '404', $body_layout_width),\n\t\tstr_replace('%section%', '404', $uncodeblock_404),\n\t\tstr_replace('%section%', '404', $uncodeblocks_404),\n\t\tstr_replace('%section%', '404', $footer_section_title),\n\t\tstr_replace('%section%', '404', $footer_uncode_block),\n\t\tstr_replace('%section%', '404', $footer_width),\n\t\t//////////////////////\n\t\t// Posts Index\t\t///\n\t\t//////////////////////\n\t\tstr_replace('%section%', 'post_index', $menu_section_title),\n\t\tstr_replace('%section%', 'post_index', $menu),\n\t\tstr_replace('%section%', 'post_index', $menu_width),\n\t\tstr_replace('%section%', 'post_index', $menu_opaque),\n\t\tstr_replace('%section%', 'post_index', $header_section_title),\n\t\tstr_replace('%section%', 'post_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'post_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'post_index', $header_revslider),\n\t\tstr_replace('%section%', 'post_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'post_index', $header_width),\n\t\tstr_replace('%section%', 'post_index', $header_height),\n\t\tstr_replace('%section%', 'post_index', $header_min_height),\n\t\tstr_replace('%section%', 'post_index', $header_title),\n\t\tstr_replace('%section%', 'post_index', $header_style),\n\t\tstr_replace('%section%', 'post_index', $header_content_width),\n\t\tstr_replace('%section%', 'post_index', $header_custom_width),\n\t\tstr_replace('%section%', 'post_index', $header_align),\n\t\tstr_replace('%section%', 'post_index', $header_position),\n\t\tstr_replace('%section%', 'post_index', $header_title_font),\n\t\tstr_replace('%section%', 'post_index', $header_title_size),\n\t\tstr_replace('%section%', 'post_index', $header_title_height),\n\t\tstr_replace('%section%', 'post_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'post_index', $header_title_weight),\n\t\tstr_replace('%section%', 'post_index', $header_title_transform),\n\t\tstr_replace('%section%', 'post_index', $header_title_italic),\n\t\tstr_replace('%section%', 'post_index', $header_text_animation),\n\t\tstr_replace('%section%', 'post_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'post_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'post_index', $header_featured),\n\t\tstr_replace('%section%', 'post_index', $header_background),\n\t\tstr_replace('%section%', 'post_index', $header_parallax),\n\t\tstr_replace('%section%', 'post_index', $header_kburns),\n\t\tstr_replace('%section%', 'post_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'post_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'post_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'post_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'post_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'post_index', $menu_no_padding_mobile),\n\t\tstr_replace('%section%', 'post_index', $title_archive_custom_activate),\n\t\tstr_replace('%section%', 'post_index', $title_archive_custom_text),\n\t\tstr_replace('%section%', 'post_index', $subtitle_archive_custom_text),\n\n\t\tstr_replace('%section%', 'post_index', $body_section_title),\n\t\tstr_replace('%section%', 'post_index', $show_breadcrumb),\n\t\tstr_replace('%section%', 'post_index', $breadcrumb_align),\n\t\tstr_replace('%section%', 'post_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'post_index', $body_layout_width),\n\t\tstr_replace('%section%', 'post_index', $body_single_post_width),\n\t\tstr_replace('%section%', 'post_index', $body_single_text_lenght),\n\t\tstr_replace('%section%', 'post_index', $show_title),\n\t\tstr_replace('%section%', 'post_index', $remove_pagination),\n\t\tstr_replace('%section%', 'post_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'post_index', run_array_to($sidebar_activate, 'std', 'on')),\n\t\tstr_replace('%section%', 'post_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'post_index', $sidebar_position),\n\t\tstr_replace('%section%', 'post_index', $sidebar_size),\n\t\tstr_replace('%section%', 'post_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'post_index', $sidebar_style),\n\t\tstr_replace('%section%', 'post_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'post_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'post_index', $footer_section_title),\n\t\tstr_replace('%section%', 'post_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'post_index', $footer_width),\n\t\t//////////////////////\n\t\t// Pages Index\t\t///\n\t\t//////////////////////\n\t\tstr_replace('%section%', 'page_index', $menu_section_title),\n\t\tstr_replace('%section%', 'page_index', $menu),\n\t\tstr_replace('%section%', 'page_index', $menu_width),\n\t\tstr_replace('%section%', 'page_index', $menu_opaque),\n\t\tstr_replace('%section%', 'page_index', $header_section_title),\n\t\tstr_replace('%section%', 'page_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'page_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'page_index', $header_revslider),\n\t\tstr_replace('%section%', 'page_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'page_index', $header_width),\n\t\tstr_replace('%section%', 'page_index', $header_height),\n\t\tstr_replace('%section%', 'page_index', $header_min_height),\n\t\tstr_replace('%section%', 'page_index', $header_title),\n\t\tstr_replace('%section%', 'page_index', $header_style),\n\t\tstr_replace('%section%', 'page_index', $header_content_width),\n\t\tstr_replace('%section%', 'page_index', $header_custom_width),\n\t\tstr_replace('%section%', 'page_index', $header_align),\n\t\tstr_replace('%section%', 'page_index', $header_position),\n\t\tstr_replace('%section%', 'page_index', $header_title_font),\n\t\tstr_replace('%section%', 'page_index', $header_title_size),\n\t\tstr_replace('%section%', 'page_index', $header_title_height),\n\t\tstr_replace('%section%', 'page_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'page_index', $header_title_weight),\n\t\tstr_replace('%section%', 'page_index', $header_title_transform),\n\t\tstr_replace('%section%', 'page_index', $header_title_italic),\n\t\tstr_replace('%section%', 'page_index', $header_text_animation),\n\t\tstr_replace('%section%', 'page_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'page_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'page_index', $header_featured),\n\t\tstr_replace('%section%', 'page_index', $header_background),\n\t\tstr_replace('%section%', 'page_index', $header_parallax),\n\t\tstr_replace('%section%', 'page_index', $header_kburns),\n\t\tstr_replace('%section%', 'page_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'page_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'page_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'page_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'page_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'page_index', $menu_no_padding_mobile),\n\n\t\tstr_replace('%section%', 'page_index', $body_section_title),\n\t\tstr_replace('%section%', 'page_index', $show_breadcrumb),\n\t\tstr_replace('%section%', 'page_index', $breadcrumb_align),\n\t\tstr_replace('%section%', 'page_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'page_index', $body_layout_width),\n\t\tstr_replace('%section%', 'page_index', $body_single_post_width),\n\t\tstr_replace('%section%', 'page_index', $body_single_text_lenght),\n\t\tstr_replace('%section%', 'page_index', $show_title),\n\t\tstr_replace('%section%', 'page_index', $remove_pagination),\n\t\tstr_replace('%section%', 'page_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'page_index', run_array_to($sidebar_activate, 'std', 'on')),\n\t\tstr_replace('%section%', 'page_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'page_index', $sidebar_position),\n\t\tstr_replace('%section%', 'page_index', $sidebar_size),\n\t\tstr_replace('%section%', 'page_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'page_index', $sidebar_style),\n\t\tstr_replace('%section%', 'page_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'page_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'page_index', $footer_section_title),\n\t\tstr_replace('%section%', 'page_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'page_index', $footer_width),\n\t\t////////////////////////\n\t\t// Archive Index\t\t///\n\t\t////////////////////////\n\t\tstr_replace('%section%', 'portfolio_index', $menu_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $menu),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_width),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_opaque),\n\t\tstr_replace('%section%', 'portfolio_index', $header_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'portfolio_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'portfolio_index', $header_revslider),\n\t\tstr_replace('%section%', 'portfolio_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'portfolio_index', $header_width),\n\t\tstr_replace('%section%', 'portfolio_index', $header_height),\n\t\tstr_replace('%section%', 'portfolio_index', $header_min_height),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title),\n\t\tstr_replace('%section%', 'portfolio_index', $header_style),\n\t\tstr_replace('%section%', 'portfolio_index', $header_content_width),\n\t\tstr_replace('%section%', 'portfolio_index', $header_custom_width),\n\t\tstr_replace('%section%', 'portfolio_index', $header_align),\n\t\tstr_replace('%section%', 'portfolio_index', $header_position),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_font),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_size),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_height),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_weight),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_transform),\n\t\tstr_replace('%section%', 'portfolio_index', $header_title_italic),\n\t\tstr_replace('%section%', 'portfolio_index', $header_text_animation),\n\t\tstr_replace('%section%', 'portfolio_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'portfolio_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'portfolio_index', $header_featured),\n\t\tstr_replace('%section%', 'portfolio_index', $header_background),\n\t\tstr_replace('%section%', 'portfolio_index', $header_parallax),\n\t\tstr_replace('%section%', 'portfolio_index', $header_kburns),\n\t\tstr_replace('%section%', 'portfolio_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'portfolio_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'portfolio_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'portfolio_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'portfolio_index', $menu_no_padding_mobile),\n\t\tstr_replace('%section%', 'portfolio_index', $title_archive_custom_activate),\n\t\tstr_replace('%section%', 'portfolio_index', $title_archive_custom_text),\n\t\tstr_replace('%section%', 'portfolio_index', $subtitle_archive_custom_text),\n\n\t\tstr_replace('%section%', 'portfolio_index', $body_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $show_breadcrumb),\n\t\tstr_replace('%section%', 'portfolio_index', $breadcrumb_align),\n\t\tstr_replace('%section%', 'portfolio_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'portfolio_index', $body_layout_width),\n\t\tstr_replace('%section%', 'portfolio_index', $body_single_post_width),\n\t\tstr_replace('%section%', 'portfolio_index', $show_title),\n\t\tstr_replace('%section%', 'portfolio_index', $remove_pagination),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_activate),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_position),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_size),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_style),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'portfolio_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'portfolio_index', $footer_section_title),\n\t\tstr_replace('%section%', 'portfolio_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'portfolio_index', $footer_width),\n\t);\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_two );\n\t$custom_settings_one = array_merge( $custom_settings_one, $cpt_index_options );\n\n\t$custom_settings_three = array(\n\t\t///////////////////////\n\t\t// Search Index\t\t///\n\t\t///////////////////////\n\t\tstr_replace('%section%', 'search_index', $menu_section_title),\n\t\tstr_replace('%section%', 'search_index', $menu),\n\t\tstr_replace('%section%', 'search_index', $menu_width),\n\t\tstr_replace('%section%', 'search_index', $menu_opaque),\n\t\tstr_replace('%section%', 'search_index', $header_section_title),\n\t\tstr_replace('%section%', 'search_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\tstr_replace('%section%', 'search_index', $header_uncode_block),\n\t\tstr_replace('%section%', 'search_index', $header_revslider),\n\t\tstr_replace('%section%', 'search_index', $header_layerslider),\n\n\t\tstr_replace('%section%', 'search_index', $header_width),\n\t\tstr_replace('%section%', 'search_index', $header_height),\n\t\tstr_replace('%section%', 'search_index', $header_min_height),\n\t\tstr_replace('%section%', 'search_index', $header_title),\n\t\tstr_replace('%section%', 'search_index', $header_title_text),\n\t\tstr_replace('%section%', 'search_index', $header_style),\n\t\tstr_replace('%section%', 'search_index', $header_content_width),\n\t\tstr_replace('%section%', 'search_index', $header_custom_width),\n\t\tstr_replace('%section%', 'search_index', $header_align),\n\t\tstr_replace('%section%', 'search_index', $header_position),\n\t\tstr_replace('%section%', 'search_index', $header_title_font),\n\t\tstr_replace('%section%', 'search_index', $header_title_size),\n\t\tstr_replace('%section%', 'search_index', $header_title_height),\n\t\tstr_replace('%section%', 'search_index', $header_title_spacing),\n\t\tstr_replace('%section%', 'search_index', $header_title_weight),\n\t\tstr_replace('%section%', 'search_index', $header_title_transform),\n\t\tstr_replace('%section%', 'search_index', $header_title_italic),\n\t\tstr_replace('%section%', 'search_index', $header_text_animation),\n\t\tstr_replace('%section%', 'search_index', $header_animation_speed),\n\t\tstr_replace('%section%', 'search_index', $header_animation_delay),\n\t\tstr_replace('%section%', 'search_index', $header_background),\n\t\tstr_replace('%section%', 'search_index', $header_parallax),\n\t\tstr_replace('%section%', 'search_index', $header_kburns),\n\t\tstr_replace('%section%', 'search_index', $header_overlay_color),\n\t\tstr_replace('%section%', 'search_index', $header_overlay_color_alpha),\n\t\tstr_replace('%section%', 'search_index', $header_scroll_opacity),\n\t\tstr_replace('%section%', 'search_index', $header_scrolldown),\n\t\tstr_replace('%section%', 'search_index', $menu_no_padding),\n\t\tstr_replace('%section%', 'search_index', $menu_no_padding_mobile),\n\t\tstr_replace('%section%', 'search_index', $title_archive_custom_activate),\n\t\tstr_replace('%section%', 'search_index', $title_archive_custom_text),\n\t\tstr_replace('%section%', 'search_index', $subtitle_archive_custom_text),\n\n\t\tstr_replace('%section%', 'search_index', $body_section_title),\n\t\tstr_replace('%section%', 'search_index', $body_uncode_block),\n\t\tstr_replace('%section%', 'search_index', $body_layout_width),\n\t\tstr_replace('%section%', 'search_index', $remove_pagination),\n\t\tstr_replace('%section%', 'search_index', $sidebar_section_title),\n\t\tstr_replace('%section%', 'search_index', $sidebar_activate),\n\t\tstr_replace('%section%', 'search_index', $sidebar_widget),\n\t\tstr_replace('%section%', 'search_index', $sidebar_position),\n\t\tstr_replace('%section%', 'search_index', $sidebar_size),\n\t\tstr_replace('%section%', 'search_index', $sidebar_sticky),\n\t\tstr_replace('%section%', 'search_index', $sidebar_style),\n\t\tstr_replace('%section%', 'search_index', $sidebar_bgcolor),\n\t\tstr_replace('%section%', 'search_index', $sidebar_fill),\n\t\tstr_replace('%section%', 'search_index', $footer_section_title),\n\t\tstr_replace('%section%', 'search_index', $footer_uncode_block),\n\t\tstr_replace('%section%', 'search_index', $footer_width),\n\n\t\tarray(\n\t\t\t'id' => '_uncode_sidebars',\n\t\t\t'label' => esc_html__('Site sidebars', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the sidebars you will need. A default sidebar is already defined.', 'uncode') ,\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_sidebars_section',\n\t\t\t'class' => 'list-item',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_sidebar_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'sidebar-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique sidebar ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_font_groups',\n\t\t\t'label' => esc_html__('Custom fonts', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the fonts you will need.', 'uncode') ,\n\t\t\t'std' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'title' => 'Font Default',\n\t\t\t\t\t'_uncode_font_group_unique_id' => 'font-555555',\n\t\t\t\t\t'_uncode_font_group' => 'manual',\n\t\t\t\t\t'_uncode_font_manual' => '-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Oxygen-Sans,Ubuntu,Cantarell,\"Helvetica Neue\",sans-serif'\n\t\t\t\t),\n\t\t\t),\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_font_group_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'font-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique font ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_font_group',\n\t\t\t\t\t'label' => esc_html__('Uncode font', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify a font.', 'uncode') ,\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'choices' => $title_font,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_font_manual',\n\t\t\t\t\t'label' => esc_html__('Font family', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Enter a font family.', 'uncode') ,\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'condition' => '_uncode_font_group:is(manual)',\n\t\t\t\t\t'operator' => 'and'\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_font_size',\n\t\t\t'label' => esc_html__('Default font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for p,li,dt,dd,dl,address,label,small,pre in px.', 'uncode') ,\n\t\t\t'std' => '15',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_large_text_size',\n\t\t\t'label' => esc_html__('Large text font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for large text in px.', 'uncode') ,\n\t\t\t'std' => '18',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h1',\n\t\t\t'label' => esc_html__('Font size H1', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H1 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '35',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h2',\n\t\t\t'label' => esc_html__('Font size H2', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H2 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '29',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h3',\n\t\t\t'label' => esc_html__('Font size H3', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H3 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '24',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h4',\n\t\t\t'label' => esc_html__('Font size H4', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H4 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '20',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h5',\n\t\t\t'label' => esc_html__('Font size H5', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H5 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '17',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_h6',\n\t\t\t'label' => esc_html__('Font size H6', 'uncode') ,\n\t\t\t'desc' => esc_html__('Font size for H6 in <b>px</b>.', 'uncode') ,\n\t\t\t'std' => '14',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_sizes',\n\t\t\t'label' => esc_html__('Custom font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the additional font sizes you will need.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_size_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'fontsize-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique font size ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_size',\n\t\t\t\t\t'label' => esc_html__('Font size', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Font size in <b>px</b>.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_heights',\n\t\t\t'label' => esc_html__('Custom line height', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the additional font line heights you will need.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_height_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'fontheight-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique font height ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_height',\n\t\t\t\t\t'label' => esc_html__('Font line height', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Insert a line height.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_spacings',\n\t\t\t'label' => esc_html__('Custom letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the letter spacings you will need.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_typography_section',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_spacing_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'fontspace-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique letter spacing ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_heading_font_spacing',\n\t\t\t\t\t'label' => esc_html__('Letter spacing', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Letter spacing with the unit (em or px). Ex. 0.2em', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_colors_list',\n\t\t\t'label' => esc_html__('Color palettes', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define all the colors you will need.', 'uncode') ,\n\t\t\t'std' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Black','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-jevc',\n\t\t\t\t\t'_uncode_custom_color' => '#000000',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 1','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-nhtu',\n\t\t\t\t\t'_uncode_custom_color' => '#101213',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 2','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-wayh',\n\t\t\t\t\t'_uncode_custom_color' => '#141618',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 3','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-rgdb',\n\t\t\t\t\t'_uncode_custom_color' => '#1b1d1f',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Dark 4','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-prif',\n\t\t\t\t\t'_uncode_custom_color' => '#303133',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('White','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-xsdn',\n\t\t\t\t\t'_uncode_custom_color' => '#ffffff',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 1','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-lxmt',\n\t\t\t\t\t'_uncode_custom_color' => '#f7f7f7',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 2','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-gyho',\n\t\t\t\t\t'_uncode_custom_color' => '#eaeaea',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 3','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-uydo',\n\t\t\t\t\t'_uncode_custom_color' => '#dddddd',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Light 4','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-wvjs',\n\t\t\t\t\t'_uncode_custom_color' => '#777',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Cerulean','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-vyce',\n\t\t\t\t\t'_uncode_custom_color' => '#0cb4ce',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'title' => esc_html__('Blue Ribbon','uncode'),\n\t\t\t\t\t'_uncode_custom_color_unique_id' => 'color-210407',\n\t\t\t\t\t'_uncode_custom_color' => '#006cff',\n\t\t\t\t\t'_uncode_custom_color_regular' => 'on',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_colors_section',\n\t\t\t'class' => 'list-colors',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color_unique_id',\n\t\t\t\t\t'std' => 'color-',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique color ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color_regular',\n\t\t\t\t\t'label' => esc_html__('Monochrome', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Activate to assign a monochromatic color, otherwise a gradient will be used.', 'uncode') ,\n\t\t\t\t\t'std' => 'on',\n\t\t\t\t\t'type' => 'on-off',\n\t\t\t\t\t'section' => 'uncode_customize_section',\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color',\n\t\t\t\t\t'label' => esc_html__('Colorpicker', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify the color for this palette. You can also define a color with the alpha value.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t'condition' => '_uncode_custom_color_regular:is(on)',\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_custom_color_gradient',\n\t\t\t\t\t'label' => esc_html__('Gradient', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify the gradient color for this palette. NB. You can use a gradient color only as a background color.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'gradientpicker',\n\t\t\t\t\t'condition' => '_uncode_custom_color_regular:is(off)',\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_light_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square-o\"></i> ' . esc_html__('Light skin', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_color_light',\n\t\t\t'label' => esc_html__('SVG/Text logo color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the logo color if it\\'s a SVG or textual.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_color_light',\n\t\t\t'label' => esc_html__('Menu text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu text color.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_color_light',\n\t\t\t'label' => esc_html__('Primary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_alpha_light',\n\t\t\t'label' => esc_html__('Primary menu background opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu background transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_bg_color_light',\n\t\t\t'label' => esc_html__('Primary submenu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary submenu background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_color_light',\n\t\t\t'label' => esc_html__('Primary menu border color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu border color.', 'uncode') ,\n\t\t\t'std' => 'color-gyho',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_alpha_light',\n\t\t\t'label' => esc_html__('Primary menu border opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu border transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secmenu_bg_color_light',\n\t\t\t'label' => esc_html__('Secondary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the secondary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_color_light',\n\t\t\t'label' => esc_html__('Headings color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the headings text color.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_text_color_light',\n\t\t\t'label' => esc_html__('Content text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content area text color.', 'uncode') ,\n\t\t\t'std' => 'color-wvjs',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_background_color_light',\n\t\t\t'label' => esc_html__('Content background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content background color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_dark_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square\"></i> ' . esc_html__('Dark skin', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_logo_color_dark',\n\t\t\t'label' => esc_html__('SVG/Text logo color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the logo color if it\\'s a SVG or textual.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_color_dark',\n\t\t\t'label' => esc_html__('Menu text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu text color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_color_dark',\n\t\t\t'label' => esc_html__('Primary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-wayh',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_bg_alpha_dark',\n\t\t\t'label' => esc_html__('Primary menu background opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu background transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_bg_color_dark',\n\t\t\t'label' => esc_html__('Primary submenu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary submenu background color.', 'uncode') ,\n\t\t\t'std' => 'color-rgdb',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_color_dark',\n\t\t\t'label' => esc_html__('Primary menu border color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu border color.', 'uncode') ,\n\t\t\t'std' => 'color-prif',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_border_alpha_dark',\n\t\t\t'label' => esc_html__('Primary menu border opacity', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the primary menu border transparency.', 'uncode') ,\n\t\t\t'std' => '100',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secmenu_bg_color_dark',\n\t\t\t'label' => esc_html__('Secondary menu background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the secondary menu background color.', 'uncode') ,\n\t\t\t'std' => 'color-wayh',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_color_dark',\n\t\t\t'label' => esc_html__('Headings color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the headings text color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_text_color_dark',\n\t\t\t'label' => esc_html__('Content text color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content area text color.', 'uncode') ,\n\t\t\t'std' => 'color-xsdn',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_background_color_dark',\n\t\t\t'label' => esc_html__('Content background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content background color.', 'uncode') ,\n\t\t\t'std' => 'color-wayh',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_general_block_title',\n\t\t\t'label' => '<i class=\"fa fa-globe3\"></i> ' . esc_html__('General', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_background',\n\t\t\t'label' => esc_html__('HTML body background', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body background color and media.', 'uncode') ,\n\t\t\t'type' => 'background',\n\t\t\t'std' => array(\n\t\t\t\t'background-color' => 'color-lxmt',\n\t\t\t\t'background-repeat' => '',\n\t\t\t\t'background-attachment' => '',\n\t\t\t\t'background-position' => '',\n\t\t\t\t'background-size' => '',\n\t\t\t\t'background-image' => '',\n\t\t\t),\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_accent_color',\n\t\t\t'label' => esc_html__('Accent color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the accent color.', 'uncode') ,\n\t\t\t'std' => 'color-210407',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_link_color',\n\t\t\t'label' => esc_html__('Links color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the color of links in page textual contents.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Default', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'accent',\n\t\t\t\t\t'label' => esc_html__('Accent color', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_font_family',\n\t\t\t'label' => esc_html__('Body font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_body_font_weight',\n\t\t\t'label' => esc_html__('Body font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the body font weight.', 'uncode') ,\n\t\t\t'std' => '400',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_ui_font_family',\n\t\t\t'label' => esc_html__('UI font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the UI font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_ui_font_weight',\n\t\t\t'label' => esc_html__('UI font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the UI font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_family',\n\t\t\t'label' => esc_html__('Headings font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the headings font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_heading_font_weight',\n\t\t\t'label' => esc_html__('Headings font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the Headings font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_letter_spacing',\n\t\t\t'label' => esc_html__('Headings letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the letter spacing in EMs.', 'uncode') ,\n\t\t\t'std' => '0.00',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_input_underline',\n\t\t\t'label' => esc_html__('Input text underlined', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to style all the input text with the underline.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_fallback_font',\n\t\t\t'label' => esc_html__('Fallback font', 'uncode') ,\n\t\t\t'desc' => esc_html__('Select a font to use as fallback when Google Fonts import is not available.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_style_block_title',\n\t\t\t'label' => '<i class=\"fa fa-menu\"></i> ' . esc_html__('Menu', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_overlay_menu_style',\n\t\t\t'label' => esc_html__('Overlay menu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the overlay menu skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '_uncode_headers:is(menu-overlay),_uncode_headers:is(menu-overlay-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_color_hover',\n\t\t\t'label' => esc_html__('Menu highlight color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu active and hover effect color (If not specified an opaque version of the menu color will be used).', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_primary_menu_style',\n\t\t\t'label' => esc_html__('Primary menu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary menu skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_primary_submenu_style',\n\t\t\t'label' => esc_html__('Primary submenu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the primary submenu skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_secondary_menu_style',\n\t\t\t'label' => esc_html__('Secondary menu skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the secondary menu skin.', 'uncode') ,\n\t\t\t'std' => 'dark',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '_uncode_headers:is(hmenu-right),_uncode_headers:is(hmenu-left),_uncode_headers:is(hmenu-justify),_uncode_headers:is(hmenu-center)',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_font_size',\n\t\t\t'label' => esc_html__('Menu font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font size. NB: the Overlay menu font size is automatic relative to the viewport.', 'uncode') ,\n\t\t\t'std' => '12',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_submenu_font_size',\n\t\t\t'label' => esc_html__('Submenu font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the submenu font size. NB: the Overlay submenu font size is automatic relative to the viewport.', 'uncode') ,\n\t\t\t'std' => '12',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_mobile_font_size',\n\t\t\t'label' => esc_html__('Mobile menu font size', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font size for mobile (when the Navbar > Animation > is not Menu Centered Mobile).', 'uncode') ,\n\t\t\t'std' => '12',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_font_family',\n\t\t\t'label' => esc_html__('Menu font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_font_weight',\n\t\t\t'label' => esc_html__('Menu font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the menu font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_letter_spacing',\n\t\t\t'label' => esc_html__('Menu letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the letter spacing in EMs (the default value is 0.05).', 'uncode') ,\n\t\t\t'std' => '0.05',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_first_uppercase',\n\t\t\t'label' => esc_html__('Menu first level uppercase', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to transform the first menu level to uppercase.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_menu_other_uppercase',\n\t\t\t'label' => esc_html__('Menu other levels uppercase', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to transform all the others menu level to uppercase.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_content_block_title',\n\t\t\t'label' => '<i class=\"fa fa-layout\"></i> ' . esc_html__('Content', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_general_style',\n\t\t\t'label' => esc_html__('Skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the content skin.', 'uncode') ,\n\t\t\t'std' => 'light',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'light',\n\t\t\t\t\t'label' => esc_html__('Light', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'dark',\n\t\t\t\t\t'label' => esc_html__('Dark', 'uncode') ,\n\t\t\t\t\t'src' => ''\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_general_bg_color',\n\t\t\t'label' => esc_html__('Background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify a custom content background color.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_buttons_block_title',\n\t\t\t'label' => '<i class=\"fa fa-download3\"></i> ' . esc_html__('Buttons and Forms', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_font_family',\n\t\t\t'label' => esc_html__('Buttons font family', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the buttons font family.', 'uncode') ,\n\t\t\t'std' => 'font-555555',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $custom_fonts\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_font_weight',\n\t\t\t'label' => esc_html__('Buttons font weight', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the buttons font weight.', 'uncode') ,\n\t\t\t'std' => '600',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $title_weight\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_text_transform',\n\t\t\t'label' => esc_html__('Buttons text transform', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the buttons text transform.', 'uncode') ,\n\t\t\t'std' => 'uppercase',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'initial',\n\t\t\t\t\t'label' => esc_html__('Default', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'uppercase',\n\t\t\t\t\t'label' => esc_html__('Uppercase', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'lowercase',\n\t\t\t\t\t'label' => esc_html__('Lowercase', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'capitalize',\n\t\t\t\t\t'label' => esc_html__('Capitalize', 'uncode') ,\n\t\t\t\t) ,\n\t\t\t) ,\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_letter_spacing',\n\t\t\t'label' => esc_html__('Buttons letter spacing', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the letter spacing value.', 'uncode') ,\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'operator' => 'or',\n\t\t\t'choices' => $btn_letter_spacing,\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_buttons_border_width',\n\t\t\t'label' => esc_html__('Button and form fields border', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the width of the borders for buttons and form fields', 'uncode') ,\n\t\t\t'std' => '1',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '1,5,1',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_button_hover',\n\t\t\t'label' => esc_html__('Button hover effect', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify an effect on hover state.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'label' => esc_html__('Outlined', 'uncode')\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'full-colored',\n\t\t\t\t\t'label' => esc_html__('Flat', 'uncode')\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_style_block_title',\n\t\t\t'label' => '<i class=\"fa fa-ellipsis\"></i> ' . esc_html__('Footer', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_last_style',\n\t\t\t'label' => esc_html__('Copyright area skin', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the copyright area skin color.', 'uncode') ,\n\t\t\t'std' => 'dark',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and',\n\t\t\t'choices' => $stylesArrayMenu\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_bg_color',\n\t\t\t'label' => esc_html__('Copyright area custom background color', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify a custom copyright area background color.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'uncode_color',\n\t\t\t'section' => 'uncode_customize_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_customize_extra_block_title',\n\t\t\t'label' => '<i class=\"fa fa-download3\"></i> ' . esc_html__('Scroll & Parallax', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_scroll_constant',\n\t\t\t'label' => esc_html__('ScrollTo constant speed', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to always have a constant speed when scrolling to point.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_scroll_constant_factor',\n\t\t\t'label' => esc_html__('ScrollTo constant speed factor', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the constant scroll speed factor. Default 2', 'uncode') ,\n\t\t\t'std' => '2',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '1,15,0.25',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_scroll_constant:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_scroll_speed_value',\n\t\t\t'label' => esc_html__('ScrollTo speed fixed', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the scroll speed time in milliseconds.', 'uncode') ,\n\t\t\t'std' => '1000',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_scroll_constant:is(off)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_parallax_factor',\n\t\t\t'label' => esc_html__('Parallax speed factor', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the parallax speed factor. Default 2.5', 'uncode') ,\n\t\t\t'std' => '2.5',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '0.5,3,0.5',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_portfolio_block_title',\n\t\t\t'label' => '<i class=\"fa fa-briefcase3\"></i> ' . ucfirst($portfolio_cpt_name) . ' ' . esc_html__('CPT', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_cpt',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('CPT label', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter a custom portfolio post type label.', 'uncode') ,\n\t\t\t'std' => 'portfolio',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_portfolio_cpt_slug',\n\t\t\t'label' => ucfirst($portfolio_cpt_name) . ' ' . esc_html__('CPT slug', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter a custom portfolio post type slug.', 'uncode') ,\n\t\t\t'std' => 'portfolio',\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t)\n\t);\n\n\tif (class_exists('WooCommerce')) {\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_block_title',\n\t\t\t'label' => '<i class=\"fa fa-shopping-cart\"></i> ' . esc_html__('WooCommerce', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t);\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_cart_icon',\n\t\t\t'label' => esc_html__('Cart icon', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the cart icon', 'uncode') ,\n\t\t\t'std' => 'fa fa-bag',\n\t\t\t'type' => 'text',\n\t\t\t'class' => 'button_icon_container',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t);\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_hooks',\n\t\t\t'label' => esc_html__('Enable Hooks', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to enable default WooCommerce hooks on product loops.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t);\n\n\t\t$custom_settings_three[] = array(\n\t\t\t'id' => '_uncode_woocommerce_enhanced_atc',\n\t\t\t'label' => esc_html__('Enhance Add To Cart Button', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to enable the enhanced Add To Cart button on loops.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t);\n\t}\n\n\t$custom_settings_four = array(\n\t\tarray(\n\t\t\t'id' => '_uncode_customize_admin_block_title',\n\t\t\t'label' => '<i class=\"fa fa-dashboard\"></i> ' . esc_html__('Admin', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_admin_help',\n\t\t\t'label' => esc_html__('Help button in admin bar', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to show the Uncode help button in the WP admin bar.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_extra_section',\n\t\t) ,\n\t);\n\n\t$custom_settings_five = array(\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_layout_block_title',\n\t\t\t'label' => '<i class=\"fa fa-layers\"></i> ' . esc_html__('Layout', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_full',\n\t\t\t'label' => esc_html__('Footer full width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Expand the footer to full width.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'condition' => '_uncode_boxed:is(off)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_content_block_title',\n\t\t\t'label' => '<i class=\"fa fa-cog2\"></i> ' . esc_html__('Widget area', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_block',\n\t\t\t'label' => esc_html__('Content Block', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the Content Block to use as a footer content.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'custom-post-type-select',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'post_type' => 'uncodeblock',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_last_block_title',\n\t\t\t'label' => '<i class=\"fa fa-copyright\"></i> ' . esc_html__('Copyright area', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_copy_hide',\n\t\t\t'label' => esc_html__('Hide Copyright Area', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'desc' => esc_html__('Activate this to hide the Copyright Area.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_copyright',\n\t\t\t'label' => esc_html__('Automatic copyright text', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to use an automatic copyright text.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_text',\n\t\t\t'label' => esc_html__('Custom copyright text', 'uncode') ,\n\t\t\t'desc' => esc_html__('Insert a custom text for the footer copyright area.', 'uncode') ,\n\t\t\t'type' => 'textarea',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_footer_copyright:is(off)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_position',\n\t\t\t'label' => esc_html__('Content alignment', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the footer copyright text alignment.', 'uncode') ,\n\t\t\t'std' => 'left',\n\t\t\t'type' => 'select',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t\t'choices' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode')\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'center',\n\t\t\t\t\t'label' => esc_html__('Center', 'uncode')\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode')\n\t\t\t\t)\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_social',\n\t\t\t'label' => esc_html__('Social links', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to have the social icons in the footer copyright area.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_add_block_title',\n\t\t\t'label' => '<i class=\"fa fa-square-plus\"></i> ' . esc_html__('Additionals', 'uncode') ,\n\t\t\t'type' => 'textblock-titled',\n\t\t\t'class' => 'section-title',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_uparrow',\n\t\t\t'label' => esc_html__('Scroll up button', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to add a scroll up button in the footer.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'std' => 'on',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_footer_uparrow_mobile',\n\t\t\t'label' => esc_html__('Scroll up button on mobile', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to add a scroll up button in the footer for mobile devices.', 'uncode') ,\n\t\t\t'type' => 'on-off',\n\t\t\t'std' => 'on',\n\t\t\t'condition' => '_uncode_footer_uparrow:is(on)',\n\t\t\t'operator' => 'and',\n\t\t\t'section' => 'uncode_footer_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_social_list',\n\t\t\t'label' => esc_html__('Social Networks', 'uncode') ,\n\t\t\t'desc' => esc_html__('Define here all the social networks you will need.', 'uncode') ,\n\t\t\t'type' => 'list-item',\n\t\t\t'section' => 'uncode_connections_section',\n\t\t\t'class' => 'list-social',\n\t\t\t'settings' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_social_unique_id',\n\t\t\t\t\t'class' => 'unique_id',\n\t\t\t\t\t'std' => 'social-',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__('Unique social ID','uncode'),\n\t\t\t\t\t'desc' => esc_html__('This value is created automatically and it shouldn\\'t be edited unless you know what you are doing.','uncode'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_social',\n\t\t\t\t\t'label' => esc_html__('Social Network Icon', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Specify the social network icon.', 'uncode') ,\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'class' => 'button_icon_container',\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_link',\n\t\t\t\t\t'label' => esc_html__('Social Network Link', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Enter your social network link.', 'uncode') ,\n\t\t\t\t\t'std' => '',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'condition' => '',\n\t\t\t\t\t'operator' => 'and'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'id' => '_uncode_menu_hidden',\n\t\t\t\t\t'label' => esc_html__('Hide In The Menu', 'uncode') ,\n\t\t\t\t\t'desc' => esc_html__('Activate to hide the social icon in the menu (if the social connections in the menu is active).', 'uncode') ,\n\t\t\t\t\t'std' => 'off',\n\t\t\t\t\t'type' => 'on-off',\n\t\t\t\t\t'condition' => '',\n\t\t\t\t\t'operator' => 'and'\n\t\t\t\t) ,\n\t\t\t)\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_gmaps_api',\n\t\t\t'label' => esc_html__('Google Maps API KEY', 'uncode') ,\n\t\t\t'desc' => sprintf( wp_kses(__( 'To use Uncode custom styled Google Maps you need to create <a href=\"%s\" target=\"_blank\">here the Google API KEY</a> and paste it in this field.', 'uncode' ), array( 'a' => array( 'href' => array(),'target' => array() ) ) ), 'https://developers.google.com/maps/documentation/javascript/get-api-key#get-an-api-key' ),\n\t\t\t'type' => 'text',\n\t\t\t'section' => 'uncode_gmaps_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_css',\n\t\t\t'label' => esc_html__('CSS', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter here your custom CSS.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'css',\n\t\t\t'section' => 'uncode_cssjs_section',\n\t\t\t'rows' => '20',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_js',\n\t\t\t'label' => esc_html__('Javascript', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter here your custom Javacript code.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'textarea-simple',\n\t\t\t'section' => 'uncode_cssjs_section',\n\t\t\t'rows' => '20',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_custom_tracking',\n\t\t\t'label' => esc_html__('Tracking', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter here your custom Tracking code.', 'uncode') ,\n\t\t\t'std' => '',\n\t\t\t'type' => 'textarea-simple',\n\t\t\t'section' => 'uncode_cssjs_section',\n\t\t\t'rows' => '20',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive',\n\t\t\t'label' => esc_html__('Adaptive images', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to take advantage of the Adaptive Images system. Adaptive Images detects your visitor\\'s screen size and automatically delivers device appropriate re-scaled images.', 'uncode') ,\n\t\t\t'std' => 'on',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_async',\n\t\t\t'label' => esc_html__('Asynchronous adaptive image system', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to load the adaptive images asynchronously, this will improve the loading performance and it\\'s necessary if using an aggresive caching system.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_async_blur',\n\t\t\t'label' => esc_html__('Asynchronous loading blur effect', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to use a bluring effect when loading the images.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_adaptive:is(on),_uncode_adaptive_async:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_mobile_advanced',\n\t\t\t'label' => esc_html__('Mobile settings', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to set specific mobile options.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_use_orientation_width',\n\t\t\t'label' => esc_html__('Use current mobile orientation width', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to use the current mobile orientation width (portrait or landscape) instead of the max device\\'s width (landscape).', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_adaptive:is(on),_uncode_adaptive_mobile_advanced:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_limit_density',\n\t\t\t'label' => esc_html__('Limit device density', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to limit the pixel density to 2 when generating the most appropriate image for high pixel density displays.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'and',\n\t\t\t'condition' => '_uncode_adaptive:is(on),_uncode_adaptive_mobile_advanced:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_quality',\n\t\t\t'label' => esc_html__('Image quality', 'uncode') ,\n\t\t\t'desc' => esc_html__('Adjust the images compression quality.', 'uncode') ,\n\t\t\t'std' => '90',\n\t\t\t'type' => 'numeric-slider',\n\t\t\t'min_max_step'=> '60,100,1',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_adaptive_sizes',\n\t\t\t'label' => esc_html__('Image sizes range', 'uncode') ,\n\t\t\t'desc' => esc_html__('Enter all the image sizes you want use for the Adaptive Images system. NB. The values needs to be comma separated.', 'uncode') ,\n\t\t\t'type' => 'text',\n\t\t\t'std' => '258,516,720,1032,1440,2064,2880',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'operator' => 'or',\n\t\t\t'condition' => '_uncode_adaptive:is(on)',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_htaccess',\n\t\t\t'label' => esc_html__('Apache Server Configs', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate the enhanced .htaccess, this will improve the web site\\'s performance and security.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_production',\n\t\t\t'label' => esc_html__('Production mode', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate this to switch to production mode, the CSS and JS will be cached by the browser and the JS minified.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_performance_section',\n\t\t\t'condition' => '',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_redirect',\n\t\t\t'label' => esc_html__('Activate page redirect', 'uncode') ,\n\t\t\t'desc' => esc_html__('Activate to redirect all the website calls to a specific page. NB. This can only be visible when the user is not logged in.', 'uncode') ,\n\t\t\t'std' => 'off',\n\t\t\t'type' => 'on-off',\n\t\t\t'section' => 'uncode_redirect_section',\n\t\t) ,\n\t\tarray(\n\t\t\t'id' => '_uncode_redirect_page',\n\t\t\t'label' => esc_html__('Redirect page', 'uncode') ,\n\t\t\t'desc' => esc_html__('Specify the redirect page. NB. This page will be presented without menu and footer.', 'uncode') ,\n\t\t\t'type' => 'page_select',\n\t\t\t'section' => 'uncode_redirect_section',\n\t\t\t'post_type' => 'page',\n\t\t\t'condition' => '_uncode_redirect:is(on)',\n\t\t\t'operator' => 'and'\n\t\t) ,\n\t);\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_three );\n\n\tif ( ! defined('ENVATO_HOSTED_SITE') )\n\t\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_four );\n\n\t$custom_settings_one = array_merge( $custom_settings_one, $custom_settings_five );\n\n\t$custom_settings = array(\n\t\t'sections' => $custom_settings_section_one,\n\t\t'settings' => $custom_settings_one,\n\t);\n\n\tif (class_exists('WooCommerce'))\n\t{\n\n\t\t$woo_section = array(\n\t\t\t// array(\n\t\t\t// \t'id' => 'uncode_woocommerce_section',\n\t\t\t// \t'title' => '<i class=\"fa fa-shopping-cart\"></i> ' . esc_html__('WooCommerce', 'uncode')\n\t\t\t// ),\n\t\t\tarray(\n\t\t\t\t'id' => 'uncode_product_section',\n\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-paper\"></i> ' . esc_html__('Product', 'uncode') . '</span>',\n\t\t\t\t'group' => esc_html__('Single', 'uncode'),\n\t\t\t) ,\n\t\t\tarray(\n\t\t\t\t'id' => 'uncode_product_index_section',\n\t\t\t\t'title' => '<span class=\"smaller\"><i class=\"fa fa-archive2\"></i> ' . esc_html__('Products', 'uncode') . '</span>',\n\t\t\t\t'group' => esc_html__('Archives', 'uncode'),\n\t\t\t) ,\n\t\t);\n\n\t\t$menus_array[] = array(\n\t\t\t'value' => '',\n\t\t\t'label' => esc_html__('Select…', 'uncode')\n\t\t);\n\t\t$menu_array = array();\n\t\t$nav_menus = get_registered_nav_menus();\n\n\t\tforeach ($nav_menus as $location => $description)\n\t\t{\n\n\t\t\t$menu_array['value'] = $location;\n\t\t\t$menu_array['label'] = $description;\n\t\t\t$menus_array[] = $menu_array;\n\t\t}\n\n\t\t$menus_array[] = array(\n\t\t\t'value' => 'social',\n\t\t\t'label' => esc_html__('Social Menu', 'uncode')\n\t\t);\n\n\t\t$woocommerce_post = array(\n\t\t\t/////////////////////////\n\t\t\t// Product Single\t\t///\n\t\t\t/////////////////////////\n\t\t\tstr_replace('%section%', 'product', $menu_section_title),\n\t\t\tstr_replace('%section%', 'product', $menu),\n\t\t\tstr_replace('%section%', 'product', $menu_width),\n\t\t\tstr_replace('%section%', 'product', $menu_opaque),\n\t\t\tstr_replace('%section%', 'product', $header_section_title),\n\t\t\tstr_replace('%section%', 'product', $header_type),\n\t\t\tstr_replace('%section%', 'product', $header_uncode_block),\n\t\t\tstr_replace('%section%', 'product', $header_revslider),\n\t\t\tstr_replace('%section%', 'product', $header_layerslider),\n\n\t\t\tstr_replace('%section%', 'product', $header_width),\n\t\t\tstr_replace('%section%', 'product', $header_height),\n\t\t\tstr_replace('%section%', 'product', $header_min_height),\n\t\t\tstr_replace('%section%', 'product', $header_title),\n\t\t\tstr_replace('%section%', 'product', $header_style),\n\t\t\tstr_replace('%section%', 'product', $header_content_width),\n\t\t\tstr_replace('%section%', 'product', $header_custom_width),\n\t\t\tstr_replace('%section%', 'product', $header_align),\n\t\t\tstr_replace('%section%', 'product', $header_position),\n\t\t\tstr_replace('%section%', 'product', $header_title_font),\n\t\t\tstr_replace('%section%', 'product', $header_title_size),\n\t\t\tstr_replace('%section%', 'product', $header_title_height),\n\t\t\tstr_replace('%section%', 'product', $header_title_spacing),\n\t\t\tstr_replace('%section%', 'product', $header_title_weight),\n\t\t\tstr_replace('%section%', 'product', $header_title_transform),\n\t\t\tstr_replace('%section%', 'product', $header_title_italic),\n\t\t\tstr_replace('%section%', 'product', $header_text_animation),\n\t\t\tstr_replace('%section%', 'product', $header_animation_speed),\n\t\t\tstr_replace('%section%', 'product', $header_animation_delay),\n\t\t\tstr_replace('%section%', 'product', $header_featured),\n\t\t\tstr_replace('%section%', 'product', $header_background),\n\t\t\tstr_replace('%section%', 'product', $header_parallax),\n\t\t\tstr_replace('%section%', 'product', $header_kburns),\n\t\t\tstr_replace('%section%', 'product', $header_overlay_color),\n\t\t\tstr_replace('%section%', 'product', $header_overlay_color_alpha),\n\t\t\tstr_replace('%section%', 'product', $header_scroll_opacity),\n\t\t\tstr_replace('%section%', 'product', $header_scrolldown),\n\n\t\t\tstr_replace('%section%', 'product', $body_section_title),\n\t\t\tstr_replace('%section%', 'product', $body_layout_width),\n\t\t\tstr_replace('%section%', 'product', $body_layout_width_custom),\n\t\t\tstr_replace('%section%', 'product', $show_breadcrumb),\n\t\t\tstr_replace('%section%', 'product', $breadcrumb_align),\n\t\t\tstr_replace('%section%', 'product', $show_title),\n\t\t\tstr_replace('%section%', 'product', $show_share),\n\t\t\tstr_replace('%section%', 'product', $image_layout),\n\t\t\tstr_replace('%section%', 'product', $media_size),\n\t\t\tstr_replace('%section%', 'product', $enable_sticky_desc),\n\t\t\tstr_replace('%section%', 'product', $enable_woo_zoom),\n\t\t\tstr_replace('%section%', 'product', $thumb_cols),\n\t\t\tstr_replace('%section%', 'product', $enable_woo_slider),\n\t\t\tstr_replace('%section%', 'product', $body_uncode_block_after),\n\t\t\tstr_replace('%section%', 'product', $navigation_section_title),\n\t\t\tstr_replace('%section%', 'product', $navigation_activate),\n\t\t\tstr_replace('%section%', 'product', $navigation_page_index),\n\t\t\tstr_replace('%section%', 'product', $navigation_index_label),\n\t\t\tstr_replace('%section%', 'product', $navigation_nextprev_title),\n\t\t\tstr_replace('%section%', 'product', $footer_section_title),\n\t\t\tstr_replace('%section%', 'product', $footer_uncode_block),\n\t\t\tstr_replace('%section%', 'product', $footer_width),\n\t\t\tstr_replace('%section%', 'product', $custom_fields_section_title),\n\t\t\tstr_replace('%section%', 'product', $custom_fields_list),\n\t\t\t/////////////////////////\n\t\t\t// Products Index\t\t///\n\t\t\t/////////////////////////\n\t\t\tstr_replace('%section%', 'product_index', $menu_section_title),\n\t\t\tstr_replace('%section%', 'product_index', $menu),\n\t\t\tstr_replace('%section%', 'product_index', $menu_width),\n\t\t\tstr_replace('%section%', 'product_index', $menu_opaque),\n\t\t\tstr_replace('%section%', 'product_index', $header_section_title),\n\t\t\tstr_replace('%section%', 'product_index', run_array_to($header_type, 'std', 'header_basic')),\n\t\t\tstr_replace('%section%', 'product_index', $header_uncode_block),\n\t\t\tstr_replace('%section%', 'product_index', $header_revslider),\n\t\t\tstr_replace('%section%', 'product_index', $header_layerslider),\n\n\t\t\tstr_replace('%section%', 'product_index', $header_width),\n\t\t\tstr_replace('%section%', 'product_index', $header_height),\n\t\t\tstr_replace('%section%', 'product_index', $header_min_height),\n\t\t\tstr_replace('%section%', 'product_index', $header_title),\n\t\t\tstr_replace('%section%', 'product_index', $header_style),\n\t\t\tstr_replace('%section%', 'product_index', $header_content_width),\n\t\t\tstr_replace('%section%', 'product_index', $header_custom_width),\n\t\t\tstr_replace('%section%', 'product_index', $header_align),\n\t\t\tstr_replace('%section%', 'product_index', $header_position),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_font),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_size),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_height),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_spacing),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_weight),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_transform),\n\t\t\tstr_replace('%section%', 'product_index', $header_title_italic),\n\t\t\tstr_replace('%section%', 'product_index', $header_text_animation),\n\t\t\tstr_replace('%section%', 'product_index', $header_animation_speed),\n\t\t\tstr_replace('%section%', 'product_index', $header_animation_delay),\n\t\t\tstr_replace('%section%', 'product_index', $header_featured),\n\t\t\tstr_replace('%section%', 'product_index', $header_background),\n\t\t\tstr_replace('%section%', 'product_index', $header_parallax),\n\t\t\tstr_replace('%section%', 'product_index', $header_kburns),\n\t\t\tstr_replace('%section%', 'product_index', $header_overlay_color),\n\t\t\tstr_replace('%section%', 'product_index', $header_overlay_color_alpha),\n\t\t\tstr_replace('%section%', 'product_index', $header_scroll_opacity),\n\t\t\tstr_replace('%section%', 'product_index', $header_scrolldown),\n\t\t\tstr_replace('%section%', 'product_index', $menu_no_padding),\n\t\t\tstr_replace('%section%', 'product_index', $menu_no_padding_mobile),\n\t\t\tstr_replace('%section%', 'product_index', $title_archive_custom_activate),\n\t\t\tstr_replace('%section%', 'product_index', $title_archive_custom_text),\n\t\t\tstr_replace('%section%', 'product_index', $subtitle_archive_custom_text),\n\n\t\t\tstr_replace('%section%', 'product_index', $body_section_title),\n\t\t\tstr_replace('%section%', 'product_index', $show_breadcrumb),\n\t\t\tstr_replace('%section%', 'product_index', $breadcrumb_align),\n\t\t\tstr_replace('%section%', 'product_index', $body_uncode_block),\n\t\t\tstr_replace('%section%', 'product_index', $body_layout_width),\n\t\t\tstr_replace('%section%', 'product_index', $body_single_post_width),\n\t\t\tstr_replace('%section%', 'product_index', $show_title),\n\t\t\tstr_replace('%section%', 'product_index', $remove_pagination),\n\t\t\tstr_replace('%section%', 'product_index', $products_per_page),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_section_title),\n\t\t\tstr_replace('%section%', 'product_index', run_array_to($sidebar_activate, 'std', 'on')),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_widget),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_position),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_size),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_sticky),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_style),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_bgcolor),\n\t\t\tstr_replace('%section%', 'product_index', $sidebar_fill),\n\t\t\tstr_replace('%section%', 'product_index', $footer_section_title),\n\t\t\tstr_replace('%section%', 'product_index', $footer_uncode_block),\n\t\t\tstr_replace('%section%', 'product_index', $footer_width),\n\t\t);\n\n\t\t$custom_settings['sections'] = array_merge( $custom_settings['sections'], $woo_section );\n\t\t// array_push($custom_settings['settings'], $woocommerce_cart_icon);\n\t\t// array_push($custom_settings['settings'], $woocommerce_hooks);\n\t\t$custom_settings['settings'] = array_merge( $custom_settings['settings'], $woocommerce_post );\n\n\t}\n\n\t$custom_settings['settings'] = array_filter( $custom_settings['settings'], 'uncode_is_not_null' );\n\n\t/* allow settings to be filtered before saving */\n\t$custom_settings = apply_filters(ot_settings_id() . '_args', $custom_settings);\n\n\t/* settings are not the same update the DB */\n\tif ($saved_settings !== $custom_settings)\n\t{\n\t\tupdate_option(ot_settings_id() , $custom_settings);\n\t}\n\n\t/**\n\t * Filter on layout images.\n\t */\n\tfunction filter_layout_radio_images($array, $layout)\n\t{\n\n\t\t/* only run the filter where the field ID is my_radio_images */\n\t\tif ($layout == '_uncode_headers')\n\t\t{\n\t\t\t$array = array(\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-right',\n\t\t\t\t\t'label' => esc_html__('Right', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-right.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-justify',\n\t\t\t\t\t'label' => esc_html__('Justify', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-justify.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-left',\n\t\t\t\t\t'label' => esc_html__('Left', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-left.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-center',\n\t\t\t\t\t'label' => esc_html__('Center', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-center.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-center-split',\n\t\t\t\t\t'label' => esc_html__('Center Split', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-splitted.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'hmenu-center-double',\n\t\t\t\t\t'label' => esc_html__('Center Double', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/hmenu-center-double.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'vmenu',\n\t\t\t\t\t'label' => esc_html__('Lateral', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/vmenu.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'vmenu-offcanvas',\n\t\t\t\t\t'label' => esc_html__('Offcanvas', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/offcanvas.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'menu-overlay',\n\t\t\t\t\t'label' => esc_html__('Overlay', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/overlay.jpg'\n\t\t\t\t) ,\n\t\t\t\tarray(\n\t\t\t\t\t'value' => 'menu-overlay-center',\n\t\t\t\t\t'label' => esc_html__('Overlay Center', 'uncode') ,\n\t\t\t\t\t'src' => get_template_directory_uri() . '/core/assets/images/layout/overlay-center.jpg'\n\t\t\t\t) ,\n\t\t\t);\n\t\t}\n\t\treturn $array;\n\t}\n\tadd_filter('ot_radio_images', 'filter_layout_radio_images', 10, 2);\n}", "function customizer_extension( $wp_customize ){\n\n\t$wp_customize->add_section( 'contato_networking', array(\n\t\t 'title' => __( 'Contato Menu', 'styled-store' ),\n\t\t 'priority' => 50,\n\t ) );\n\n\n\n\t// Setting for hiding the social bar\n\t$wp_customize->add_setting( 'show_contato', array(\n\t\t'sanitize_callback' => 'styledstore_sanitize_checkbox',\n\t));\n\n\n\t// Control for hiding the social bar\n\t$wp_customize->add_control( 'show_contato', array(\n\t\t'label' => __( 'Mostrar contato', 'styled-store' ),\n\t\t'type' => 'checkbox',\n\t\t'section' => 'contato_networking',\n\t\t'priority' => 1,\n\t) );\n\n\n\t\t// Setting group for Facebook\n\t\t$wp_customize->add_setting( 'sac_uid', array(\n\t\t\t'sanitize_callback' => 'esc_html',\n\t\t) );\n\n\t\t$wp_customize->add_control( 'sac_uid', array(\n\t\t\t'settings' => 'sac_uid',\n\t\t\t'label' => __( 'SAC', 'styled-store' ),\n\t\t\t'section' => 'contato_networking',\n\t\t\t'type' => 'text',\n\t\t\t'priority' => 1,\n\t\t) );\n\t//Setting group for e-mail\n\t$wp_customize->add_setting( 'email_uid', array(\n\t\t'sanitize_callback' => 'esc_html',\n\t) );\n\n\t$wp_customize->add_control( 'email_uid', array(\n\t\t'settings' => 'email_uid',\n\t\t'label' => __( 'Email de Contato', 'lojamissdaisy' ),\n\t\t'label' => esc_html__( 'Email de Contato', 'lojamissdaisy' ),\n\t\t'section' => 'contato_networking',\n\t\t'type' => 'text',\n\t\t'priority' => 1,\n\t) );\n}", "static function register_default_settings() {\n\t\tself::register_setting( 'builder_access', array(\n\t\t\t'default' => 'all',\n\t\t\t'group' => __( 'Frontend', 'fl-builder' ),\n\t\t\t'label' => __( 'Builder Access', 'fl-builder' ),\n\t\t\t'description' => __( 'The selected roles will have access to the builder for editing posts, pages, and CPTs.', 'fl-builder' ),\n\t\t\t'order' => '1',\n\t\t) );\n\n\t\tself::register_setting( 'unrestricted_editing', array(\n\t\t\t'default' => 'all',\n\t\t\t'group' => __( 'Frontend', 'fl-builder' ),\n\t\t\t'label' => __( 'Unrestricted Editing', 'fl-builder' ),\n\t\t\t'description' => __( 'The selected roles will have unrestricted access to all editing features within the builder.', 'fl-builder' ),\n\t\t\t'order' => '2',\n\t\t) );\n\t}", "function theme_notifications_content_type_settings(&$elements) {\n $output = '';\n $options = _notifications_content_type_options();\n $header = array_merge(array(''), array_values($options));\n $rows = array();\n foreach (element_children($elements) as $key) {\n $row = array($elements[$key]['#title']);\n unset($elements[$key]['#title']);\n foreach (array_keys($options) as $index) {\n unset($elements[$key][$index]['#title']);\n $row[] = drupal_render($elements[$key][$index]);\n }\n $rows[] = $row;\n }\n $output .= theme('table', array('header' => $header, 'rows' =>$rows));\n $output .= drupal_render($elements);\n return $output;\n}", "function dentario_clients_settings_theme_setup2() {\n\t\tdentario_add_theme_inheritance( array('clients' => array(\n\t\t\t'stream_template' => 'blog-clients',\n\t\t\t'single_template' => 'single-client',\n\t\t\t'taxonomy' => array('clients_group'),\n\t\t\t'taxonomy_tags' => array(),\n\t\t\t'post_type' => array('clients'),\n\t\t\t'override' => 'custom'\n\t\t\t) )\n\t\t);\n\t}", "function tb_settings_init() {\n if ( get_option( \"tb_theme_options\" ) == false ) {\n add_option( \"tb_theme_options\", apply_filters( \"tb_default_options\", tb_default_options() ) );\n }\n\n // Add a section to our submenu\n add_settings_section (\n \"tb_settings_section\",\n \"Tickets Broadway Theme Options\",\n \"tb_section_callback\",\n \"tb_theme_options\"\n );\n\n // Add option for banner image on homepage\n add_settings_field (\n \"Banner Image\",\n \"Homepage Banner Image\",\n \"banner_callback\",\n \"tb_theme_options\",\n \"tb_settings_section\"\n );\n\n // Add option for banner image link on homepage\n add_settings_field (\n \"Banner Image Link\",\n \"Homepage Banner Link\",\n \"banner_link_callback\",\n \"tb_theme_options\",\n \"tb_settings_section\"\n );\n\n // Add option for selecting a city (for spinning out microsites)\n add_settings_field (\n \"City Selection\",\n \"Microsite City\",\n \"microsite_city_callback\",\n \"tb_theme_options\",\n \"tb_settings_section\"\n );\n\n // Lastly, register them settings\n register_setting (\n \"tb_theme_options\",\n \"tb_theme_options\"\n );\n}", "public function initSettings() {\n $this->theme = wp_get_theme();\n\n // Set the default arguments\n $this->setArguments();\n\n // Set a few help tabs so you can see how it's done\n //$this->setHelpTabs();\n\n // Create the sections and fields\n $this->setSections();\n\n if ( ! isset( $this->args['opt_name'] ) ) { // No errors please\n return;\n }\n\n // If Redux is running as a plugin, this will remove the demo notice and links\n //add_action( 'redux/loaded', array( $this, 'remove_demo' ) );\n\n // Function to test the compiler hook and demo CSS output.\n // Above 10 is a priority, but 2 in necessary to include the dynamically generated CSS to be sent to the function.\n //add_filter('redux/options/'.$this->args['opt_name'].'/compiler', array( $this, 'compiler_action' ), 10, 3);\n\n // Change the arguments after they've been declared, but before the panel is created\n //add_filter('redux/options/'.$this->args['opt_name'].'/args', array( $this, 'change_arguments' ) );\n\n // Change the default value of a field after it's been set, but before it's been useds\n //add_filter('redux/options/'.$this->args['opt_name'].'/defaults', array( $this,'change_defaults' ) );\n\n // Dynamically add a section. Can be also used to modify sections/fields\n //add_filter('redux/options/' . $this->args['opt_name'] . '/sections', array($this, 'dynamic_section'));\n\n $this->ReduxFramework = new ReduxFramework( $this->sections, $this->args );\n }", "function TS_VCSC_Set_Plugin_Options() {\r\n\t\t// Redirect Option\r\n\t\tadd_option('ts_vcsc_extend_settings_redirect', \t\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_activation', \t\t\t\t\t\t0);\r\n\t\t// Options for Theme Authors\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypes', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeWidget',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeTeam',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeTestimonial',\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeLogo', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeSkillset',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_additions', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_codeeditors', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_fontimport', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_iconicum', \t\t\t\t \t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_dashboard', \t\t\t\t\t\t1);\r\n\t\t// Options for Custom CSS/JS Editor\r\n\t\tadd_option('ts_vcsc_extend_settings_customCSS',\t\t\t\t\t\t\t'/* Welcome to the Custom CSS Editor! Please add all your Custom CSS here. */');\r\n\t\tadd_option('ts_vcsc_extend_settings_customJS', \t\t\t\t '/* Welcome to the Custom JS Editor! Please add all your Custom JS here. */');\r\n\t\t// Other Options\r\n\t\tadd_option('ts_vcsc_extend_settings_frontendEditor', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_buffering', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_mainmenu', \t\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsDomain', \t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_previewImages',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_visualSelector',\t\t\t\t\t1);\r\n add_option('ts_vcsc_extend_settings_nativeSelector',\t\t\t\t\t1);\r\n add_option('ts_vcsc_extend_settings_nativePaginator',\t\t\t\t\t'200');\r\n\t\tadd_option('ts_vcsc_extend_settings_backendPreview',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_extended', \t\t\t\t 0);\r\n\t\tadd_option('ts_vcsc_extend_settings_systemInfo',\t\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_socialDefaults', \t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_builtinLightbox', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_lightboxIntegration', \t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowAutoUpdate', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowNotification', \t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowDeprecated', \t\t\t\t\t0);\r\n\t\t// Font Active / Inactive\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceMedia',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceIcon',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceAwesome',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceBrankic',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCountricons',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCurrencies',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceElegant',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceEntypo',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceFoundation',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceGenericons',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceIcoMoon',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceMonuments',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceSocialMedia',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceTypicons',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceFontsAll',\t\t\t\t\t0);\t\t\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Awesome',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Entypo',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Linecons',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_OpenIconic',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Typicons',\t\t\t\t0);\t\t\r\n\t\t// Custom Font Data\r\n\t\tadd_option('ts_vcsc_extend_settings_IconFontSettings',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustom',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomArray',\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomJSON',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomPath',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomPHP', \t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomName',\t\t\t\t\t'Custom User Font');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomAuthor',\t\t\t\t'Custom User');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomCount',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomDate',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomDirectory',\t\t\t'');\r\n\t\t// Row + Column Extensions\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsRows',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsColumns',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsRowEffectsBreak',\t\t\t'600');\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsSmoothScroll',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsSmoothSpeed',\t\t\t\t'30');\r\n\t\t// Custom Post Types\r\n\t\tadd_option('ts_vcsc_extend_settings_customWidgets',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_customTeam',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_customTestimonial',\t\t\t\t\t0);\t\t\r\n\t\tadd_option('ts_vcsc_extend_settings_customSkillset',\t\t\t\t\t0);\t\t\r\n\t\tadd_option('ts_vcsc_extend_settings_customTimelines', \t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_customLogo', \t\t\t\t\t\t0);\r\n\t\t// tinyMCE Icon Shortcode Generator\r\n\t\tadd_option('ts_vcsc_extend_settings_useIconGenerator',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_useTinyMCEMedia', \t\t\t\t\t1);\r\n\t\t// Standard Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_StandardElements',\t\t\t\t\t'');\r\n\t\t// Demo Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_DemoElements', \t\t\t\t\t\t'');\r\n\t\t// WooCommerce Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_WooCommerceUse',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_WooCommerceElements',\t\t\t\t'');\r\n\t\t// bbPress Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_bbPressUse',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_bbPressElements',\t\t\t\t\t'');\r\n\t\t// Options for External Files\r\n\t\tadd_option('ts_vcsc_extend_settings_loadForcable',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadLightbox', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadTooltip', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadFonts', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadEnqueue',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadHeader',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadjQuery', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadModernizr',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadWaypoints', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadCountTo', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadMooTools', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadDetector', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadHammerNew', \t\t\t\t\t1);\r\n\t\t// Google Font Manager Settings\r\n\t\tadd_option('ts_vcsc_extend_settings_allowGoogleManager', \t\t\t\t1);\r\n\t\t// Single Page Navigator\r\n\t\tadd_option('ts_vcsc_extend_settings_allowPageNavigator', \t\t\t\t0);\r\n\t\t// EnlighterJS - Syntax Highlighter\r\n\t\tadd_option('ts_vcsc_extend_settings_allowEnlighterJS',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowThemeBuilder',\t\t\t\t\t0);\r\n\t\t// Post Type Menu Positions\r\n\t\t$TS_VCSC_Menu_Positions_Defaults_Init = array(\r\n\t\t\t'ts_widgets'\t\t\t\t\t=> 50,\r\n\t\t\t'ts_timeline'\t\t\t\t\t=> 51,\r\n\t\t\t'ts_team'\t\t\t\t\t\t=> 52,\r\n\t\t\t'ts_testimonials'\t\t\t\t=> 53,\r\n\t\t\t'ts_skillsets'\t\t\t\t\t=> 54,\r\n\t\t\t'ts_logos'\t\t\t\t\t\t=> 55,\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_menuPositions',\t\t\t\t\t\t$TS_VCSC_Menu_Positions_Defaults_Init);\r\n\t\t// Row Toggle Settings\r\n\t\t$TS_VCSC_Row_Toggle_Defaults_Init = array(\r\n\t\t\t'Large Devices' => 1200,\r\n\t\t\t'Medium Devices' => 992,\r\n\t\t\t'Small Devices' => 768,\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_rowVisibilityLimits', \t\t\t\t$TS_VCSC_Row_Toggle_Defaults_Init);\r\n\t\t// Language Settings: Countdown\r\n\t\t$TS_VCSC_Countdown_Language_Defaults_Init = array(\r\n\t\t\t'DayPlural' => 'Days',\r\n\t\t\t'DaySingular' => 'Day',\r\n\t\t\t'HourPlural' => 'Hours',\r\n\t\t\t'HourSingular' => 'Hour',\r\n\t\t\t'MinutePlural' => 'Minutes',\r\n\t\t\t'MinuteSingular' => 'Minute',\r\n\t\t\t'SecondPlural' => 'Seconds',\r\n\t\t\t'SecondSingular' => 'Second',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsCountdown', \t\t\t$TS_VCSC_Countdown_Language_Defaults_Init);\r\n\t\t// Language Settings: Google Maps PLUS\r\n\t\t$TS_VCSC_Google_MapPLUS_Language_Defaults_Init = array(\r\n\t\t\t'ListenersStart' => 'Start Listeners',\r\n\t\t\t'ListenersStop' => 'Stop Listeners',\r\n\t\t\t'MobileShow' => 'Show Google Map',\r\n\t\t\t'MobileHide' => 'Hide Google Map',\r\n\t\t\t'StyleDefault' => 'Google Standard',\r\n\t\t\t'StyleLabel' => 'Change Map Style',\r\n\t\t\t'FilterAll' => 'All Groups',\r\n\t\t\t'FilterLabel' => 'Filter by Groups',\r\n\t\t\t'SelectLabel' => 'Zoom to Location',\r\n\t\t\t'ControlsOSM' => 'Open Street',\r\n\t\t\t'ControlsHome' => 'Home',\r\n\t\t\t'ControlsBounds' => 'Fit All',\r\n\t\t\t'ControlsBike' => 'Bicycle Trails',\r\n\t\t\t'ControlsTraffic' => 'Traffic',\r\n\t\t\t'ControlsTransit' => 'Transit',\r\n\t\t\t'TrafficMiles' => 'Miles per Hour',\r\n\t\t\t'TrafficKilometer' => 'Kilometers per Hour',\r\n\t\t\t'TrafficNone' => 'No Data Available',\r\n\t\t\t'SearchButton' => 'Search Location',\r\n\t\t\t'SearchHolder' => 'Enter address to search for ...',\r\n\t\t\t'SearchGoogle' => 'View on Google Maps',\r\n\t\t\t'SearchDirections' => 'Get Directions',\r\n\t\t\t'OtherLink' => 'Learn More!',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsGoogleMapPLUS', \t\t$TS_VCSC_Google_MapPLUS_Language_Defaults_Init);\r\n\t\t// Language Settings: Google Maps (Deprecated)\r\n\t\t$TS_VCSC_Google_Map_Language_Defaults_Init = array(\r\n\t\t\t'TextCalcShow' => 'Show Address Input',\r\n\t\t\t'TextCalcHide' => 'Hide Address Input',\r\n\t\t\t'TextDirectionShow' => 'Show Directions',\r\n\t\t\t'TextDirectionHide' => 'Hide Directions',\r\n\t\t\t'TextResetMap' => 'Reset Map',\r\n\t\t\t'PrintRouteText' \t\t\t => 'Print Route',\r\n\t\t\t'TextViewOnGoogle' => 'View on Google',\r\n\t\t\t'TextButtonCalc' => 'Show Route',\r\n\t\t\t'TextSetTarget' => 'Please enter your Start Address:',\r\n\t\t\t'TextGeoLocation' => 'Get My Location',\r\n\t\t\t'TextTravelMode' => 'Travel Mode',\r\n\t\t\t'TextDriving' => 'Driving',\r\n\t\t\t'TextWalking' => 'Walking',\r\n\t\t\t'TextBicy' => 'Bicycling',\r\n\t\t\t'TextWP' => 'Optimize Waypoints',\r\n\t\t\t'TextButtonAdd' => 'Add Stop on the Way',\r\n\t\t\t'TextDistance' => 'Total Distance:',\r\n\t\t\t'TextMapHome' => 'Home',\r\n\t\t\t'TextMapBikes' => 'Bicycle Trails',\r\n\t\t\t'TextMapTraffic' => 'Traffic',\r\n\t\t\t'TextMapSpeedMiles' => 'Miles Per Hour',\r\n\t\t\t'TextMapSpeedKM' => 'Kilometers Per Hour',\r\n\t\t\t'TextMapNoData' => 'No Data Available!',\r\n\t\t\t'TextMapMiles' => 'Miles',\r\n\t\t\t'TextMapKilometes' => 'Kilometers',\r\n\t\t\t'TextMapActivate' => 'Show Google Map',\r\n\t\t\t'TextMapDeactivate' => 'Hide Google Map',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsGoogleMap', \t\t\t$TS_VCSC_Google_Map_Language_Defaults_Init);\r\n\t\t// Language Settings: Isotope Posts\r\n\t\t$TS_VCSC_Isotope_Posts_Language_Defaults_Init = array(\r\n\t\t\t'ButtonFilter'\t\t => 'Filter Posts', \r\n\t\t\t'ButtonLayout'\t\t => 'Change Layout',\r\n\t\t\t'ButtonSort'\t\t => 'Sort Criteria',\r\n\t\t\t// Standard Post Strings\r\n\t\t\t'Date' \t\t\t\t => 'Post Date', \r\n\t\t\t'Modified' \t\t\t => 'Post Modified', \r\n\t\t\t'Title' \t\t\t => 'Post Title', \r\n\t\t\t'Author' \t\t\t => 'Post Author', \r\n\t\t\t'PostID' \t\t\t => 'Post ID', \r\n\t\t\t'Comments' \t\t\t => 'Number of Comments',\r\n\t\t\t// Layout Strings\r\n\t\t\t'SeeAll'\t\t\t => 'See All',\r\n\t\t\t'Timeline' \t\t\t => 'Timeline',\r\n\t\t\t'Masonry' \t\t\t => 'Centered Masonry',\r\n\t\t\t'FitRows'\t\t\t => 'Fit Rows',\r\n\t\t\t'StraightDown' \t\t => 'Straigt Down',\r\n\t\t\t// WooCommerce Strings\r\n\t\t\t'WooFilterProducts' => 'Filter Products',\r\n\t\t\t'WooTitle' => 'Product Title',\r\n\t\t\t'WooPrice' => 'Product Price',\r\n\t\t\t'WooRating' => 'Product Rating',\r\n\t\t\t'WooDate' => 'Product Date',\r\n\t\t\t'WooModified' => 'Product Modified',\r\n\t\t\t// General Strings\r\n\t\t\t'Categories' => 'Categories',\r\n\t\t\t'Tags' => 'Tags',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsIsotopePosts', \t\t\t$TS_VCSC_Isotope_Posts_Language_Defaults_Init);\r\n\t\t// Options for Lightbox Settings\r\n\t\t$TS_VCSC_Lightbox_Setting_Defaults_Init = array(\r\n\t\t\t'thumbs' => 'bottom',\r\n\t\t\t'thumbsize' => 50,\r\n\t\t\t'animation' => 'random',\r\n\t\t\t'captions' => 'data-title',\r\n\t\t\t'closer' => 1, // true/false\r\n\t\t\t'duration' => 5000,\r\n\t\t\t'share' => 0, // true/false\r\n\t\t\t'social' \t => 'fb,tw,gp,pin',\r\n\t\t\t'notouch' => 1, // true/false\r\n\t\t\t'bgclose'\t\t\t => 1, // true/false\r\n\t\t\t'nohashes'\t\t\t => 1, // true/false\r\n\t\t\t'keyboard'\t\t\t => 1, // 0/1\r\n\t\t\t'fullscreen'\t\t => 1, // 0/1\r\n\t\t\t'zoom'\t\t\t\t => 1, // 0/1\r\n\t\t\t'fxspeed'\t\t\t => 300,\r\n\t\t\t'scheme'\t\t\t => 'dark',\r\n\t\t\t'removelight' => 0,\r\n\t\t\t'customlight' => 0,\r\n\t\t\t'customcolor'\t\t => '#ffffff',\r\n\t\t\t'backlight' \t\t => '#ffffff',\r\n\t\t\t'usecolor' \t\t => 0, // true/false\r\n\t\t\t'background' => '',\r\n\t\t\t'repeat' => 'no-repeat',\r\n\t\t\t'overlay' => '#000000',\r\n\t\t\t'noise' => '',\r\n\t\t\t'cors' => 0, // true/false\r\n\t\t\t'scrollblock' => 'css',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_defaultLightboxSettings',\t\t\t$TS_VCSC_Lightbox_Setting_Defaults_Init);\r\n\t\tadd_option('ts_vcsc_extend_settings_defaultLightboxAnimation', \t\t\t'random');\r\n\t\t// Options for Envato Sales Data\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoData', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoInfo', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoLink', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoPrice', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoRating', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoSales', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoCheck', \t\t\t\t\t 0);\r\n\t\t$roles \t\t\t\t\t\t\t\t= get_editable_roles();\r\n\t\tforeach ($GLOBALS['wp_roles']->role_objects as $key => $role) {\r\n\t\t\tif (isset($roles[$key]) && $role->has_cap('edit_pages') && !$role->has_cap('ts_vcsc_extend')) {\r\n\t\t\t\t$role->add_cap('ts_vcsc_extend');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function default_options() {\r\n\t\t$this->version = BF_VERSION;\r\n\t\t\r\n\t\t$this->footer_message = sprintf( __('<strong>&copy; %s</strong>. All Rights Reserved.'), get_bloginfo('name') );\r\n\t\t\r\n\t\t$this->home_link = __('Home', 'buffet');\r\n\t\t$this->blog_link = __('Blog', 'buffet');\r\n\t\t$this->topnav_linkcat = 0;\r\n\t\t\r\n\t\t$this->index_news_thumbs = true;\r\n\t\t\r\n\t\t$this->archive_news_thumbs = true;\r\n\r\n\t\t$this->hooks = array();\r\n\t}", "function eggnews_additional_settings_register( $wp_customize ) {\n $wp_customize->add_panel(\n 'eggnews_additional_settings_panel',\n array(\n 'priority' => 7,\n 'capability' => 'edit_theme_options',\n 'theme_supports' => '',\n 'title' => esc_html__( 'Additional Settings', 'eggnews' ),\n )\n );\n/*--------------------------------------------------------------------------------------------*/\n\t// Category Color Section\n $wp_customize->add_section(\n 'eggnews_categories_color_section',\n array(\n 'title' => esc_html__( 'Categories Color', 'eggnews' ),\n 'priority' => 5,\n 'panel' => 'eggnews_additional_settings_panel',\n )\n );\n\n\t$priority = 3;\n\t$categories = get_terms( 'category' ); // Get all Categories\n\t$wp_category_list = array();\n\n\tforeach ( $categories as $category_list ) {\n\n\t\t$wp_customize->add_setting(\n\t\t\t'eggnews_category_color_'.esc_html( strtolower( $category_list->name ) ),\n\t\t\tarray(\n\t\t\t\t'default' => '#408c40',\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'sanitize_callback' => 'sanitize_hex_color'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t$wp_customize,\n\t\t\t\t'eggnews_category_color_'.esc_html( strtolower($category_list->name) ),\n\t\t\t\tarray(\n\t\t\t\t\t/* translators: %s: category namet */\n\t\t\t\t\t'label' => sprintf( esc_html__( ' %s', 'eggnews' ), esc_html( $category_list->name ) ),\n\t\t\t\t\t'section' => 'eggnews_categories_color_section',\n\t\t\t\t\t'priority' => absint($priority)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$priority++;\n\t}\n/*--------------------------------------------------------------------------------------------*/\n\t//Social icons\n\t$wp_customize->add_section(\n 'eggnews_social_media_section',\n array(\n 'title' => esc_html__( 'Social Media', 'eggnews' ),\n 'priority' => 10,\n 'panel' => 'eggnews_additional_settings_panel',\n )\n );\n\n\t//Add Facebook Link\n $wp_customize->add_setting(\n 'social_fb_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_fb_link',\n array(\n 'type' => 'text',\n 'priority' => 5,\n 'label' => esc_html__( 'Facebook', 'eggnews' ),\n 'description' => esc_html__( 'Your Facebook Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n //Add twitter Link\n $wp_customize->add_setting(\n 'social_tw_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_tw_link',\n array(\n 'type' => 'text',\n 'priority' => 6,\n 'label' => esc_html__( 'Twitter', 'eggnews' ),\n 'description' => esc_html__( 'Your Twitter Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n //Add Google plus Link\n $wp_customize->add_setting(\n 'social_gp_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_gp_link',\n array(\n 'type' => 'text',\n 'priority' => 7,\n 'label' => esc_html__( 'Google Plus', 'eggnews' ),\n 'description' => esc_html__( 'Your Google Plus Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n //Add LinkedIn Link\n $wp_customize->add_setting(\n 'social_lnk_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_lnk_link',\n array(\n 'type' => 'text',\n 'priority' => 8,\n 'label' => esc_html__( 'LinkedIn', 'eggnews' ),\n 'description' => esc_html__( 'Your LinkedIn Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n //Add youtube Link\n $wp_customize->add_setting(\n 'social_yt_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_yt_link',\n array(\n 'type' => 'text',\n 'priority' => 9,\n 'label' => esc_html__( 'YouTube', 'eggnews' ),\n 'description' => esc_html__( 'Your YouTube Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n //Add vimeo Link\n $wp_customize->add_setting(\n 'social_vm_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_vm_link',\n array(\n 'type' => 'text',\n 'priority' => 10,\n 'label' => esc_html__( 'Vimeo', 'eggnews' ),\n 'description' => esc_html__( 'Your Vimeo Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n //Add Pinterest link\n $wp_customize->add_setting(\n 'social_pin_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_pin_link',\n array(\n 'type' => 'text',\n 'priority' => 11,\n 'label' => esc_html__( 'Pinterest', 'eggnews' ),\n 'description' => esc_html__( 'Your Pinterest Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n //Add Instagram link\n $wp_customize->add_setting(\n 'social_insta_link',\n array(\n 'default' => '',\n 'capability' => 'edit_theme_options',\n 'transport'=> 'postMessage',\n 'sanitize_callback' => 'esc_url_raw'\n )\n );\n $wp_customize->add_control(\n 'social_insta_link',\n array(\n 'type' => 'text',\n 'priority' => 12,\n 'label' => esc_html__( 'Instagram', 'eggnews' ),\n 'description' => esc_html__( 'Your Instagram Account URL', 'eggnews' ),\n 'section' => 'eggnews_social_media_section'\n )\n );\n\n}", "function messenger_config_form($form, &$form_state)\n{\n\n $form[MESSENGER_URL] = array(\n '#type' => 'textfield',\n '#title' => t('API url'),\n '#default_value' => variable_get(MESSENGER_URL, ''),\n '#description' => t('The api url. eg: http://api.domain.com'),\n '#required' => TRUE,\n );\n\n $form[MESSENGER_SECRET] = array(\n '#type' => 'textfield',\n '#title' => t('Secret'),\n '#default_value' => variable_get(MESSENGER_SECRET, ''),\n '#description' => t('API secret.'),\n '#required' => TRUE,\n );\n\n $form[GIPHY_API] = array(\n '#type' => 'textfield',\n '#title' => t('Giphy api key'),\n '#default_value' => variable_get(GIPHY_API, DEFAULT_GIPHY_API),\n '#description' => t('Enter Giphy api.'),\n '#required' => TRUE,\n );\n\n $form[GIPHY_EXCLUDE_KEYWORD] = array(\n '#type' => 'textarea',\n '#title' => t('Giphy exclude keywords'),\n '#default_value' => variable_get(GIPHY_EXCLUDE_KEYWORD, ''),\n '#description' => t('Enter a word per line'),\n '#required' => FALSE,\n );\n\n //MESSENGER_OFFSET\n $form[MESSENGER_OFFSET] = array(\n '#type' => 'textfield',\n '#title' => t('Inbox Offset Height'),\n '#default_value' => variable_get(MESSENGER_OFFSET, 300),\n '#description' => t('Use offset to calculate height of inbox'),\n '#required' => FALSE,\n );\n\n return system_settings_form($form);\n\n\n}", "public function setupConfig() {\n\t\t// By default we will not show the new featured image metabox for any post type.\n\t\t// It is up to other components (like the portfolio component) or the theme to \"declare\" (via the filters bellow)\n\t\t// what post types should use it.\n\t\t$this->config = array(\n\t\t\t// 'post_types' => array( 'post', 'jetpack-portfolio', ),\n\t\t);\n\n\t\t// Allow others to make changes to the config\n\t\t// Make the hooks dynamic and standard\n\t\t$hook_slug = self::prepareStringForHooks( self::COMPONENT_SLUG );\n\t\t$modified_config = apply_filters( \"pixelgrade_{$hook_slug}_initial_config\", $this->config, self::COMPONENT_SLUG );\n\n\t\t// Check/validate the modified config\n\t\tif ( method_exists( $this, 'validate_config' ) && ! $this->validate_config( $modified_config ) ) {\n\t\t\t/* translators: 1: the component slug */\n\t\t\t_doing_it_wrong( __METHOD__, sprintf( 'The component config modified through the \"pixelgrade_%1$s_initial_config\" dynamic filter is invalid! Please check the modifications you are trying to do!', esc_html( $hook_slug ) ), null );\n\t\t\treturn;\n\t\t}\n\n\t\t// Change the component's config with the modified one\n\t\t$this->config = $modified_config;\n\n\t\t// Filter only the post types for legacy reasons\n\t\t// @todo Evaluate if these legacy reasons still stand\n\t\tif ( isset( $this->config['post_types'] ) ) {\n\t\t\t$this->config['post_types'] = apply_filters( \"pixelgrade_{$hook_slug}_post_types\", $this->config['post_types'] );\n\t\t}\n\t}", "function dynamik_theme_settings_defaults( $defaults = true, $import = false )\r\n{\t\r\n\t$defaults = array(\r\n\t\t'remove_all_page_titles' => ( !$defaults && !empty( $import['remove_all_page_titles'] ) ) ? 1 : 0,\r\n\t\t'remove_page_titles_ids' => '',\r\n\t\t'include_inpost_cpt_all' => ( !$defaults && !empty( $import['include_inpost_cpt_all'] ) ) ? 1 : 0,\r\n\t\t'include_inpost_cpt_names' => '',\r\n\t\t'post_formats_active' => ( !$defaults && !empty( $import['post_formats_active'] ) ) ? 1 : 0,\r\n\t\t'protected_folders' => '',\r\n\t\t'responsive_enabled' => ( $defaults || !empty( $import['responsive_enabled'] ) ) ? 1 : 0,\r\n\t\t'protocol_relative_urls' => ( !$defaults && !empty( $import['protocol_relative_urls'] ) ) ? 1 : 0,\r\n\t\t'enable_ace_editor_syntax_validation' => ( $defaults || !empty( $import['enable_ace_editor_syntax_validation'] ) ) ? 1 : 0,\r\n\t\t'design_options_control' => 'kitchen_sink',\r\n\t\t'custom_image_size_one_mode' => '',\r\n\t\t'custom_image_size_one_width' => '0',\r\n\t\t'custom_image_size_one_height' => '0',\r\n\t\t'custom_image_size_two_mode' => '',\r\n\t\t'custom_image_size_two_width' => '0',\r\n\t\t'custom_image_size_two_height' => '0',\r\n\t\t'custom_image_size_three_mode' => '',\r\n\t\t'custom_image_size_three_width' => '0',\r\n\t\t'custom_image_size_three_height' => '0',\r\n\t\t'custom_image_size_four_mode' => '',\r\n\t\t'custom_image_size_four_width' => '0',\r\n\t\t'custom_image_size_four_height' => '0',\r\n\t\t'custom_image_size_five_mode' => '',\r\n\t\t'custom_image_size_five_width' => '0',\r\n\t\t'custom_image_size_five_height' => '0',\r\n\t\t'bootstrap_column_classes_active' => ( $defaults || !empty( $import['bootstrap_column_classes_active'] ) ) ? 1 : 0,\r\n\t\t'html_five_active' => ( $defaults || !empty( $import['html_five_active'] ) ) ? 1 : 0,\r\n\t\t'accessibility_active' => ( $defaults || !empty( $import['accessibility_active'] ) ) ? 1 : 0,\r\n\t\t'fancy_dropdowns_active' => ( $defaults || !empty( $import['fancy_dropdowns_active'] ) ) ? 1 : 0,\r\n\t\t'affiliate_link' => ''\r\n\t);\r\n\t\r\n\treturn apply_filters( 'dynamik_theme_settings_defaults', $defaults );\r\n}", "function wpbasic_customizer( $wp_customize ) {\n\n // Social Account - Section\n // Please note: You will not be able to see the settings section until it contains at least one setting\n $wp_customize->add_section(\n 'wpbasic_social_accounts',\n array(\n 'title' => 'Social Account',\n 'priority' => 10\n )\n );\n \n // Twitter Setting and Control (these go hand in hand like two peas in a pod)\n // Please note: You will not be able to see this new setting until it has it’s own control\n $wp_customize->add_setting(\n 'wpbasic_social_accounts', // The unique ID of this setting\n array(\n //default option that is registerd under choices\n 'default' => '@Facebook',\n 'type' => 'theme_mod',\n )\n );\n \n \n // Controls are simply the interface used to change a setting\n $wp_customize->add_control(\n 'wpbasic_social_accounts',\n array(\n \n 'type' => 'select',\n \n 'label' => 'Social Accounts:',\n 'section' => 'wpbasic_social_accounts',\n \n 'choices' => array(\n '@Twitter' => '@Twitter',\n '@Facebook' => '@Facebook',\n '@Instagram' => '@Instagram',\n ),\n )\n );\n \n // Email Setting and Control\n $wp_customize->add_setting(\n \"wpbasic_social_accounts_email\", // The unique ID of this setting\n array(\n 'default' => '[email protected]',\n )\n );\n\t\n\t$wp_customize->add_control(\n\t\t\"wpbasic_social_accounts_email\",\n\t\tarray(\n\t\t\t\"label\" => \"Email\",\n\t\t\t\"section\" => \"wpbasic_social_accounts\",\n\t\t\t\"type\" => \"email\",\n\t\t)\n\t);\n\t\n}", "function techfak_get_default_theme_options() {\n\t$default_theme_options = array(\n\t\t'color_scheme' => 'blau',\n\t\t'theme_layout' => 'maxwidth'\n\t);\n\n\treturn apply_filters( 'techfak_default_theme_options', $default_theme_options );\n}", "public function setDefaultSettings() {\n $defaultSettings = array(\n \"media_buttons\" => false,\n \"textarea_name\" => $this->getNameAttribute(),\n \"textarea_rows\" => 10,\n \"teeny\" => false,\n \"quicktags\" => false\n );\n $this->setWpEditorSettings($defaultSettings);\n }", "private static function default_options()\n\t{\n\t\t$options = array(\n\t\t\t'jambo__send_to' => $_SERVER['SERVER_ADMIN'],\n\t\t\t'jambo__subject' => _t('[CONTACT FORM] %s', 'jambo'),\n\t\t\t'jambo__show_form_on_success' => 1,\n\t\t\t'jambo__success_msg' => _t('Thank you for your feedback. I\\'ll get back to you as soon as possible.', 'jambo'),\n\t\t\t);\n\t\treturn Plugins::filter('jambo_default_options', $options);\n\t}", "function video_cck_dailymotion_settings() {\n $form = array();\n return $form;\n}", "function pu_register_settings() {\n // Register the settings with Validation callback\n register_setting('pu_theme_options', 'pu_theme_options');\n\n // Add settings section\n add_settings_section('pu_text_section', 'Social Links', 'pu_display_section', 'pu_theme_options.php');\n\n // Create textbox field\n $field_args = array(\n 'type' => 'text',\n 'id' => 'twitter_link',\n 'name' => 'twitter_link',\n 'desc' => 'Twitter Link - Example: http://twitter.com/username',\n 'std' => '',\n 'label_for' => 'twitter_link',\n 'class' => 'css_class'\n );\n\n // Add twitter field\n add_settings_field('twitter_link', 'Twitter', 'pu_display_setting', 'pu_theme_options.php', 'pu_text_section', $field_args);\n\n $field_args = array(\n 'type' => 'text',\n 'id' => 'facebook_link',\n 'name' => 'facebook_link',\n 'desc' => 'Facebook Link - Example: http://facebook.com/username',\n 'std' => '',\n 'label_for' => 'facebook_link',\n 'class' => 'css_class'\n );\n\n // Add facebook field\n add_settings_field('facebook_link', 'Facebook', 'pu_display_setting', 'pu_theme_options.php', 'pu_text_section', $field_args);\n\n $field_args = array(\n 'type' => 'text',\n 'id' => 'gplus_link',\n 'name' => 'gplus_link',\n 'desc' => 'Google+ Link - Example: http://plus.google.com/user_id',\n 'std' => '',\n 'label_for' => 'gplus_link',\n 'class' => 'css_class'\n );\n\n // Add Google+ field\n add_settings_field('gplus_link', 'Google+', 'pu_display_setting', 'pu_theme_options.php', 'pu_text_section', $field_args);\n\n $field_args = array(\n 'type' => 'text',\n 'id' => 'youtube_link',\n 'name' => 'youtube_link',\n 'desc' => 'Youtube Link - Example: https://www.youtube.com/channel/channel_id',\n 'std' => '',\n 'label_for' => 'youtube_link',\n 'class' => 'css_class'\n );\n\n // Add youtube field\n add_settings_field('youtube_ink', 'Youtube', 'pu_display_setting', 'pu_theme_options.php', 'pu_text_section', $field_args);\n\n $field_args = array(\n 'type' => 'text',\n 'id' => 'linkedin-square_link',\n 'name' => 'linkedin-square_link',\n 'desc' => 'LinkedIn Link - Example: http://linkedin-square.com/in/username',\n 'std' => '',\n 'label_for' => 'linkedin-square_link',\n 'class' => 'css_class'\n );\n\n // Add LinkedIn field\n add_settings_field('linkedin-square_link', 'LinkedIn', 'pu_display_setting', 'pu_theme_options.php', 'pu_text_section', $field_args);\n\n $field_args = array(\n 'type' => 'text',\n 'id' => 'instagram_link',\n 'name' => 'instagram_link',\n 'desc' => 'Instagram Link - Example: http://instagram.com/username',\n 'std' => '',\n 'label_for' => 'instagram_link',\n 'class' => 'css_class'\n );\n\n // Add Instagram field\n add_settings_field('instagram_link', 'Instagram', 'pu_display_setting', 'pu_theme_options.php', 'pu_text_section', $field_args);\n\n // Add settings section title here\n add_settings_section('section_name_here', 'Section Title Here', 'pu_display_section', 'pu_theme_options.php');\n\n // Create textarea field\n $field_args = array(\n 'type' => 'textarea',\n 'id' => 'settings_field_1',\n 'name' => 'settings_field_1',\n 'desc' => 'Setting Description Here',\n 'std' => '',\n 'label_for' => 'settings_field_1'\n );\n\n // section_name should be same as section_name above (line 116)\n add_settings_field('settings_field_1', 'Setting Title Here', 'pu_display_setting', 'pu_theme_options.php', 'section_name_here', $field_args);\n\n\n // Copy lines 118 through 129 to create additional field within that section\n // Copy line 116 for a new section and then 118-129 to create a field in that section\n}", "function genesis_extender_custom_css_options_defaults()\n{\t\n\t$defaults = array(\n\t\t'custom_css' => '',\n\t\t'css_builder_popup_active' => 0\n\t);\n\t\n\treturn apply_filters( 'genesis_extender_custom_css_options_defaults', $defaults );\n}", "protected function initConfiguration(){\n $settings = array(\n 'user' => 'bitshok',\n 'widget_id' => '355763562850942976',\n 'tweets_limit' => 3,\n 'follow_btn' => 'on'\n );\n Configuration::updateValue($this->name.'_settings', serialize($settings));\n }", "function ba_options_init() {\n\n register_setting('ba_theme_options', 'ba_social'); // Options group, option name\n register_setting('ba_theme_options', 'ba_contact');\n register_setting('ba_theme_options', 'ba_cf_shortcode');\n\n\n\n// ----------------------------- Sections ----------------------------- //\n\n // Social media section\n add_settings_section(\n 'ba_social_section', // Section ID\n __('Social Media Links'), // Section title\n 'ba_social_cb', // Section callback function\n 'ba_theme_options' // Options group\n );\n\n // Contact info section\n add_settings_section(\n 'ba_contact_section',\n __('Contact Info'),\n 'ba_contact_cb',\n 'ba_theme_options'\n );\n\n // Contact form shortcode\n add_settings_section(\n 'ba_cf_section',\n __('Contact Form Shortcode'),\n 'ba_cf_shortcode_cb',\n 'ba_theme_options'\n );\n\n\n\n// ------------------------- Settings Fields ------------------------- //\n\n\n\n // ------ Social Media Settings fields ------ //\n\n add_settings_field(\n 'ba_facebook', // id\n __('Facebook'), // Title\n 'ba_social_field', // Callback\n 'ba_theme_options', // Options group\n 'ba_social_section', // Section\n array(\n 'label_for' => 'ba_facebook',\n 'class' => 'ba-social-row',\n 'ba_custom_data' => 'custom'\n )\n );\n\n add_settings_field(\n 'ba_twitter',\n __('Twitter'),\n 'ba_social_field',\n 'ba_theme_options',\n 'ba_social_section',\n array(\n 'label_for' => 'ba_twitter',\n 'class' => 'ba-social-row',\n )\n );\n\n add_settings_field(\n 'ba_youtube',\n __('YouTube'),\n 'ba_social_field',\n 'ba_theme_options',\n 'ba_social_section',\n array(\n 'label_for' => 'ba_youtube',\n 'class' => 'ba-social-row',\n )\n );\n\n\n\n // ------ Contact info settings fields ------ //\n\n add_settings_field(\n 'ba_phone',\n __('Phone Number'),\n 'ba_contact_field',\n 'ba_theme_options',\n 'ba_contact_section',\n array(\n 'label_for' => 'ba_phone',\n 'class' => 'ba-social-row',\n )\n );\n\n add_settings_field(\n 'ba_email',\n __('Email Address'),\n 'ba_contact_field',\n 'ba_theme_options',\n 'ba_contact_section',\n array(\n 'label_for' => 'ba_email',\n 'class' => 'ba-social-row',\n )\n );\n\n // ------ Contact form shortcode fields ------ //\n\n add_settings_field(\n 'ba_shortcode',\n __('Contact Form Shortcode'),\n 'ba_cf_field',\n 'ba_theme_options',\n 'ba_cf_section',\n array(\n 'label_for' => 'ba_shortcode',\n 'class' => 'ba-social-row',\n )\n );\n\n}", "function display_global_settings()\n {\n $settings = array_merge($this->settings, $_POST);\n \n $site_url = rtrim($this->EE->config->item('site_url'), '/');\n $third_party_path_array = explode('/', trim(PATH_THIRD, '/'));\n $uri_segments_array = array();\n $uri_segments_array = array_slice($third_party_path_array, -3);\n //print_r($uri_segments_array);\n $third_party_uri = implode('/', $uri_segments_array);\n // Styles\n $this->EE->cp->add_to_head('<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$site_url.'/'.$third_party_uri.'/page_type_switcher/styles/display_global_settings.css\" />');\n \n $this->EE->lang->loadfile('page_type_switcher');\n \n //print_r($this->settings);\n \n // Get custom field info \n $query_field_info = $this->_get_field_info();\n $query_field_info_num_rows = $query_field_info->num_rows();\n //echo '$query_field_info_num_rows: ['.$query_field_info_num_rows.']<br><br>'.PHP_EOL;\n $query_field_info_result = $query_field_info->result_array();\n //print_r($query_field_info_result);\n \n // Find page type switcher's ftype_id\n $sql_ftype_id = \"SELECT fieldtype_id \n FROM exp_fieldtypes \n WHERE name = 'page_type_switcher'\n LIMIT 1\";\n $query_ftype_id = $this->EE->db->query($sql_ftype_id);\n if ($query_ftype_id->num_rows() == 1)\n {\n $ftype_id = $query_ftype_id->row('fieldtype_id');\n //echo '$ftype_id: ['.$ftype_id.']<br><br>'.PHP_EOL;\n }\n \n // Create fieldtype's site settings form\n $r = '';\n $r .= '<table class=\"mainTable padTable\" cellspacing=\"0\" cellpaddind=\"0\" border=\"0\">'.PHP_EOL;\n $r .= '<tr>'.PHP_EOL;\n $r .= '<td width=\"30%\">'.PHP_EOL;\n $r .= $this->EE->lang->line('page_types_max_num');\n $r .= '</td>'.PHP_EOL;\n $r .= '<td>'.PHP_EOL;\n $r .= '<input type=\"text\" name=\"page_types_max_num\" value=\"'.$this->settings['page_types_max_num'].'\" style=\"width: 90%;\" />';\n $r .= '</td>'.PHP_EOL;\n $r .= '</tr>'.PHP_EOL;\n \n if ($query_field_info_num_rows == 0)\n {\n $r .= '<script type=\"text/javascript\">alert(\"'.$this->EE->lang->line('no_page_type_switchers_in_field_groups_allert').'\");</script>'.PHP_EOL;\n }\n\n for ($i = 0; $i < $query_field_info_num_rows; $i++)\n {\n if ($i == 0 OR $query_field_info_result[$i]['group_id'] != $query_field_info_result[$i - 1]['group_id'])\n {\n $r .= '<tr class=\"header\">'.PHP_EOL;\n $r .= '<th colspan=\"2\">';\n $r .= $query_field_info_result[$i]['group_name'];\n $r .= '</th>'.PHP_EOL;\n $r .= '</tr>'.PHP_EOL;\n \n for ($j = 1; $j <= $this->settings['page_types_max_num']; $j++)\n {\n $r .= '<tr>'.PHP_EOL;\n $r .= '<td width=\"30%\">'.PHP_EOL;\n $r .= str_replace('{number}', $j, $this->EE->lang->line('page_type_number_name'));\n $r .= '</td>'.PHP_EOL;\n $r .= '<td>'.PHP_EOL;\n $value = '';\n if (isset($this->settings['field_group'][$query_field_info_result[$i]['group_id']]['page_type_'.$j.'_name']))\n {\n $value = $this->settings['field_group'][$query_field_info_result[$i]['group_id']]['page_type_'.$j.'_name'];\n }\n $r .= '<input type=\"text\" name=\"'.'field_group['.$query_field_info_result[$i]['group_id'].'][page_type_'.$j.'_name]'.'\" value=\"'.$value.'\" style=\"width: 90%;\">'; \n $r .= '</td>'.PHP_EOL;\n $r .= '</tr>'.PHP_EOL;\n }\n }\n \n // Display all fields except page type switcher\n if ($query_field_info_result[$i]['field_type'] != 'page_type_switcher')\n {\n $r .= '<tr>'.PHP_EOL;\n $r .= '<td width=\"30%\">'.PHP_EOL;\n $r .= $query_field_info_result[$i]['field_label'];\n $r .= '</td>'.PHP_EOL;\n $r .= '<td style=\"white-space: pre\">'.PHP_EOL;\n for ($j = 1; $j <= $this->settings['page_types_max_num']; $j++)\n {\n $checked = '';\n if (isset($this->settings['page_types_field_id'][$query_field_info_result[$i]['field_id']]['page_type_'.$j]) AND $this->settings['page_types_field_id'][$query_field_info_result[$i]['field_id']]['page_type_'.$j] == 'y')\n {\n $checked = 'checked=\"checked\"';\n }\n $r .= str_replace('{number}', $j, $this->EE->lang->line('page_type_number_checkbox')).NBS.NBS.'<input type=\"checkbox\" name=\"'.'page_types_field_id['.$query_field_info_result[$i]['field_id'].'][page_type_'.$j.']'.'\" value=\"y\" '.$checked.'>'.NBS.NBS.NBS.NBS;\n \n }\n $r .= '</td>'.PHP_EOL;\n $r .= '</tr>'.PHP_EOL;\n }\n }\n $r .= '</table>'.PHP_EOL;\n\n return $r;\n \n }", "function notifications_content_settings_form($form, &$form_state) {\n // Build check boxes table with content types x subscription types\n $form['content'] = array(\n '#type' => 'fieldset',\n '#title' => t('Enabled subscription types'),\n '#weight' => -10,\n '#collapsible' => TRUE,\n '#description' => t('Check the subscription types that will be enabled. You can use the global settings here or set different options for each content type.'),\n );\n $form['content']['notifications_content_per_type'] = array(\n '#type' => 'radios',\n '#default_value' => variable_get('notifications_content_per_type', 0),\n '#options' => array(\n t('Use global settings on this page for all content types'),\n t('Set up for each content type on <a href=\"@content-type-settings\">Administer Content Types</a>.', array('@content-type-settings' => url('admin/structure/types'))),\n ),\n );\n $form['content']['notifications_content_type'] = array(\n '#type' => 'checkboxes',\n '#title' => t('Global options'),\n '#options' => node_type_get_names(),\n '#default_value' => variable_get('notifications_content_type', array()),\n '#description' => t('Content types for which subscriptions will be enabled.'),\n );\n\n return system_settings_form($form);\n}", "function pu_register_settings()\n{\n // Register the settings with Validation callback\n register_setting('pu_theme_options', 'pu_theme_options');\n\n // Add settings section\n add_settings_section('pu_text_section', 'Social Links', 'pu_display_section', 'pu_theme_options.php');\n\n // Create textbox field\n $field_args = array(\n 'type' => 'text',\n 'id' => 'twitter_link',\n 'name' => 'twitter_link',\n 'desc' => 'Twitter Link - Example: http://twitter.com/username',\n 'std' => '',\n 'label_for' => 'twitter_link',\n 'class' => 'css_class',\n );\n\n // Add twitter field\n add_settings_field('twitter_link', 'Twitter', 'pu_display_setting', 'pu_theme_options.php', 'pu_text_section', $field_args);\n\n $field_args = array(\n 'type' => 'text',\n 'id' => 'facebook_link',\n 'name' => 'facebook_link',\n 'desc' => 'Facebook Link - Example: http://facebook.com/username',\n 'std' => '',\n 'label_for' => 'facebook_link',\n 'class' => 'css_class',\n );\n\n // Add facebook field\n add_settings_field('facebook_link', 'Facebook', 'pu_display_setting', 'pu_theme_options.php', 'pu_text_section', $field_args);\n\n $field_args = array(\n 'type' => 'text',\n 'id' => 'gplus_link',\n 'name' => 'gplus_link',\n 'desc' => 'Google+ Link - Example: http://plus.google.com/user_id',\n 'std' => '',\n 'label_for' => 'gplus_link',\n 'class' => 'css_class',\n );\n\n // Add Google+ field\n add_settings_field('gplus_link', 'Google+', 'pu_display_setting', 'pu_theme_options.php', 'pu_text_section', $field_args);\n\n $field_args = array(\n 'type' => 'text',\n 'id' => 'youtube_link',\n 'name' => 'youtube_link',\n 'desc' => 'Youtube Link - Example: https://www.youtube.com/channel/channel_id',\n 'std' => '',\n 'label_for' => 'youtube_link',\n 'class' => 'css_class',\n );\n\n // Add youtube field\n add_settings_field('youtube_ink', 'Youtube', 'pu_display_setting', 'pu_theme_options.php', 'pu_text_section', $field_args);\n\n $field_args = array(\n 'type' => 'text',\n 'id' => 'linkedin_link',\n 'name' => 'linkedin_link',\n 'desc' => 'LinkedIn Link - Example: http://linkedin.com/in/username',\n 'std' => '',\n 'label_for' => 'linkedin_link',\n 'class' => 'css_class',\n );\n\n // Add LinkedIn field\n add_settings_field('linkedin_link', 'LinkedIn', 'pu_display_setting', 'pu_theme_options.php', 'pu_text_section', $field_args);\n\n $field_args = array(\n 'type' => 'text',\n 'id' => 'instagram_link',\n 'name' => 'instagram_link',\n 'desc' => 'Instagram Link - Example: http://instagram.com/username',\n 'std' => '',\n 'label_for' => 'instagram_link',\n 'class' => 'css_class',\n );\n\n // Add Instagram field\n add_settings_field('instagram_link', 'Instagram', 'pu_display_setting', 'pu_theme_options.php', 'pu_text_section', $field_args);\n\n // Add settings section title here\n add_settings_section('section_name_here', 'Section Title Here', 'pu_display_section', 'pu_theme_options.php');\n\n // Create textarea field\n $field_args = array(\n 'type' => 'textarea',\n 'id' => 'settings_field_1',\n 'name' => 'settings_field_1',\n 'desc' => 'Setting Description Here',\n 'std' => '',\n 'label_for' => 'settings_field_1',\n );\n\n // section_name should be same as section_name above (line 116)\n add_settings_field('settings_field_1', 'Setting Title Here', 'pu_display_setting', 'pu_theme_options.php', 'section_name_here', $field_args);\n\n // Copy lines 118 through 129 to create additional field within that section\n // Copy line 116 for a new section and then 118-129 to create a field in that section\n}", "public function default_settings_section_info() {\n global $WCPc;\n _e('Enter your default settings below', $WCPc->text_domain);\n }", "public function network_settings_init() {\n\t\tregister_setting( 'wpsimplesmtp_smtp_ms', 'wpssmtp_smtp_ms' );\n\n\t\tadd_settings_section(\n\t\t\t'wpsimplesmtp_ms_adminaccess_section',\n\t\t\t__( 'Global Administration Settings', 'simple-smtp' ),\n\t\t\tfunction () {\n\t\t\t\tesc_html_e( 'Configurations set here will overwrite any local site settings.', 'simple-smtp' );\n\t\t\t},\n\t\t\t'wpsimplesmtp_smtp_ms'\n\t\t);\n\n\t\t$this->generate_generic_field( 'host', __( 'Host', 'simple-smtp' ), 'text', 'smtp.example.com' );\n\t\t$this->generate_generic_field( 'port', __( 'Port', 'simple-smtp' ), 'number', '587' );\n\t\t$this->generate_unique_checkbox( 'auth', __( 'Authenticate', 'simple-smtp' ), __( 'Authenticate connection with username and password', 'simple-smtp' ) );\n\t\t$this->generate_generic_field( 'user', __( 'Username', 'simple-smtp' ), 'text', '[email protected]' );\n\t\t$this->generate_generic_field( 'pass', __( 'Password', 'simple-smtp' ), 'password' );\n\t\t$this->generate_generic_field( 'from', __( 'Force from e-mail address', 'simple-smtp' ), 'email', '[email protected]' );\n\t\t$this->generate_generic_field( 'fromname', __( 'Force from e-mail sender name', 'simple-smtp' ), 'text', _x( 'WordPress System', 'Force from e-mail sender name', 'simple-smtp' ) );\n\t\t$this->generate_selection( 'sec', __( 'Security', 'simple-smtp' ), $this->acceptable_security_types() );\n\t\t$this->generate_checkbox_area(\n\t\t\t'adt',\n\t\t\t__( 'Options', 'simple-smtp' ),\n\t\t\tfunction() {\n\t\t\t\t$this->generate_checkbox( 'disable', __( 'Disable email services', 'simple-smtp' ), __( 'When marked, all multisite email services will be disabled.', 'simple-smtp' ) );\n\t\t\t\t$this->generate_checkbox( 'log', __( 'Log all sent emails to the database', 'simple-smtp' ), __( 'Works with the WordPress privacy features.', 'simple-smtp' ) );\n\t\t\t\t$this->generate_checkbox( 'noverifyssl', __( 'Disable SSL Verification (advanced)', 'simple-smtp' ), __( 'Do not disable this unless you know what you\\'re doing.', 'simple-smtp' ) );\n\t\t\t}\n\t\t);\n\n\t\tadd_settings_field(\n\t\t\t'wpssmtp_smtp_siteselection',\n\t\t\t__( 'Site Administration Control', 'simple-smtp' ),\n\t\t\tfunction () {\n\t\t\t\t$collection = [];\n\t\t\t\t$sites = get_sites();\n\n\t\t\t\tforeach ( $sites as $site ) {\n\t\t\t\t\t$site_details = get_blog_details( array( 'blog_id' => $site->blog_id ) );\n\t\t\t\t\t$url = $site_details->siteurl;\n\t\t\t\t\t$name = $site_details->blogname;\n\t\t\t\t\t$string = \\sprintf(\n\t\t\t\t\t\t// translators: Tooltip to clarify to the user clicking the link will take them to the child SMTP settings.\n\t\t\t\t\t\t_x( 'Go to settings for %s', 'Sub site name', 'simple-smtp' ),\n\t\t\t\t\t\t$name\n\t\t\t\t\t);\n\t\t\t\t\t$collection[] = [\n\t\t\t\t\t\t'id' => $site->blog_id,\n\t\t\t\t\t\t'url' => $url,\n\t\t\t\t\t\t'string' => $string,\n\t\t\t\t\t\t'name' => $name,\n\t\t\t\t\t\t'settings' => add_query_arg( [ 'page' => 'wpsimplesmtp' ], get_admin_url( $site->blog_id ) . 'options-general.php' ),\n\t\t\t\t\t\t'no_set' => get_network_option( $site->blog_id, 'wpssmtp_disable_settings', 0 ),\n\t\t\t\t\t\t'no_log' => get_network_option( $site->blog_id, 'wpssmtp_disable_logging', 0 ),\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\t?>\n\t\t\t\t<table class=\"wp-list-table widefat striped wpsmtp-multisite-table\">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th><?php esc_html_e( 'Site', 'simple-smtp' ); ?></th>\n\t\t\t\t\t\t\t<th><?php esc_html_e( 'Disable Settings', 'simple-smtp' ); ?></th>\n\t\t\t\t\t\t\t<th><?php esc_html_e( 'Disable Logging', 'simple-smtp' ); ?></th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<?php foreach ( $collection as $site ) : ?>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td><a href=\"<?php echo esc_url( $site['settings'] ); ?>\" title=\"<?php echo esc_attr( $site['string'] ); ?>\"><?php echo esc_attr( $site['name'] ); ?></a><br /><?php echo esc_url( $site['url'] ); ?></td>\n\t\t\t\t\t\t\t\t<td><input type='checkbox' name='wpssmtp_perm_set_s<?php echo (int) $site['id']; ?>' <?php checked( $site['no_set'], 1 ); ?> value='1'></td>\n\t\t\t\t\t\t\t\t<td><input type='checkbox' name='wpssmtp_perm_log_s<?php echo (int) $site['id']; ?>' <?php checked( $site['no_log'], 1 ); ?> value='1'></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t<p class=\"description\"><?php esc_html_e( 'Hide aspects from local site administrators. Super administrators will still be able to see settings.', 'simple-smtp' ); ?></p>\n\t\t\t\t<?php\n\t\t\t},\n\t\t\t'wpsimplesmtp_smtp_ms',\n\t\t\t'wpsimplesmtp_ms_adminaccess_section'\n\t\t);\n\t}", "protected function field_default() {\n\t\t\treturn array(\n\t\t\t\t'settings' => array(\n\t\t\t\t\t'theme' => 'monolith',\n\t\t\t\t),\n\t\t\t\t'options' => array(),\n\t\t\t);\n\t\t}", "public function admin_init(){\n\t\t\t/* Add theme update data */\n\t\t\tif('plugin' !== $this->config['type']){\n\t\t\t\tadd_filter('pre_set_site_transient_update_themes', array($this, 'add_theme_update_data'), 10, 2);\n\t\t\t}\n\t\t\t/* Add plugin update data */\n\t\t\tif('theme' !== $this->config['type']){\n\t\t\t\tadd_filter('pre_set_site_transient_update_plugins', array($this, 'add_plugin_update_data'), 10, 2);\n\t\t\t}\n\t\t\t/* Plugin Information */\n\t\t\tif('theme' !== $this->config['type']){\n\t\t\t\tadd_filter('plugins_api_result', array($this, 'plugin_info'), 10, 3);\n\t\t\t}\n\t\t}", "function infinite_form_system_theme_settings_alter(&$form, &$form_state) {\n\n /*--------------- Share button Settings --------------*/\n $form['share'] = array(\n '#type' => 'fieldset',\n '#title' => t('Share button settings'),\n '#collapsed' => TRUE,\n '#collapsible' => TRUE,\n );\n\n $form['share']['gtm_id'] = array(\n '#type' => 'textfield',\n '#title' => t('Google tag manager ID'),\n '#default_value' => theme_get_setting('gtm_id'),\n '#size' => 80,\n '#description' => t('Enter your Google tag manager ID.'),\n '#prefix' => '<div id=\"gtm-id-wrapper\">',\n '#suffix' => '</div>',\n );\n\n $form['share']['share_image_style'] = array(\n '#type' => 'select',\n '#title' => t('Image style for sharing'),\n '#options' => image_style_options(),\n '#default_value' => theme_get_setting('share_image_style'),\n '#description' => t('Select the image style, that will be used for sharing on social media.'),\n '#prefix' => '<div id=\"share-image-style-wrapper\">',\n '#suffix' => '</div>',\n );\n\n $form['share']['facebook_share_button'] = array(\n '#type' => 'textfield',\n '#title' => t('Facebook share button text'),\n '#default_value' => theme_get_setting('facebook_share_button'),\n '#size' => 80,\n '#description' => t('Enter the the text, that will be shown on the facebook share button.'),\n '#prefix' => '<div id=\"facebook-share-button-wrapper\">',\n '#suffix' => '</div>',\n );\n\n $form['share']['whatsapp_share_button'] = array(\n '#type' => 'textfield',\n '#title' => t('Whatsapp share button text'),\n '#default_value' => theme_get_setting('whatsapp_share_button'),\n '#size' => 80,\n '#description' => t('Enter the the text, that will be shown on the whatsapp share button.'),\n '#prefix' => '<div id=\"whatsapp-share-button-wrapper\">',\n '#suffix' => '</div>',\n );\n\n $form['share']['whatsapp_share_text'] = array(\n '#type' => 'textfield',\n '#title' => t('Whatsapp share text'),\n '#default_value' => theme_get_setting('whatsapp_share_text'),\n '#size' => 80,\n '#description' => t('Enter the the text, that will be shown as share whatsapp text.'),\n '#prefix' => '<div id=\"whatsapp-share-text-wrapper\">',\n '#suffix' => '</div>',\n );\n\n $form['share']['pinterest_share_button'] = array(\n '#type' => 'textfield',\n '#title' => t('Pinterest share button text'),\n '#default_value' => theme_get_setting('pinterest_share_button'),\n '#size' => 80,\n '#description' => t('Enter the the text, that will be shown on the pinterest share button.'),\n '#prefix' => '<div id=\"pinterest-share-button-wrapper\">',\n '#suffix' => '</div>',\n );\n\n $form['share']['twitter_share_button'] = array(\n '#type' => 'textfield',\n '#title' => t('Twitter share button text'),\n '#default_value' => theme_get_setting('twitter_share_button'),\n '#size' => 80,\n '#description' => t('Enter the the text, that will be shown on the twitter share button.'),\n '#prefix' => '<div id=\"twitter-share-button-wrapper\">',\n '#suffix' => '</div>',\n );\n\n $form['share']['twitter_share_via'] = array(\n '#type' => 'textfield',\n '#title' => t('Via wich twitter handle to share.'),\n '#default_value' => theme_get_setting('twitter_share_via'),\n '#size' => 80,\n '#description' => t('Enter the the twitter handle, that will be shown when sharing content.'),\n '#prefix' => '<div id=\"twitter-share-via-wrapper\">',\n '#suffix' => '</div>',\n );\n\n $form['share']['email_share_button'] = array(\n '#type' => 'textfield',\n '#title' => t('Email share button text'),\n '#default_value' => theme_get_setting('email_share_button'),\n '#size' => 80,\n '#description' => t('Enter the the text, that will be shown on the email share button.'),\n '#prefix' => '<div id=\"email-share-button-wrapper\">',\n '#suffix' => '</div>',\n );\n\n $form['share']['email_share_text'] = array(\n '#type' => 'textfield',\n '#title' => t('Email share text'),\n '#default_value' => theme_get_setting('email_share_text'),\n '#size' => 80,\n '#description' => t('Enter the the text, that will be shown in the email.'),\n '#prefix' => '<div id=\"email-share-button-wrapper\">',\n '#suffix' => '</div>',\n );\n\n $form['share']['email_subject'] = array(\n '#type' => 'textfield',\n '#title' => t('Email subject text'),\n '#default_value' => theme_get_setting('email_subject'),\n '#size' => 80,\n '#description' => t('Enter the the text, that will be shown as the email subject.'),\n '#prefix' => '<div id=\"email-share-subject-wrapper\">',\n '#suffix' => '</div>',\n );\n}", "function genesis_sample_theme_setting_defaults() {\n\n\tif ( function_exists( 'genesis_update_settings' ) ) {\n\n\t\tgenesis_update_settings(\n\t\t\tarray(\n\t\t\t\t'blog_cat_num' => 6,\n\t\t\t\t'content_archive' => 'full',\n\t\t\t\t'content_archive_limit' => 0,\n\t\t\t\t'content_archive_thumbnail' => 0,\n\t\t\t\t'posts_nav' => 'numeric',\n\t\t\t\t'site_layout' => 'content-sidebar',\n\t\t\t)\n\t\t);\n\n\t}\n\n\tupdate_option( 'posts_per_page', 6 );\n\n}", "static function get_settings(){\n\t\t\t\treturn array(\t\n\t\t\t\t\t'icon' => GDLR_CORE_URL . '/framework/images/page-builder/nav-template.png', \n\t\t\t\t\t'title' => esc_html__('Templates', 'goodlayers-core')\n\t\t\t\t);\n\t\t\t}", "function achilles_theme_settings_page(){ ?>\n <div class=\"wrap\">\n <h2><?php printf(__('%s Settings', 'achilles'), wp_get_theme()); ?></h2>\n <div class=\"updated\">\n <p><?php _e('Enter in your property settings below.', 'achilles'); ?></p>\n </div>\n <?php settings_errors(); ?> \n \n <form action=\"options.php\" method=\"POST\">\n <?php settings_fields( 'achilles-settings-group' ); ?>\n <?php do_settings_sections( 'achilles' ); ?>\n <?php submit_button(); ?>\n </form>\n \n </div> <!-- end settings wrap -->\n \n\t\n<?php }", "public function initSettings() {\n $this->setArguments();\n\n // Create the sections and fields\n $this->setSections();\n\n if (!isset($this->args['opt_name'])) { // No errors please\n return;\n }\n\n // If Redux is running as a plugin, this will remove the demo notice and links\n add_action( 'redux/loaded', array( $this, 'cpt_remove_demo' ) );\n \n // Function to test the compiler hook and demo CSS output.\n // Above 10 is a priority, but 2 in necessary to include the dynamically generated CSS to be sent to the function.\n // add_filter('redux/options/'.$this->args['opt_name'].'/compiler', array( $this, 'compiler_action' ), 10, 2);\n \n // Change the arguments after they've been declared, but before the panel is created\n //add_filter('redux/options/'.$this->args['opt_name'].'/args', array( $this, 'change_arguments' ) );\n \n // Change the default value of a field after it's been set, but before it's been useds\n //add_filter('redux/options/'.$this->args['opt_name'].'/defaults', array( $this,'change_defaults' ) );\n\n $this->ReduxFramework = new ReduxFramework($this->sections, $this->args);\n }", "function babybel_variable_newsletter_settings_form($form, &$form_state) {\n $settings_language = babybel_variable_get_settings_language();\n if (!$form_state['rebuild']) {\n babybel_variable_set_language_warning_message($settings_language);\n }\n\n $settings_links = babybel_variable_settings_language_switcher();\n $form['settings_links'] = array(\n '#markup' => $settings_links\n );\n\n $form['lang'] = array(\n '#type' => 'hidden',\n '#value' => $settings_language,\n );\n\n $form['babybel_variable_tab'] = array(\n '#type' => 'vertical_tabs',\n );\n\n // Variable Settings for Newsletter\n $form['babybel_variable_newsletter_page'] = array(\n '#type' => 'fieldset',\n '#title' => t('Newsletter page'),\n '#group' => 'babybel_variable_tab',\n );\n\n // Webform\n $form['babybel_variable_newsletter_page']['webform'] = array(\n '#type' => 'fieldset',\n '#title' => t('Form input'),\n );\n\n $webforms = babybel_common_get_content_type('webform');\n $options_webform = array();\n if ($webforms) {\n foreach ($webforms as $id => $webform) {\n $options_webform[$id] = $webform->title . ' (' . $id . ')';\n }\n }\n\n $merge_option_webform = $options_webform + array(0 => 'None');\n ksort($merge_option_webform);\n\n $webform_id = variable_get('babybel_variable_newsletter_webform_id_' . $settings_language . '');\n $webform_exists = array_key_exists($webform_id, $merge_option_webform);\n\n $form['babybel_variable_newsletter_page']['webform']['babybel_variable_newsletter_webform_id_' . $settings_language . ''] = array(\n '#type' => 'select',\n '#options' => $merge_option_webform,\n '#title' => 'Webform ID',\n '#default_value' => $webform_exists ? $webform_id : 0,\n );\n\n // Form Input\n $form['babybel_variable_newsletter_page']['form_input'] = array(\n '#type' => 'fieldset',\n '#title' => t('Form input'),\n );\n\n $form['babybel_variable_newsletter_page']['form_input']['babybel_variable_newsletter_form_input_title_' . $settings_language . ''] = array(\n '#type' => 'textfield',\n '#title' => t('Title'),\n '#default_value' => variable_get('babybel_variable_newsletter_form_input_title_' . $settings_language . ''),\n '#required' => TRUE,\n );\n\n $form['babybel_variable_newsletter_page']['form_input']['babybel_variable_newsletter_form_input_image_' . $settings_language . ''] = array(\n '#type' => 'managed_file',\n '#title' => t('Background'),\n '#description' => '(*) Suggest image size: 375x310',\n '#upload_location' => 'public://',\n '#default_value' => variable_get('babybel_variable_newsletter_form_input_image_' . $settings_language . ''),\n '#upload_validators' => array(\n 'file_validate_extensions' => array('png'),\n ),\n '#theme' => 'babybel_variable_background_upload',\n '#required' => TRUE,\n );\n\n\n $form['babybel_variable_newsletter_page']['form_input']['babybel_variable_newsletter_form_input_text_button_' . $settings_language . ''] = array(\n '#type' => 'textfield',\n '#title' => t('Text in button'),\n '#default_value' => variable_get('babybel_variable_newsletter_form_input_text_button_' . $settings_language . ''),\n '#required' => TRUE,\n );\n\n // Form Success\n $form['babybel_variable_newsletter_page']['form_success'] = array(\n '#type' => 'fieldset',\n '#title' => t('Form success'),\n );\n\n $form['babybel_variable_newsletter_page']['form_success']['babybel_variable_newsletter_form_success_image_' . $settings_language . ''] = array(\n '#type' => 'managed_file',\n '#title' => t('Background'),\n '#description' => '(*) Suggest image size: 275x225',\n '#upload_location' => 'public://',\n '#default_value' => variable_get('babybel_variable_newsletter_form_success_image_' . $settings_language . ''),\n '#upload_validators' => array(\n 'file_validate_extensions' => array('png'),\n ),\n '#theme' => 'babybel_variable_background_upload',\n '#required' => TRUE,\n );\n\n $title = variable_get('babybel_variable_newsletter_form_success_content_' . $settings_language . '', array('value' => '', 'format' => 'plain_text'));\n $form['babybel_variable_newsletter_page']['form_success']['babybel_variable_newsletter_form_success_content_' . $settings_language . ''] = array(\n '#type' => 'text_format',\n '#title' => t('Title'),\n '#default_value' => $title['value'],\n '#format' => $title['format'],\n '#full_html' => FALSE,\n '#filter_html' => FALSE,\n '#required' => TRUE,\n );\n\n $form['babybel_variable_newsletter_page']['form_success']['babybel_variable_newsletter_form_success_cta_link_' . $settings_language . ''] = array(\n '#type' => 'link_field',\n '#field_name' => 'link_field',\n '#language' => $settings_language,\n '#field_parents' => array(),\n '#delta' => 0,\n '#default_value' => array(\n 'title' => variable_get('babybel_variable_newsletter_form_success_cta_link_title_' . $settings_language . ''),\n 'url' => variable_get('babybel_variable_newsletter_form_success_cta_link_url_' . $settings_language . ''),\n '#field_required' => TRUE,\n ),\n );\n\n // Message error\n $form['babybel_variable_newsletter_page']['message_error'] = array(\n '#type' => 'fieldset',\n '#title' => t('Error message'),\n );\n\n $form['babybel_variable_newsletter_page']['message_error']['babybel_variable_newsletter_message_error_name_' . $settings_language . ''] = array(\n '#type' => 'textfield',\n '#title' => t('First name and last name message error'),\n '#default_value' => strip_tags(variable_get('babybel_variable_newsletter_message_error_name_' . $settings_language . '')),\n '#required' => TRUE,\n );\n\n $form['babybel_variable_newsletter_page']['message_error']['babybel_variable_newsletter_message_error_email_' . $settings_language . ''] = array(\n '#type' => 'textfield',\n '#title' => t('Email message error'),\n '#default_value' => strip_tags(variable_get('babybel_variable_newsletter_message_error_email_' . $settings_language . '')),\n '#required' => TRUE,\n );\n\n $form['babybel_variable_newsletter_page']['message_error']['babybel_variable_newsletter_message_error_email_exists_' . $settings_language . ''] = array(\n '#type' => 'textfield',\n '#title' => t('Email exists message error'),\n '#default_value' => strip_tags(variable_get('babybel_variable_newsletter_message_error_email_exists_' . $settings_language . '')),\n '#required' => TRUE,\n );\n\n // Black-list\n $form['babybel_variable_newsletter_page']['black_list'] = array(\n '#type' => 'fieldset',\n '#title' => t('Black list'),\n );\n\n $form['babybel_variable_newsletter_page']['black_list']['babybel_variable_newsletter_email_blacklist_' . $settings_language] = array(\n '#type' => 'textarea',\n '#title' => t('List email'),\n '#default_value' => variable_get('babybel_variable_newsletter_email_blacklist_' . $settings_language . ''),\n );\n\n $form['#field_uploads'] = array('babybel_variable_newsletter_form_input_image_', 'babybel_variable_newsletter_form_success_image_');\n\n $form['#submit'][] = 'babybel_variable_settings_form_update_status_managed_filed';\n\n $form['#submit'] = array(\n 'babybel_variable_settings_form_update_status_managed_filed',\n 'babybel_variable_newsletter_settings_form_button_cta_link'\n );\n\n return system_settings_form($form);\n}", "private static function default_settings() {\n\t\treturn array(\n\t\t\t'module_ga' => true,\n\t\t\t'module_ip' => true,\n\t\t\t'module_log' => true,\n\t\t\t'sent_data' => false,\n\t\t\t'api_key' => '',\n\t\t\t'mark_as_approved' => true,\n\t\t);\n\t}", "public function composerSettings() {\n\n if ( current_user_can('manage_options') && $this->composer->isPlugin()) {\n //add_options_page(__(\"Swift Page Builder Settings\", \"js_composer\"), __(\"Swift Page Builder\", \"js_composer\"), 'install_plugins', \"wpb_vc_settings\", array($this, \"composerSettingsMenuHTML\"));\n }\n }", "function add_specific_settings_controls() {\n\n\t\t$this->add_control(\n\t\t\t'success_message',\n\t\t\tarray(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => esc_html__( 'Success message', 'themeisle-companion' ),\n\t\t\t\t'default' => esc_html__( 'Your message has been sent!', 'themeisle-companion' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'error_message',\n\t\t\tarray(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => esc_html__( 'Error message', 'themeisle-companion' ),\n\t\t\t\t'default' => esc_html__( 'Oops! I cannot send this email!', 'themeisle-companion' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'to_send_email',\n\t\t\tarray(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => esc_html__( 'Send to', 'themeisle-companion' ),\n\t\t\t\t'default' => get_bloginfo( 'admin_email' ),\n\t\t\t\t'description' => esc_html__( 'Where should we send the email?', 'themeisle-companion' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'submit_label',\n\t\t\tarray(\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => esc_html__( 'Submit', 'themeisle-companion' ),\n\t\t\t\t'default' => esc_html__( 'Submit', 'themeisle-companion' ),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'align_submit',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Alignment', 'themeisle-companion' ),\n\t\t\t\t'type' => Controls_Manager::CHOOSE,\n\t\t\t\t'toggle' => false,\n\t\t\t\t'default' => 'left',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'left' => array(\n\t\t\t\t\t\t'title' => __( 'Left', 'themeisle-companion' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-left',\n\t\t\t\t\t),\n\t\t\t\t\t'center' => array(\n\t\t\t\t\t\t'title' => __( 'Center', 'themeisle-companion' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-center',\n\t\t\t\t\t),\n\t\t\t\t\t'right' => array(\n\t\t\t\t\t\t'title' => __( 'Right', 'themeisle-companion' ),\n\t\t\t\t\t\t'icon' => 'fa fa-align-right',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .content-form .submit-form' => 'text-align: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "public function component_settings( $settings ) {\n\t\t$profile = (array) get_option( self::PROFILE_DATA_OPTION, array() );\n\t\t$settings['onboarding'] = array(\n\t\t\t'profile' => $profile,\n\t\t);\n\n\t\t// Only fetch if the onboarding wizard OR the task list is incomplete or currently shown.\n\t\tif ( ! self::should_show_profiler() && ! self::should_show_tasks() ) {\n\t\t\treturn $settings;\n\t\t}\n\n\t\tinclude_once WC_ABSPATH . 'includes/admin/helper/class-wc-helper-options.php';\n\t\t$wccom_auth = \\WC_Helper_Options::get( 'auth' );\n\t\t$profile['wccom_connected'] = empty( $wccom_auth['access_token'] ) ? false : true;\n\n\t\t$settings['onboarding']['activeTheme'] = get_option( 'stylesheet' );\n\t\t$settings['onboarding']['euCountries'] = WC()->countries->get_european_union_countries();\n\t\t$settings['onboarding']['industries'] = self::get_allowed_industries();\n\t\t$settings['onboarding']['productTypes'] = self::get_allowed_product_types();\n\t\t$settings['onboarding']['profile'] = $profile;\n\t\t$settings['onboarding']['themes'] = self::get_themes();\n\n\t\treturn $settings;\n\t}", "public function get_default_config() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'key' => 'name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'label' => esc_html__( 'Name', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'required',\n\t\t\t\t'placeholder' => esc_html__( 'Name', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'email',\n\t\t\t\t'type' => 'email',\n\t\t\t\t'label' => esc_html__( 'Email', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'required',\n\t\t\t\t'placeholder' => esc_html__( 'Email', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'phone',\n\t\t\t\t'type' => 'number',\n\t\t\t\t'label' => esc_html__( 'Phone', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'optional',\n\t\t\t\t'placeholder' => esc_html__( 'Phone', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'message',\n\t\t\t\t'type' => 'textarea',\n\t\t\t\t'label' => esc_html__( 'Message', 'themeisle-companion' ),\n\t\t\t\t'requirement' => 'required',\n\t\t\t\t'placeholder' => esc_html__( 'Message', 'themeisle-companion' ),\n\t\t\t\t'field_width' => '100',\n\t\t\t),\n\t\t);\n\t}", "function beaver_extender_custom_css_options_defaults() {\n\t\n\t$defaults = array(\n\t\t'custom_css' => '',\n\t\t'css_builder_popup_active' => 0\n\t);\n\t\n\treturn apply_filters( 'beaver_extender_custom_css_options_defaults', $defaults );\n\t\n}", "function plugin_page() {\n\n echo '<div class=\"wrap\">';\n echo '<h2>'.esc_html__( 'WC Sales Notification Settings','wc-sales-notification-pro' ).'</h2>';\n $this->save_message();\n $this->settings_api->show_navigation();\n $this->settings_api->show_forms();\n echo '</div>';\n\n }", "function wpsl_set_default_settings() {\n\n $settings = get_option( 'wpsl_settings' );\n\n if ( !$settings ) {\n update_option( 'wpsl_settings', wpsl_get_default_settings() );\n }\n}", "public function actionRegisterEditorCustomiserSettings()\n {\n // Add a base config for all fields\n Kirki::add_config(\n 'base_setting',\n [\n 'capability' => 'edit_theme_options',\n 'option_type' => 'theme_mod',\n ]\n );\n\n // Add 'Editor Options' Panel to 'Global Styles' Panel\n Kirki::add_panel(\n 'sophia_block_editor_options',\n [\n 'title' => esc_attr__( 'Block Editor', 'sophia' ),\n 'priority' => 10,\n ]\n );\n\n // Add 'Text Size Choices' Panel to 'Editor Options' Panel\n Kirki::add_section(\n 'sophia_block_editor_font_sizes',\n [\n 'title' => esc_attr__( 'Font Size Presets', 'sophia' ),\n 'panel' => 'sophia_block_editor_options',\n ]\n );\n\n Kirki::add_field(\n 'base_setting',\n [\n 'type' => 'number',\n 'settings' => 'sophia_block_editor_small_font_size',\n 'label' => esc_attr__( 'Font Size: Small (px)', 'sophia' ),\n 'section' => 'sophia_block_editor_font_sizes',\n 'default' => 12,\n 'choices' => [\n 'min' => 0,\n 'max' => 80,\n 'step' => 1,\n ],\n 'output' => [\n [\n 'element' => '.has-small-font-size',\n 'property' => 'font-size',\n 'suffix' => 'px',\n ],\n ],\n ]\n );\n\n Kirki::add_field(\n 'base_setting',\n [\n 'type' => 'number',\n 'settings' => 'sophia_block_editor_medium_font_size',\n 'label' => esc_attr__( 'Font Size: Medium (px)', 'sophia' ),\n 'section' => 'sophia_block_editor_font_sizes',\n 'default' => 16,\n 'choices' => [\n 'min' => 0,\n 'max' => 80,\n 'step' => 1,\n ],\n 'output' => [\n [\n 'element' => '.has-regular-font-size',\n 'property' => 'font-size',\n 'suffix' => 'px',\n ],\n ],\n ]\n );\n\n Kirki::add_field(\n 'base_setting',\n [\n 'type' => 'number',\n 'settings' => 'sophia_block_editor_large_font_size',\n 'label' => esc_attr__( 'Font Size: Large (px)', 'sophia' ),\n 'section' => 'sophia_block_editor_font_sizes',\n 'default' => 22,\n 'choices' => [\n 'min' => 0,\n 'max' => 80,\n 'step' => 1,\n ],\n 'output' => [\n [\n 'element' => '.has-large-font-size',\n 'property' => 'font-size',\n 'suffix' => 'px',\n ],\n ],\n ]\n );\n\n Kirki::add_field(\n 'base_setting',\n [\n 'type' => 'number',\n 'settings' => 'sophia_block_editor_extra_large_font_size',\n 'label' => esc_attr__( 'Font Size: Extra Large (px)', 'sophia' ),\n 'section' => 'sophia_block_editor_font_sizes',\n 'default' => 36,\n 'choices' => [\n 'min' => 0,\n 'max' => 80,\n 'step' => 1,\n ],\n 'output' => [\n [\n 'element' => '.has-larger-font-size',\n 'property' => 'font-size',\n 'suffix' => 'px',\n ],\n ],\n ]\n );\n\n // Add 'Editor color Palette' Panel to 'Editor Options' Panel\n Kirki::add_section(\n 'sophia_color_palette',\n [\n 'title' => esc_attr__( 'Site Color Palette', 'sophia' ),\n 'panel' => 'sophia_block_editor_options',\n ]\n );\n\n Kirki::add_field(\n 'base_setting',\n [\n 'type' => 'repeater',\n 'label' => esc_attr__( 'Editor Color Palette', 'sophia' ),\n 'section' => 'sophia_color_palette',\n 'row_label' => [\n 'type' => 'text',\n 'value' => esc_attr__( 'Color', 'sophia' ),\n ],\n 'button_label' => esc_attr__( 'Add a color to your palette', 'sophia' ),\n 'settings' => 'sophia_color_palette_repeater',\n 'fields' => [\n 'sophia_color_palette_color_name' => [\n 'type' => 'text',\n 'label' => esc_attr__( 'color Name', 'sophia' ),\n 'description' => esc_attr__( 'This will be added to the post editors color palette', 'sophia' ),\n 'default' => 'Orange',\n ],\n 'sophia_color_palette_color_code' => [\n 'type' => 'color',\n 'label' => esc_attr__( 'color Value', 'sophia' ),\n 'description' => esc_attr__( 'This will be added to the post editors color palette', 'sophia' ),\n 'default' => '#FF6500',\n ],\n ],\n ]\n );\n\n }", "public function configureTgmPluginActivationLibrary()\n {\n $data = $this->getData();\n\n if ( !isset($data['plugins']) || empty($data['plugins']))\n {\n return;\n }\n\n // The default TGMPA settings\n $defaults = array(\n 'default_path' => Paths::theme('vendor/bundled'),\n 'menu' => dirname(Paths::theme()) . '-install-plugins',\n 'has_notices' => true,\n 'dismissable' => true,\n 'dismiss_msg' => '',\n 'is_automatic' => true,\n 'message' => '',\n 'strings' => array(\n 'page_title' => __( 'Install Required Plugins', 'baobab' ),\n 'menu_title' => __( 'Install Plugins', 'baobab' ),\n 'installing' => __( 'Installing Plugin: %s', 'baobab' ), // %s = plugin name.\n 'oops' => __( 'Something went wrong with the plugin API.', 'baobab' ),\n 'notice_can_install_required' => _n_noop( 'This theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' ), // %1$s = plugin name(s).\n 'notice_can_install_recommended' => _n_noop( 'This theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' ), // %1$s = plugin name(s).\n 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s).\n 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s).\n 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s).\n 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s).\n 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' ), // %1$s = plugin name(s).\n 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s).\n 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ),\n 'activate_link' => _n_noop( 'Begin activating plugin', 'Begin activating plugins' ),\n 'return' => __( 'Return to Required Plugins Installer', 'baobab' ),\n 'plugin_activated' => __( 'Plugin activated successfully.', 'baobab' ),\n 'complete' => __( 'All plugins installed and activated successfully. %s', 'baobab' ), // %s = dashboard link.\n 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated', 'update-nag' or 'error'.\n )\n );\n\n // Merge user configuration with defaults\n $config = isset($data['options']) ? array_merge_recursive($defaults, $data['options']) : $defaults;\n\n tgmpa($data['plugins'], $config);\n }", "function add_settings_fields_options_discussion() {\n\tsae_add_settings_section( 'article', __( 'Default article settings' ), 'settings_section_article_before', 'discussion' );\n\n\tsae_add_settings_field( 'default_pingback_flag', '', 'checkbox', 'discussion', 'article', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Attempt to notify any blogs linked to from the article' ),\n\t) );\n\n\tsae_add_settings_field( 'default_ping_status', '', 'checkbox', 'discussion', 'article', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Allow link notifications from other blogs (pingbacks and trackbacks) on new articles' ),\n\t) );\n\n\tsae_add_settings_field( 'default_comment_status', '', 'checkbox', 'discussion', 'article', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Allow people to post comments on new articles' ),\n\t) );\n\n\tsae_add_settings_section( 'comment', __( 'Other comment settings' ), null, 'discussion' );\n\n\tsae_add_settings_field( 'require_name_email', '', 'checkbox', 'discussion', 'comment', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Comment author must fill out name and email' ),\n\t) );\n\n\tif ( ! get_option( 'users_can_register' ) && is_multisite() ) {\n\t\tsae_add_settings_field( 'comment_registration', '', 'checkbox', 'discussion', 'comment', array(\n\t\t\t'skip_title' => true,\n\t\t\t'label' => __( 'Users must be registered and logged in to comment' ),\n\t\t\t'description' => __( 'Signup has been disabled. Only members of this site can comment.' ),\n\t\t) );\n\t} else {\n\t\tsae_add_settings_field( 'comment_registration', '', 'checkbox', 'discussion', 'comment', array(\n\t\t\t'skip_title' => true,\n\t\t\t'label' => __( 'Users must be registered and logged in to comment' ),\n\t\t) );\n\t}\n\n\tsae_add_settings_field( 'close_comments_for_old_posts', '', 'checkbox', 'discussion', 'comment', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Automatically close comments on old articles: enter the number of days in the field below' ),\n\t) );\n\n\tsae_add_settings_field( 'close_comments_days_old', __( 'Number of days after which comments will be automatically closed' ), 'number', 'discussion', 'comment', array(\n\t\t'input_class' => 'small-text',\n\t\t'min' => '0',\n\t\t'step' => '1',\n\t) );\n\n\tsae_add_settings_field( 'thread_comments', '', 'checkbox', 'discussion', 'comment', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Enable threaded (nested) comments: set the number of levels in the field below' ),\n\t) );\n\n\t/**\n\t * Filters the maximum depth of threaded/nested comments.\n\t *\n\t * @since 2.7.0.\n\t *\n\t * @param int $max_depth The maximum depth of threaded comments. Default 10.\n\t */\n\t$maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 );\n\n\tfor ( $depth_index = 2; $depth_index <= $maxdeep; $depth_index++ ) {\n\t\t$thread_comments_depth_choices[ $depth_index ] = $depth_index;\n\t}\n\n\tsae_add_settings_field( 'thread_comments_depth', __( 'Nested comments levels deep' ), 'select', 'discussion', 'comment', array(\n\t\t'choices' => $thread_comments_depth_choices,\n\t) );\n\n\tsae_add_settings_field( 'page_comments', '', 'checkbox', 'discussion', 'comment', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Break comments into pages' ),\n\t) );\n\n\tsae_add_settings_field( 'comments_per_page', __( 'Number of top level comments per page' ), 'number', 'discussion', 'comment', array(\n\t\t'input_class' => 'small-text',\n\t\t'min' => '0',\n\t\t'step' => '1',\n\t) );\n\n\tsae_add_settings_field( 'default_comments_page', __( 'Comments page displayed by default' ), 'select', 'discussion', 'comment', array(\n\t\t'choices' => array(\n\t\t\t'newest' => __( 'last page' ),\n\t\t\t'oldest' => __( 'first page' ),\n\t\t)\n\t) );\n\n\tsae_add_settings_field( 'comment_order', __( 'Comments to display at the top of each page' ), 'select', 'discussion', 'comment', array(\n\t\t'choices' => array(\n\t\t\t'asc' => __( 'older comments' ),\n\t\t\t'desc' => __( 'newer comments' ),\n\t\t)\n\t) );\n\n\tsae_add_settings_section( 'notifications', __( 'Notifications' ), null, 'discussion' );\n\n\tsae_add_settings_field( 'comments_notify', '', 'checkbox', 'discussion', 'notifications', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Email me when anyone posts a comment' ),\n\t) );\n\n\tsae_add_settings_field( 'moderation_notify', '', 'checkbox', 'discussion', 'notifications', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Email me when a comment is held for moderation' ),\n\t) );\n\n\tsae_add_settings_section( 'moderation', __( 'Comment moderation' ), null, 'discussion' );\n\n\tsae_add_settings_field( 'comment_moderation', '', 'checkbox', 'discussion', 'moderation', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Before a comment appears, it must be manually approved' ),\n\t) );\n\n\tsae_add_settings_field( 'comment_whitelist', '', 'checkbox', 'discussion', 'moderation', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Before a comment appears, the comment author must have a previously approved comment' ),\n\t) );\n\n\tsae_add_settings_field( 'comment_max_links', __( 'Number of links in a comment after which it will be held in the moderation queue' ), 'number', 'discussion', 'moderation', array(\n\t\t'input_class' => 'small-text',\n\t\t'min' => '0',\n\t\t'step' => '1',\n\t\t'description' => __( 'A common characteristic of comment spam is a large number of links.' ),\n\t) );\n\n\tsae_add_settings_field( 'moderation_keys', __( 'Moderation words' ), 'textarea', 'discussion', 'moderation', array(\n\t\t'rows' => '10',\n\t\t'cols' => '50',\n\t\t'input_class' => 'large-text code',\n\t\t'description' => sprintf(\n\t\t\t__( 'When a comment contains any of these words in its content, name, URL, email, or IP, it will be held in the %1$smoderation queue%2$s. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.' ),\n\t\t\t'<a href=\"edit-comments.php?comment_status=moderated\">',\n\t\t\t'</a>'\n\t\t),\n\t) );\n\n\tsae_add_settings_field( 'blacklist_keys', __( 'Comment blacklist' ), 'textarea', 'discussion', 'moderation', array(\n\t\t'rows' => '10',\n\t\t'cols' => '50',\n\t\t'input_class' => 'large-text code',\n\t\t'description' => __( 'When a comment contains any of these words in its content, name, URL, email, or IP, it will be put in the trash. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.' )\n\t) );\n}", "public function get_custom_design_default_css() {\n\t\t\t$default_css = '/* Coupon style for custom-design */\n.coupon-container.custom-design {\n background: #39cccc;\n}\n\n.coupon-container.custom-design .coupon-content {\n border: solid 1px lightgrey;\n color: #30050b;\n}';\n\t\t\treturn apply_filters( 'wc_sc_coupon_custom_design_default_css', $default_css );\n\t\t}", "public function swc_add_customizer_css() {\n\t\t$success_bg_color \t\t= get_theme_mod( 'swc_message_background_color', apply_filters( 'swc_default_message_background_color', '#0f834d' ) );\n\t\t$success_text_color \t= get_theme_mod( 'swc_message_text_color', apply_filters( 'swc_default_message_text_color', '#ffffff' ) );\n\t\t$message_bg_color \t\t= get_theme_mod( 'swc_info_background_color', apply_filters( 'swc_default_info_background_color', '#3D9CD2' ) );\n\t\t$message_text_color \t= get_theme_mod( 'swc_info_text_color', apply_filters( 'swc_default_info_text_color', '#ffffff' ) );\n\t\t$error_bg_color \t\t= get_theme_mod( 'swc_error_background_color', apply_filters( 'swc_default_error_background_color', '#e2401c' ) );\n\t\t$error_text_color \t\t= get_theme_mod( 'swc_error_text_color', apply_filters( 'swc_default_error_text_color', '#ffffff' ) );\n\n\n\t\t$wc_style = '';\n\n\t\t$wc_style .= '\n\t\t\t.woocommerce-message {\n\t\t\t\tbackground-color: ' . $success_bg_color . ' !important;\n\t\t\t\tcolor: ' . $success_text_color . ' !important;\n\t\t\t}\n\n\t\t\t.woocommerce-message a,\n\t\t\t.woocommerce-message a:hover,\n\t\t\t.woocommerce-message .button,\n\t\t\t.woocommerce-message .button:hover {\n\t\t\t\tcolor: ' . $success_text_color . ' !important;\n\t\t\t}\n\n\t\t\t.woocommerce-info {\n\t\t\t\tbackground-color: ' . $message_bg_color . ' !important;\n\t\t\t\tcolor: ' . $message_text_color . ' !important;\n\t\t\t}\n\n\t\t\t.woocommerce-info a,\n\t\t\t.woocommerce-info a:hover,\n\t\t\t.woocommerce-info .button,\n\t\t\t.woocommerce-info .button:hover {\n\t\t\t\tcolor: ' . $message_text_color . ' !important;\n\t\t\t}\n\n\t\t\t.woocommerce-error {\n\t\t\t\tbackground-color: ' . $error_bg_color . ' !important;\n\t\t\t\tcolor: ' . $error_text_color . ' !important;\n\t\t\t}\n\n\t\t\t.woocommerce-error a,\n\t\t\t.woocommerce-error a:hover,\n\t\t\t.woocommerce-error .button,\n\t\t\t.woocommerce-error .button:hover {\n\t\t\t\tcolor: ' . $error_text_color . ' !important;\n\t\t\t}\n\n\t\t';\n\n\t\twp_add_inline_style( 'storefront-woocommerce-style', $wc_style );\n\t}", "protected function registerDefaultComponents() {\n\n\t\t$components = [\n\t\t\tBlock::class,\n\t\t\tEditor::class,\n\t\t\tIntegration::class\n\t\t];\n\n\t\tforeach ( $components as $component ) {\n\t\t\t$this->registerComponent( $component );\n\t\t}\n\t}", "protected function updateConfig() {\n $config_factory = \\Drupal::configFactory();\n $settings = $config_factory->getEditable('message_subscribe.settings');\n $settings->set('use_queue', TRUE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('mailsystem.settings');\n $settings->set('defaults', [\n 'sender' => 'swiftmailer',\n 'formatter' => 'swiftmailer',\n ]);\n $settings->set('modules', [\n 'swiftmailer' => [\n 'none' => [\n 'formatter' => 'swiftmailer',\n 'sender' => 'swiftmailer',\n ],\n ],\n 'message_notify' => [\n 'none' => [\n 'formatter' => 'swiftmailer',\n 'sender' => 'swiftmailer',\n ],\n ],\n ]);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('swiftmailer.message');\n $settings->set('format', 'text/html');\n $settings->set('respect_format', FALSE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('flag.flag.subscribe_node');\n $settings->set('status', TRUE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('user.role.authenticated');\n $permissions = $settings->get('permissions');\n foreach ([\n 'flag subscribe_node',\n 'unflag subscribe_node',\n ] as $perm) {\n if (!in_array($perm, $permissions)) {\n $permissions[] = $perm;\n }\n }\n $settings->set('permissions', $permissions);\n $settings->save(TRUE);\n\n }", "static function get_settings(){\n\t\t\t\treturn array(\n\t\t\t\t\t'icon' => 'icon_ribbon_alt',\n\t\t\t\t\t'title' => esc_html__('Promo Box', 'goodlayers-core')\n\t\t\t\t);\n\t\t\t}", "function theme_customize_register($wp_customize) {\n global $theme_default_options;\n $wp_customize->get_setting('blogname')->transport = 'postMessage';\n $wp_customize->get_setting('blogdescription')->transport = 'postMessage';\n\n if (isset($wp_customize->selective_refresh)) {\n $wp_customize->selective_refresh->add_partial('blogname', array(\n 'selector' => '.site-title a',\n 'container_inclusive' => false,\n 'render_callback' => 'theme_customize_partial_blogname',\n ));\n $wp_customize->selective_refresh->add_partial('blogdescription', array(\n 'selector' => '.site-description',\n 'container_inclusive' => false,\n 'render_callback' => 'theme_customize_partial_blogdescription',\n ));\n }\n\n // Add color scheme setting and control.\n $wp_customize->add_setting('color_scheme', array(\n 'default' => 'default',\n 'sanitize_callback' => 'sanitize_text_field',\n 'transport' => 'postMessage',\n ));\n\n $wp_customize->add_control('color_scheme', array(\n 'label' => __('Color Scheme', 'plazvote'),\n 'section' => 'colors',\n 'type' => 'select',\n 'choices' => array(),\n 'priority' => 1,\n ));\n\n $wp_customize->remove_control('background_color');\n $wp_customize->remove_section('header_image');\n $wp_customize->remove_section('background_image');\n\n for ($i = 1; $i <= 5; $i++) {\n $wp_customize->add_setting(\"color_$i\", array(\n 'default' => '#',\n 'sanitize_callback' => 'sanitize_hex_color',\n 'transport' => 'postMessage',\n ));\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, \"color_$i\", array(\n 'label' => sprintf(__('Color %s', 'plazvote'), $i),\n 'section' => 'colors',\n )));\n }\n\n $wp_customize->add_setting(\"color_white_contrast\", array(\n 'default' => '#000000',\n 'sanitize_callback' => 'sanitize_hex_color',\n 'transport' => 'postMessage',\n ));\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, \"color_white_contrast\", array(\n 'label' => __('Text Dark', 'plazvote'),\n 'section' => 'colors',\n )));\n\n $wp_customize->add_setting(\"color_shading_contrast\", array(\n 'default' => '#ffffff',\n 'sanitize_callback' => 'sanitize_hex_color',\n 'transport' => 'postMessage',\n ));\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, \"color_shading_contrast\", array(\n 'label' => __('Text Light', 'plazvote'),\n 'section' => 'colors',\n )));\n\n $wp_customize->add_setting(\"color_background\", array(\n 'default' => '#ffffff',\n 'sanitize_callback' => 'sanitize_hex_color',\n 'transport' => 'postMessage',\n ));\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, \"color_background\", array(\n 'label' => __('Background', 'plazvote'),\n 'section' => 'colors',\n )));\n\n\n $wp_customize->add_setting('colors_css', array(\n 'default' => $theme_default_options['colors_css'],\n 'sanitize_callback' => 'theme_sanitize_raw',\n 'transport' => 'postMessage',\n ));\n\n $wp_customize->add_setting('resolved_css', array(\n 'default' => '',\n 'sanitize_callback' => 'theme_sanitize_raw',\n 'transport' => 'postMessage',\n ));\n\n // Remove the core header textcolor control, as it shares the main text color.\n $wp_customize->remove_control('header_textcolor');\n\n\n /**\n * Fonts\n */\n $wp_customize->add_section('fonts', array(\n 'capability' => 'edit_theme_options',\n 'title' => __('Fonts', 'plazvote'),\n 'priority' => 40,\n ));\n\n $wp_customize->add_setting('font_scheme', array(\n 'default' => 'default',\n 'sanitize_callback' => 'sanitize_text_field',\n 'transport' => 'postMessage',\n ));\n\n $wp_customize->add_control('font_scheme', array(\n 'label' => __('Font Scheme', 'plazvote'),\n 'section' => 'fonts',\n 'type' => 'select',\n 'choices' => array(),\n ));\n\n $wp_customize->add_setting('fonts_css', array(\n 'default' => $theme_default_options['fonts_css'],\n 'sanitize_callback' => 'theme_sanitize_raw',\n 'transport' => 'postMessage',\n ));\n\n $wp_customize->add_setting('fonts_link', array(\n 'default' => $theme_default_options['fonts_link'],\n 'sanitize_callback' => 'theme_sanitize_raw',\n 'transport' => 'postMessage',\n ));\n\n $wp_customize->add_setting(\"font_heading\", array(\n 'default' => '',\n 'sanitize_callback' => 'sanitize_text_field',\n 'transport' => 'postMessage',\n ));\n $wp_customize->add_control('font_heading', array(\n 'label' => __('Heading Font', 'plazvote'),\n 'section' => 'fonts',\n 'type' => 'select',\n 'choices' => array(),\n ));\n\n $wp_customize->add_setting(\"font_text\", array(\n 'default' => '',\n 'sanitize_callback' => 'sanitize_text_field',\n 'transport' => 'postMessage',\n ));\n $wp_customize->add_control('font_text', array(\n 'label' => __('Text Font', 'plazvote'),\n 'section' => 'fonts',\n 'type' => 'select',\n 'choices' => array(),\n ));\n\n\n /**\n * Typography\n */\n $wp_customize->add_section('typography', array(\n 'capability' => 'edit_theme_options',\n 'title' => __('Typography', 'plazvote'),\n 'priority' => 40,\n ));\n\n $wp_customize->add_setting('typography_scheme', array(\n 'default' => 'default',\n 'sanitize_callback' => 'sanitize_text_field',\n 'transport' => 'postMessage',\n ));\n\n $wp_customize->add_control('typography_scheme', array(\n 'label' => __('Typography Scheme', 'plazvote'),\n 'section' => 'typography',\n 'type' => 'select',\n 'choices' => array(),\n ));\n\n $wp_customize->add_setting('typography_css', array(\n 'default' => $theme_default_options['typography_css'],\n 'sanitize_callback' => 'theme_sanitize_raw',\n 'transport' => 'postMessage',\n ));\n\n $wp_customize->add_setting('typography_base_size', array(\n 'default' => 16,//$theme_default_options['typography_base_size'],\n 'sanitize_callback' => 'absint',\n 'transport' => 'postMessage',\n ));\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'typography_base_size', array(\n 'type' => 'number',\n 'label' => __('Base Size', 'plazvote'),\n 'section' => 'typography',\n 'input_attrs' => array(\n 'min' => 13,\n 'max' => 24,\n 'step' => 1,\n ),\n )));\n\n $defined_settings = apply_filters('np_theme_settings', array());\n $theme_font_weight = $defined_settings && $defined_settings['typography']['h1']['font-weight'] ? $defined_settings['typography']['h1']['font-weight'] : '400';\n $wp_customize->add_setting(\"typography_heading_weight\", array(\n 'default' => $theme_font_weight,//$theme_default_options['typography_heading_weight'],\n 'sanitize_callback' => 'sanitize_text_field',\n 'transport' => 'postMessage',\n ));\n $wp_customize->add_control('typography_heading_weight', array(\n 'label' => __('Heading Weight', 'plazvote'),\n 'section' => 'typography',\n 'type' => 'select',\n 'choices' => array(\n '100' => __('100 Thin', 'plazvote'),\n '300' => __('300 Light', 'plazvote'),\n '400' => __('400 Regular', 'plazvote'),\n '500' => __('500 Medium', 'plazvote'),\n '700' => __('700 Bold', 'plazvote'),\n '900' => __('900 Black', 'plazvote'),\n ),\n ));\n\n\n /**\n * Logo options\n */\n $wp_customize->add_setting('logo_width', array(\n 'default' => $theme_default_options['logo_width'],\n 'sanitize_callback' => 'absint',\n 'transport' => 'postMessage',\n ));\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logo_width', array(\n 'type' => 'number',\n 'label' => __('Logo max width (px)', 'plazvote'),\n 'section' => 'title_tagline',\n 'priority' => 9,\n )));\n\n $wp_customize->add_setting('logo_height', array(\n 'default' => $theme_default_options['logo_height'],\n 'sanitize_callback' => 'absint',\n 'transport' => 'postMessage',\n ));\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logo_height', array(\n 'type' => 'number',\n 'label' => __('Logo max height (px)', 'plazvote'),\n 'section' => 'title_tagline',\n 'priority' => 9,\n )));\n\n $wp_customize->add_setting('logo_link', array(\n 'default' => $theme_default_options['logo_link'],\n 'sanitize_callback' => 'esc_url_raw',\n 'transport' => 'postMessage',\n ));\n $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logo_link', array(\n 'type' => 'url',\n 'label' => __('Logo link href', 'plazvote'),\n 'section' => 'title_tagline',\n 'priority' => 9,\n )));\n\n\n $wp_customize->add_setting('custom_favicon', array(\n 'theme_supports' => array(),\n 'transport' => 'postMessage',\n 'sanitize_callback' => 'theme_sanitize_raw'\n ));\n $wp_customize->add_control(new WP_Customize_Cropped_Image_Control($wp_customize, 'custom_favicon', array(\n 'label' => __('Favicon', 'plazvote'),\n 'section' => 'title_tagline',\n 'priority' => 8,\n 'height' => '64',\n 'width' => '64',\n 'button_labels' => array(\n 'select' => __('Select favicon', 'plazvote'),\n 'change' => __('Change favicon', 'plazvote'),\n 'remove' => __('Remove', 'plazvote'),\n 'default' => __('Default', 'plazvote'),\n 'placeholder' => __('No favicon selected', 'plazvote'),\n 'frame_title' => __('Select favicon', 'plazvote'),\n 'frame_button' => __('Choose favicon', 'plazvote'),\n ),\n )));\n\n\n /**\n * Menu options\n */\n $wp_customize->add_section('menu_options', array(\n 'capability' => 'edit_theme_options',\n 'title' => __('Theme options', 'plazvote'),\n 'panel' => 'nav_menus',\n ));\n\n $wp_customize->add_setting('menu_trim_title', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'theme_sanitize_checkbox',\n 'default' => $theme_default_options['menu_trim_title'],\n ));\n $wp_customize->add_control('menu_trim_title', array(\n 'type' => 'checkbox',\n 'section' => 'menu_options',\n 'label' => __('Trim long menu items', 'plazvote'),\n ));\n\n $wp_customize->add_setting('menu_trim_len', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'absint',\n 'default' => $theme_default_options['menu_trim_len'],\n ));\n $wp_customize->add_control('menu_trim_len', array(\n 'type' => 'number',\n 'section' => 'menu_options',\n 'label' => __('Limit each item to [N] characters', 'plazvote'),\n ));\n\n $wp_customize->add_setting('submenu_trim_len', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'absint',\n 'default' => $theme_default_options['submenu_trim_len'],\n ));\n $wp_customize->add_control('submenu_trim_len', array(\n 'type' => 'number',\n 'section' => 'menu_options',\n 'label' => __('Limit each subitem to [N] characters', 'plazvote'),\n ));\n\n $wp_customize->add_setting('menu_use_tag_filter', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'theme_sanitize_checkbox',\n 'default' => $theme_default_options['menu_use_tag_filter'],\n ));\n $wp_customize->add_control('menu_use_tag_filter', array(\n 'type' => 'checkbox',\n 'section' => 'menu_options',\n 'label' => __('Apply menu item tag filter', 'plazvote'),\n ));\n\n $wp_customize->add_setting('menu_allowed_tags', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => $theme_default_options['menu_allowed_tags'],\n ));\n $wp_customize->add_control('menu_allowed_tags', array(\n 'type' => 'text',\n 'section' => 'menu_options',\n 'label' => __('Allowed menu item tags', 'plazvote'),\n ));\n\n $wp_customize->add_setting('use_default_menu', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'theme_sanitize_checkbox',\n 'default' => $theme_default_options['use_default_menu'],\n ));\n $wp_customize->add_control('use_default_menu', array(\n 'type' => 'checkbox',\n 'section' => 'menu_options',\n 'label' => __('Use not stylized menu', 'plazvote'),\n 'description' => __('Used standart wp_nav_menu when option is enabled (need for some third-party plugins).', 'plazvote'),\n ));\n\n\n /**\n * Excerpt options\n */\n $wp_customize->add_section('excerpt_options', array(\n 'capability' => 'edit_theme_options',\n 'title' => __('Excerpt', 'plazvote'),\n ));\n\n $wp_customize->add_setting('excerpt_auto', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'theme_sanitize_checkbox',\n 'default' => $theme_default_options['excerpt_auto'],\n ));\n $wp_customize->add_control('excerpt_auto', array(\n 'type' => 'checkbox',\n 'section' => 'excerpt_options',\n 'label' => __('Use auto excerpts', 'plazvote'),\n 'description' => __('Generate post excerpts automatically (When neither more-tag nor post excerpt is used)', 'plazvote'),\n ));\n\n $wp_customize->add_setting('excerpt_words', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'absint',\n 'default' => $theme_default_options['excerpt_words'],\n ));\n $wp_customize->add_control('excerpt_words', array(\n 'type' => 'number',\n 'section' => 'excerpt_options',\n 'label' => __('Excerpt length (words)', 'plazvote'),\n ));\n\n $wp_customize->add_setting('excerpt_min_remainder', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'absint',\n 'default' => $theme_default_options['excerpt_min_remainder'],\n ));\n $wp_customize->add_control('excerpt_min_remainder', array(\n 'type' => 'number',\n 'section' => 'excerpt_options',\n 'label' => __('Excerpt balance (words)', 'plazvote'),\n ));\n\n $wp_customize->add_setting('excerpt_strip_shortcodes', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'theme_sanitize_checkbox',\n 'default' => $theme_default_options['excerpt_strip_shortcodes'],\n ));\n $wp_customize->add_control('excerpt_strip_shortcodes', array(\n 'type' => 'checkbox',\n 'section' => 'excerpt_options',\n 'label' => __('Remove shortcodes from excerpt', 'plazvote'),\n ));\n\n $wp_customize->add_setting('excerpt_use_tag_filter', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'theme_sanitize_checkbox',\n 'default' => $theme_default_options['excerpt_use_tag_filter'],\n ));\n $wp_customize->add_control('excerpt_use_tag_filter', array(\n 'type' => 'checkbox',\n 'section' => 'excerpt_options',\n 'label' => __('Apply excerpt tag filter', 'plazvote'),\n ));\n\n $wp_customize->add_setting('excerpt_allowed_tags', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => $theme_default_options['excerpt_allowed_tags'],\n ));\n $wp_customize->add_control('excerpt_allowed_tags', array(\n 'type' => 'text',\n 'section' => 'excerpt_options',\n 'label' => __('Allowed excerpt tags', 'plazvote'),\n ));\n\n $wp_customize->add_setting('show_morelink', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'theme_sanitize_checkbox',\n 'default' => $theme_default_options['show_morelink'],\n ));\n $wp_customize->add_control('show_morelink', array(\n 'type' => 'checkbox',\n 'section' => 'excerpt_options',\n 'label' => __('Show More Link', 'plazvote'),\n ));\n\n $wp_customize->add_setting('morelink_template', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'theme_sanitize_raw',\n 'default' => $theme_default_options['morelink_template'],\n ));\n $wp_customize->add_control('morelink_template', array(\n 'type' => 'text',\n 'section' => 'excerpt_options',\n 'label' => __('More Link Template', 'plazvote'),\n 'description' => sprintf(__('ShortTags: %s', 'plazvote'), '[url], [text]'),\n ));\n\n\n /**\n * SEO options\n */\n $wp_customize->add_section('seo_options', array(\n 'capability' => 'edit_theme_options',\n 'title' => __('SEO', 'plazvote'),\n 'priority' => 200,\n ));\n\n $wp_customize->add_setting('seo_og', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'theme_sanitize_checkbox',\n 'default' => $theme_default_options['seo_og'],\n ));\n $wp_customize->add_control('seo_og', array(\n 'type' => 'checkbox',\n 'section' => 'seo_options',\n 'label' => __('Include Open Graph meta tags', 'plazvote'),\n ));\n\n $wp_customize->add_setting('seo_ld', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'theme_sanitize_checkbox',\n 'default' => $theme_default_options['seo_ld'],\n ));\n $wp_customize->add_control('seo_ld', array(\n 'type' => 'checkbox',\n 'section' => 'seo_options',\n 'label' => __('Include schema.org JSON-LD syntax markup', 'plazvote'),\n ));\n\n\n /**\n * Other options\n */\n $wp_customize->add_section('other_options', array(\n 'capability' => 'edit_theme_options',\n 'title' => __('Other settings', 'plazvote'),\n 'priority' => 200,\n ));\n\n $wp_customize->add_setting('include_jquery', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'theme_sanitize_checkbox',\n 'default' => $theme_default_options['include_jquery'],\n ));\n $wp_customize->add_control('include_jquery', array(\n 'type' => 'checkbox',\n 'section' => 'other_options',\n 'label' => __('Use jQuery from theme', 'plazvote'),\n ));\n\n /**\n * Sidebar options\n */\n $wp_customize->add_section('sidebar_options', array(\n 'capability' => 'edit_theme_options',\n 'title' => __('Sidebars', 'plazvote'),\n 'priority' => 100,\n ));\n\n $layouts_choices = array(\n '' => __('Default', 'plazvote'),\n 'left-sidebar' => __('Left', 'plazvote'),\n 'right-sidebar' => __('Right', 'plazvote'),\n 'none' => __('None', 'plazvote'),\n );\n\n $wp_customize->add_setting('sidebars_layout_blog', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => $theme_default_options['sidebars_layout_blog'],\n ));\n $wp_customize->add_control('sidebars_layout_blog', array(\n 'type' => 'select',\n 'choices' => $layouts_choices,\n 'section' => 'sidebar_options',\n 'label' => __('Blog Template', 'plazvote'),\n 'description' => __('Templates for displaying blogs, archives, search results', 'plazvote'),\n ));\n\n $wp_customize->add_setting('sidebars_layout_post', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => $theme_default_options['sidebars_layout_post'],\n ));\n $wp_customize->add_control('sidebars_layout_post', array(\n 'type' => 'select',\n 'choices' => $layouts_choices,\n 'section' => 'sidebar_options',\n 'label' => __('Post Template', 'plazvote'),\n 'description' => __('Templates for displaying single posts', 'plazvote'),\n ));\n\n $wp_customize->add_setting('sidebars_layout_default', array(\n 'capability' => 'edit_theme_options',\n 'sanitize_callback' => 'sanitize_text_field',\n 'default' => $theme_default_options['sidebars_layout_default'],\n ));\n $wp_customize->add_control('sidebars_layout_default', array(\n 'type' => 'select',\n 'choices' => $layouts_choices,\n 'section' => 'sidebar_options',\n 'label' => __('Default Template', 'plazvote'),\n 'description' => __('Templates for displaying single pages and everything else', 'plazvote'),\n ));\n}", "public function customize_preview_settings()\n {\n }", "public function defaultSettings()\n\t{\n\t\treturn [\n\t\t\t'notifications' => [\n\t\t\t\t'team_event_create' => 1,\n\t\t\t\t'team_event_update' => 2,\n\t\t\t\t'team_event_delete' => 2,\n\t\t\t\t'team_stats' \t\t=> 1,\n\t\t\t\t'team_post' \t\t=> 1,\n\t\t\t\t'user_post' \t\t=> 2,\n\t\t\t\t'user_stats'\t\t=> 1,\n\t\t\t],\n\t\t];\n\t}", "function estore_woocommerce_settings_register($wp_customize) {\n\n\t// WooCommerce Category Color Options\n\t$wp_customize->add_panel( 'estore_woocommerce_panel', array(\n\t\t'priority' => 1000,\n\t\t'title' => esc_html__( 'WooCommerce Settings', 'estore' ),\n\t\t'capability' => 'edit_theme_options',\n\t\t'description' => esc_html__( 'Change WooCommerce settings related to theme.', 'estore' )\n\t));\n\n\t// Header My Account Link\n\t$wp_customize->add_setting( 'estore_header_ac_btn', array(\n\t\t\t'default' => '',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'estore_sanitize_checkbox',\n\t\t)\n\t);\n\n\t$wp_customize->add_control( 'estore_header_ac_btn', array(\n\t\t\t'label' => esc_html__( 'Enable My Account Button', 'estore' ),\n\t\t\t'section' => 'estore_header_integrations',\n\t\t\t'type' => 'checkbox',\n\t\t\t'priority' => 10\n\t\t)\n\t);\n\n\t// Header Currency Info\n\t$wp_customize->add_setting( 'estore_header_currency', array(\n\t\t\t'default' => '',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'estore_sanitize_checkbox',\n\t\t)\n\t);\n\n\t$wp_customize->add_control( 'estore_header_currency', array(\n\t\t\t'label' => esc_html__( 'Enable Currency Symbol', 'estore' ),\n\t\t\t'section' => 'estore_header_integrations',\n\t\t\t'type' => 'checkbox',\n\t\t\t'priority' => 20\n\t\t)\n\t);\n\n\t$wp_customize->add_section( 'estore_woocommerce_category_color_setting', array(\n\t\t'priority' => 1,\n\t\t'title' => esc_html__( 'Category Color Settings', 'estore' ),\n\t\t'panel' => 'estore_woocommerce_panel'\n\t));\n\n\t$priority = 1;\n\t$categories = get_terms( 'product_cat' ); // Get all WooCommerce Categories\n\t$wp_category_list = array();\n\n\tforeach ($categories as $category_list ) {\n\n\t\t$wp_customize->add_setting( 'estore_woocommerce_category_color_'.$category_list->term_id,\n\t\t\tarray(\n\t\t\t\t'default' => '',\n\t\t\t\t'capability' => 'edit_theme_options',\n\t\t\t\t'sanitize_callback' => 'estore_hex_color_sanitize',\n\t\t\t\t'sanitize_js_callback' => 'estore_color_escaping_sanitize'\n\t\t\t)\n\t\t);\n\n\t\t$wp_customize->add_control(\n\t\t\tnew WP_Customize_Color_Control(\n\t\t\t\t$wp_customize, 'estore_woocommerce_category_color_'.$category_list->term_id,\n\t\t\t\tarray(\n\t\t\t\t\t'label' => sprintf(__(' %s', 'estore' ), $category_list->name ),\n\t\t\t\t\t'section' => 'estore_woocommerce_category_color_setting',\n\t\t\t\t\t'settings' => 'estore_woocommerce_category_color_'.$category_list->term_id,\n\t\t\t\t\t'priority' => $priority\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t$priority++;\n\t}\n\n\t// WooCommerce Pages layout\n\t$wp_customize->add_section(\n\t\t'estore_woocommerce_global_layout_section',\n\t\tarray(\n\t\t\t'priority' => 10,\n\t\t\t'title' => esc_html__( 'Archive Page Layout', 'estore' ),\n\t\t\t'panel' => 'estore_woocommerce_panel'\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'estore_woocommerce_global_layout',\n\t\tarray(\n\t\t\t'default' => 'no_sidebar_full_width',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'estore_sanitize_radio'\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew Estore_Image_Radio_Control (\n\t\t\t$wp_customize,\n\t\t\t'estore_woocommerce_global_layout',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'This layout will be reflected in archives, categories, search page etc. of WooCommerce.', 'estore' ),\n\t\t\t\t'section' => 'estore_woocommerce_global_layout_section',\n\t\t\t\t'type' => 'radio',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'right_sidebar' => Estore_ADMIN_IMAGES_URL . '/right-sidebar.png',\n\t\t\t\t\t'left_sidebar' => Estore_ADMIN_IMAGES_URL . '/left-sidebar.png',\n\t\t\t\t\t'no_sidebar_full_width' => Estore_ADMIN_IMAGES_URL . '/no-sidebar-full-width-layout.png',\n\t\t\t\t\t'no_sidebar_content_centered' => Estore_ADMIN_IMAGES_URL . '/no-sidebar-content-centered-layout.png'\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n\n\t// WooCommerce Product Page Layout\n\t$wp_customize->add_section(\n\t\t'estore_woocommerce_product_layout_section',\n\t\tarray(\n\t\t\t'priority' => 20,\n\t\t\t'title' => esc_html__( 'Product Page Layout', 'estore' ),\n\t\t\t'panel' => 'estore_woocommerce_panel'\n\t\t)\n\t);\n\n\t$wp_customize->add_setting(\n\t\t'estore_woocommerce_product_layout',\n\t\tarray(\n\t\t\t'default' => 'right_sidebar',\n\t\t\t'capability' => 'edit_theme_options',\n\t\t\t'sanitize_callback' => 'estore_sanitize_radio'\n\t\t)\n\t);\n\n\t$wp_customize->add_control(\n\t\tnew Estore_Image_Radio_Control (\n\t\t\t$wp_customize,\n\t\t\t'estore_woocommerce_product_layout',\n\t\t\tarray(\n\t\t\t\t'label' => esc_html__( 'This layout will be reflected in product page of WooCommerce.', 'estore' ),\n\t\t\t\t'section' => 'estore_woocommerce_product_layout_section',\n\t\t\t\t'type' => 'radio',\n\t\t\t\t'choices' => array(\n\t\t\t\t\t'right_sidebar' => Estore_ADMIN_IMAGES_URL . '/right-sidebar.png',\n\t\t\t\t\t'left_sidebar' => Estore_ADMIN_IMAGES_URL . '/left-sidebar.png',\n\t\t\t\t\t'no_sidebar_full_width' => Estore_ADMIN_IMAGES_URL . '/no-sidebar-full-width-layout.png',\n\t\t\t\t\t'no_sidebar_content_centered' => Estore_ADMIN_IMAGES_URL . '/no-sidebar-content-centered-layout.png'\n\t\t\t\t)\n\t\t\t)\n\t\t)\n\t);\n\n}", "function gc_theme_setting_defaults() {\n\n\tif ( function_exists( 'genesis_update_settings' ) ) {\n\n\t\tgenesis_update_settings( array(\n\t\t\t'blog_cat_num' => 5,\n\t\t\t'content_archive' => 'excerpts',\n\t\t\t'content_archive_limit' => 0,\n\t\t\t'content_archive_thumbnail' => 1,\n\t\t\t'posts_nav' => 'numeric',\n\t\t\t'site_layout' => 'content-sidebar',\n\t\t) );\n\n\t}\n\tupdate_option( 'posts_per_page', 5 );\n\n}", "public function set_default_data() {\n\t\t$this->button_text_color = '#FFFFFF';\n\t\t$this->button_background_color = '#6699CC';\n\n\t\t$this->header_text_color = '#FFFFFF';\n\t\t$this->header_background_color = '#6699CC';\n\n\t\t$this->button_text = 'Do Not Sell My Data';\n\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\n\t\t$this->ot_logo = '';\n\t\t$this->display_position = 'right';\n\t\t$this->floating_button\t= '';\n\t\t$this->isLinkEnabled \t= 'textlink';\n\t}", "function display_default() {\n\n $target = $this->get_new_page(array('action' => 'default'));\n\n $configform = new $this->form_class($target->url);\n\n $configform->set_data(elis::$config->local_elisprogram);\n\n if ($configdata = $configform->get_data()) {\n /// Notifications section:\n\n configpage::config_set_value($configdata, 'notify_classenrol_user', 0);\n configpage::config_set_value($configdata, 'notify_classenrol_role', 0);\n configpage::config_set_value($configdata, 'notify_classenrol_supervisor', 0);\n if (empty($configdata->notify_classenrol_message)) {\n $configdata->notify_classenrol_message = get_string('notifyclassenrolmessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_classenrol_message', $configdata->notify_classenrol_message);\n\n configpage::config_set_value($configdata, 'notify_classcompleted_user', 0);\n configpage::config_set_value($configdata, 'notify_classcompleted_role', 0);\n configpage::config_set_value($configdata, 'notify_classcompleted_supervisor', 0);\n if (empty($configdata->notify_classcompleted_message)) {\n $configdata->notify_classcompleted_message = get_string('notifyclasscompletedmessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_classcompleted_message', $configdata->notify_classcompleted_message);\n\n configpage::config_set_value($configdata, 'notify_classnotstarted_user', 0);\n configpage::config_set_value($configdata, 'notify_classnotstarted_role', 0);\n configpage::config_set_value($configdata, 'notify_classnotstarted_supervisor', 0);\n if (empty($configdata->notify_classnotstarted_message)) {\n $configdata->notify_classnotstarted_message = get_string('notifyclassnotstartedmessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_classnotstarted_message', $configdata->notify_classnotstarted_message);\n configpage::config_set_value($configdata, 'notify_classnotstarted_days', 0);\n\n configpage::config_set_value($configdata, 'notify_classnotcompleted_user', 0);\n configpage::config_set_value($configdata, 'notify_classnotcompleted_role', 0);\n configpage::config_set_value($configdata, 'notify_classnotcompleted_supervisor', 0);\n if (empty($configdata->notify_classnotcompleted_message)) {\n $configdata->notify_classnotcompleted_message = get_string('notifyclassnotcompletedmessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_classnotcompleted_message', $configdata->notify_classnotcompleted_message);\n configpage::config_set_value($configdata, 'notify_classnotcompleted_days', 0);\n\n configpage::config_set_value($configdata, 'notify_curriculumcompleted_user', 0);\n configpage::config_set_value($configdata, 'notify_curriculumcompleted_role', 0);\n configpage::config_set_value($configdata, 'notify_curriculumcompleted_supervisor', 0);\n if (empty($configdata->notify_curriculumcompleted_message)) {\n $configdata->notify_curriculumcompleted_message = get_string('notifycurriculumcompletedmessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_curriculumcompleted_message', $configdata->notify_curriculumcompleted_message);\n\n\n configpage::config_set_value($configdata, 'notify_curriculumnotcompleted_user', 0);\n configpage::config_set_value($configdata, 'notify_curriculumnotcompleted_role', 0);\n configpage::config_set_value($configdata, 'notify_curriculumnotcompleted_supervisor', 0);\n if (empty($configdata->notify_curriculumnotcompleted_message)) {\n $configdata->notify_curriculumnotcompleted_message = get_string('notifycurriculumnotcompletedmessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_curriculumnotcompleted_message', $configdata->notify_curriculumnotcompleted_message);\n configpage::config_set_value($configdata, 'notify_curriculumnotcompleted_days', 0);\n\n configpage::config_set_value($configdata, 'notify_trackenrol_user', 0);\n configpage::config_set_value($configdata, 'notify_trackenrol_role', 0);\n configpage::config_set_value($configdata, 'notify_trackenrol_supervisor', 0);\n if (empty($configdata->notify_trackenrol_message)) {\n $configdata->notify_trackenrol_message = get_string('notifytrackenrolmessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_trackenrol_message', $configdata->notify_trackenrol_message);\n\n\n configpage::config_set_value($configdata, 'notify_courserecurrence_user', 0);\n configpage::config_set_value($configdata, 'notify_courserecurrence_role', 0);\n configpage::config_set_value($configdata, 'notify_courserecurrence_supervisor', 0);\n if (empty($configdata->notify_courserecurrence_message)) {\n $configdata->notify_courserecurrence_message = get_string('notifycourserecurrencemessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_courserecurrence_message', $configdata->notify_courserecurrence_message);\n configpage::config_set_value($configdata, 'notify_courserecurrence_days', 0);\n\n configpage::config_set_value($configdata, 'notify_curriculumrecurrence_user', 0);\n configpage::config_set_value($configdata, 'notify_curriculumrecurrence_role', 0);\n configpage::config_set_value($configdata, 'notify_curriculumrecurrence_supervisor', 0);\n if (empty($configdata->notify_curriculumrecurrence_message)) {\n $configdata->notify_curriculumrecurrence_message = get_string('notifycurriculumrecurrencemessagedef', 'local_elisprogram');\n }\n pm_set_config('notify_curriculumrecurrence_message', $configdata->notify_curriculumrecurrence_message);\n configpage::config_set_value($configdata, 'notify_curriculumrecurrence_days', 0);\n\n configpage::config_set_value($configdata, 'notify_addedtowaitlist_user', 1);\n configpage::config_set_value($configdata, 'notify_enroledfromwaitlist_user', 1);\n configpage::config_set_value($configdata, 'notify_incompletecourse_user', 1);\n }\n\n $configform->display();\n }", "public function defaultConfiguration(){\n return array(\n// 'noticias_block_string' => $this->t('Valor por defecto. Este bloque se creó a las %time', array('%time' => date('c'))),\n 'noticias_block_string' => $this->t('Valor por defecto. Este bloque se creó a las %time', array('%time' => date('c'))),\n \n \n ); \n }", "function storeConfigForm()\r\n\t{\r\n\t\t/*\tAdd the field for the store configuration\t*/\r\n\t\tadd_settings_field('wpklikandpay_store_tpe', __('Num&eacute;ro de TPE de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'storeTpe'), 'wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig');\r\n\t\t// add_settings_field('wpklikandpay_store_rang', __('Num&eacute;ro de rang de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'storeRang'), 'wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig');\r\n\t\t// add_settings_field('wpklikandpay_store_id', __('Identifiant de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'storeIdentifier'), 'wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig');\r\n\t\tadd_settings_field('wpklikandpay_environnement', __('Environnement de la boutique', 'wpklikandpay'), array('wpklikandpay_option', 'environnement'), 'wpklikandpayStoreConfig', 'mainWKlikAndPayStoreConfig');\r\n\t}", "public function admin_options() { ?>\n <h3><?php _e( $this->pluginTitle(), 'midtrans-woocommerce' ); ?></h3>\n <p><?php _e($this->getSettingsDescription(), 'midtrans-woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "function the_champ_options_init(){\r\n\tregister_setting('the_champ_facebook_options', 'the_champ_facebook', 'the_champ_validate_options');\r\n\tregister_setting('the_champ_login_options', 'the_champ_login', 'the_champ_validate_options');\r\n\tregister_setting('the_champ_sharing_options', 'the_champ_sharing', 'the_champ_validate_options');\r\n\tregister_setting('the_champ_counter_options', 'the_champ_counter', 'the_champ_validate_options');\r\n\tregister_setting('the_champ_general_options', 'the_champ_general', 'the_champ_validate_options');\r\n\tif((the_champ_social_sharing_enabled() || the_champ_social_counter_enabled() || the_champ_social_commenting_enabled()) && current_user_can('manage_options')){\r\n\t\t// show option to disable sharing on particular page/post\r\n\t\t$post_types = get_post_types( array('public' => true), 'names', 'and');\r\n\t\t$post_types = array_unique( array_merge($post_types, array('post', 'page')));\r\n\t\tforeach($post_types as $type){\r\n\t\t\tadd_meta_box('the_champ_meta', 'Super Socializer', 'the_champ_sharing_meta_setup', $type);\r\n\t\t}\r\n\t\t// save sharing meta on post/page save\r\n\t\tadd_action('save_post', 'the_champ_save_sharing_meta');\r\n\t}\r\n}", "public function default() {\n \n $this->data = ModuleConfig::settings();\n // [Module_Data]\n }", "public static function get_core_default_theme()\n {\n }", "public static function settings() {\r\n\t\t// VC Form MH Listing\r\n\t\t// Here we setup MH Listing element (basic data and params)\r\n\t\treturn array(\r\n\t\t\t'name' => esc_html__( 'Property Listings', 'myhome-core' ),\r\n\t\t\t'base' => 'mh_listing',\r\n 'icon' => plugins_url( 'myhome-core/public/img/vc-icon.png' ),\r\n\t\t\t'category' => esc_html__( 'MyHome', 'myhome-core' ),\r\n\t\t\t'params' => My_Home_Listing::get_settings()\r\n\t\t);\r\n\t}", "private function render_settings() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php esc_html_e( 'Network Mail', 'simple-smtp' ); ?></h1>\n\t\t\t<form action='edit.php?action=wpsimplesmtpms' method='post'>\t\n\t\t\t\t<?php\n\t\t\t\twp_nonce_field( 'simple-smtp-ms' );\n\t\t\t\tdo_settings_sections( 'wpsimplesmtp_smtp_ms' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "public function getDefaultSettings();", "function my_theme_create_options() {\r\n $titan = TitanFramework::getInstance( 'genietheme' );\r\n \r\n // Create my admin panel\r\n $panel = $titan->createAdminPanel( array(\r\n 'name' => 'Theme Options',\r\n ) );\r\n \r\n \r\n $generaltab = $panel->createTab( array(\r\n 'name' => 'General Tab',\r\n ) );\r\n \r\n // Create options for my admin panel\r\n $generaltab->createOption( array(\r\n 'name' => 'LOGO',\r\n 'id' => 'head_logo',\r\n 'type' => 'upload',\r\n 'desc' => 'Upoad logo of site.'\r\n ) );\r\n \r\n $generaltab->createOption( array(\r\n 'name' => 'Header Scripts',\r\n 'id' => 'header_scripts',\r\n 'type' => 'textarea',\r\n 'desc' => 'Enter your header scripts or code like google analytics,webmaster code etc...'\r\n ) );\r\n \r\n \r\n $generaltab->createOption( array(\r\n 'name' => 'Footer Scripts',\r\n 'id' => 'footer_scripts',\r\n 'type' => 'textarea',\r\n 'desc' => 'Enter your footer scripts or code like google analytics,webmaster code etc...'\r\n ) );\r\n \r\n \r\n $generaltab->createOption( array(\r\n 'type' => 'save'\r\n ) );\r\n \r\n \r\n $titan = TitanFramework::getInstance( 'genietheme' );\r\n$productMetaBox = $titan->createMetaBox( array(\r\n 'name' => 'Additinal Job Information',\r\n 'post_type' => 'jobs',\r\n) );\r\n\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Job Link',\r\n 'id' => 'j_link',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Experience Required',\r\n 'id' => 'exp_required',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Education Qualification',\r\n 'id' => 'edu_qual',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Preffered Nationality',\r\n 'id' => 'nationality',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Salary',\r\n 'id' => 'salary',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'No. of vaccancies',\r\n 'id' => 'vaccancies',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Benefits',\r\n 'id' => 'benefits',\r\n 'type' => 'text',\r\n \r\n ) );\r\n $productMetaBox->createOption( array(\r\n 'name' => 'Gender',\r\n 'id' => 'gender',\r\n 'options' => array(\r\n '1' => 'Male',\r\n '2' => 'Female',\r\n '3' => 'Male/Female',\r\n ),\r\n 'type' => 'radio',\r\n 'desc' => 'Select gender',\r\n 'default' => '1',\r\n \r\n ) );\r\n\r\n \r\n}", "function htmlconvertwordpresstheme($wp_customize){\n $wp_customize->add_panel('htmlconvertwordpresstheme_settings', array(\n\n 'title'=>__('htmlconvertwordpresstheme_settings'),\n 'description' =>'',\n 'priority'=>10,\n\n\n ));\n\n\n $wp_customize->add_section('htmlconvertwordpresstheme_colors', array(\n 'title'=>'color',\n 'panel'=> 'htmlconvertwordpresstheme_settings',\n\n\n ));\n\n\n $wp_customize->add_setting('htmlconvertwordpresstheme_nav_bg_color', array(\n\n 'type'=>'theme_mod',\n 'capability'=> 'edit_theme_options',\n 'default'=>'',\n 'transport'=>'refresh',\n 'sanitize_callback'=>'sanitize_hex_color',\n ));\n\n\n $wp_customize->add_control('htmlconvertwordpresstheme_nav_bg_color', array(\n \n 'label'=>__('Menu Background'),\n 'type'=>'color',\n 'section'=>'htmlconvertwordpresstheme_colors',\n ));\n\n/* customize setting body background color*/\n$wp_customize->add_setting('htmlconvertwordpresstheme_body_background_color', array(\n\n 'type'=>'theme_mod',\n 'capability'=> 'edit_theme_options',\n 'default'=>'#fff',\n 'transport'=>'refresh',\n 'sanitize_callback'=>'sanitize_hex_color',\n));\n\n\n$wp_customize->add_control('htmlconvertwordpresstheme_body_background_color', array(\n\n 'label'=>__('Body Background color'),\n 'type'=>'color',\n 'section'=>'htmlconvertwordpresstheme_colors',\n));\n\n\n}", "public function init() {\n //Yii::app()->theme = Yii::app()->user->getCurrentTheme();\n //Yii::app()->theme = 'teacher';\n //parent::init();\n }", "function wpec_gd_settings_init(){\n\n register_setting( 'social_settings', 'social_settings', 'wpec_validate_options' );\n add_settings_section( 'facebook_section', 'Social Media Configuration', 'social_media_section_text', 'wpec_gd_options' );\n add_settings_field( 'facebook_api_key', 'Facebook Application API ID:', 'facebook_api_id', 'wpec_gd_options', 'facebook_section' );\n add_settings_field( 'facebook_app_secret', 'Faceook Application Secret:', 'facebook_app_secret', 'wpec_gd_options', 'facebook_section' );\n\n\t\n //Register Settings for each email. Arrays of Subject and Body\n register_setting( 'wpec_gd_main_options', 'wpec_gd_options_array', 'wpec_validate_options' );\n register_setting( 'wpec_gd_emails', 'site_owner_tipped', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'site_owner_untipped', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'site_owner_expired', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'business_owner_tipped', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'business_owner_untipped', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'business_owner_expired', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'deal_purchaser_tipped', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'deal_purchaser_untipped', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'deal_purchaser_expired', 'wpec_validate_emails' );\n register_setting( 'wpec_gd_emails', 'deal_purchaser_new_deal', 'wpec_validate_emails' );\n\n add_settings_section( 'main_section', __( 'Main Settings', 'wpec-group-deals' ), 'wpec_options_intro_text', 'wpec_gd_options' );\n add_settings_section( 'email_templates', __( 'Email Templates', 'wpec-group-deals' ), 'wpec_options_email_intro_text', 'wpec_gd_options' );\n \n add_settings_field( 'gd_api_id', __( 'Group Deals API ID', 'wpec-group-deals' ), 'gd_api_id', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'gd_referral_credit', __( 'Referral Credit', 'wpec-group-deals' ), 'gd_referral_credit', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'gd_logo_upload', __( 'Logo Upload', 'wpec-group-deals' ), 'gd_logo_upload', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_dd_home_image_width', __( 'Group Deal Image Width', 'wpec-group-deals' ), 'wpec_options_img_width', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_dd_home_image_height', __( 'Group Deal Image Height', 'wpec-group-deals' ), 'wpec_options_img_height', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_dd_home_image_crop', __( 'Crop Images?', 'wpec-group-deals' ), 'wpec_options_crop_img', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_paypal_email', __( 'Paypal Email:', 'wpec-group-deals' ), 'wpec_paypal_email', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_default_location', __( 'Default Location:', 'wpec-group-deals' ), 'wpec_default_location', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_default_page', __( 'What page should be used for the Group Deals landing page? NOTE: If you do not have multiple locations to choose from, the popup will not show. Going to the home page will show the featured deal you have created. :', 'wpec-group-deals' ), 'wpec_default_page', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_location_threshold', __( 'When determining a user\\'s location, how wide of a radius should the GeoIP system allow for nearby locations?', 'wpec-group-deals' ), 'wpec_location_threshold', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'gd_mobile_theme', __( 'Mobile Theme?', 'wpec-group-deals' ), 'gd_mobile_theme', 'wpec_gd_options', 'main_section' );\n add_settings_field( 'wpec_site_owner_tipped_subject', __( 'Site Owner - Deal Tipped {Subject}', 'wpec-group-deals' ), 'wpec_site_owner_tipped_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_site_owner_tipped_body', __( 'Site Owner - Deal Tipped {Body}', 'wpec-group-deals' ), 'wpec_site_owner_tipped_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_site_owner_untipped_subject', __( 'Site Owner - Deal Untipped {Subject}', 'wpec-group-deals' ), 'wpec_site_owner_untipped_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_site_owner_untipped_body', __( 'Site Owner - Deal Untipped {Body}', 'wpec-group-deals' ), 'wpec_site_owner_untipped_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_site_owner_expired_subject', __( 'Site Owner - Deal Expired {Subject}', 'wpec-group-deals' ), 'wpec_site_owner_expired_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_site_owner_expired_body', __( 'Site Owner - Deal Expired {Body}', 'wpec-group-deals' ), 'wpec_site_owner_expired_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_business_owner_tipped_subject', __( 'Business Owner - Deal Tipped {Subject}', 'wpec-group-deals' ), 'wpec_business_owner_tipped_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_business_owner_tipped_body', __( 'Business Owner - Deal Tipped {Body}', 'wpec-group-deals' ), 'wpec_business_owner_tipped_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_business_owner_untipped_subject', __( 'Business Owner - Deal Untipped {Subject}', 'wpec-group-deals' ), 'wpec_business_owner_untipped_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_business_owner_untipped_body', __( 'Business Owner - Deal Untipped {Body}', 'wpec-group-deals' ), 'wpec_business_owner_untipped_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_business_owner_expired_subject', __( 'Business Owner - Deal Expired {Subject}', 'wpec-group-deals' ), 'wpec_business_owner_expired_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_business_owner_expired_body', __( 'Business Owner - Deal Expired {Body}', 'wpec-group-deals' ), 'wpec_business_owner_expired_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_tipped_subject', __( 'Deal Purchaser - Deal Tipped {Subject}', 'wpec-group-deals' ), 'wpec_deal_purchaser_tipped_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_tipped_body', __( 'Deal Purchaser - Deal Tipped {Body}', 'wpec-group-deals' ), 'wpec_deal_purchaser_tipped_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_untipped_subject', __( 'Deal Purchaser - Deal Untipped {Subject}', 'wpec-group-deals' ), 'wpec_deal_purchaser_untipped_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_untipped_body', __( 'Deal Purchaser - Deal Untipped {Body}', 'wpec-group-deals' ), 'wpec_deal_purchaser_untipped_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_expired_subject', __( 'Deal Purchaser - Deal Expired {Subject}', 'wpec-group-deals' ), 'wpec_deal_purchaser_expired_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_expired_body', __( 'Deal Purchaser - Deal Expired {Body}', 'wpec-group-deals' ), 'wpec_deal_purchaser_expired_body', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_new_deal_subject', __( 'Deal Purchaser - New Deal {Subject}', 'wpec-group-deals' ), 'wpec_deal_purchaser_new_deal_subject', 'wpec_gd_options', 'email_templates' );\n add_settings_field( 'wpec_deal_purchaser_new_deal_body', __( 'Deal Purchaser - New Deal {Body}', 'wpec-group-deals' ), 'wpec_deal_purchaser_new_deal_body', 'wpec_gd_options', 'email_templates' );\n \n }", "function clea_base_custom_social( $wp_customize ) {\n\t\n\t/* Get the theme prefix. */\n\t$prefix = hybrid_get_prefix();\n\t\n\t$ald_description = __( 'charger les liens vers les réseaux sociaux du site', 'clea-base' );\t\n\t\n\t\t/* Add the test textarea section. */\n\t\t$wp_customize->add_section(\n\t\t\t'unique-impact-1-social',\n\t\t\tarray(\n\t\t\t\t'title' \t=> esc_html__( 'Réseaux sociaux', 'clea-base' ),\n\t\t\t\t'priority' \t=> 200,\n\t\t\t\t'capability' \t=> 'edit_theme_options',\n\t\t\t\t'description'\t=> $ald_description\n\t\t\t)\n\t\t);\n\n\t/** demander Facebook **/\n\t$wp_customize->add_setting( \n\t\t\"{$prefix}_theme_settings[facebook]\", \n\t\tarray(\n\t\t\t'type' \t=> 'option',\n\t\t\t'default' => '',\n\t\t\t'sanitize_callback' => 'clea_base_social_sanitize',\n\t\t)\n\t);\t\n\n\t$wp_customize->add_control(\n \"{$prefix}_theme_settings[facebook]\",\n array(\n 'label' => __('url Facebook', 'clea-base'),\n 'section' => 'unique-impact-1-social',\n 'type' => 'text',\n )\n\t);\t\n\n\n\t/** demander Twitter **/\n\t$wp_customize->add_setting( \n\t\t\"{$prefix}_theme_settings[twitter]\", \n\t\tarray(\n\t\t\t'type' \t=> 'option',\n\t\t\t'default' => '',\n\t\t\t'sanitize_callback' => 'clea_base_social_sanitize',\n\t\t)\n\t);\t\n\n\t$wp_customize->add_control(\n \"{$prefix}_theme_settings[twitter]\",\n array(\n 'label' => __('url Twitter', 'clea-base'),\n 'section' => 'unique-impact-1-social',\n 'type' => 'text',\n )\n\t);\t\t\n\n\t/** demander Pinterest **/\n\t$wp_customize->add_setting( \n\t\t\"{$prefix}_theme_settings[pinterest]\", \n\t\tarray(\n\t\t\t'type' \t=> 'option',\n\t\t\t'default' => '',\n\t\t\t'sanitize_callback' => 'clea_base_social_sanitize',\n\t\t)\n\t);\t\n\n\t$wp_customize->add_control(\n \"{$prefix}_theme_settings[pinterest]\",\n\t\tarray(\n\t\t\t'label' => __('url Pinterest', 'clea-base'),\n\t\t\t'section' => 'unique-impact-1-social',\n\t\t\t'type' => 'text',\n\t\t)\n\t);\t\t\n\n\n\t/** demander RSS **/\n\t$wp_customize->add_setting( \n\t\t\"{$prefix}_theme_settings[rss]\", \n\t\tarray(\n\t\t\t'type' \t=> 'option',\n\t\t\t'default' => '',\n\t\t\t'sanitize_callback' => 'clea_base_social_sanitize',\n\t\t)\n\t);\t\n\n\t$wp_customize->add_control(\n \"{$prefix}_theme_settings[rss]\",\n\t\tarray(\n\t\t\t'label' => __('url RSS', 'clea-base'),\n\t\t\t'section' => 'unique-impact-1-social',\n\t\t\t'type' => 'text',\n\t\t)\n\t);\t\n\n\t/** demander Google + **/\n\t$wp_customize->add_setting( \n\t\t\"{$prefix}_theme_settings[google+]\", \n\t\tarray(\n\t\t\t'type' \t=> 'option',\n\t\t\t'default' => '',\n\t\t\t'sanitize_callback' => 'clea_base_social_sanitize',\n\t\t)\n\t);\t\n\n\t$wp_customize->add_control(\n \"{$prefix}_theme_settings[google+]\",\n\t\tarray(\n\t\t\t'label' => __('url Google +', 'clea-base'),\n\t\t\t'section' => 'unique-impact-1-social',\n\t\t\t'type' => 'text',\n\t\t)\n\t);\t\n\n\t/** demander LinkedIn **/\n\t$wp_customize->add_setting( \n\t\t\"{$prefix}_theme_settings[linkedin]\", \n\t\tarray(\n\t\t\t'type' \t=> 'option',\n\t\t\t'default' => '',\n\t\t\t'sanitize_callback' => 'clea_base_social_sanitize',\n\t\t)\n\t);\t\n\n\t$wp_customize->add_control(\n \"{$prefix}_theme_settings[linkedin]\",\n\t\tarray(\n\t\t\t'label' => __('url LinkedIn', 'clea-base'),\n\t\t\t'section' => 'unique-impact-1-social',\n\t\t\t'type' => 'text',\n\t\t)\n\t);\t\n\n\t/** demander Viadeo **/\n\t$wp_customize->add_setting( \n\t\t\"{$prefix}_theme_settings[viadeo]\", \n\t\tarray(\n\t\t\t'type' \t=> 'option',\n\t\t\t'default' => '',\n\t\t\t'sanitize_callback' => 'clea_base_social_sanitize',\n\t\t)\n\t);\t\n\n\t$wp_customize->add_control(\n \"{$prefix}_theme_settings[viadeo]\",\n\t\tarray(\n\t\t\t'label' => __('url Viadeo', 'clea-base'),\n\t\t\t'section' => 'unique-impact-1-social',\n\t\t\t'type' => 'text',\n\t\t)\n\t);\t\n\t\n}", "function mustsee_theme_settings_defaults( $defaults ) {\n\n\t$defaults['twitter_url'] = '';\n\t$defaults['facebook_url'] = '';\n\t$defaults['pinterest_url'] = '';\n\t$defaults['linkedin_url'] = '';\n\t$defaults['youtube_url'] = '';\n\t$defaults['googleplus_url'] = '';\n\t$defaults['agent_address'] = '';\n\t$defaults['agent_phone'] = '';\n\n\treturn $defaults;\n}" ]
[ "0.6433837", "0.60070544", "0.6003427", "0.5977585", "0.5955388", "0.5907726", "0.5903883", "0.58484674", "0.5843911", "0.58338296", "0.58061206", "0.57994074", "0.57885665", "0.5757142", "0.5728515", "0.57258457", "0.5705115", "0.5659023", "0.5658147", "0.5649024", "0.56438136", "0.5635949", "0.56287867", "0.56143475", "0.5602088", "0.56003463", "0.55948126", "0.55769116", "0.5554575", "0.5544819", "0.5533225", "0.5532527", "0.5527401", "0.55087835", "0.5502974", "0.549364", "0.54884964", "0.5488011", "0.5482036", "0.5480818", "0.54638535", "0.5462926", "0.54573923", "0.5454752", "0.54540664", "0.5452808", "0.5434897", "0.543128", "0.54290545", "0.54197097", "0.5416112", "0.5415224", "0.54128724", "0.5408458", "0.5399781", "0.53987074", "0.5398092", "0.5392813", "0.53848714", "0.5382166", "0.5380235", "0.5374266", "0.53688645", "0.5367042", "0.5366794", "0.5363571", "0.5362436", "0.5361362", "0.53537196", "0.5346162", "0.5345222", "0.53437686", "0.5338226", "0.5329249", "0.5326964", "0.5324509", "0.53227824", "0.53212357", "0.53182006", "0.5309274", "0.52998877", "0.5288693", "0.52881944", "0.5284214", "0.52832216", "0.5282478", "0.5282251", "0.5282161", "0.5280213", "0.52793306", "0.5278133", "0.52758723", "0.5273749", "0.5272813", "0.5264846", "0.5264117", "0.5263458", "0.5260949", "0.52599317", "0.5259716" ]
0.7264607
0
Render this component using the correct layout option.
public function render() { if ( false === (bool) $this->data( 'customize' ) ) { $type = $this->setting( 'type' ); $defaults = (array) $this->get_option( 'newsroom-settings', 'component_defaults', "{$type}_call_to_action", 'data' ); $this->set_data( $defaults ); } if ( 'sticky' === $this->setting( 'layout' ) ) { \ai_get_template_part( $this->get_component_path( 'sticky' ), [ 'component' => $this, 'stylesheet' => 'sticky-cta', ] ); } else { \ai_get_template_part( $this->get_component_path( $this->setting( 'type' ) ), [ 'component' => $this, 'stylesheet' => $this->slug, ] ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renderLayout();", "public function renderLayout() {\n \t// See if we need to autoload the layout\n \tif (!is_null($this->getLayout())) {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t\t // Set the layout file\n \t\t $sFile = APPLICATIONPATH.\"/layouts/{$this->loadConfigVar('systemSettings', 'defaultViewsFolder')}/{$this->getLayout()}\";\n } else {\n // Set the layout file with the router\n $sFile = APPLICATIONPATH.\"/layouts/{$this->getRouter()}/{$this->getLayout()}\";\n }\n // Check to see if the file exists\n if (file_exists($sFile)) {\n // Load it\n require_once($sFile);\n // File does not exist\n } else {\n // Set the system error\n $this->setError(\n\t\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t\t':layoutName', \n\t\t\t\t\t\t\t$this->getLayout(), \n\t\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t\t'layoutDoesNotExist'\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// Run the error controller\n\t\t\t\t\t// $this->runError();\n }\n \t}\n \t// Return instance\n \treturn $this;\n }", "protected function render()\n {\n $settings = $this->get_settings_for_display();\n require dirname(__FILE__) . '/' . $settings['layout'] . '.php';\n }", "protected function setupLayout() {\n\t\tif (!is_null($this -> layout)) {\n\t\t\t$this -> layout = View::make($this -> layout);\n\t\t}\n\t}", "public function render_screen_layout()\n {\n }", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\treturn $this->layout = View::make($this->layout);\n\t\t}\n\t}", "public function render()\n {\n $content = $this->__layoutContent();\n\n extract($this->getViewData());\n ob_start();\n include $content;\n ob_get_flush();\n }", "protected function setupLayout() {\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout() {\n if ( ! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "public function render()\n {\n return view(\"layouts.{$this->layout}\");\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = \\View::make($this->layout);\n }\n }", "public static function renderLayout()\n {\n return self::$layout;\n }", "public function layout( $layout ) {\n\t\t$this->_layout = $layout;\n\t}", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n\n }", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout() {\n if (!is_null($this->layout)) $this->layout = View::make($this->layout);\n }", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\r\n\t{\r\n\t\tif ( ! is_null($this->layout))\r\n\t\t{\r\n\t\t\t$this->layout = View::make($this->layout);\r\n\t\t}\r\n\t}", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if (! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "protected function setupLayout()\n {\n if( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "public function render()\r\n\t{\r\n\t\tif( $this->_layout && file_exists($this->_layout) )\r\n\t\t{\r\n\t\t\t$this->_layout = apply_filters( 'tp_event_meta_box_layout', $this->_layout, $this->_id );\r\n\t\t\tdo_action( 'tp_event_before_metabox', $this->_id );\r\n\t\t\trequire_once $this->_layout;\r\n\t\t\tdo_action( 'tp_event_after_metabox', $this->_id );\r\n\t\t}\r\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout)) {\n\t\t\t$this->layout = view($this->layout);\n\t\t}\n\t}", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n\n if (Request::Ajax())\n {\n $this->layout = View::make('layouts.ajax');\n }\n else\n $this->layout = View::make($this->layout);\n\n $this->layout->content = \" \";\n }\n }", "protected function initLayout()\n {\n $showLabels = $this->hasLabels();\n $showErrors = $this->getConfigParam('showErrors');\n $this->mergeSettings($showLabels, $showErrors);\n $this->buildLayoutParts($showLabels, $showErrors);\n }", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout) && ! $this->is_pjax())\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "protected function setupLayout() {\n\t\tif ( ! is_null($this->layout)) {\n\n\n\t\t\t$cb_js_var = array(\n\t\t\t\t'site_url' => url('/'),\n\t\t\t\t'admin_url' => url('/admin'),\n\t\t\t\t'admin_assets_url' => asset('packages/vizioart/cookbook/'),\n\t\t\t\t'admin_api_url' => url('/admin/api')\n\t\t\t);\n\n\n\t\t\t$this->layout = View::make($this->layout, array(\n\t\t\t\t'cb_js_var' => $cb_js_var\n\t\t\t));\n\t\t}\n\t}", "public function setLayout($value);", "public function setLayout($layout)\n\t{\n\t\t//LAYOUT CAN BE FLAT\t\n\t}", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout, $this->_data);\n\t\t\t$this->layout->content = null;\n\t\t\t$this->layout->currentProject = null;\n\t\t}\n\t}", "public function initLayout();", "function set_layout($layout) {\n $this->layout = $layout;\n }", "protected function makeViewLayout()\n {\n new MakeLayout($this, $this->files);\n }", "public function useLayout($layout)\n {\n $this->layout = $layout;\n }", "abstract function buildShowLayout(): void;", "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\n\t\t$this->setLocale();\n\t}", "protected function setupLayout()\n\t{\n\t\tdefine(\"aol_institute\", 68);\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "function setLayout($value) {\r\n $this->layout = $value;\r\n }", "function setLayout($value) {\n $this->layout = $value;\n }", "function layout($layout = 'vertical')\n {\n $this->layout = $layout;\n return $this;\n }", "protected function _prepareLayout(){\r\n return $this;\r\n }", "public function setLayout() {\n if ($this->controller == 'login' || $this->controller == 'infos') {\n $this->viewBuilder()->setLayout('empty');\n } else if ($this->controller == 'ajax') {\n $this->viewBuilder()->setLayout('ajax');\n } else {\n $this->viewBuilder()->setLayout('chotreo');\n }\n }", "public function render($data = [], $layout = 'master')\n {\n require './views/layout/' . $layout . '.php';\n }", "private function prepareLayout($params)\n {\n if (isset($params['layout'])) {\n $this->layout = $params['layout'];\n }\n\n $this->renderer->setLayout($this->layout);\n }", "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = view($this->layout);\n $this->layout->menus = Menu::getMenu() ;\n }\n }", "public function getLayout() {}", "protected function setupLayout() {\n\t\t$this->data['route'] = Route::getCurrentRoute()->getPath();\t\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->data['enrolledCourses'] = NULL;\n\t\t\t\n\t\t\tif (Auth::check() && in_array(Auth::user()->user_type, array(3, 5))) {\n\t\t\t\t$this->data['enrolledCourses'] = EnrolledCourses::getEnrolledCourses();\n\t\t\t\t$this->data['endedCourses'] = EnrolledCourses::getEndedCourses();\n\t\t\t\t$this->data['profiling'] = User::getRegProfile();\t\n\t\t\t\t$this->data['profiling_ctr'] = $this->data['profiling'];\t\t\t\t\n\t\t\t} else if (Auth::check() && Auth::user()->user_type == 2) {\n\t\t\t\t$this->data['assigned_courses'] = Courses::getAssignedCourses();\n\t\t\t}\n\n\t\t\t$this->layout = View::make($this->layout, $this->data);\n\t\t}\n\t}", "public function enableLayout()\n\t{\n\t\t$this->_layout = new Opt_View($this->_layoutName);\n\n\t\treturn $this;\n\t}", "public function apply_layout()\n\t{\n\t\tif (!$this instanceof Controller)\n\t\t\tthrow new Kohana_Exception('The `Component_DefaultLayout` trait must be used by Controller class');\n\n // if we are logged in, we'll send user to tmpl\n $usr = Auth::instance()->logged_in()\n ? Auth::instance()->get_user()\n : null;\n\n\t\t$content = $this->response->getBody();\n\t\t$layout = View::factory('layouts/default', [\n\t\t\t'content' => $content,\n\t\t\t'template_settings' => $this->template_settings,\n 'user' => $usr,\n\t\t]);\n\n\t\t$this->response->body($layout);\n\t}", "public function renderWithLayout($params,$layoutFile=null) {\n\t\tif ($layoutFile==null) $layoutFile = J::$options['layout'];\n\t\t$viewFile = J::path($layoutFile).'.jade';\n\t\t$fileName = pathinfo($layoutFile,PATHINFO_DIRNAME);\n\t\t$cachePath = J::path('App/Cache/Jade/'.$fileName);\n\t\tif (!is_dir($cachePath)) mkdir($cachePath,0777,true);\n\t\t$cacheFile = $cachePath.'/'.pathinfo($layoutFile,PATHINFO_BASENAME).'.php';\t\t\n\t\t$params['actionContent'] = $this->render($params);\n\t\t$rendered = $this->render($params,$viewFile,$cacheFile);\n\t\treturn $rendered;\n\t}", "protected function render()\n {\n }", "protected function render()\n {\n }", "protected function render()\n {\n }", "function setLayout($name) {\n\t\t$this->layout = $name;\n\t}", "protected function render()\n {\n }", "function render($view = null, $layout = null, $die = true) {\r\n if(!is_null($view)) {\r\n $this->setView($view);\r\n } // if\r\n if(!is_null($layout)) {\r\n $this->setLayout($layout);\r\n } // if\r\n \r\n $this->renderLayout(\r\n $this->getLayoutPath(), // layout path\r\n $this->fetchView($this->getViewPath()) // content\r\n ); // renderLayout\r\n \r\n if($die) {\r\n die();\r\n } // if\r\n }", "public function setOptionsLayout($optionsLayout)\n {\n $this->_optionsLayout = $optionsLayout;\n }", "public function renderLayout($view = null, $param = array())\n {\n\n if (!empty($param)) {\n $this->setParam($param);\n }\n if (!empty($view)) {\n $this->setView($view);\n }\n\n include_once(DIRREQ . \"app/view/template/Layout.php\");\n }", "public function layout() {\n return $this->layout;\n }", "protected function _prepareLayout()\n\t{\n\t\treturn parent::_prepareLayout();\n\t}", "public function set_layout($layout)\n {\n $this->_layout = $layout;\n }", "public function layout()\n {\n return $this->layout;\n }", "protected function _render()\n {\n }", "protected function _prepareLayout()\n {\n return $this;\n }", "protected function _prepareLayout()\n {\n return $this;\n }" ]
[ "0.7498908", "0.6944566", "0.64646375", "0.641364", "0.6401269", "0.62587255", "0.62550926", "0.6248393", "0.624445", "0.62413514", "0.6225673", "0.6212743", "0.62110597", "0.62056243", "0.61987007", "0.61987007", "0.61942035", "0.61909676", "0.61909676", "0.61871785", "0.61863476", "0.61863476", "0.61863476", "0.61863476", "0.61863476", "0.6183002", "0.6168281", "0.616657", "0.61598265", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.6147165", "0.61376566", "0.61285776", "0.6110063", "0.6054565", "0.6044616", "0.60396856", "0.60222954", "0.5994775", "0.59868085", "0.598499", "0.59781045", "0.5961516", "0.5912248", "0.58868414", "0.5883886", "0.5872162", "0.585031", "0.5837851", "0.58277303", "0.58020383", "0.5792103", "0.578221", "0.5778953", "0.5757089", "0.5754484", "0.57484275", "0.57440364", "0.5737634", "0.57140887", "0.5678574", "0.5659696", "0.5659238", "0.5659238", "0.56586236", "0.5656429", "0.5656322", "0.5645863", "0.56453586", "0.5644964", "0.56202483", "0.5604445", "0.55969137", "0.5585143", "0.55732286", "0.55732286" ]
0.0
-1
Return an array of Call to Action type options.
public function get_type_options() : array { /** * Filters Call to Action type options. * * @param array Type options to be filtered. */ return apply_filters( 'cta_type_options', // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound [ 'subscribe' => __( 'Subscribe', 'civil-first-fleet' ), 'newsletter' => __( 'Newsletter Sign up', 'civil-first-fleet' ), ] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_action_options() {\n return array(\n 'c' => get_string('create', 'logstore_database'),\n 'r' => get_string('read', 'logstore_database'),\n 'u' => get_string('update', 'logstore_database'),\n 'd' => get_string('delete')\n );\n }", "public function optionsAction()\n {\n return ['GET', 'POST', 'PATCH', 'DELETE'];\n }", "protected function getOptions()\n\t{\n\t\treturn array_merge(parent::getOptions(),array(\n\t\t\tarray('action', 'a', InputOption::VALUE_NONE, 'Show only next actions.', null),\n\t\t\tarray('skip-done', 'x', InputOption::VALUE_NONE, 'Skip completed actions.', null),\n\t\t));\n\t}", "public function toOptionArray()\r\n {\r\n $paymentActions = array();\r\n\r\n foreach ($this->_allowedActions as $_action) {\r\n if (!array_key_exists($_action, $this->_actions)) {\r\n continue;\r\n }\r\n\r\n $paymentActions[] = array(\r\n 'value' => $_action,\r\n 'label' => Mage::helper('realex')->__($this->_actions[$_action])\r\n );\r\n }\r\n\r\n return $paymentActions;\r\n }", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "protected function getOptions(): array\n {\n return [\n ['url', null, InputOption::VALUE_OPTIONAL, 'Optional url that will be used to fetch xml for call.', null],\n ['from', null, InputOption::VALUE_OPTIONAL, 'Optional from number that will be used.', null],\n ];\n }", "public function options()\n {\n return $this->setMethod(__FUNCTION__)\n ->makeRequest();\n }", "public function getOptions() : array;", "public function getActions(): array;", "public function actions(): array\n {\n /**\n * @var string\n */\n $cmd = request('cmd', '');\n\n return [\n // new Actions\\FullcalendarAction(),\n // new Actions\\TestAction(),\n new ArtisanAction($cmd),\n ];\n }", "#[Pure]\n public function getActionArguments() : array\n {\n return $this->actionArguments;\n }", "protected function getOptions(): array\n {\n return [\n ['json', null, InputOption::VALUE_NONE, 'Output the route list as JSON'],\n ['path', null, InputOption::VALUE_OPTIONAL, 'Only show routes matching the given path pattern'],\n ['except-path', null, InputOption::VALUE_OPTIONAL, 'Do not display the routes matching the given path pattern'],\n ['reverse', 'r', InputOption::VALUE_NONE, 'Reverse the ordering of the routes'],\n ['sort', null, InputOption::VALUE_OPTIONAL, 'The column (uri, view) to sort by', 'uri'],\n ];\n }", "function get_bulk_actions() {\n\t\t//bulk action combo box parameter\n\t\t//if you want to add some more value to bulk action parameter then push key value set in below array\n\t\t$actions = array();\n\t\treturn $actions;\n }", "public function getOptions()\n {\n return array();\n }", "public function options() : array\n {\n return $this->input->getOptions();\n }", "public function get(): array\n {\n return $this->actions->toArray();\n }", "public function actions(): array;", "protected function getOptions() : array\n {\n return [];\n }", "public function getAvailableOptions(): array\n\t{\n\t\treturn [\n\t\t\t'id',\n\t\t\t'timestamp',\n\t\t\t'trigger',\n\t\t\t'progress',\n\t\t\t'assignment',\n\t\t\t'obj_type',\n\t\t\t'obj_title',\n\t\t\t'refid',\n\t\t\t'link',\n\t\t\t'parent_title',\n\t\t\t'parent_refid',\n\t\t\t'user_mail',\n\t\t\t'user_id',\n\t\t\t'user_login',\n\t\t];\n\t}", "public function getHttpMethodOptions()\n {\n return $this->getOptionArray(Mage::helper('mp_debug/filter')->getHttpMethodValues());\n }", "protected function getOptions(): array\n {\n return [];\n }", "protected function getOptions(): array\n {\n return [];\n }", "protected function getOptions()\r\n {\r\n return [\r\n\r\n ];\r\n }", "public function get_actions(): array;", "public function getActions(): array\n {\n return $this->actions;\n }", "protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getOptions()\n {\n return [\n ['method', 'm', InputOption::VALUE_OPTIONAL, 'Method'],\n ['uri', 'u', InputOption::VALUE_OPTIONAL, 'Uri'],\n ['name', 'f', InputOption::VALUE_OPTIONAL, 'Name'],\n ['action', 'a', InputOption::VALUE_OPTIONAL, 'Action'],\n ['middleware', 'd', InputOption::VALUE_OPTIONAL, 'Middleware'],\n ['map', 'p', InputOption::VALUE_OPTIONAL, 'Map to'],\n ['reverse', 'r', InputOption::VALUE_NONE, 'Reverse route list']\n ];\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array(\n\n );\n }", "public function getOptions() : array\n {\n $reflection = new \\ReflectionClass(get_class($this));\n return array_values($reflection->getConstants());\n }", "protected function _options() {\n\t\t\t$options['Actionrole']['role_id'] = $this->Actionrole->Role->find('list', array('order' => 'name', 'conditions' => array('actif' => 1)));\n\t\t\t$options['Actionrole']['categorieactionrole_id'] = $this->Actionrole->Categorieactionrole->find('list', array('order' => 'name'));\n\n\t\t\treturn $options;\n\t\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "public function getActions() {\n\t\treturn array(\n\t\t\t// Client Nav\n\t\t\tarray(\n\t\t\t\t'action'=>\"widget_client_home\",\n\t\t\t\t'uri'=>\"plugin/client_notices/client_widget/\",\n\t\t\t\t'name'=>Language::_(\"ClientNoticesPlugin.widget_client_home.index\", true)\n\t\t\t),\n\t\t\t// Staff Nav\n array(\n 'action' => \"nav_secondary_staff\",\n 'uri' => \"plugin/client_notices/admin_main/index/\",\n 'name' => Language::_(\"ClientNoticesPlugin.nav_secondary_staff.index\", true),\n 'options' => array(\n\t\t\t\t\t'parent' => \"clients/\"\n\t\t\t\t)\n ),\n\t\t\t// Client Profile Action Link\n\t\t\tarray(\n\t\t\t\t'action' => \"action_staff_client\",\n\t\t\t\t'uri' => \"plugin/client_notices/admin_main/add/\",\n\t\t\t\t'name' => Language::_(\"ClientNoticesPlugin.action_staff_client.add\", true),\n\t\t\t\t'options' => array(\n\t\t\t\t\t'class' => \"invoice\"\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "public static function getForOptions()\n {\n return [\n 'Buyer' => self::FOR_BUYER,\n 'Freelancer' => self::FOR_FREELANCER,\n 'Fee' => self::FOR_WAWJOB\n ];\n }", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions() {\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function curlOptions($action, $request)\n {\n $options = \n\t\t\t$this->options['curlopts'] + \n\t\t\tarray(\n\t\t\t\tCURLOPT_SSL_VERIFYPEER => true,\n\t\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\t\tCURLOPT_HTTPHEADER => $this->buildHeaders($action),\n\t\t\t\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t\t\tCURLOPT_HTTPAUTH => ((!empty($this->options['token'])) ? CURLAUTH_BEARER : CURLAUTH_BASIC | CURLAUTH_NTLM)\n\t\t\t); \n\n\t\tif(!empty($this->options['user']) && !empty($this->options['password'])) {\n\n\t\t\t$options[CURLOPT_USERPWD] = $this->options['user'] . ':' . $this->options['password']; \n\n\t\t}\n\n // We shouldn't allow these options to be overridden.\n $options[CURLOPT_HEADER] = true;\n $options[CURLOPT_POST] = true;\n $options[CURLOPT_POSTFIELDS] = $request;\n\n return $options;\n }", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "protected function _getOptions() { return array(); }", "protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "public function getActions() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'action'=>\"nav_primary_client\",\n\t\t\t\t'uri'=>\"plugin/knowledgebase/client_main/\",\n\t\t\t\t'name'=>Language::_(\"KnowledgebasePlugin.client_main\", true)\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'action' => \"nav_secondary_staff\",\n\t\t\t\t'uri' => \"plugin/knowledgebase/admin_main/\",\n\t\t\t\t'name' => Language::_(\"KnowledgebasePlugin.admin_main\", true),\n\t\t\t\t'options' => array('parent' => \"tools/\")\n\t\t\t)\t\t\t\n\t\t);\n\t}", "protected function _options() {\n\t\t\treturn array();\n\t\t}" ]
[ "0.67643094", "0.6639785", "0.6434818", "0.62135303", "0.6212376", "0.6212376", "0.6212376", "0.6212376", "0.6212376", "0.6212376", "0.6212376", "0.618919", "0.61701673", "0.61453754", "0.61074096", "0.6103989", "0.6098876", "0.6053197", "0.6031527", "0.6031157", "0.60117716", "0.5990957", "0.59784085", "0.5966842", "0.5963906", "0.59625816", "0.5949205", "0.5949205", "0.593106", "0.59204537", "0.5918772", "0.5912448", "0.59086126", "0.58855", "0.58855", "0.58855", "0.58855", "0.58855", "0.58855", "0.58855", "0.5877883", "0.5869188", "0.586794", "0.58538514", "0.58538514", "0.58538514", "0.58538514", "0.58538514", "0.58538514", "0.58538514", "0.58538514", "0.58538514", "0.58538514", "0.58538514", "0.58538514", "0.58538514", "0.5853672", "0.58527344", "0.58527344", "0.58527344", "0.58527344", "0.58527344", "0.5852672", "0.5848812", "0.5848812", "0.5848812", "0.5822702", "0.5818554", "0.5818554", "0.5818554", "0.5818554", "0.5818554", "0.5818554", "0.5818554", "0.5808477", "0.5808477", "0.5808477", "0.5808477", "0.58040375", "0.5796739", "0.5796739", "0.5796739", "0.5796739", "0.5796739", "0.5796739", "0.5796739", "0.5796739", "0.5796739", "0.5796739", "0.5796739", "0.5796739", "0.5796739", "0.5796739", "0.5796739", "0.5796739", "0.5789825", "0.57863307", "0.57857925", "0.5783381", "0.5779509" ]
0.7321445
0
Return an array of Mailchimp newsletter options.
public function get_newsletter_options() : array { $newsletters = []; $newsletter_lists = (array) $this->get_option( 'newsroom-settings', 'newsletter', 'mailchimp_lists', 'lists' ); // Loop through lists and build array. foreach ( $newsletter_lists as $list ) { $list = wp_parse_args( $list, [ 'id' => '', 'name' => '', ] ); // Validate both properties. if ( ! empty( $list['name'] ) && ! empty( $list['id'] ) ) { $newsletters[ sanitize_title( $list['name'] ) ] = $list['name']; } } return $newsletters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function mailchimpOptions()\n {\n if (!$this->mailchimpOptions) {\n return $this->defaultOptions();\n }\n\n return $this->mailchimpOptions;\n }", "public function get_newsletter_options_for_gutenberg() {\n\n\t\t// Format newsletters for Gutenberg.\n\t\t$newsletters = [];\n\t\tforeach ( (array) $this->get_newsletter_options() as $value => $label ) {\n\t\t\t$newsletters[] = [\n\t\t\t\t'value' => $value,\n\t\t\t\t'label' => $label,\n\t\t\t];\n\t\t}\n\n\t\treturn $newsletters;\n\t}", "public function provide_newsletter_options() {\n\t\twp_add_inline_script(\n\t\t\t'civil-first-fleet-admin-js',\n\t\t\tsprintf(\n\t\t\t\t'var civilNewsletterOptions = %1$s;',\n\t\t\t\twp_json_encode( $this->get_newsletter_options_for_gutenberg() )\n\t\t\t)\n\t\t);\n\t}", "public function get_options(): array\n {\n $options = empty($this->options) ? [] : $this->options;\n return array_merge([\n self::FIELD_MESSAGE => $this->get_option_default(self::FIELD_MESSAGE),\n ], $options);\n }", "public function getActiveNotificationChannelsOptions()\n {\n \treturn $this->getChannelOptions();\n }", "public function newsletterList()\n {\n return $this->ozioma->newsletter->list();\n }", "function optinpanda_subscription_services_options( $options ) {\r\n \r\n // mailchimp\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-mailchimp-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'mailchimp_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'http://kb.mailchimp.com/accounts/management/about-api-keys#Finding-or-generating-your-API-key' ),\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'The API key of your MailChimp account.', 'optinpanda' ),\r\n ),\r\n array(\r\n 'type' => 'checkbox',\r\n 'way' => 'buttons',\r\n 'name' => 'mailchimp_welcome',\r\n 'title' => __( 'Send \"Welcome\" Email', 'optinpanda' ),\r\n 'default' => true,\r\n 'hint' => __( 'Sends the Welcome Email configured in your MailChimp account after subscription (works only if the Single Opt-In set).', 'optinpanda' )\r\n ) \r\n )\r\n );\r\n\r\n // aweber\r\n\r\n if( !get_option('opanda_aweber_consumer_key', false) ) {\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-aweber-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_aweber_html'\r\n ),\r\n array(\r\n 'type' => 'textarea',\r\n 'name' => 'aweber_auth_code',\r\n 'title' => __( 'Authorization Code', 'optinpanda' ),\r\n 'hint' => __( 'The authorization code you will see after log in to your Aweber account.', 'optinpanda' )\r\n )\r\n )\r\n ); \r\n\r\n } else {\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-aweber-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_aweber_html'\r\n ) \r\n )\r\n );\r\n }\r\n\r\n // getresponse\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-getresponse-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'getresponse_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'http://support.getresponse.com/faq/where-i-find-api-key' ),\r\n 'hint' => __( 'The API key of your GetResponse account.', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n\r\n // mymail\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-mymail-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_show_mymail_html'\r\n ),\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'checkbox',\r\n 'way' => 'buttons',\r\n 'name' => 'mymail_redirect',\r\n 'title' => __( 'Redirect To Locker', 'optinpanda' ),\r\n 'hint' => sprintf( __( 'Set On to redirect the user after the email confirmation to the page where the locker located.<br />If Off, the MyMail will redirect the user to the page specified in the option <a href=\"%s\" target=\"_blank\">Newsletter Homepage</a>.', 'optinpanda' ), admin_url('options-general.php?page=newsletter-settings&settings-updated=true#frontend') )\r\n )\r\n )\r\n );\r\n\r\n // mailpoet\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-mailpoet-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opnada_show_mailpoet_html'\r\n ) \r\n )\r\n );\r\n\r\n // acumbamail\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-acumbamail-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'acumbamail_customer_id',\r\n 'title' => __( 'Customer ID', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get ID & Token</a>', 'optinpanda' ), 'https://acumbamail.com/apidoc/' ),\r\n 'hint' => __( 'The customer ID of your Acumbamail account.', 'optinpanda' )\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'acumbamail_api_token',\r\n 'title' => __( 'API Token', 'optinpanda' ),\r\n 'hint' => __( 'The API token of your Acumbamail account.', 'optinpanda' )\r\n )\r\n )\r\n );\r\n\r\n // knews\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-knews-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_show_knews_html'\r\n ),\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'checkbox',\r\n 'way' => 'buttons',\r\n 'name' => 'knews_redirect',\r\n 'title' => __( 'Redirect To Locker', 'optinpanda' ),\r\n 'hint' => __( 'Set On to redirect the user after the email confirmation to the page where the locker located.<br />If Off, the K-news will redirect the user to the home page.', 'optinpanda' )\r\n ) \r\n )\r\n ); \r\n\r\n // freshmail\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-freshmail-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'freshmail_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Keys</a>', 'optinpanda' ), 'https://app.freshmail.com/en/settings/integration/' ),\r\n 'hint' => __( 'The API Key of your FreshMail account.', 'optinpanda' )\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'freshmail_apisecret',\r\n 'title' => __( 'API Secret', 'optinpanda' ),\r\n 'hint' => __( 'The API Sercret of your FreshMail account.', 'optinpanda' )\r\n )\r\n )\r\n );\r\n\r\n // sendy\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sendy-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendy_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'The API key of your Sendy application, available in Settings.', 'optinpanda' ),\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendy_url',\r\n 'title' => __( 'Installation', 'optinpanda' ),\r\n 'hint' => __( 'An URL for your Sendy installation, <strong>http://your_sendy_installation</strong>', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n \r\n // smartemailing\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-smartemailing-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'smartemailing_username',\r\n 'title' => __( 'Username', 'optinpanda' ),\r\n 'hint' => __( 'Enter your username on SmartEmailing. Usually it is a email.', 'optinpanda' ),\r\n ), \r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'smartemailing_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'https://app.smartemailing.cz/userinfo/show/api' ),\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'The API key of your SmartEmailing account.', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n \r\n // sendinblue\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sendinblue-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendinblue_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'https://my.sendinblue.com/advanced/apikey' ),\r\n 'hint' => __( 'The API Key (version 2.0) of your Sendinblue account.', 'optinpanda' )\r\n )\r\n )\r\n );\r\n \r\n // activecampaign\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-activecampaign-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'activecampaign_apiurl',\r\n 'title' => __( 'API Url', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Url</a>', 'optinpanda' ), 'http://www.activecampaign.com/help/using-the-api/' ),\r\n 'hint' => __( 'The API Url of your ActiveCampaign account.', 'optinpanda' )\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'activecampaign_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'http://www.activecampaign.com/help/using-the-api/' ),\r\n 'hint' => __( 'The API Key of your ActiveCampaign account.', 'optinpanda' )\r\n )\r\n )\r\n ); \r\n \r\n // sendgrid\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sendgrid-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendgrid_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'https://app.sendgrid.com/settings/api_keys' ),\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'Your SendGrid API key. Grant <strong>Full Access</strong> for <strong>Mail Send</strong> and <strong>Marketing Campaigns</strong> in settings of your API key.', 'optinpanda' ),\r\n ) \r\n )\r\n );\r\n \r\n // sg autorepondeur\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sgautorepondeur-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sg_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get Code</a>', 'optinpanda' ), 'http://sg-autorepondeur.com/membre_v2/compte-options.php' ),\r\n 'title' => __( 'Activation Code', 'optinpanda' ),\r\n 'hint' => __( 'The Activation Code from your SG Autorepondeur account (<i>Mon compte -> Autres Options -> Informations administratives</i>).', 'optinpanda' ),\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sg_memberid',\r\n 'title' => __( 'Member ID', 'optinpanda' ),\r\n 'hint' => __( 'The Memeber ID of your SG Autorepondeur account (<i>available on the home page below the SG logo, for example, 9059</i>).', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n\r\n return $options;\r\n}", "private static function default_options()\n\t{\n\t\t$options = array(\n\t\t\t'jambo__send_to' => $_SERVER['SERVER_ADMIN'],\n\t\t\t'jambo__subject' => _t('[CONTACT FORM] %s', 'jambo'),\n\t\t\t'jambo__show_form_on_success' => 1,\n\t\t\t'jambo__success_msg' => _t('Thank you for your feedback. I\\'ll get back to you as soon as possible.', 'jambo'),\n\t\t\t);\n\t\treturn Plugins::filter('jambo_default_options', $options);\n\t}", "public function getActiveListenableChannelsOptions ()\n {\n \treturn $this->getChannelOptions(true, $description=false); \n }", "public static function get_options() {\n\t\treturn get_option( 'omnimailer' ) ?: self::get_default_options();\n\t}", "protected function getOptions()\r\n {\r\n return [\r\n\r\n ];\r\n }", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "protected function getOptions()\n {\n return [];\n }", "public static function getOptionsList()\n {\n $optionsArray = [\n 'banner_content' => Yii::t('app', 'Homepage banner content'),\n 'mid_content' => Yii::t('app', 'Homepage mid page content'),\n 'footer_about_us' => Yii::t('app', 'Footer About us'),\n 'footer_address' => Yii::t('app', 'Footer Address'),\n ];\n\n return $optionsArray;\n }", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n {\n return array(\n );\n }", "public function getOptions()\n {\n return array();\n }", "protected function getOptions() {\n return [];\n }", "protected function getOptions() {\n return [];\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return [\n ['name', null, InputOption::VALUE_REQUIRED, '订阅的名称', ''],\n ];\n }", "protected function getOptions()\n {\n return array(\n\n );\n }", "public function getOptions() : array;", "protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getOptions(): array\n {\n return [];\n }", "protected function getOptions(): array\n {\n return [];\n }", "public function currentMailingOptions()\n {\n $currentMailingOptions = [];\n $currentSiteProducts = $this->invoice->site->getProductPricing();\n foreach ($currentSiteProducts as $currentSiteProduct) {\n if ($currentSiteProduct->product_print_id == $this->product->product_print_id) {\n $currentMailingOptions[] = $currentSiteProduct->mailingOption;\n }\n }\n\n return collect($currentMailingOptions)->unique();\n }", "protected function _options() {\n\t\t\treturn array();\n\t\t}", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ['to', null, InputOption::VALUE_OPTIONAL, 'Wether we\\'d like to rent or park a bike', 'rent'],\n ['notify', null, InputOption::VALUE_NONE, 'Notify the response'],\n ];\n }", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions() : array\n {\n return [];\n }", "protected function getOptions() {\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected\n function getOptions() {\n return array();\n }", "protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "public static function getForOptions()\n {\n return [\n 'Buyer' => self::FOR_BUYER,\n 'Freelancer' => self::FOR_FREELANCER,\n 'Fee' => self::FOR_WAWJOB\n ];\n }", "public function options(): array\n\t{\n\t\treturn collect(trans('site::order.help.in_stock_type', []))\n\t\t\t->prepend(trans('site::messages.select_no_matter'), '')\n\t\t\t->toArray();\n\t}", "public function showOptions()\n {\n\treturn $this->getConfigData('checkout/delivery_options');\n }", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "public function getAvailableOptions(): array\n\t{\n\t\treturn [\n\t\t\t'id',\n\t\t\t'timestamp',\n\t\t\t'trigger',\n\t\t\t'progress',\n\t\t\t'assignment',\n\t\t\t'obj_type',\n\t\t\t'obj_title',\n\t\t\t'refid',\n\t\t\t'link',\n\t\t\t'parent_title',\n\t\t\t'parent_refid',\n\t\t\t'user_mail',\n\t\t\t'user_id',\n\t\t\t'user_login',\n\t\t];\n\t}", "public function getOptions();", "public function getOptions();" ]
[ "0.7125456", "0.70712036", "0.6891936", "0.6391974", "0.6320785", "0.6318037", "0.62442356", "0.6193153", "0.6085702", "0.6072265", "0.6070981", "0.60334027", "0.60334027", "0.60334027", "0.60334027", "0.60334027", "0.60334027", "0.60334027", "0.6006714", "0.6006714", "0.6006714", "0.6006714", "0.6006714", "0.6006714", "0.6006714", "0.6006714", "0.6006714", "0.6006076", "0.59964854", "0.59964854", "0.59964854", "0.5995126", "0.5987864", "0.5987864", "0.5982699", "0.5982699", "0.5982699", "0.5982699", "0.5982699", "0.5982699", "0.5982699", "0.5974723", "0.59735024", "0.59712124", "0.59648126", "0.5954424", "0.5954424", "0.5945736", "0.5944686", "0.5942108", "0.5942108", "0.5942108", "0.5942108", "0.5942108", "0.59405905", "0.5938707", "0.5938707", "0.5938707", "0.5938707", "0.5938707", "0.5938707", "0.5938707", "0.5938707", "0.5938707", "0.5938707", "0.5938707", "0.5938707", "0.5938707", "0.5934503", "0.5934503", "0.5934503", "0.5934503", "0.5934503", "0.5934503", "0.5934503", "0.5934503", "0.5934503", "0.59294224", "0.5918237", "0.58889276", "0.58889276", "0.58889276", "0.58889276", "0.58889276", "0.58889276", "0.58889276", "0.5884356", "0.586353", "0.5863397", "0.5848111", "0.5848111", "0.5848111", "0.5848111", "0.5846712", "0.58427906", "0.5840943", "0.58340186", "0.5824305", "0.57855225", "0.57855225" ]
0.7950536
0
Output the newsletter options in a format that Gutenberg can use.
public function get_newsletter_options_for_gutenberg() { // Format newsletters for Gutenberg. $newsletters = []; foreach ( (array) $this->get_newsletter_options() as $value => $label ) { $newsletters[] = [ 'value' => $value, 'label' => $label, ]; } return $newsletters; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function provide_newsletter_options() {\n\t\twp_add_inline_script(\n\t\t\t'civil-first-fleet-admin-js',\n\t\t\tsprintf(\n\t\t\t\t'var civilNewsletterOptions = %1$s;',\n\t\t\t\twp_json_encode( $this->get_newsletter_options_for_gutenberg() )\n\t\t\t)\n\t\t);\n\t}", "function printOptions()\n {\n $lines = $this->outputOptions();\n echo join( \"\\n\" , $lines );\n }", "public function showOptions()\n {\n\treturn $this->getConfigData('checkout/delivery_options');\n }", "function optinpanda_subscription_services_options( $options ) {\r\n \r\n // mailchimp\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-mailchimp-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'mailchimp_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'http://kb.mailchimp.com/accounts/management/about-api-keys#Finding-or-generating-your-API-key' ),\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'The API key of your MailChimp account.', 'optinpanda' ),\r\n ),\r\n array(\r\n 'type' => 'checkbox',\r\n 'way' => 'buttons',\r\n 'name' => 'mailchimp_welcome',\r\n 'title' => __( 'Send \"Welcome\" Email', 'optinpanda' ),\r\n 'default' => true,\r\n 'hint' => __( 'Sends the Welcome Email configured in your MailChimp account after subscription (works only if the Single Opt-In set).', 'optinpanda' )\r\n ) \r\n )\r\n );\r\n\r\n // aweber\r\n\r\n if( !get_option('opanda_aweber_consumer_key', false) ) {\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-aweber-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_aweber_html'\r\n ),\r\n array(\r\n 'type' => 'textarea',\r\n 'name' => 'aweber_auth_code',\r\n 'title' => __( 'Authorization Code', 'optinpanda' ),\r\n 'hint' => __( 'The authorization code you will see after log in to your Aweber account.', 'optinpanda' )\r\n )\r\n )\r\n ); \r\n\r\n } else {\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-aweber-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_aweber_html'\r\n ) \r\n )\r\n );\r\n }\r\n\r\n // getresponse\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-getresponse-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'getresponse_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'http://support.getresponse.com/faq/where-i-find-api-key' ),\r\n 'hint' => __( 'The API key of your GetResponse account.', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n\r\n // mymail\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-mymail-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_show_mymail_html'\r\n ),\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'checkbox',\r\n 'way' => 'buttons',\r\n 'name' => 'mymail_redirect',\r\n 'title' => __( 'Redirect To Locker', 'optinpanda' ),\r\n 'hint' => sprintf( __( 'Set On to redirect the user after the email confirmation to the page where the locker located.<br />If Off, the MyMail will redirect the user to the page specified in the option <a href=\"%s\" target=\"_blank\">Newsletter Homepage</a>.', 'optinpanda' ), admin_url('options-general.php?page=newsletter-settings&settings-updated=true#frontend') )\r\n )\r\n )\r\n );\r\n\r\n // mailpoet\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-mailpoet-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opnada_show_mailpoet_html'\r\n ) \r\n )\r\n );\r\n\r\n // acumbamail\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-acumbamail-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'acumbamail_customer_id',\r\n 'title' => __( 'Customer ID', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get ID & Token</a>', 'optinpanda' ), 'https://acumbamail.com/apidoc/' ),\r\n 'hint' => __( 'The customer ID of your Acumbamail account.', 'optinpanda' )\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'acumbamail_api_token',\r\n 'title' => __( 'API Token', 'optinpanda' ),\r\n 'hint' => __( 'The API token of your Acumbamail account.', 'optinpanda' )\r\n )\r\n )\r\n );\r\n\r\n // knews\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-knews-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'html',\r\n 'html' => 'opanda_show_knews_html'\r\n ),\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'checkbox',\r\n 'way' => 'buttons',\r\n 'name' => 'knews_redirect',\r\n 'title' => __( 'Redirect To Locker', 'optinpanda' ),\r\n 'hint' => __( 'Set On to redirect the user after the email confirmation to the page where the locker located.<br />If Off, the K-news will redirect the user to the home page.', 'optinpanda' )\r\n ) \r\n )\r\n ); \r\n\r\n // freshmail\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-freshmail-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'freshmail_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Keys</a>', 'optinpanda' ), 'https://app.freshmail.com/en/settings/integration/' ),\r\n 'hint' => __( 'The API Key of your FreshMail account.', 'optinpanda' )\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'freshmail_apisecret',\r\n 'title' => __( 'API Secret', 'optinpanda' ),\r\n 'hint' => __( 'The API Sercret of your FreshMail account.', 'optinpanda' )\r\n )\r\n )\r\n );\r\n\r\n // sendy\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sendy-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendy_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'The API key of your Sendy application, available in Settings.', 'optinpanda' ),\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendy_url',\r\n 'title' => __( 'Installation', 'optinpanda' ),\r\n 'hint' => __( 'An URL for your Sendy installation, <strong>http://your_sendy_installation</strong>', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n \r\n // smartemailing\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-smartemailing-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'smartemailing_username',\r\n 'title' => __( 'Username', 'optinpanda' ),\r\n 'hint' => __( 'Enter your username on SmartEmailing. Usually it is a email.', 'optinpanda' ),\r\n ), \r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'smartemailing_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'https://app.smartemailing.cz/userinfo/show/api' ),\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'The API key of your SmartEmailing account.', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n \r\n // sendinblue\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sendinblue-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendinblue_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'https://my.sendinblue.com/advanced/apikey' ),\r\n 'hint' => __( 'The API Key (version 2.0) of your Sendinblue account.', 'optinpanda' )\r\n )\r\n )\r\n );\r\n \r\n // activecampaign\r\n\r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-activecampaign-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'activecampaign_apiurl',\r\n 'title' => __( 'API Url', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Url</a>', 'optinpanda' ), 'http://www.activecampaign.com/help/using-the-api/' ),\r\n 'hint' => __( 'The API Url of your ActiveCampaign account.', 'optinpanda' )\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'activecampaign_apikey',\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'http://www.activecampaign.com/help/using-the-api/' ),\r\n 'hint' => __( 'The API Key of your ActiveCampaign account.', 'optinpanda' )\r\n )\r\n )\r\n ); \r\n \r\n // sendgrid\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sendgrid-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sendgrid_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get API Key</a>', 'optinpanda' ), 'https://app.sendgrid.com/settings/api_keys' ),\r\n 'title' => __( 'API Key', 'optinpanda' ),\r\n 'hint' => __( 'Your SendGrid API key. Grant <strong>Full Access</strong> for <strong>Mail Send</strong> and <strong>Marketing Campaigns</strong> in settings of your API key.', 'optinpanda' ),\r\n ) \r\n )\r\n );\r\n \r\n // sg autorepondeur\r\n \r\n $options[] = array(\r\n 'type' => 'div',\r\n 'id' => 'opanda-sgautorepondeur-options',\r\n 'class' => 'opanda-mail-service-options opanda-hidden',\r\n 'items' => array(\r\n\r\n array(\r\n 'type' => 'separator'\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sg_apikey',\r\n 'after' => sprintf( __( '<a href=\"%s\" class=\"btn btn-default\" target=\"_blank\">Get Code</a>', 'optinpanda' ), 'http://sg-autorepondeur.com/membre_v2/compte-options.php' ),\r\n 'title' => __( 'Activation Code', 'optinpanda' ),\r\n 'hint' => __( 'The Activation Code from your SG Autorepondeur account (<i>Mon compte -> Autres Options -> Informations administratives</i>).', 'optinpanda' ),\r\n ),\r\n array(\r\n 'type' => 'textbox',\r\n 'name' => 'sg_memberid',\r\n 'title' => __( 'Member ID', 'optinpanda' ),\r\n 'hint' => __( 'The Memeber ID of your SG Autorepondeur account (<i>available on the home page below the SG logo, for example, 9059</i>).', 'optinpanda' ),\r\n )\r\n )\r\n );\r\n\r\n return $options;\r\n}", "public function getOptions() {\n\t\tif ($this->row->options != '') {\n\t\t\t$options = explode(\";\", $this->row->options);\n\t\t}\n\t\tif ($this->row->intoptions != '') {\n\t\t\t$intoptions = explode(\";\", $this->row->intoptions);\n\t\t\t$options_map = array_combine($intoptions, $options);\n\t\t}\n\t\tif ($options) {\n\t\t\t$msg = \"Predefined Options:\\n\";\n\t\t\tif ($intoptions) {\n\t\t\t\tforeach ($options_map as $key => $label) {\n\t\t\t\t\t$save_link = $this->text->makeChatcmd('Select', \"/tell <myname> settings save {$this->row->name} {$key}\");\n\t\t\t\t\t$msg .= \"<tab> <highlight>{$label}<end> ({$save_link})\\n\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach ($options as $char) {\n\t\t\t\t\t$save_link = $this->text->makeChatcmd('Select', \"/tell <myname> settings save {$this->row->name} {$char}\");\n\t\t\t\t\t$msg .= \"<tab> <highlight>{$char}<end> ({$save_link})\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $msg;\n\t}", "public function admin_options() {\n\t\t\t?>\n\t\t\t\t<h3><?php esc_html_e('Cointopay Checkout', 'Cointopay'); ?></h3>\n\n\t\t\t\t<div id=\"wc_get_started\">\n\t\t\t\t<span class=\"main\"><?php esc_html_e('Provides a secure way to accept crypto currencies.', 'Cointopay'); ?></span>\n\t\t\t\t<p><a href=\"https://app.cointopay.com/index.jsp?#Register\" target=\"_blank\" class=\"button button-primary\"><?php esc_html_e('Join free', 'Cointopay'); ?></a> <a href=\"https://cointopay.com\" target=\"_blank\" class=\"button\"><?php esc_html_e('Learn more about WooCommerce and Cointopay', 'Cointopay'); ?></a></p>\n\t\t\t\t</div>\n\n\t\t\t\t<table class=\"form-table\">\n\t\t\t <?php $this->generate_settings_html(); ?>\n\t\t\t\t</table>\n\t\t\t\t<?php\n\n\t\t}", "public function admin_options() {\n\n\t\t\t?>\n\t\t\t<h3>ATOS</h3>\n\t\t\t<p><?php _e('Acceptez les paiements par carte bleue grâce à Atos.', 'woothemes'); ?></p>\n\t\t\t<p><?php _e('Plugin créé par David Fiaty', 'woothemes'); ?> - <a href=\"http://www.cmsbox.fr\">http://www.cmsbox.fr</a></p>\n\t\t\t<table class=\"form-table\">\n\t\t\t<?php\n\t\t\t\t// Generate the HTML For the settings form.\n\t\t\t\t$this->generate_settings_html();\n\t\t\t?>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<?php\n\t\t}", "protected function _toHtml() {\r\n\t\t$html = '';\r\n\t\t$link_options = self::getData('link_options');\r\n\r\n\t\tif(empty($link_options)) {\r\n\t\t\treturn $html;\r\n\t\t}\r\n\r\n\t\t$arr_options = explode(',', $link_options);\r\n\r\n\t\tif(is_array($arr_options) && count($arr_options)) {\r\n\t\t\tforeach($arr_options as $option) {\r\n\t\t\t\tSwitch ($option) {\r\n\t\t\t\t\tcase 'print':\r\n\t\t\t\t\t\t$html .= '<div><a href=\"javascript: window.print();\">Print</a></div>';;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'email':\r\n\t\t\t\t\t\t$html .= '<div><a href=\"mailto:[email protected]&subject=Inquiry\">Contact Us</a></div>';\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $html;\r\n\t}", "public function describe_client_options() {\n echo '<p>The following options configure what URL to access when a post is published in this blog.</p>';\n }", "public function admin_options() { ?>\n <h3><?php _e( 'Veritrans', 'woocommerce' ); ?></h3>\n <p><?php _e('Allows payments using Veritrans.', 'woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "public function printEmail () {\n\t\t$html = '';\n\t\t$values = $this->value();\n\t\tforeach ($this->options as $value => $label) {\n\t\t\tif ($values[$value]) {\n\t\t\t\t$html .= '<div>'.$label.'</div>';\n\t\t\t}\n\t\t}\n\t\tforeach ($this->others as $value => $label) {\n\t\t\tif ($values[$value]) {\n\t\t\t\t$html .= '<div><em>'.$label.'</em>: '.htmlentities($values[$value]).'</div>';\n\t\t\t}\n\t\t}\n\t\tif (! $html) {\n\t\t\t$html .= '<em>None</em>';\n\t\t}\n\t\treturn $html;\n\t}", "public function admin_options() {\r\n echo '<h3>' . __('Mondido', 'mondido') . '</h3>';\r\n echo '<p>' . __('Mondido, Simple payments, smart functions', 'mondido') . '</p>';\r\n echo '<table class=\"form-table\">';\r\n // Generate the HTML For the settings form.\r\n $this->generate_settings_html();\r\n echo '</table>';\r\n }", "private function renderOptions(): string\n {\n $str = '';\n if ($this->defaultText !== false) {\n $option = new OptionElement();\n $option->text = $this->defaultText;\n $option->value = $this->defaultValue;\n $str .= $option->render();\n }\n foreach ($this->arrOption as $option) {\n $this->setAutoOptionTitle($option);\n $str .= $option->render();\n }\n\n return $str;\n }", "function admin_options() {\r\n ?>\r\n <h3><?php _e('Bitcoin Payment','Bitcoin_Payment'); ?></h3>\r\n <table class=\"form-table\">\r\n <?php $this->generate_settings_html(); ?>\r\n </table> <?php\r\n }", "public function admin_options() {\n?>\n\t\t<h3><?php _e('Authorize SIM', WC_Authorize_SIM::TEXT_DOMAIN); ?></h3>\n \t<p><?php _e('Authorize SIM works by sending the user to Authorize to enter their payment information.', WC_Authorize_SIM::TEXT_DOMAIN); ?></p>\n \t<div class=\"updated\"><p>\n \t\t<strong><?php _e('Authorize.Net config:', WC_Authorize_SIM::TEXT_DOMAIN) ?></strong>\n \t\t<?php _e( 'Please login to Authorize and go to Account >> Settings >> Response/Receipt URLs' ); ?>\n \t\t<ol>\n\t \t\t<li><?php _e( 'Click \"Add URL\", and set this value for URL textbox: ') ?><strong><?php echo $this->notify_url ?></strong></li>\n\t \t\t<li><?php _e( 'Click \"Submit\" to complete', WC_Authorize_SIM::TEXT_DOMAIN ) ?></li>\n \t\t</ol>\n \t</p></div>\n \t<table class=\"form-table\">\n \t\t<?php $this->generate_settings_html(); ?>\n\t\t</table><!--/.form-table--> \t\n<?php\n }", "function print_options(){\n\t\tforeach ($this->options as $value) {\n\t\t\t$this->print_option($value);\n\t\t}\n\t}", "public function admin_options(){\r\n echo '<h3>'.__('Netgíró Payment Gateway', 'netgiro').'</h3>';\r\n echo '<p>'.__('Verslaðu á netinu með Netgíró á einfaldan hátt.').'</p>';\r\n echo '<table class=\"form-table\">';\r\n $this -> generate_settings_html();\r\n echo '</table>';\r\n }", "public function admin_options() { ?>\n <h3><?php _e( $this->pluginTitle(), 'midtrans-woocommerce' ); ?></h3>\n <p><?php _e($this->getSettingsDescription(), 'midtrans-woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "final public function print_editor_options() {\r\n\t\tob_start(); ?>\r\n\t\t<div class=\"field-settings-wrapper\" v-if=\"field.type == '<?php echo esc_attr( $this->props['type'] ) ?>'\">\r\n\t\t\t<?php $this->get_editor_options(); ?>\r\n\t\t\t<?php $this->get_visibility_settings() ?>\r\n\t\t</div>\r\n\t\t<?php return ob_get_clean();\r\n\t}", "public function paml_additional_options() {\n\t\tglobal $paml_options;\n\n\t\t$multisite_reg = get_site_option( 'registration' );\n\n\t\techo '<div id=\"additional-settings\">';\n\n\t\tif ( ( get_option( 'users_can_register' ) && ! is_multisite() ) || ( $multisite_reg == 'all' || $multisite_reg == 'blog' || $multisite_reg == 'user' ) )\n\t\t\techo '<a href=\"#register\" class=\"modal-login-nav\">' . __( 'Register', 'pressapps' ) . '</a> | ';\n\n\t\techo '<a href=\"#forgotten\" class=\"modal-login-nav\">' . __( 'Lost your password?', 'pressapps' ) . '</a>';\n\n\t\techo '<div class=\"hide-login\"> | <a href=\"#login\" class=\"modal-login-nav\">' . __( 'Back to Login', 'pressapps' ) . '</a></div>';\n\n\t\techo '</div>';\n\t}", "public function get_newsletter_options() : array {\n\t\t$newsletters = [];\n\t\t$newsletter_lists = (array) $this->get_option( 'newsroom-settings', 'newsletter', 'mailchimp_lists', 'lists' );\n\n\t\t// Loop through lists and build array.\n\t\tforeach ( $newsletter_lists as $list ) {\n\t\t\t$list = wp_parse_args(\n\t\t\t\t$list,\n\t\t\t\t[\n\t\t\t\t\t'id' => '',\n\t\t\t\t\t'name' => '',\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t// Validate both properties.\n\t\t\tif (\n\t\t\t\t! empty( $list['name'] )\n\t\t\t\t&& ! empty( $list['id'] )\n\t\t\t) {\n\t\t\t\t$newsletters[ sanitize_title( $list['name'] ) ] = $list['name'];\n\t\t\t}\n\t\t}\n\n\t\treturn $newsletters;\n\t}", "public function admin_options() {\n\n\t\t?>\n\t\t<h3><?php _e( 'PayU standard', 'woocommerce' ); ?></h3>\n\t\t<p><?php _e( 'PayU standard works by sending the user to PayU to enter their payment information.', 'woocommerce' ); ?></p>\n\n \t<?php if ( $this->is_valid_for_use() ) : ?>\n\n\t\t\t<table class=\"form-table\">\n\t\t\t<?php $this->generate_settings_html(); ?>\n\t\t\t</table><!--/.form-table-->\n\n\t\t<?php else : ?>\n <div class=\"inline error\"><p><strong><?php _e( 'Gateway Disabled', 'woocommerce' ); ?></strong>: <?php _e( 'PayU does not support your store currency.', 'woocommerce' ); ?></p></div>\n\t\t<?php\n\t\t\tendif;\n\t}", "public function pageBudgetmailer()\n {\n print new Template( 'options' );\n }", "public function admin_options() { ?>\n <h3><?php _e( $this->pluginTitle(), 'midtrans-woocommerce' ); ?></h3>\n <p><?php _e('Allows payments using Midtrans.', 'midtrans-woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form. generated from `init_form_fields`\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "function options_page() {\n\t\t$settings = __( 'AdControl Settings', 'adcontrol' );\n\t\t$notice = sprintf(\n\t\t\t__( 'AdControl requires %sJetpack%s to be installed and connected at this time. %sHelp getting started.%s', 'adcontrol' ),\n\t\t\t'<a href=\"https://jetpack.com/\" target=\"_blank\">', '</a>',\n\t\t\t'<a href=\"https://jetpack.com/support/getting-started-with-jetpack/\" target=\"_blank\">', '</a>'\n\t\t);\n\n\t\techo <<<HTML\n\t\t<div class=\"wrap\">\n\t\t\t<div id=\"icon-options-general\" class=\"icon32\"><br></div>\n\t\t\t<h2>$settings</h2>\n\t\t\t<p>$notice</p>\n\t\t</div>\nHTML;\n\t}", "function simplenews_admin_settings_newsletter($form, &$form_state) {\n $address_default = variable_get('site_mail', ini_get('sendmail_from'));\n $form = array();\n\n $form['simplenews_default_options'] = array(\n '#type' => 'fieldset',\n '#title' => t('Default newsletter options'),\n '#collapsible' => FALSE,\n '#description' => t('These options will be the defaults for new newsletters, but can be overridden in the newsletter editing form.'),\n );\n $links = array('!mime_mail_url' => 'http://drupal.org/project/mimemail', '!html_url' => 'http://drupal.org/project/htmlmail');\n $description = t('Default newsletter format. Install <a href=\"!mime_mail_url\">Mime Mail</a> module or <a href=\"!html_url\">HTML Mail</a> module to send newsletters in HTML format.', $links);\n $form['simplenews_default_options']['simplenews_format'] = array(\n '#type' => 'select',\n '#title' => t('Format'),\n '#options' => simplenews_format_options(),\n '#description' => $description,\n '#default_value' => variable_get('simplenews_format', 'plain'),\n );\n // @todo Do we need these master defaults for 'priority' and 'receipt'?\n $form['simplenews_default_options']['simplenews_priority'] = array(\n '#type' => 'select',\n '#title' => t('Priority'),\n '#options' => simplenews_get_priority(),\n '#description' => t('Note that email priority is ignored by a lot of email programs.'),\n '#default_value' => variable_get('simplenews_priority', SIMPLENEWS_PRIORITY_NONE),\n );\n $form['simplenews_default_options']['simplenews_receipt'] = array(\n '#type' => 'checkbox',\n '#title' => t('Request receipt'),\n '#default_value' => variable_get('simplenews_receipt', 0),\n '#description' => t('Request a Read Receipt from your newsletters. A lot of email programs ignore these so it is not a definitive indication of how many people have read your newsletter.'),\n );\n $form['simplenews_default_options']['simplenews_send'] = array(\n '#type' => 'radios',\n '#title' => t('Default send action'),\n '#options' => array(\n SIMPLENEWS_COMMAND_SEND_TEST => t('Send one test newsletter to the test address'),\n SIMPLENEWS_COMMAND_SEND_NOW => t('Send newsletter'),\n ),\n '#default_value' => variable_get('simplenews_send', 0),\n );\n $form['simplenews_test_address'] = array(\n '#type' => 'fieldset',\n '#title' => t('Test addresses'),\n '#collapsible' => FALSE,\n '#description' => t('Supply a comma-separated list of email addresses to be used as test addresses. The override function allows to override these addresses in the newsletter editing form.'),\n );\n $form['simplenews_test_address']['simplenews_test_address'] = array(\n '#type' => 'textfield',\n '#title' => t('Email address'),\n '#size' => 60,\n '#maxlength' => 128,\n '#default_value' => variable_get('simplenews_test_address', $address_default),\n );\n $form['simplenews_test_address']['simplenews_test_address_override'] = array(\n '#type' => 'checkbox',\n '#title' => t('Allow test address override'),\n '#default_value' => variable_get('simplenews_test_address_override', 0),\n );\n $form['simplenews_sender_info'] = array(\n '#type' => 'fieldset',\n '#title' => t('Sender information'),\n '#collapsible' => FALSE,\n '#description' => t('Default sender address that will only be used for confirmation emails. You can specify sender information for each newsletter separately on the newsletter\\'s settings page.'),\n );\n $form['simplenews_sender_info']['simplenews_from_name'] = array(\n '#type' => 'textfield',\n '#title' => t('From name'),\n '#size' => 60,\n '#maxlength' => 128,\n '#default_value' => variable_get('simplenews_from_name', variable_get('site_name', 'Drupal')),\n );\n $form['simplenews_sender_info']['simplenews_from_address'] = array(\n '#type' => 'textfield',\n '#title' => t('From email address'),\n '#size' => 60,\n '#maxlength' => 128,\n '#required' => TRUE,\n '#default_value' => variable_get('simplenews_from_address', $address_default),\n );\n\n return system_settings_form($form);\n}", "public function admin_options() {\n\t\t\t?>\n\t\t\t<img style=\"float:right\" src=\"<?php echo plugin_dir_url(__FILE__); ?>coinsimple.png\" />\n\t\t\t<h3><?php _e('CoinSimple', 'woocommerce');?></h3>\n\n\t\t\t<table class=\"form-table\">\n\t\t\t\t<?php $this->generate_settings_html(); ?>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<?php\n\t\t}", "public function admin_options() {\n\n echo '<h3>'.__('MTN Mobile Money Settings', 'woocommerce').'</h3>';\n echo '<table class=\"form-table\">';\n\n $this->generate_settings_html();\n echo '</table>';\n }", "function generate_option_text( $subscription ) {\n\t$base_text = sprintf( esc_html__( '#%1$d - every %2$s - next: %3$s', 'jg-toolbox' ), $subscription->get_id(), wcs_get_subscription_period_strings( $subscription->get_billing_interval(), $subscription->get_billing_period() ), date_i18n( wc_date_format(), $subscription->get_time( 'next_payment' ) ) );\n\n\treturn $base_text;\n}", "function ac_nl_settings_page() {\n\t?>\n\t<div class=\"wrap\">\n\t\t<h2>Newsletter Subscription plugin settings</h2>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t <?php settings_fields( 'ac-nl-settings-group' ); ?>\n\t\t <?php do_settings_sections( 'ac-nl-settings-group' ); ?>\n\t\t <table class=\"form-table\">\n\t\t <tr valign=\"top\">\n\t\t\t <th scope=\"row\">API Key</th>\n\t\t\t <td><input type=\"text\" name=\"ac_nl_api_key\" value=\"<?php echo esc_attr( get_option( 'ac_nl_api_key' ) ); ?>\" /></td>\n\t\t </tr> \n\t\t <tr valign=\"top\">\n\t\t\t <th scope=\"row\">List ID</th>\n\t\t\t <td><input type=\"number\" name=\"ac_nl_list_id\" value=\"<?php echo esc_attr( get_option( 'ac_nl_list_id' ) ); ?>\" /></td>\n\t\t </tr>\n\t\t </table> \n\t\t <?php submit_button(); ?>\n\t\t</form>\n\t</div>\n<?php }", "public function render_settings_section() {\n\t\tprintf( __( 'Insert your %s license information to enable future updates (including bug fixes and new features) and gain access to support.', $this->text_domain ), $this->product_name );\n\t}", "public function admin_options()\n {\n ?>\n <h3><?php _e('PAYSTO', 'woocommerce'); ?></h3>\n <p><?php _e('Settings payment recieve from PAYSTO system.', 'woocommerce'); ?></p>\n\n <?php if ($this->is_valid_for_use()): ?>\n\n <table class=\"form-table\">\n\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n\n <?php else: ?>\n <div class=\"inline error\"><p>\n <strong><?php _e('Gate swich off', 'woocommerce'); ?></strong>:\n <?php _e('PAYSTO not support currency used in your store.', 'woocommerce'); ?>\n </p></div>\n <?php\n endif;\n\n }", "public function admin_options() {\n \t\t?>\n \t\t<thead><tr><th scope=\"col\" width=\"200px\"><?php echo apply_filters( 'tgm_jigoshop_custom_gateway_title', 'Client Payments' ); ?></th><th scope=\"col\" class=\"desc\"><?php echo apply_filters( 'tgm_jigoshop_custom_gateway_description', 'This payment gateway is setup specifically for client billing accounts. Orders will be processed and billed directly to existing client accounts.' ); ?></th></tr></thead>\n \t\t<tr>\n\t \t<td class=\"titledesc\"><?php echo apply_filters( 'tgm_jigoshop_enable_custom_gateway_title', 'Enable Client Payments?' ) ?>:</td>\n\t \t\t<td class=\"forminp\">\n\t\t \t\t<select name=\"jigoshop_tgm_custom_gateway_enabled\" id=\"jigoshop_tgm_custom_gateway_enabled\" style=\"min-width:100px;\">\n\t\t \t\t<option value=\"yes\" <?php if ( get_option( 'jigoshop_tgm_custom_gateway_enabled' ) == 'yes' ) echo 'selected=\"selected\"'; ?>><?php _e( 'Yes', 'jigoshop' ); ?></option>\n\t\t \t\t<option value=\"no\" <?php if ( get_option( 'jigoshop_tgm_custom_gateway_enabled' ) == 'no' ) echo 'selected=\"selected\"'; ?>><?php _e( 'No', 'jigoshop' ); ?></option>\n\t\t \t\t</select>\n\t \t\t</td>\n\t \t</tr>\n\t \t<tr>\n\t \t<td class=\"titledesc\"><a href=\"#\" tip=\"<?php echo apply_filters( 'tgm_jigoshop_method_tooltip_description', 'This controls the title which the user sees during checkout.' ); ?>\" class=\"tips\" tabindex=\"99\"></a><?php echo apply_filters( 'tgm_jigoshop_method_tooltip_title', 'Method Title' ) ?>:</td>\n\t \t\t<td class=\"forminp\">\n\t\t \t\t<input class=\"input-text\" type=\"text\" name=\"jigoshop_tgm_custom_gateway_title\" id=\"jigoshop_tgm_custom_gateway_title\" value=\"<?php if ( $value = get_option( 'jigoshop_tgm_custom_gateway_title' ) ) echo $value; else echo 'Client Payments'; ?>\" />\n\t \t\t</td>\n\t \t</tr>\n\t \t<tr>\n\t \t<td class=\"titledesc\"><a href=\"#\" tip=\"<?php echo apply_filters( 'tgm_jigoshop_message_tooltip_description', 'This message lets the customer know that the order and total will be processed to their billing account.' ); ?>\" class=\"tips\" tabindex=\"99\"></a><?php echo apply_filters( 'tgm_jigoshop_message_tooltip_title', 'Customer Message' ) ?>:</td>\n\t \t\t<td class=\"forminp\">\n\t\t \t\t<input class=\"input-text wide-input\" type=\"text\" name=\"jigoshop_tgm_custom_gateway_description\" id=\"jigoshop_tgm_custom_gateway_description\" value=\"<?php if ( $value = get_option( 'jigoshop_tgm_custom_gateway_description' ) ) echo $value; ?>\" />\n\t \t\t</td>\n\t \t</tr>\n\n \t\t<?php\n \t}", "public function jltma_mcb_export_settings() {\n\n $export_options = [];\n $options = wp_load_alloptions();\n foreach($options as $option_name => $option_value) {\n if(preg_match('/jltma_mcb/', $option_name)) {\n $export_options[$option_name] = $option_value;\n }\n }\n $export_options[\"jltma_mcb\"] = file_get_contents( JLTMA_MCB_PLUGIN_PATH . '/custom_breakpoints.json');\n\n header(\"Content-type: text/plain\");\n header(\"Content-Disposition: attachment; filename=master_custom_breakpoints_backup.json\");\n\n echo json_encode($export_options);\n\n }", "function bb_print_mystique_option( $option ) {\r\n\techo bb_get_mystique_option( $option );\r\n}", "private static function default_options()\n\t{\n\t\t$options = array(\n\t\t\t'jambo__send_to' => $_SERVER['SERVER_ADMIN'],\n\t\t\t'jambo__subject' => _t('[CONTACT FORM] %s', 'jambo'),\n\t\t\t'jambo__show_form_on_success' => 1,\n\t\t\t'jambo__success_msg' => _t('Thank you for your feedback. I\\'ll get back to you as soon as possible.', 'jambo'),\n\t\t\t);\n\t\treturn Plugins::filter('jambo_default_options', $options);\n\t}", "public function updateOptions()\r\n {\r\n if ($_SERVER['REQUEST_METHOD'] !== 'POST')\r\n return;\r\n\r\n update_option('ohs_newsletter_sendgrid_api', $_POST['ohs_newsletter_sendgrid_api']);\r\n update_option('ohs_newsletter_sendgrid_list', $_POST['ohs_newsletter_sendgrid_list']);\r\n update_option('ohs_newsletter_redirect', $_POST['ohs_newsletter_redirect']);\r\n }", "function skcw_options() {\n\t$template_path = get_option('skcw_template_directory');\n\t$templates = get_option('skcw_templates_list');\n\n\tif ( isset($_GET['skcw_message']) ) {\n\t\tswitch($_GET['skcw_message']) {\n\t\t\tcase 'updated':\n\t\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\tjQuery(document).ready(function() {\n\t\t\t\t\t\tjQuery(\"#skcw_updated\").show();\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t\t<?php\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tinclude(SKCW_DIR.'views/options-view.php');\n}", "public function render()\n {\n $out = [];\n $optionInfo = [];\n\n if ($this->title) {\n $out['title'] = $this->title;\n }\n\n if ($this->description) {\n $out['description'] = $this->description;\n }\n\n if ($this->footer) {\n $out['footer'] = $this->footer;\n }\n\n if ($this->imageUrl) {\n $out['image'] = [\n 'url' => $this->imageUrl,\n 'accessibilityText' => ($this->accessibilityText) ? $this->accessibilityText : 'accessibility text',\n ];\n }\n\n $out['openUrlAction'] = [\n 'url' => $this->openUrlAction,\n ];\n\n return $out;\n }", "public function actionMyOptions()\n {\n echo \"option1 - $this->option1\\n\\roption2 - $this->option2\\n\\rcolor - $this->color\\n\\r\";\n }", "public function theme_options($options){\n\n\t\t$options[] = array(\n\t\t\t'name' => 'Legal Information',\n\t\t\t'desc' => '',\n\t\t\t'type' => 'info'\n\t\t);\n\t\t$options[] = array(\n\t\t\t'name' => __( 'Company Name', 'waboot' ),\n\t\t\t'desc' => __( '[wb_legal_name]', 'waboot' ),\n\t\t\t'id' => $this->name.'_company_name',\n\t\t\t'std' => '',\n\t\t\t'type' => 'text'\n\t\t);\n\t\t$options[] = array(\n\t\t\t'name' => __( 'Company Address', 'waboot' ),\n\t\t\t'desc' => __( '[wb_legal_address]', 'waboot' ),\n\t\t\t'id' => $this->name.'_address',\n\t\t\t'std' => '',\n\t\t\t'type' => 'text',\n\t\t);\n\t\t$options[] = array(\n\t\t\t'name' => __( 'Company Mail', 'waboot' ),\n\t\t\t'desc' => __( '[wb_legal_mail]', 'waboot' ),\n\t\t\t'id' => $this->name.'_mail',\n\t\t\t'std' => '',\n\t\t\t'type' => 'text'\n\t\t);\n\t\t$options[] = array(\n\t\t\t'name' => __( 'Company Telephone', 'waboot' ),\n\t\t\t'desc' => __( '[wb_legal_tel]', 'waboot' ),\n\t\t\t'id' => $this->name.'_tel',\n\t\t\t'std' => '',\n\t\t\t'type' => 'text'\n\t\t);\n\t\t$options[] = array(\n\t\t\t'name' => __( 'Domain Name', 'waboot' ),\n\t\t\t'desc' => __( '[wb_legal_siteurl]', 'waboot' ),\n\t\t\t'id' => $this->name.'_siteurl',\n\t\t\t'std' => preg_replace('/http:\\/\\//', '', get_bloginfo('url') ),\n\t\t\t'type' => 'text'\n\t\t);\n\t\t$options[] = array(\n\t\t\t'name' => __( 'Legal Representative', 'waboot' ),\n\t\t\t'desc' => __( '[wb_legal_rep]', 'waboot' ),\n\t\t\t'id' => $this->name.'_rep',\n\t\t\t'std' => '',\n\t\t\t'type' => 'text'\n\t\t);\n\n\t\treturn $options;\n\t}", "public function getGreetingsOptions()\r\n {\r\n $offlineMessage = $this->jsQuoteEscape($this->escapeHtml($this->getChatHelper()->getOfflineMessage()));\r\n $onlineMessage = $this->jsQuoteEscape($this->escapeHtml($this->getChatHelper()->getOnlineMessage()));\r\n\r\n $data = array();\r\n (!empty($onlineMessage )) ? $data[] = \"'online': '\" . $onlineMessage . \"'\" : null;\r\n (!empty($offlineMessage)) ? $data[] = \"'offline': '\" . $offlineMessage . \"'\" : null;\r\n\r\n if (count($data) > 0) {\r\n $data = implode(',',$data);\r\n return \"\\$zopim.livechat.setGreetings({\" . $data . \"});\" . \"\\n\";\r\n }\r\n return null;\r\n }", "function SetupExportOptions() {\n\t\tglobal $Language;\n\n\t\t// Printer friendly\n\t\t$item = &$this->ExportOptions->Add(\"print\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportPrintUrl . \"\\\" class=\\\"ewExportLink ewPrint\\\" title=\\\"\" . ew_HtmlEncode($Language->Phrase(\"PrinterFriendlyText\")) . \"\\\" data-caption=\\\"\" . ew_HtmlEncode($Language->Phrase(\"PrinterFriendlyText\")) . \"\\\">\" . $Language->Phrase(\"PrinterFriendly\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\n\t\t// Export to Excel\n\t\t$item = &$this->ExportOptions->Add(\"excel\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportExcelUrl . \"\\\" class=\\\"ewExportLink ewExcel\\\" title=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToExcelText\")) . \"\\\" data-caption=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToExcelText\")) . \"\\\">\" . $Language->Phrase(\"ExportToExcel\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\n\t\t// Export to Word\n\t\t$item = &$this->ExportOptions->Add(\"word\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportWordUrl . \"\\\" class=\\\"ewExportLink ewWord\\\" title=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToWordText\")) . \"\\\" data-caption=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToWordText\")) . \"\\\">\" . $Language->Phrase(\"ExportToWord\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Export to Html\n\t\t$item = &$this->ExportOptions->Add(\"html\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportHtmlUrl . \"\\\" class=\\\"ewExportLink ewHtml\\\" title=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToHtmlText\")) . \"\\\" data-caption=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToHtmlText\")) . \"\\\">\" . $Language->Phrase(\"ExportToHtml\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Export to Xml\n\t\t$item = &$this->ExportOptions->Add(\"xml\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportXmlUrl . \"\\\" class=\\\"ewExportLink ewXml\\\" title=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToXmlText\")) . \"\\\" data-caption=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToXmlText\")) . \"\\\">\" . $Language->Phrase(\"ExportToXml\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Export to Csv\n\t\t$item = &$this->ExportOptions->Add(\"csv\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportCsvUrl . \"\\\" class=\\\"ewExportLink ewCsv\\\" title=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToCsvText\")) . \"\\\" data-caption=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToCsvText\")) . \"\\\">\" . $Language->Phrase(\"ExportToCsv\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\n\t\t// Export to Pdf\n\t\t$item = &$this->ExportOptions->Add(\"pdf\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportPdfUrl . \"\\\" class=\\\"ewExportLink ewPdf\\\" title=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToPDFText\")) . \"\\\" data-caption=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToPDFText\")) . \"\\\">\" . $Language->Phrase(\"ExportToPDF\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Export to Email\n\t\t$item = &$this->ExportOptions->Add(\"email\");\n\t\t$url = \"\";\n\t\t$item->Body = \"<button id=\\\"emf_users\\\" class=\\\"ewExportLink ewEmail\\\" title=\\\"\" . $Language->Phrase(\"ExportToEmailText\") . \"\\\" data-caption=\\\"\" . $Language->Phrase(\"ExportToEmailText\") . \"\\\" onclick=\\\"ew_EmailDialogShow({lnk:'emf_users',hdr:ewLanguage.Phrase('ExportToEmailText'),f:document.fuserslist,sel:false\" . $url . \"});\\\">\" . $Language->Phrase(\"ExportToEmail\") . \"</button>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Drop down button for export\n\t\t$this->ExportOptions->UseButtonGroup = TRUE;\n\t\t$this->ExportOptions->UseImageAndText = TRUE;\n\t\t$this->ExportOptions->UseDropDownButton = TRUE;\n\t\tif ($this->ExportOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ExportOptions->UseDropDownButton = TRUE;\n\t\t$this->ExportOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonExport\");\n\n\t\t// Add group option item\n\t\t$item = &$this->ExportOptions->Add($this->ExportOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "function bbps_add_options() {\n\n\t// Default options\n\t$options = array (\n\t//user counts and titles\n\t\t// The default display for topic status we used not resolved as default\n\t\t'_bbps_default_status' => '1',\n\t\t//enable user post count display\n\t\t'_bbps_enable_post_count' => '1',\n\t\t//enable user rank\n\t\t'_bbps_enable_user_rank' => '1',\n\t\t//defaults for who can change the topic status\n\t\t'_bbps_status_permissions' => '',\n\t\t// the reply counts / boundaries for the custom forum poster titles this has no default as the user must set these\n\t\t'_bbps_reply_count' => '',\n\t\t//the status people want to show on their topics.\n\t\t'_bbps_used_status' => '',\n\t\t//give admin and forum moderators the ability to move topics into other forums default = enabled\n\t\t'_bbps_enable_topic_move' => '1',\n\t\t//urgent topics\n\t\t'_bbps_status_permissions_urgent' => '',\n\t\t//do a color change for resolved topics\n\t\t//'_bbps_status_color_change' => '1',\n\t);\n\t// Add default options\n\tforeach ( $options as $key => $value )\n\t\tadd_option( $key, $value );\n\n}", "function sailthru_scout_options_callback() {\n\techo '<p>Scout is an on-site tool that displays relevant content to users when viewing a particular page.</p>';\n}", "function wpmantis_update_options()\n{\n\t$options = get_option('wp_mantis_options');\n\n\t$options['mantis_user'] = $_REQUEST['mantis_user'];\n\t$options['mantis_password'] = $_REQUEST['mantis_password'];\n\t$options['mantis_soap_url'] = $_REQUEST['mantis_soap_url'];\n\t$options['mantis_base_url'] = $_REQUEST['mantis_base_url'];\n\t$options['mantis_max_desc_lenght'] = $_REQUEST['mantis_max_desc_lenght'];\n\t$options['mantis_enable_pagination'] = isset($_REQUEST['mantis_enable_pagination']);\n\t$options['mantis_bugs_per_page'] = $_REQUEST['mantis_bugs_per_page'];\n\t$options['mantis_colors'] = $_REQUEST['color'];\n\t\n\t//Check to see that the base URL ends with a trailing slash if not, add it\n\tif (substr($options['mantis_base_url'], -1, 1) != '/') { $options['mantis_base_url'] .= '/'; }\n\n\tupdate_option('wp_mantis_options', $options);\n\n\t?>\n\t<div id=\"message\" class=\"updated fade\">\n\t<p><?php _e('Options saved.', 'wp-mantis'); ?></p>\n\t</div>\n\t<?php\n}", "function HERITAGE_general_options_callback() {\n ?>\n <p>\n <?php echo esc_html__('Setup custom logo.', 'heritage'); ?>\n </p>\n <?php\n /*print theme settings*/\n if (LC_SWP_PRINT_SETTINGS) {\n $general = get_option('heritage_theme_general_options');\n\n ?>\n <pre>heritage_theme_general_options:\n\t\t\t<?php echo (json_encode($general)); ?>\n\t\t</pre>\n <?php\n }\n}", "function SetupExportOptions() {\r\n\t\tglobal $Language;\r\n\r\n\t\t// Printer friendly\r\n\t\t$item = &$this->ExportOptions->Add(\"print\");\r\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportPrintUrl . \"\\\" class=\\\"ewExportLink ewPrint\\\" title=\\\"\" . ew_HtmlEncode($Language->Phrase(\"PrinterFriendlyText\")) . \"\\\" data-caption=\\\"\" . ew_HtmlEncode($Language->Phrase(\"PrinterFriendlyText\")) . \"\\\">\" . $Language->Phrase(\"PrinterFriendly\") . \"</a>\";\r\n\t\t$item->Visible = TRUE;\r\n\r\n\t\t// Export to Excel\r\n\t\t$item = &$this->ExportOptions->Add(\"excel\");\r\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportExcelUrl . \"\\\" class=\\\"ewExportLink ewExcel\\\" title=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToExcelText\")) . \"\\\" data-caption=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToExcelText\")) . \"\\\">\" . $Language->Phrase(\"ExportToExcel\") . \"</a>\";\r\n\t\t$item->Visible = TRUE;\r\n\r\n\t\t// Export to Word\r\n\t\t$item = &$this->ExportOptions->Add(\"word\");\r\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportWordUrl . \"\\\" class=\\\"ewExportLink ewWord\\\" title=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToWordText\")) . \"\\\" data-caption=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToWordText\")) . \"\\\">\" . $Language->Phrase(\"ExportToWord\") . \"</a>\";\r\n\t\t$item->Visible = TRUE;\r\n\r\n\t\t// Export to Html\r\n\t\t$item = &$this->ExportOptions->Add(\"html\");\r\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportHtmlUrl . \"\\\" class=\\\"ewExportLink ewHtml\\\" title=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToHtmlText\")) . \"\\\" data-caption=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToHtmlText\")) . \"\\\">\" . $Language->Phrase(\"ExportToHtml\") . \"</a>\";\r\n\t\t$item->Visible = TRUE;\r\n\r\n\t\t// Export to Xml\r\n\t\t$item = &$this->ExportOptions->Add(\"xml\");\r\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportXmlUrl . \"\\\" class=\\\"ewExportLink ewXml\\\" title=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToXmlText\")) . \"\\\" data-caption=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToXmlText\")) . \"\\\">\" . $Language->Phrase(\"ExportToXml\") . \"</a>\";\r\n\t\t$item->Visible = TRUE;\r\n\r\n\t\t// Export to Csv\r\n\t\t$item = &$this->ExportOptions->Add(\"csv\");\r\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportCsvUrl . \"\\\" class=\\\"ewExportLink ewCsv\\\" title=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToCsvText\")) . \"\\\" data-caption=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToCsvText\")) . \"\\\">\" . $Language->Phrase(\"ExportToCsv\") . \"</a>\";\r\n\t\t$item->Visible = TRUE;\r\n\r\n\t\t// Export to Pdf\r\n\t\t$item = &$this->ExportOptions->Add(\"pdf\");\r\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportPdfUrl . \"\\\" class=\\\"ewExportLink ewPdf\\\" title=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToPDFText\")) . \"\\\" data-caption=\\\"\" . ew_HtmlEncode($Language->Phrase(\"ExportToPDFText\")) . \"\\\">\" . $Language->Phrase(\"ExportToPDF\") . \"</a>\";\r\n\t\t$item->Visible = TRUE;\r\n\r\n\t\t// Export to Email\r\n\t\t$item = &$this->ExportOptions->Add(\"email\");\r\n\t\t$url = \"\";\r\n\t\t$item->Body = \"<button id=\\\"emf_tutores\\\" class=\\\"ewExportLink ewEmail\\\" title=\\\"\" . $Language->Phrase(\"ExportToEmailText\") . \"\\\" data-caption=\\\"\" . $Language->Phrase(\"ExportToEmailText\") . \"\\\" onclick=\\\"ew_EmailDialogShow({lnk:'emf_tutores',hdr:ewLanguage.Phrase('ExportToEmailText'),f:document.ftutoresview,key:\" . ew_ArrayToJsonAttr($this->RecKey) . \",sel:false\" . $url . \"});\\\">\" . $Language->Phrase(\"ExportToEmail\") . \"</button>\";\r\n\t\t$item->Visible = FALSE;\r\n\r\n\t\t// Drop down button for export\r\n\t\t$this->ExportOptions->UseButtonGroup = TRUE;\r\n\t\t$this->ExportOptions->UseImageAndText = TRUE;\r\n\t\t$this->ExportOptions->UseDropDownButton = TRUE;\r\n\t\tif ($this->ExportOptions->UseButtonGroup && ew_IsMobile())\r\n\t\t\t$this->ExportOptions->UseDropDownButton = TRUE;\r\n\t\t$this->ExportOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonExport\");\r\n\r\n\t\t// Add group option item\r\n\t\t$item = &$this->ExportOptions->Add($this->ExportOptions->GroupOptionName);\r\n\t\t$item->Body = \"\";\r\n\t\t$item->Visible = FALSE;\r\n\r\n\t\t// Hide options for export\r\n\t\tif ($this->Export <> \"\")\r\n\t\t\t$this->ExportOptions->HideAllOptions();\r\n\t}", "function _echo( $option_key ) {\n\t\tbf_echo_option( $option_key, $this->option_panel_id );\n\t}", "public function display_options_page() {\n\t\t?>\n\t\t<div class=\"wrap ee-breakouts-admin\">\n\t\t\t<div id=\"icon-options-general\" class=\"icon32\"></div>\n\t\t\t<h2><?php _e('EE Breakouts Settings', 'event_espresso'); ?></h2>\n\t\t\t<div id=\"poststuff\">\n\t\t\t\t<div id=\"post-body-content\">\n\t\t\t\t\t<div class=\"form-wrap\">\n\t\t\t\t\t\t<form action=\"options.php\" method=\"post\">\n\t\t\t\t\t\t\t<?php settings_fields('ee_breakout_options'); ?>\n\t\t\t\t\t\t\t<?php do_settings_sections('ee_breakouts_admin'); ?>\n\t\t\t\t\t\t\t<span class=\"submit\">\n\t\t\t\t\t\t\t\t<input type=\"submit\" class=\"button primary-button\" name=\"update_ee_breakout_options\" value=\"Save Options\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</div> <!-- end .form-wrap -->\n\t\t\t\t</div> <!-- end #post-body-content -->\n\t\t\t</div> <!-- end #poststuff -->\n\t\t</div> <!-- end .wrap -->\n\t\t<?php\n\t}", "function wpbs_echo_option()\n {\n include wpbs_advs_plugin_dir . 'admin/view/adminLayout.php';\n }", "public function admin_options() {\n\n ?>\n <h3>交通银行支付平台</h3>\n \n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "function inkpro_add_blog_display_options( $options ) {\r\n\r\n\t$new_options = array(\r\n\t\t'standard' => esc_html__( 'Standard', 'inkpro' ),\r\n\t\t'grid' => esc_html__( 'Square grid', 'inkpro' ),\r\n\t\t'grid3' => esc_html__( 'Portrait grid', 'inkpro' ),\r\n\t\t'column' => esc_html__( 'Columns', 'inkpro' ),\r\n\t\t'masonry' => esc_html__( 'Masonry', 'inkpro' ),\r\n\t\t'metro' => esc_html__( 'Metro', 'inkpro' ),\r\n\t\t'medium-image' => esc_html__( 'Medium image', 'inkpro' ),\r\n\t\t'photo' => esc_html__( 'Photo', 'inkpro' ),\r\n\t);\r\n\r\n\t$options = array_merge( $new_options, $options );\r\n\t\r\n\treturn $options;\r\n}", "function printAdminPageSettings() {\r\n \r\n wpscSupportTickets_saveSettings(); // Action hook for saving\r\n\r\n $devOptions = $this->getAdminOptions();\r\n\r\n echo '<div class=\"wrap\">';\r\n\r\n $this->adminHeader();\r\n\r\n if (@isset($_POST['update_wpscSupportTicketsSettings'])) {\r\n\r\n if (isset($_POST['wpscSupportTicketsmainpage'])) {\r\n $devOptions['mainpage'] = esc_sql($_POST['wpscSupportTicketsmainpage']);\r\n }\r\n if (isset($_POST['turnwpscSupportTicketsOn'])) {\r\n $devOptions['turnon_wpscSupportTickets'] = esc_sql($_POST['turnwpscSupportTicketsOn']);\r\n }\r\n if (isset($_POST['email'])) {\r\n $devOptions['email'] = esc_sql($_POST['email']);\r\n }\r\n if (isset($_POST['email_new_ticket_subject'])) {\r\n $devOptions['email_new_ticket_subject'] = esc_sql($_POST['email_new_ticket_subject']);\r\n }\r\n if (isset($_POST['email_new_ticket_body'])) {\r\n $devOptions['email_new_ticket_body'] = esc_sql($_POST['email_new_ticket_body']);\r\n }\r\n if (isset($_POST['email_new_reply_subject'])) {\r\n $devOptions['email_new_reply_subject'] = esc_sql($_POST['email_new_reply_subject']);\r\n }\r\n if (isset($_POST['email_new_reply_body'])) {\r\n $devOptions['email_new_reply_body'] = esc_sql($_POST['email_new_reply_body']);\r\n }\r\n if (isset($_POST['disable_inline_styles'])) {\r\n $devOptions['disable_inline_styles'] = esc_sql($_POST['disable_inline_styles']);\r\n }\r\n if (isset($_POST['allow_guests'])) {\r\n $devOptions['allow_guests'] = esc_sql($_POST['allow_guests']);\r\n }\r\n if (isset($_POST['custom_field_position'])) {\r\n $devOptions['custom_field_position'] = esc_sql($_POST['custom_field_position']);\r\n } \r\n if (isset($_POST['custom_field_frontend_position'])) {\r\n $devOptions['custom_field_frontend_position'] = esc_sql($_POST['custom_field_frontend_position']);\r\n } \r\n if (isset($_POST['use_ticket_in_email'])) {\r\n $devOptions['use_ticket_in_email'] = esc_sql($_POST['use_ticket_in_email']);\r\n } \r\n if (isset($_POST['use_reply_in_email'])) {\r\n $devOptions['use_reply_in_email'] = esc_sql($_POST['use_reply_in_email']);\r\n } \r\n if (isset($_POST['display_severity_on_create'])) {\r\n $devOptions['display_severity_on_create'] = esc_sql($_POST['display_severity_on_create']);\r\n }\r\n if(isset($_POST['email_name'])) {\r\n $devOptions['email_name'] = esc_sql($_POST['email_name']);\r\n }\r\n if(isset($_POST['hide_email_on_frontend_list'])) {\r\n $devOptions['hide_email_on_frontend_list'] = esc_sql($_POST['hide_email_on_frontend_list']);\r\n } \r\n if(isset($_POST['email_encoding'])) {\r\n $devOptions['email_encoding'] = esc_sql($_POST['email_encoding']);\r\n } \r\n if(isset($_POST['hide_email_on_support_tickets'])) {\r\n $devOptions['hide_email_on_support_tickets'] = esc_sql($_POST['hide_email_on_support_tickets']);\r\n } \r\n if(isset($_POST['enable_beta_testing'])) {\r\n $devOptions['enable_beta_testing'] = esc_sql($_POST['enable_beta_testing']);\r\n } \r\n if(isset($_POST['disable_all_emails'])) {\r\n $devOptions['disable_all_emails'] = esc_sql($_POST['disable_all_emails']);\r\n } \r\n if(isset($_POST['override_wordpress_email'])) {\r\n $devOptions['override_wordpress_email'] = esc_sql($_POST['override_wordpress_email']);\r\n }\r\n if(isset($_POST['overrides_email'])) {\r\n $devOptions['overrides_email'] = esc_sql($_POST['overrides_email']);\r\n } \r\n if(isset($_POST['custom_title'])) {\r\n $devOptions['custom_title'] = esc_sql($_POST['custom_title']);\r\n }\r\n if(isset($_POST['custom_message'])) {\r\n $devOptions['custom_message'] = esc_sql($_POST['custom_message']);\r\n } \r\n if(isset($_POST['show_login_text'])) {\r\n $devOptions['show_login_text'] = esc_sql($_POST['show_login_text']);\r\n } \r\n if(isset($_POST['override_mysql_timezone'])) {\r\n $devOptions['override_mysql_timezone'] = esc_sql($_POST['override_mysql_timezone']);\r\n }\r\n if(isset($_POST['show_advanced_options'])) {\r\n $devOptions['show_advanced_options'] = esc_sql($_POST['show_advanced_options']);\r\n }\r\n if(isset($_POST['custom_new_ticket_button_text'])) {\r\n $devOptions['custom_new_ticket_button_text'] = esc_sql($_POST['custom_new_ticket_button_text']);\r\n } \r\n \r\n if(isset($_POST['cc_all_new_tickets'])) {\r\n $devOptions['cc_all_new_tickets'] = esc_sql($_POST['cc_all_new_tickets']);\r\n } \r\n if(isset($_POST['cc_all_new_tickets_to_email'])) {\r\n $devOptions['cc_all_new_tickets_to_email'] = esc_sql($_POST['cc_all_new_tickets_to_email']);\r\n } \r\n if(isset($_POST['cc_all_user_replies'])) {\r\n $devOptions['cc_all_user_replies'] = esc_sql($_POST['cc_all_user_replies']);\r\n } \r\n if(isset($_POST['cc_all_user_replies_to_email'])) {\r\n $devOptions['cc_all_user_replies_to_email'] = esc_sql($_POST['cc_all_user_replies_to_email']);\r\n } \r\n if(isset($_POST['cc_all_admin_replies'])) {\r\n $devOptions['cc_all_admin_replies'] = esc_sql($_POST['cc_all_admin_replies']);\r\n } \r\n if(isset($_POST['cc_all_admin_replies_to_email'])) {\r\n $devOptions['cc_all_admin_replies_to_email'] = esc_sql($_POST['cc_all_admin_replies_to_email']);\r\n } \r\n if(isset($_POST['allow_search'])) {\r\n $devOptions['allow_search'] = esc_sql($_POST['allow_search']);\r\n } \r\n update_option($this->adminOptionsName, $devOptions);\r\n\r\n echo '<div class=\"updated\"><p><strong>';\r\n _e('Settings Updated.', 'wpsc-support-tickets');\r\n echo '</strong></p></div>';\r\n }\r\n\r\n echo '\r\n \r\n <script type=\"text/javascript\">\r\n jQuery(function() {\r\n jQuery( \"#wst_tabs\" ).tabs();\r\n setTimeout(function(){ jQuery(\".updated\").fadeOut(); },3000);\r\n });\r\n </script>\r\n\r\n <form method=\"post\" action=\"' , $_SERVER[\"REQUEST_URI\"] , '\">\r\n \r\n\r\n <div id=\"wst_tabs\" style=\"padding:5px 5px 0px 5px;font-size:1.1em;border-color:#DDD;border-radius:6px;\">\r\n <ul>\r\n <li><a href=\"#wst_tabs-1\">' , __('General', 'wpsc-support-tickets') , '</a></li>\r\n <li><a href=\"#wst_tabs-3\">' , __('Email', 'wpsc-support-tickets') , '</a></li>\r\n <li><a href=\"#wst_tabs-4\">' , __('Styling', 'wpsc-support-tickets') , '</a></li> \r\n <li><a href=\"#wst_tabs-5\">' , __('Guests', 'wpsc-support-tickets') , '</a></li> \r\n <li><a href=\"#wst_tabs-6\">' , __('Custom Fields', 'wpsc-support-tickets') , '</a></li> \r\n <li><a href=\"#wst_tabs-2\">' , __('PRO', 'wpsc-support-tickets') , '</a></li>\r\n </ul> \r\n \r\n \r\n <div id=\"wst_tabs-1\">\r\n\r\n <br />\r\n <h1>' , __('General', 'wpsc-support-tickets') , '</h1>\r\n <table class=\"widefat\" style=\"background:#FFF;\"><tr><td>\r\n\r\n <p><strong>' , __('Main Page', 'wpsc-support-tickets') , ':</strong> ' , __('You need to use a Page as the base for wpsc Support Tickets.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"wpscSupportTicketsmainpage\">\r\n <option value=\"\">';\r\n esc_attr(__('Select page', 'wpsc-support-tickets'));\r\n echo '</option>';\r\n\r\n $pages = get_pages();\r\n foreach ($pages as $pagg) {\r\n $option = '<option value=\"' . $pagg->ID . '\"';\r\n if ($pagg->ID == $devOptions['mainpage']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg->post_title;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n \r\n echo '\r\n </select>\r\n </p>';\r\n\r\n echo '<p><strong>' , __('Allow user to select Severity on ticket creation?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want the user to select the severity of their ticket when creating it.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"display_severity_on_create\">\r\n ';\r\n\r\n $pagesYXX[0] = 'true';\r\n $pagesYXX[1] = 'false';\r\n foreach ($pagesYXX as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['display_severity_on_create']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p> \r\n \r\n <p><strong>' , __('Show Advanced Settings?', 'wpsc-support-tickets') , ':</strong> ' , __('By default, some advanced settings are hidden that are either rarely used or that can problems. Set this to true if you want to enable Advanced Settings. Note that you will need to save your settings before any change will occur.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"show_advanced_options\">\r\n ';\r\n\r\n $pagesYXX[0] = 'true';\r\n $pagesYXX[1] = 'false';\r\n foreach ($pagesYXX as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['show_advanced_options']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p> ';\r\n\r\n if($devOptions['show_advanced_options']=='true') {\r\n \r\n echo '\r\n <p><strong>' , __('Enabled & Test Beta Features?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true ONLY ON TEST websites. This will enable new beta features as they are released. ', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"enable_beta_testing\">\r\n ';\r\n\r\n $pagesYXX[0] = 'true';\r\n $pagesYXX[1] = 'false';\r\n foreach ($pagesYXX as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['enable_beta_testing']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p> \r\n\r\n <p style=\"padding:5px;border:1px dotted black;\">\r\n '; \r\n\r\n // New search system, now in beta \r\n if ($devOptions['enable_beta_testing'] == 'true') {\r\n echo '<br />\r\n <strong>', __('BETA', 'wpsc-support-tickets') ,': ' , __('Enable Ticket Search?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to \"true\" to show a ticket search box on the \"Main Page\" you set. If you have \"Allow Guests\" set to \"false\" and \"Allow everyone to see all tickets\" (PRO only) set to \"false\", then search will only work for registered users and they can only search their own tickets. If you have \"Allow Guests\" set to \"true\", but \"Allow everyone to see all tickets\" (PRO only) set to \"false\", then users and guests can search, but are limited to their own tickets. If you have \"Allow Guests\" set to \"true\", and \"Allow everyone to see all tickets\" (PRO only) set to \"true\", then users and guests can search everyone\\'s tickets, making everything publicly searchable. ', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"allow_search\">\r\n ';\r\n\r\n $pagesYXX[0] = 'true';\r\n $pagesYXX[1] = 'false';\r\n foreach ($pagesYXX as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['allow_search']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n <br /><br /> '; \r\n } \r\n \r\n echo ' \r\n <img src=\"' , plugins_url() , '/wpsc-support-tickets/images/bug_report.png\" alt=\"' , __('Warning', 'wpsc-support-tickets') , '\" style=\"float:left;\" /> <strong style=\"font-size:1.2em;\">' , __('Warning', 'wpsc-support-tickets') , ' - ' , __('This may fix issues on incorrectly configured servers, but it comes at a performance cost of an additional database connection and an additional query on every page load. Generally, you should only turn this on if tickets do not change who replied last, and always say the Last Poster was the ticket creator, no matter how many times an admin makes a reply. You should not change this setting unless you believe that your PHP timezone and MySQL are not set to the same thing, as evidence by the Last Poster issue. If you turn this on when it is not needed, you will only slow down the performance of your website with no benefits. ', 'wpsc-support-tickets') , '</strong><br style=\"clear:both;\" /><br />\r\n <strong>' , __('Force Sync MySQL timezone to PHP timezone?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to make emails come from your wpsc Support Ticket admin email below, and to change your sent from name to your Blog\\'s name.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"override_mysql_timezone\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['override_mysql_timezone']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n <br />\r\n </p>';\r\n }\r\n \r\n echo '\r\n\r\n </td></tr></table>\r\n <br /><br /><br />\r\n </div>\r\n <div id=\"wst_tabs-3\"> \r\n <h1>' , __('Email', 'wpsc-support-tickets') , '</h1>\r\n <table class=\"widefat\" style=\"background:#FFF;\"><tr><td> \r\n\r\n <strong>' , __('Email', 'wpsc-support-tickets') , ':</strong> ' , __('The admin email where all new ticket &amp; reply notification emails will be sent', 'wpsc-support-tickets') , '<br /><input name=\"email\" value=\"' . $devOptions['email'] . '\" style=\"width:95%;\" /><br /><br />\r\n \r\n <strong>' , __('New Ticket Email', 'wpsc-support-tickets') , '</strong> ' , __('The subject &amp; body of the email sent to the customer when creating a new ticket.', 'wpsc-support-tickets') , '<br /><input name=\"email_new_ticket_subject\" value=\"' , stripslashes(stripslashes($devOptions['email_new_ticket_subject'])) , '\" style=\"width:95%;\" />\r\n <textarea style=\"width:95%;\" name=\"email_new_ticket_body\">' , stripslashes(stripslashes($devOptions['email_new_ticket_body'])) , '</textarea>\r\n <br /><br />\r\n \r\n <p><strong>' , __('Include the ticket in New Ticket Email', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want the content of the ticket included in the new ticket email.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"use_ticket_in_email\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['use_ticket_in_email']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n\r\n <strong>' , __('New Reply Email', 'wpsc-support-tickets') , '</strong> ' , __('The subject &amp; body of the email sent to the customer when there is a new reply.', 'wpsc-support-tickets') , '<br /><input name=\"email_new_reply_subject\" value=\"' , stripslashes(stripslashes($devOptions['email_new_reply_subject'])) , '\" style=\"width:95%;\" />\r\n <textarea style=\"width:95%;\" name=\"email_new_reply_body\">' , stripslashes(stripslashes($devOptions['email_new_reply_body'])) , '</textarea>\r\n <br /><br />\r\n \r\n <p><strong>' , __('Include the reply in New Reply Email', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want the content of the reply included in the new reply email.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"use_reply_in_email\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['use_reply_in_email']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n \r\n <p><strong>' , __('Email Charset Encoding', 'wpsc-support-tickets') , ':</strong> ' , __('You may need to change this if email text is encoding incorrectly. The default is utf-8.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"email_encoding\">\r\n ';\r\n\r\n $pagesYxxx[0] = 'utf-8';\r\n $pagesYxxx[1] = 'iso-8859-1';\r\n $pagesYxxx[2] = 'koi8-r';\r\n $pagesYxxx[3] = 'gb2312';\r\n $pagesYxxx[4] = 'big5';\r\n $pagesYxxx[5] = 'shift_jis';\r\n $pagesYxxx[5] = 'euc-jp';\r\n foreach ($pagesYxxx as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['email_encoding']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n\r\n <p><strong>' , __('Disable All Emails', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to turn off all emails from wpsc Support Tickets.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"disable_all_emails\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['disable_all_emails']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n ';\r\n \r\n if ($devOptions['show_advanced_options'] == 'true') {\r\n \r\n echo '\r\n <div style=\"padding:5px;border:1px dotted black;\">\r\n <p><strong>' , __('CC All New Tickets?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to CC the below email address on all new tickets.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"cc_all_new_tickets\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['cc_all_new_tickets']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n <strong>' , __('Email Address to CC on New Tickets', 'wpsc-support-tickets') , '</strong> ' , __('When enabled, the email address to CC on new tickets.', 'wpsc-support-tickets') , '<br /><input name=\"cc_all_new_tickets_to_email\" value=\"' , $devOptions['cc_all_new_tickets_to_email'] , '\" style=\"width:95%;\" />\r\n <br /><br /> \r\n '; \r\n \r\n \r\n echo '\r\n <p><strong>' , __('CC All User Replies?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to CC the below email address on all user replies to tickets.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"cc_all_user_replies\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['cc_all_user_replies']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n <strong>' , __('Email Address to CC on All User Replies', 'wpsc-support-tickets') , '</strong> ' , __('When enabled, the email address to CC on new user replies.', 'wpsc-support-tickets') , '<br /><input name=\"cc_all_user_replies_to_email\" value=\"' , $devOptions['cc_all_user_replies_to_email'] , '\" style=\"width:95%;\" />\r\n <br /><br /> \r\n '; \r\n \r\n \r\n \r\n echo '\r\n <p><strong>' , __('CC All Admin Replies?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to CC the below email address on all admin replies to tickets.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"cc_all_admin_replies\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['cc_all_admin_replies']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n <strong>' , __('Email Address to CC on All Admin Replies', 'wpsc-support-tickets') , '</strong> ' , __('When enabled, the email address to CC on new admin replies.', 'wpsc-support-tickets') , '<br /><input name=\"cc_all_admin_replies_to_email\" value=\"' , $devOptions['cc_all_admin_replies_to_email'] , '\" style=\"width:95%;\" />\r\n <br /><br /> \r\n </div>\r\n <br /><br /> \r\n '; \r\n \r\n \r\n \r\n echo ' \r\n <p style=\"padding:5px;border:1px dotted black;\">\r\n <img src=\"' , plugins_url() , '/wpsc-support-tickets/images/bug_report.png\" alt=\"' , __('Warning', 'wpsc-support-tickets') , '\" style=\"float:left;\" /> <strong style=\"font-size:1.2em;\">' , __('Warning', 'wpsc-support-tickets') , ' - ' , __('Activating these overrides can cause registration emails to fail in some circumstances. Please double check that new users receive their registration emails after enabling this override.', 'wpsc-support-tickets') , '</strong><br style=\"clear:both;\" /><br />\r\n <strong>' , __('Override Wordpress Email Sent \"Name\" &amp; \"From\"', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to make emails come from your wpsc Support Ticket admin email below, and to change your sent from name to your Blog\\'s name.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"override_wordpress_email\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['override_wordpress_email']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n <br />\r\n <strong>' , __('Override Name Sent From', 'wpsc-support-tickets') ,'</strong> ', __('The name of the admin email sender, such as \"Business Name Support Team\", or whatever is appropriate for your situation.', 'wpsc-support-tickets') ,'<br /><input name=\"email_name\" value=\"' , $devOptions['email_name'] , '\" style=\"width:95%;\" /><br /><br />\r\n <strong>' , __('Override Email Sent From', 'wpsc-support-tickets') ,'</strong> ', __('The email address that all outgoing emails will appear to be sent from.', 'wpsc-support-tickets') ,'<br /><input name=\"overrides_email\" value=\"' , $devOptions['overrides_email'] , '\" style=\"width:95%;\" /><br /><br />\r\n </p>';\r\n }\r\n \r\n echo ' \r\n </td></tr></table>\r\n <br /><br /><br />\r\n </div>\r\n <div id=\"wst_tabs-4\"> \r\n <h1>' , __('Styling', 'wpsc-support-tickets') , '</h1>\r\n <table class=\"widefat\" style=\"background:#FFF;\"><tr><td> \r\n\r\n <p><strong>' , __('Disable inline styles', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want to disable the inline CSS styles.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"disable_inline_styles\">\r\n ';\r\n\r\n $pagesX[0] = 'true';\r\n $pagesX[1] = 'false';\r\n foreach ($pagesX as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['disable_inline_styles']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n\r\n\r\n </td></tr></table>\r\n <br /><br /><br />\r\n </div>\r\n <div id=\"wst_tabs-5\"> \r\n <h1>' , __('Guests', 'wpsc-support-tickets') , '</h1>\r\n <table class=\"widefat\" style=\"background:#FFF;\"><tr><td> \r\n\r\n <p><strong>' , __('Allow Guests', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true if you want Guests to be able to use the support ticket system.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"allow_guests\">\r\n ';\r\n\r\n $pagesY[0] = 'true';\r\n $pagesY[1] = 'false';\r\n foreach ($pagesY as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['allow_guests']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n \r\n <p><strong>' , __('Show guest email address in front end list', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true and a guest\\'s email address will be displayed in the ticket list.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"hide_email_on_frontend_list\">\r\n ';\r\n\r\n $pagesXn[0] = 'true';\r\n $pagesXn[1] = 'false';\r\n foreach ($pagesXn as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['hide_email_on_frontend_list']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n \r\n\r\n <p><strong>' , __('Show guest email address on support tickets', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to true and a guest\\'s email address will be displayed in support tickets.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"hide_email_on_support_tickets\">\r\n ';\r\n\r\n $pagesXnr[0] = 'true';\r\n $pagesXnr[1] = 'false';\r\n foreach ($pagesXnr as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['hide_email_on_support_tickets']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n\r\n \r\n\r\n <p><strong>' , __('Show login/register links?', 'wpsc-support-tickets') , ':</strong> ' , __('Set this to false if you do not want a link to register or login to appear when a user is not logged in.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"show_login_text\">\r\n ';\r\n\r\n $pagesXnr[0] = 'true';\r\n $pagesXnr[1] = 'false';\r\n foreach ($pagesXnr as $pagg) {\r\n $option = '<option value=\"' . $pagg . '\"';\r\n if ($pagg === $devOptions['show_login_text']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg;\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n\r\n </td></tr></table>\r\n <br /><br /><br />\r\n </div>\r\n <div id=\"wst_tabs-6\"> \r\n <h1>' , __('Custom Fields', 'wpsc-support-tickets') , '</h1>\r\n <table class=\"widefat\" style=\"background:#FFF;\"><tr><td> \r\n\r\n <p><strong>' , __('Place custom form fields', 'wpsc-support-tickets') , ':</strong> ' , __('When creating a ticket, this determines where your custom fields are placed on the ticket submission form.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"custom_field_position\">\r\n ';\r\n\r\n $pagesXX[0]['valname'] = 'before everything';$pagesXX[0]['displayname'] = __('before everything', 'wpsc-support-tickets');\r\n $pagesXX[1]['valname'] = 'before message';$pagesXX[1]['displayname'] = __('before message', 'wpsc-support-tickets');\r\n $pagesXX[2]['valname'] = 'after message';$pagesXX[2]['displayname'] = __('after message', 'wpsc-support-tickets');\r\n $pagesXX[3]['valname'] = 'after everything';$pagesXX[3]['displayname'] = __('after everything', 'wpsc-support-tickets');\r\n\r\n foreach ($pagesXX as $pagg) {\r\n $option = '<option value=\"' . $pagg['valname'] . '\"';\r\n if ($pagg['valname'] === $devOptions['custom_field_position']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg['displayname'];\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p>\r\n\r\n <p><strong>' , __('Display custom fields', 'wpsc-support-tickets') , ':</strong> ' , __('When a ticket creator views a ticket they created, this setting determines where the custom fields are placed on the page.', 'wpsc-support-tickets') , ' <br />\r\n <select name=\"custom_field_frontend_position\">\r\n ';\r\n\r\n $pagesXY[0]['valname'] = 'before everything';$pagesXY[0]['displayname'] = __('before everything', 'wpsc-support-tickets');\r\n $pagesXY[1]['valname'] = 'before message';$pagesXY[1]['displayname'] = __('before message', 'wpsc-support-tickets');\r\n $pagesXY[2]['valname'] = 'after message';$pagesXY[2]['displayname'] = __('after message &amp; replies', 'wpsc-support-tickets');\r\n\r\n foreach ($pagesXY as $pagg) {\r\n $option = '<option value=\"' . $pagg['valname'] . '\"';\r\n if ($pagg['valname'] === $devOptions['custom_field_frontend_position']) {\r\n $option .= ' selected=\"selected\"';\r\n }\r\n $option .='>';\r\n $option .= $pagg['displayname'];\r\n $option .= '</option>';\r\n echo $option;\r\n }\r\n\r\n echo '\r\n </select>\r\n </p> \r\n \r\n <strong>' , __('Change TITLE to', 'wpsc-support-tickets') , ':</strong> ' , __('By default, a user must fill out a title when submitting a ticket. This setting lets you easily change the name of the word TITLE so that you word this appropriately for your situation.', 'wpsc-support-tickets') , '<br /><input name=\"custom_title\" value=\"' . $devOptions['custom_title'] . '\" style=\"width:95%;\" /><br /><br />\r\n \r\n <strong>' , __('Change MESSAGE to', 'wpsc-support-tickets') , ':</strong> ' , __('By default, a user must fill out a message when submitting a ticket. This setting lets you easily change the name of the words YOUR MESSAGE so that you word this appropriately for your situation.', 'wpsc-support-tickets') , '<br /><input name=\"custom_message\" value=\"' . $devOptions['custom_message'] . '\" style=\"width:95%;\" /><br /><br />\r\n ';\r\n \r\n echo '<strong>' , __('Change New Ticket button text to', 'wpsc-support-tickets') , ':</strong> ' , __('By default, this button says Create a New Ticket, but here you can change it to whatever you want.', 'wpsc-support-tickets') , '<br /><input name=\"custom_new_ticket_button_text\" value=\"' . $devOptions['custom_new_ticket_button_text'] . '\" style=\"width:95%;\" /><br /><br />';\r\n \r\n echo ' \r\n\r\n <br /><br /><br /><br />\r\n </td></tr></table>\r\n\r\n\r\n </div>\r\n\r\n <div id=\"wst_tabs-2\">';\r\n\r\n wpscSupportTickets_settings(); // Action hook\r\n\r\n echo '\r\n </div>\r\n \r\n\r\n <input type=\"hidden\" name=\"update_wpscSupportTicketsSettings\" value=\"update\" />\r\n <div style=\"float:right;position:relative;top:-20px;\"> <input class=\"button-primary\" style=\"position:relative;z-index:999999;\" type=\"submit\" name=\"update_wpscSupportTicketsSettings_submit\" value=\"';\r\n _e('Update Settings', 'wpsc-support-tickets');\r\n echo'\" /></div>\r\n \r\n\r\n </div>\r\n </div>\r\n </form>\r\n \r\n\r\n ';\r\n\r\n\r\n }", "function print_mail_settings() {\n $link = print_mail_print_link();\n\n $form['settings'] = array(\n '#type' => 'fieldset',\n '#title' => t('Send by email options'),\n );\n\n $form['settings']['print_mail_hourly_threshold'] = array(\n '#type' => 'select',\n '#title' => t('Hourly threshold'),\n '#default_value' => variable_get('print_mail_hourly_threshold', PRINT_MAIL_HOURLY_THRESHOLD),\n '#options' => drupal_map_assoc(array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50)),\n '#description' => t('The maximum number of emails a user can send per hour.'),\n );\n\n $form['settings']['print_mail_use_reply_to'] = array(\n '#type' => 'checkbox',\n '#title' => t('Use Reply-To header'),\n '#default_value' => variable_get('print_mail_use_reply_to', PRINT_MAIL_USE_REPLY_TO),\n '#description' => t(\"When enabled, any email sent will use the provided user and username in the 'Reply-To' header, with the site's email address used in the 'From' header (configured in !link). Enabling this helps in preventing email being flagged as spam.\", array('!link' => l(t('Site information'), 'admin/config/system/site-information'))),\n );\n\n $form['settings']['print_mail_teaser_default'] = array(\n '#type' => 'checkbox',\n '#title' => t('Send only the teaser'),\n '#default_value' => variable_get('print_mail_teaser_default', PRINT_MAIL_TEASER_DEFAULT_DEFAULT),\n '#description' => t(\"If selected, the default choice will be to send only the node's teaser instead of the full content.\"),\n );\n\n $form['settings']['print_mail_user_recipients'] = array(\n '#type' => 'checkbox',\n '#title' => t('Enable user list recipients'),\n '#default_value' => variable_get('print_mail_user_recipients', PRINT_MAIL_USER_RECIPIENTS_DEFAULT),\n '#description' => t(\"If selected, a user list will be included as possible email recipients.\"),\n );\n\n $form['settings']['print_mail_teaser_choice'] = array(\n '#type' => 'checkbox',\n '#title' => t('Enable teaser/full mode choice'),\n '#default_value' => variable_get('print_mail_teaser_choice', PRINT_MAIL_TEASER_CHOICE_DEFAULT),\n '#description' => t('If checked, the user will be able to choose between sending the full content or only the teaser at send time.'),\n );\n\n $form['settings']['print_mail_send_option_default'] = array(\n '#type' => 'select',\n '#title' => t('Default email sending format'),\n '#default_value' => variable_get('print_mail_send_option_default', PRINT_MAIL_SEND_OPTION_DEFAULT),\n '#options' => array(\n 'sendlink' => t('Link'),\n 'sendpage' => t('Inline HTML'),\n ),\n );\n if (class_exists('Mail_mime')) {\n $form['settings']['print_mail_send_option_default']['#options']['inline-attachment'] = t('Inline HTML with Attachment');\n $form['settings']['print_mail_send_option_default']['#options']['plain-attachment'] = t('Plain Text with Attachment');\n }\n\n $form['settings']['print_mail_job_queue'] = array(\n '#type' => 'checkbox',\n '#title' => t('Send emails using queue'),\n '#default_value' => variable_get('print_mail_job_queue', PRINT_MAIL_JOB_QUEUE_DEFAULT),\n '#description' => t(\"Selecting this option, email delivery will be performed by the system queue during each cron run. Leaving this unselected, the email will be sent immediately, but the site will take slightly longer to reply to the user.\"),\n );\n\n $form['settings']['print_mail_display_sys_urllist'] = array(\n '#type' => 'checkbox',\n '#title' => t('Printer-friendly URLs list in system pages'),\n '#default_value' => variable_get('print_mail_display_sys_urllist', PRINT_TYPE_SYS_URLLIST_DEFAULT),\n '#description' => t('Enabling this option will display a list of printer-friendly destination URLs at the bottom of the page.'),\n );\n\n $form['settings']['link_text'] = array(\n '#type' => 'fieldset',\n '#title' => t('Custom link text'),\n '#collapsible' => TRUE,\n '#collapsed' => TRUE,\n );\n $form['settings']['link_text']['print_mail_link_text_enabled'] = array(\n '#type' => 'checkbox',\n '#title' => t('Enable custom link text'),\n '#default_value' => variable_get('print_mail_link_text_enabled', PRINT_TYPE_LINK_TEXT_ENABLED_DEFAULT),\n );\n $form['settings']['link_text']['print_mail_link_text'] = array(\n '#type' => 'textfield',\n '#default_value' => variable_get('print_mail_link_text', $link['text']),\n '#description' => t('Text used in the link to the send by email form.'),\n );\n\n return system_settings_form($form);\n}", "private function formVotingOptions()\n {\n $content = '';\n $count = 1;\n extract($this->language[$this->selectLanguage()]);\n foreach ($this->votingOptions AS $option)\n {\n $content .= '\n <dt><label for=\"votingText\">' . $txtVotingOption. ' #' . $count++ . '</label></dt>\n <dd><input type=\"text\" name=\"votingOptions[]\" value=\"' . $option . '\" /></dd>';\n }\n return $content;\n }", "public function tOptions()\n {\n return json_encode($this->options);\n }", "public function showMailOptions()\n\t{\n\t\t/**\n\t\t * @var $ilTabs ilTabsGUI\n\t\t * @var $lng ilLanguage\n\t\t * @var $rbacsystem ilRbacSystem\n\t\t */\n\t\tglobal $ilTabs, $lng, $rbacsystem;\n\n\t\tinclude_once 'Services/Mail/classes/class.ilMailGlobalServices.php';\n\t\tif(!$rbacsystem->checkAccess('internal_mail', ilMailGlobalServices::getMailObjectRefId()))\n\t\t{\n\t\t\t$this->ilias->raiseError($lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);\n\t\t}\n\t\t\n\t\t$lng->loadLanguageModule('mail');\n\t\t\n\t\t$this->__initSubTabs('showMailOptions');\n\t\t$ilTabs->activateTab('mail_settings');\n\n\t\t$this->setHeader();\n\n\t\t$this->initMailOptionsForm();\n\t\t$this->setMailOptionsValuesByDB();\n\n\t\t$this->tpl->setContent($this->form->getHTML());\n\t\t$this->tpl->show();\n\t}", "public function get_settings_html() {\n\t\treturn '';\n\t}", "function settings_html() {\n $this->render_setting( 'label_any' );\n $this->render_setting( 'modifiers' );\n $this->render_setting( 'orderby' );\n $this->render_setting( 'count' );\n }", "public function admin_options() {\n\t\t\t?>\n\t \t<h3><?php _e('Payment Express', 'woothemes'); ?></h3>\n\t \t<p><?php _e('Allows credit card payments by Payment Express PX-Pay method', 'woothemes'); ?></p>\n\t \t<table class=\"form-table\">\n\t \t<?php\n\t\t\t\t// Generate the HTML For the settings form.\n\t\t\t\t$this->generate_settings_html();\n\t\t\t?>\n\t\t\t</table><!--/.form-table-->\n\t \t<?php\n\t\t}", "public function optionsAction()\n\t{\n\t\treturn '';\n\t}", "function adminOptions() {\r\n\t\t\tTrackTheBookView::render('admin-options');\r\n\t\t}", "function SetupExportOptions() {\n\t\tglobal $Language;\n\n\t\t// Printer friendly\n\t\t$item = &$this->ExportOptions->Add(\"print\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportPrintUrl . \"\\\">\" . $Language->Phrase(\"PrinterFriendly\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Export to Excel\n\t\t$item = &$this->ExportOptions->Add(\"excel\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportExcelUrl . \"\\\">\" . $Language->Phrase(\"ExportToExcel\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\n\t\t// Export to Word\n\t\t$item = &$this->ExportOptions->Add(\"word\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportWordUrl . \"\\\">\" . $Language->Phrase(\"ExportToWord\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Export to Html\n\t\t$item = &$this->ExportOptions->Add(\"html\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportHtmlUrl . \"\\\">\" . $Language->Phrase(\"ExportToHtml\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Export to Xml\n\t\t$item = &$this->ExportOptions->Add(\"xml\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportXmlUrl . \"\\\">\" . $Language->Phrase(\"ExportToXml\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Export to Csv\n\t\t$item = &$this->ExportOptions->Add(\"csv\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportCsvUrl . \"\\\">\" . $Language->Phrase(\"ExportToCsv\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Export to Pdf\n\t\t$item = &$this->ExportOptions->Add(\"pdf\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportPdfUrl . \"\\\">\" . $Language->Phrase(\"ExportToPDF\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Export to Email\n\t\t$item = &$this->ExportOptions->Add(\"email\");\n\t\t$item->Body = \"<a id=\\\"emf_userlevels\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_EmailDialogShow({lnk:'emf_userlevels',hdr:ewLanguage.Phrase('ExportToEmail'),f:document.fuserlevelslist,sel:false});\\\">\" . $Language->Phrase(\"ExportToEmail\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Hide options for export/action\n\t\tif ($this->Export <> \"\" || $this->CurrentAction <> \"\")\n\t\t\t$this->ExportOptions->HideAllOptions();\n\t}", "function outputOptionsList()\n {\n $cc_types = modApiFunc(\"Configuration\", \"getCreditCardSettings\", false);\n\n $OptionsList = '';\n foreach ($cc_types as $type)\n {\n $_id = $type['id'];\n $_name = $type['name'];\n $OptionsList.= '<option value='.$_id.'>'.$_name.'</option>';\n }\n return $OptionsList;\n }", "private function render_settings() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php esc_html_e( 'Network Mail', 'simple-smtp' ); ?></h1>\n\t\t\t<form action='edit.php?action=wpsimplesmtpms' method='post'>\t\n\t\t\t\t<?php\n\t\t\t\twp_nonce_field( 'simple-smtp-ms' );\n\t\t\t\tdo_settings_sections( 'wpsimplesmtp_smtp_ms' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "public function __toString(): string\n {\n $options = \\http_build_query(Values::of($this->options), '', ' ');\n return '[Twilio.Events.V1.UpdateSubscriptionOptions ' . $options . ']';\n }", "function renderSettings()\t{\n\t\tglobal $LANG;\n\n\t\t\t// Create checkboxes for additiona languages to show:\n\t\t$checkOutput = array();\n\t\tforeach($this->langKeys as $langKey)\t{\n\t\t\tif ($langKey != 'default')\t{\n\t\t\t\t$checkOutput[] = '<div class=\"langbox\">'.t3lib_BEfunc::getFuncCheck('','SET[addLang_'.$langKey.']',$this->MOD_SETTINGS['addLang_'.$langKey]).' '.$langKey.(' ['.$LANG->sL('LLL:EXT:setup/mod/locallang.xml:lang_'.$langKey).']').'</div>';\n\t\t\t}\n\t\t}\n\t\t$out.= $this->showCSH('funcmenu_'.$this->MOD_SETTINGS['function'],$LANG->getLL('additional_languages')).'<br />'.\n\t\t\t\timplode('',$checkOutput);\n\n\t\t\t// Select font size:\n\t\t$out.= '<h3 style=\"clear:both\">'.$LANG->getLL('select_font').'</h3>'.\n\t\t\t\tt3lib_BEfunc::getFuncMenu('','SET[fontsize]',$this->MOD_SETTINGS['fontsize'],$this->MOD_MENU['fontsize']);\n\n\t\t\t// Return output:\n\t\treturn $out;\n\t}", "public function display_analytics_options_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2>WSU Analytics Settings</h2>\n\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t<?php\n\t\twp_nonce_field( 'wsuwp-analytics-options' );\n\t\tdo_settings_sections( $this->settings_page );\n\n\t\tsubmit_button();\n\t\t?>\n\t\t\t\t<input type=\"hidden\" name=\"action\" value=\"update\" />\n\t\t\t\t<input type=\"hidden\" name=\"option_page\" value=\"wsuwp-analytics\" />\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "function email_print_select_options($options, $perpage) {\n\n\tglobal $CFG, $USER;\n\n\t$baseurl = $CFG->wwwroot . '/blocks/email_list/email/index.php?' . email_build_url($options);\n\n\techo '<br />';\n\n\techo '<div class=\"content emailfloatcontent\">';\n\n\tif ( $options->id != SITEID ) {\n\t\techo '<div class=\"emailfloat emailleft\">';\n\t\tif ( ! email_isfolder_type(email_get_folder($options->folderid), EMAIL_SENDBOX) ) {\n\t\t\techo '<select name=\"action\" onchange=\"this.form.submit()\">\n\t\t \t<option value=\"\" selected=\"selected\">' . get_string('markas', 'block_email_list') .':</option>\n\t\t \t\t\t<option value=\"toread\">' . get_string('toread','block_email_list') . '</option>\n\t\t \t<option value=\"tounread\">' . get_string('tounread','block_email_list') . '</option>\n\t\t \t\t</select>';\n\n\n\t\t print_spacer(1, 20, false);\n\t\t}\n\t\techo '</div>';\n\t echo '<div class=\"emailleft\">';\n\t email_print_movefolder_button($options);\n\t\t// Idaho State University & MoodleRooms contrib - Thanks!\n\t\temail_print_preview_button($options->id);\n\t\techo '</div>';\n\t\techo '<div id=\"move2folder\"></div>';\n\t\techo '</div>';\n\n\t}\n\n\t// ALERT!: Now, I'm printing end start form, for choose number mail per page\n\t$url = '';\n\t// Build url part options\n \tif ($options) {\n \t\t$url = email_build_url($options);\n }\n\n\n\techo '</form>';\n\techo '<form id=\"mailsperpage\" name=\"mailsperpage\" action=\"'.$CFG->wwwroot.'/blocks/email_list/email/index.php?'.$url.'\" method=\"post\">';\n\n\n\t// Choose number mails perpage\n\n\techo '<div id=\"sizepage\" class=\"emailright\">' . get_string('mailsperpage', 'block_email_list') .': ';\n\n\n\t// Define default separator\n\t$spaces = '&#160;&#160;&#160;';\n\n\techo '<select name=\"perpage\" onchange=\"javascript:this.form.submit();\">';\n\n\tfor($i = 5; $i < 80; $i=$i+5) {\n\n \tif ( $perpage == $i ) {\n \t\techo '<option value=\"'.$i.'\" selected=\"selected\">' . $i . '</option>';\n \t} else {\n \t\techo '<option value=\"'.$i.'\">' . $i . '</option>';\n \t}\n\t}\n\n echo '</select>';\n\n\techo '</div>';\n\n return true;\n}", "protected function settingsHtml(): string\n {\n return Craft::$app->view->renderTemplate('cookie-consent/settings', [\n 'settings' => CookieConsent::getSettings(),\n ]);\n }", "function aegean_epay_admin_get_payment_options() {\n $return = array();\n $options = aegean_epay_load_payment_options();\n foreach ($options as $option) {\n $return[] = implode('|', $option);\n }\n\n return implode(\"\\n\", $return);\n}", "function edd_incentives_render_options() {\n global $post;\n\n $post_id = $post->ID;\n $all_discounts = edd_get_discounts();\n $meta = get_post_meta( $post_id, '_edd_incentive_meta', true );\n $subscribe = ( isset( $meta['subscribe'] ) ? true : false );\n\n // Selected discount code\n echo '<p>';\n echo '<strong><label for=\"_edd_incentive_discount\">' . __( 'Discount Offer', 'edd-incentives' ) . '</label></strong><br />';\n echo '<select class=\"edd-incentives-select2\" name=\"_edd_incentive_meta[discount]\" id=\"_edd_incentive_discount\">';\n echo '<option></option>';\n\n foreach( $all_discounts as $id => $discount ) {\n echo '<option value=\"' . $discount->ID . '\"' . ( isset( $meta['discount'] ) && $meta['discount'] == $discount->ID ? ' selected' : '' ) . '>' . $discount->post_title . '</option>';\n }\n\n echo '</select>';\n echo '</p>';\n\n do_action( 'edd_incentives_options_fields', $post_id );\n\n wp_nonce_field( basename( __FILE__ ), 'edd_incentives_nonce' );\n}", "function tb_longwave_header_options_callback() {\n\techo '<p>Settings for things visible in the Head of the theme.</p>';\n}", "function SetupExportOptions() {\n\t\tglobal $ReportLanguage, $deals_details;\n\n\t\t// Printer friendly\n\t\t$item =& $this->ExportOptions->Add(\"print\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportPrintUrl . \"\\\">\" . $ReportLanguage->Phrase(\"PrinterFriendly\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\n\t\t// Export to Excel\n\t\t$item =& $this->ExportOptions->Add(\"excel\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportExcelUrl . \"\\\">\" . $ReportLanguage->Phrase(\"ExportToExcel\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\n\t\t// Export to Word\n\t\t$item =& $this->ExportOptions->Add(\"word\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportWordUrl . \"\\\">\" . $ReportLanguage->Phrase(\"ExportToWord\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\n\t\t// Export to Pdf\n\t\t$item =& $this->ExportOptions->Add(\"pdf\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportPdfUrl . \"\\\">\" . $ReportLanguage->Phrase(\"ExportToPDF\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Uncomment codes below to show export to Pdf link\n//\t\t$item->Visible = FALSE;\n\t\t// Export to Email\n\n\t\t$item =& $this->ExportOptions->Add(\"email\");\n\t\t$item->Body = \"<a name=\\\"emf_deals_details\\\" id=\\\"emf_deals_details\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ewrpt_EmailDialogShow({lnk:'emf_deals_details',hdr:ewLanguage.Phrase('ExportToEmail')});\\\">\" . $ReportLanguage->Phrase(\"ExportToEmail\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Reset filter\n\t\t$item =& $this->ExportOptions->Add(\"resetfilter\");\n\t\t$item->Body = \"<a href=\\\"\" . ewrpt_CurrentPage() . \"?cmd=reset\\\">\" . $ReportLanguage->Phrase(\"ResetAllFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$this->SetupExportOptionsExt();\n\n\t\t// Hide options for export\n\t\tif ($deals_details->Export <> \"\")\n\t\t\t$this->ExportOptions->HideAllOptions();\n\n\t\t// Set up table class\n\t\tif ($deals_details->Export == \"word\" || $deals_details->Export == \"excel\" || $deals_details->Export == \"pdf\")\n\t\t\t$this->ReportTableClass = \"ewTable\";\n\t\telse\n\t\t\t$this->ReportTableClass = \"ewTable ewTableSeparate\";\n\t}", "function options_html($key, $field)\n\t{\n\t\t// vars\n\t\t$options = $field->options;\n\t\t$options['save_format'] = isset($options['save_format']) ? $options['save_format'] : 'url';\n\t\t\n\t\t?>\n\t\t<tr class=\"field_option field_option_file\">\n\t\t\t<td class=\"label\">\n\t\t\t\t<label><?php _e(\"Return Value\",'acf'); ?></label>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php \n\t\t\t\t\t$temp_field = new stdClass();\t\n\t\t\t\t\t$temp_field->type = 'select';\n\t\t\t\t\t$temp_field->input_name = 'acf[fields]['.$key.'][options][save_format]';\n\t\t\t\t\t$temp_field->input_class = '';\n\t\t\t\t\t$temp_field->value = $options['save_format'];\n\t\t\t\t\t$temp_field->options = array('choices' => array(\n\t\t\t\t\t\t'url'\t=>\t'File URL',\n\t\t\t\t\t\t'id'\t=>\t'Attachment ID'\n\t\t\t\t\t));\n\t\t\t\t\t$this->parent->create_field($temp_field);\n\t\t\t\t?>\n\t\t\t</td>\n\t\t</tr>\n\n\t\t<?php\n\t}", "function options_page_html()\n\t\t{\n\t\t\tif (!current_user_can('manage_options')) {\n\t\t\t\twp_die(__('You do not have sufficient permissions to access this page.'));\n\t\t\t}\n\t\t\t\n\t\t\techo '<div class=\"wrap\">';\n\t\t\techo '<h2>';\n\t\t\techo 'Verify Meta Tags Plugin Options';\n\t\t\techo '</h2>';\n\t\t\techo '<form method=\"post\" action=\"options.php\">';\n\t\t\tsettings_fields('vmt-options-page');\n\t\t\tdo_settings_sections('vmt-options-page');\n\t\t\techo '<p class=submit>';\n\t\t\techo '<input type=\"submit\" class=\"button-primary\" value=\"' . __('Save Changes') . '\" />';\n\t\t\techo '</p>';\n\t\t\techo '</form>';\n\t\t\techo '</div>';\n\t\t}", "function ms_settings_section() {\n?>\n<h3><?php _e( 'Post Revision Workflow', $this->text_domain ) ?></h3>\n<table class=\"form-table\">\n\t<tbody>\n \t<tr valign=\"top\">\n \t<th scope=\"row\">\n \t<label for=\"dpn_reviewers\"><?php _e( 'Default email address for post revision workflow notification:', $this->text_domain ) ?></label>\n </th>\n <td>\n \t<?php $this->settings_field() ?>\n </td>\n </tr>\n </tbody>\n</table>\n<?php\n\t\t}", "public static function get_options() {\n\t\treturn get_option( 'omnimailer' ) ?: self::get_default_options();\n\t}", "public function options($args)\r\n {\r\n if (SecurityUtil::checkPermission('EZComments::', '::', ACCESS_READ)) {\r\n // Create output object - this object will store all of our output so that\r\n // we can return it easily when required\r\n $render = Zikula_View::getInstance('EZComments');\r\n $render->assign('active', !isset($args['active']) || isset($args['active']['EZComments']));\r\n return $render->fetch('ezcomments_search_form.tpl');\r\n }\r\n\r\n return '';\r\n }", "function twispay_tw_get_suppress_email( $tw_lang ) {\n // Wordpress database reference\n global $wpdb;\n $html = '';\n $table_name = $wpdb->prefix . 'twispay_tw_configuration';\n\n $suppress_email = $wpdb->get_results( \"SELECT suppress_email FROM $table_name\" );\n\n if ( $suppress_email ) {\n $html .= '<select name=\"suppress_email\" id=\"suppress_email\">';\n foreach ( $suppress_email as $e_s ) {\n if ( $e_s->suppress_email == 1 ) {\n $html .= '<option value=\"1\" selected>' . esc_html( $tw_lang['live_mode_option_true'] ) . '</option>';\n $html .= '<option value=\"0\">' . esc_html( $tw_lang['live_mode_option_false'] ) . '</option>';\n }\n else {\n $html .= '<option value=\"1\">' . esc_html( $tw_lang['live_mode_option_true'] ) . '</option>';\n $html .= '<option value=\"0\" selected>' . esc_html( $tw_lang['live_mode_option_false'] ) . '</option>';\n }\n\n break;\n }\n $html .= '</select>';\n\n return $html;\n }\n}", "public function print_default_options_page() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\t<p>WPCampus settings require the Advanced Custom Fields PRO plugin. <a href=\"<?php echo admin_url( 'plugins.php' ); ?>\">Manage plugins</a></p>\n\t\t</div>\n\t\t<?php\n\t}", "function theme_tvchat_admin_page($flags, $default_flags) \n{\n $output = '<p>' . t('TV Chat 프로그램에 대한 각종 설정을 관리합니다.').'</p>';\n\n $output .= drupal_get_form( 'tvchat_config_form');\n return $output;\n}", "public static function setting_inner () \n { \n $html = null;\n\n $top = __( 'Setting : Option', 'text' );;\n $inner = self::setting_inner_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'setting', $top, $inner, $bottom );\n\n return $html;\n }", "public static function generate_options ()\n\t{\n\t\t// Location options\n\t\tadd_option(\"wustache_base_folder\", 'templates');\n\t}", "public function format()\n\t{\n\t\t// Get the event data\n\t\t$channel_data = & Swiftriver_Event::$data;\n\t\t\n\t\tif (isset($channel_data['channel']) AND $channel_data['channel'] == 'twitter')\n\t\t{\n\t\t\t$parameters = $channel_data['parameters']['value'];\n\t\t\t\n\t\t\tif (isset($parameters['user']))\n\t\t\t{\n\t\t\t\t$channel_data['display_name'] .= 'From: '.$parameters['user'];\n\t\t\t}\n\t\t\tif (isset($parameters['keyword']))\n\t\t\t{\n\t\t\t\t$channel_data['display_name'] .= ' Keywords: '.$parameters['keyword'];\n\t\t\t}\n\t\t\tif (isset($parameters['location']))\n\t\t\t{\n\t\t\t\t$channel_data['display_name'] .= ' Location: '.$parameters['location'];\n\t\t\t}\n\t\t}\n\t}", "protected function _toHtml()\r\n {\r\n if ($this->getChatHelper()->getEnabled()) {\r\n\r\n $zopimOptions = '';\r\n\r\n if ($this->getChatHelper()->getConfigType() == 'adv') {\r\n $zopimOptions .= $this->getCookieLawOptions(); // Must be in first place\r\n $zopimOptions .= $this->getDisableSound();\r\n $zopimOptions .= $this->getTheme(); // should be set after setColor/setColors js methods but works better here\r\n\r\n $zopimOptions .= $this->getConciergeOptions();\r\n $zopimOptions .= $this->getBadgeOptions();\r\n\r\n $zopimOptions .= $this->getWindowOptions();\r\n $zopimOptions .= $this->getGreetingsOptions();\r\n $zopimOptions .= $this->getButtonOptions();\r\n $zopimOptions .= $this->getBubbleOptions();\r\n $zopimOptions .= $this->getColor();\r\n }\r\n\r\n if (strlen($this->getName()) > 0) {\r\n $zopimOptions .= $this->getName();\r\n }\r\n if (strlen($this->getEmail()) > 0) {\r\n $zopimOptions .= $this->getEmail();\r\n }\r\n if (strlen($this->getLanguage()) > 0) {\r\n $zopimOptions .= $this->getLanguage();\r\n }\r\n\r\n $zopimOptions .= $this->getDepartmentsOptions();\r\n\r\n /* @var $block Mage_Core_Block_Template */\r\n $block = $this->getLayout()->createBlock(\r\n 'core/template',\r\n 'zopim_chat',\r\n array(\r\n 'template' => 'chat/widget.phtml',\r\n 'key' => $this->getChatHelper()->getKey(),\r\n 'zopim_options' => $zopimOptions\r\n )\r\n );\r\n\r\n return $block->toHtml();\r\n }\r\n\r\n return null;\r\n }", "function _echo_esc_attr( $option_key ) {\n\t\techo esc_attr( bf_get_option( $option_key, $this->option_panel_id ) );\n\t}", "protected function getOptions()\n\t{\n\t\t$this->options['USE_ACCOUNT_NUMBER'] = (Config\\Option::get(\"sale\", \"account_number_template\", \"\") !== \"\") ? true : false;\n\t}", "function SetupExportOptions() {\n\t\tglobal $ReportLanguage, $dealers_reports;\n\n\t\t// Printer friendly\n\t\t$item =& $this->ExportOptions->Add(\"print\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportPrintUrl . \"\\\">\" . $ReportLanguage->Phrase(\"PrinterFriendly\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\n\t\t// Export to Excel\n\t\t$item =& $this->ExportOptions->Add(\"excel\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportExcelUrl . \"\\\">\" . $ReportLanguage->Phrase(\"ExportToExcel\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\n\t\t// Export to Word\n\t\t$item =& $this->ExportOptions->Add(\"word\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportWordUrl . \"\\\">\" . $ReportLanguage->Phrase(\"ExportToWord\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\n\t\t// Export to Pdf\n\t\t$item =& $this->ExportOptions->Add(\"pdf\");\n\t\t$item->Body = \"<a href=\\\"\" . $this->ExportPdfUrl . \"\\\">\" . $ReportLanguage->Phrase(\"ExportToPDF\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Uncomment codes below to show export to Pdf link\n//\t\t$item->Visible = FALSE;\n\t\t// Export to Email\n\n\t\t$item =& $this->ExportOptions->Add(\"email\");\n\t\t$item->Body = \"<a name=\\\"emf_dealers_reports\\\" id=\\\"emf_dealers_reports\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ewrpt_EmailDialogShow({lnk:'emf_dealers_reports',hdr:ewLanguage.Phrase('ExportToEmail')});\\\">\" . $ReportLanguage->Phrase(\"ExportToEmail\") . \"</a>\";\n\t\t$item->Visible = FALSE;\n\n\t\t// Reset filter\n\t\t$item =& $this->ExportOptions->Add(\"resetfilter\");\n\t\t$item->Body = \"<a href=\\\"\" . ewrpt_CurrentPage() . \"?cmd=reset\\\">\" . $ReportLanguage->Phrase(\"ResetAllFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$this->SetupExportOptionsExt();\n\n\t\t// Hide options for export\n\t\tif ($dealers_reports->Export <> \"\")\n\t\t\t$this->ExportOptions->HideAllOptions();\n\n\t\t// Set up table class\n\t\tif ($dealers_reports->Export == \"word\" || $dealers_reports->Export == \"excel\" || $dealers_reports->Export == \"pdf\")\n\t\t\t$this->ReportTableClass = \"ewTable\";\n\t\telse\n\t\t\t$this->ReportTableClass = \"ewTable ewTableSeparate\";\n\t}", "public function plugin_settings_description() {\n\t\t\n\t\t$description = '<p>';\n\t\t$description .= sprintf(\n\t\t\tesc_html__( 'iContact makes it easy to send email newsletters to your customers, manage your subscriber lists, and track campaign performance. Use Gravity Forms to collect customer information and automatically add it to your iContact list. If you don\\'t have an iContact account, you can %1$s sign up for one here.%2$s', 'gravityformsicontact' ),\n\t\t\t'<a href=\"http://www.icontact.com/\" target=\"_blank\">', '</a>'\n\t\t);\n\t\t$description .= '</p>';\n\t\t\n\t\tif ( ! $this->initialize_api() ) {\n\t\t\t\n\t\t\t$description .= '<p>';\n\t\t\t$description .= esc_html__( 'Gravity Forms iContact Add-On requires your Application ID, API username and API password. To obtain an application ID, follow the steps below:', 'gravityformsicontact' );\n\t\t\t$description .= '</p>';\n\t\t\t\n\t\t\t$description .= '<ol>';\n\t\t\t$description .= '<li>' . sprintf(\n\t\t\t\tesc_html__( 'Visit iContact\\'s %1$s application registration page.%2$s', 'gravityformsicontact' ),\n\t\t\t\t'<a href=\"https://app.icontact.com/icp/core/registerapp/\" target=\"_blank\">', '</a>'\n\t\t\t) . '</li>';\n\t\t\t$description .= '<li>' . esc_html__( 'Set an application name and description for your application.', 'gravityformsicontact' ) . '</li>';\n\t\t\t$description .= '<li>' . esc_html__( 'Choose to show information for API 2.0.', 'gravityformsicontact' ) . '</li>';\n\t\t\t$description .= '<li>' . esc_html__( 'Copy the provided API-AppId into the Application ID setting field below.', 'gravityformsicontact' ) . '</li>';\n\t\t\t$description .= '<li>' . esc_html__( 'Click \"Enable this AppId for your account\".', 'gravityformsicontact' ) . '</li>';\n\t\t\t$description .= '<li>' . esc_html__( 'Create a password for your application and click save.', 'gravityformsicontact' ) . '</li>';\n\t\t\t$description .= '<li>' . esc_html__( 'Enter your API password, along with your iContact account username, into the settings fields below.', 'gravityformsicontact' ) . '</li>';\n\t\t\t$description .= '</ol>';\n\t\t\t\n\t\t}\n\t\t\t\t\n\t\treturn $description;\n\t\t\n\t}", "public function options_page_html() {\n // check user capabilities\n if ( ! current_user_can( 'manage_options' ) ) {\n return;\n }\n\n // add error/update messages\n\n // check if the user have submitted the settings\n // wordpress will add the \"settings-updated\" $_GET parameter to the url\n if ( isset( $_GET['settings-updated'] ) ) {\n // add settings saved message with the class of \"updated\"\n add_settings_error( 'settcalc_messages', 'settcalc_message', __( 'Settings Saved', 'settcalc' ), 'updated' );\n }\n\n // show error/update messages\n settings_errors( 'settcalc_messages' );\n ?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n <form action=\"options.php\" method=\"post\">\n <?php\n // output security fields for the registered setting \"wporg\"\n settings_fields( 'settcalc' );\n // output setting sections and their fields\n // (sections are registered for \"wporg\", each field is registered to a specific section)\n do_settings_sections( 'settcalc' );\n // output save settings button\n submit_button( 'Save Settings' );\n ?>\n </form>\n </div>\n <?php\n }", "public function server_info_section() {\n \n ?><p><?php _e( 'Information about SMTP server', JPEN_DOMAIN ); ?></p><?php\n\n add_settings_field( \n 'jpen_smtp_host', \n __( 'SMTP Host', JPEN_DOMAIN ), \n [ $this, 'smtp_host_field' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_host',\n 'default' => 'smtp.gmail.com',\n ) \n );\n\n add_settings_field( \n 'jpen_smtp_port', \n __( 'SMTP Port', JPEN_DOMAIN ), \n [ $this, 'smtp_port_field' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_port',\n 'default' => 25,\n ) \n );\n\n add_settings_field( \n 'jpen_smtp_secure', \n __( 'SMTP Secure', JPEN_DOMAIN ), \n [ $this, 'smtp_secure_select' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_secure',\n 'options' => [ 'tls', 'ssl' ],\n 'default' => 'tls',\n ) \n );\n\n add_settings_field( \n 'jpen_smtp_auth', \n __( 'SMTP Auth', JPEN_DOMAIN ), \n [ $this, 'smtp_auth_check' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_auth',\n 'default' => true,\n ) \n );\n\n add_settings_field( \n 'jpen_smtp_debug', \n __( 'SMTP Debug', JPEN_DOMAIN ), \n [ $this, 'smtp_debug_check' ], \n $this->page_slug, \n 'jpen_server_info', \n array(\n 'label_for' => 'jpen_smtp_debug',\n 'default' => 1,\n ) \n );\n }", "function news_options_page() {\r\n\r\n // variables for the field and option names \r\n $opt_name = 'mt_news_header';\r\n\t$opt_name_2 = 'mt_news_color';\r\n $opt_name_3 = 'mt_news_topic';\r\n\t$opt_name_4 = 'mt_news_number';\r\n $opt_name_6 = 'mt_news_plugin_support';\n $opt_name_7 = 'mt_news_description';\n $opt_name_8 = 'mt_news_dateyes';\r\n $hidden_field_name = 'mt_quotes_submit_hidden';\r\n $data_field_name = 'mt_news_header';\r\n\t$data_field_name_2 = 'mt_news_color';\r\n $data_field_name_3 = 'mt_news_topic';\r\n\t$data_field_name_4 = 'mt_news_number';\r\n $data_field_name_6 = 'mt_news_plugin_support';\n $data_field_name_7 = 'mt_news_description';\n $data_field_name_8 = 'mt_news_dateyes';\r\n\r\n // Read in existing option value from database\r\n $opt_val = get_option( $opt_name );\r\n\t$opt_val_2 = get_option( $opt_name_2 );\r\n $opt_val_3 = get_option( $opt_name_3 );\r\n\t$opt_val_4 = get_option( $opt_name_4 );\r\n $opt_val_6 = get_option($opt_name_6);\n $opt_val_7 = get_option($opt_name_7);\n $opt_val_8 = get_option($opt_name_8);\r\n\r\n // See if the user has posted us some information\r\n // If they did, this hidden field will be set to 'Y'\r\n if( $_POST[ $hidden_field_name ] == 'Y' ) {\r\n // Read their posted value\r\n $opt_val = $_POST[ $data_field_name ];\r\n\t\t$opt_val_2 = $_POST[ $data_field_name_2 ];\r\n $opt_val_3 = $_POST[ $data_field_name_3 ];\r\n\t\t$opt_val_4 = $_POST[ $data_field_name_4 ];\r\n $opt_val_6 = $_POST[$data_field_name_6];\n $opt_val_7 = $_POST[$data_field_name_7];\n $opt_val_8 = $_POST[$data_field_name_8];\r\n\r\n // Save the posted value in the database\r\n update_option( $opt_name, $opt_val );\r\n\t\tupdate_option( $opt_name_2, $opt_val_2 );\r\n update_option( $opt_name_3, $opt_val_3 );\r\n\t\tupdate_option( $opt_name_4, $opt_val_4 );\r\n update_option( $opt_name_6, $opt_val_6 );\n update_option( $opt_name_7, $opt_val_7 ); \n update_option( $opt_name_8, $opt_val_8 ); \r\n\r\n // Put an options updated message on the screen\r\n\r\n?>\r\n<div class=\"updated\"><p><strong><?php _e('Options saved.', 'mt_trans_domain' ); ?></strong></p></div>\r\n<?php\r\n\r\n }\r\n\r\n // Now display the options editing screen\r\n\r\n echo '<div class=\"wrap\">';\r\n\r\n // header\r\n\r\n echo \"<h2>\" . __( 'News Plugin Options', 'mt_trans_domain' ) . \"</h2>\";\n\necho \"<strong>Enter [news] into your posts or pages to insert news!</strong>\";\n\r\n$blog_url_feedback=get_bloginfo('url');\r\n\r\n // options form\r\n \r\n $change4 = get_option(\"mt_news_plugin_support\");\r\n\r\nif ($change4==\"Yes\" || $change4==\"\") {\r\n$change4=\"checked\";\r\n$change41=\"\";\r\n} else {\r\n$change4=\"\";\r\n$change41=\"checked\";\r\n}\n\n $change5 = get_option(\"mt_news_description\");\r\n\r\nif ($change5==\"Yes\") {\r\n$change5=\"checked\";\r\n$change51=\"\";\r\n} else {\r\n$change5=\"\";\r\n$change51=\"checked\";\r\n}\n\n $change6 = get_option(\"mt_news_dateyes\");\r\n\r\nif ($change6==\"Yes\") {\r\n$change6=\"checked\";\r\n$change61=\"\";\r\n} else {\r\n$change6=\"\";\r\n$change61=\"checked\";\r\n}\r\n ?>\r\n\t\r\n<form name=\"form1\" method=\"post\" action=\"\">\r\n<input type=\"hidden\" name=\"<?php echo $hidden_field_name; ?>\" value=\"Y\">\r\n\r\n<p><?php _e(\"News Widget Title\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name; ?>\" value=\"<?php echo $opt_val; ?>\" size=\"50\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"News Category:\", 'mt_trans_domain' ); ?> \r\n<select name=\"<?php echo $data_field_name_3; ?>\">\r\n<option value=\"topstories\">Top News</option>\r\n<option value=\"world\">World</option>\r\n<option value=\"europe\">Europe</option>\r\n<option value=\"china\">China</option>\r\n<option value=\"india\">India</option>\r\n<option value=\"asia\">Asia</option>\r\n<option value=\"oceania\">Oceania</option>\r\n<option value=\"africa\">Africa</option>\r\n<option value=\"us\">United States</option>\r\n<option value=\"britain\">Britain</option>\r\n<option value=\"business\">Business</option>\r\n<option value=\"tech\">Technology</option>\r\n<option value=\"politics\">Politics</option>\r\n<option value=\"health\">Health</option>\r\n<option value=\"sports\">Sports</option>\r\n<option value=\"entertainment\">Entertainment</option>\r\n<option value=\"oddlyenough\">Odd News</option>\r\n</select>\r\n</p><hr />\r\n\r\n<p><?php _e(\"Number of News items\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_4; ?>\" value=\"<?php echo $opt_val_4; ?>\" size=\"3\">\r\n</p><hr />\n\n<p><?php _e(\"Show News Descriptions?\", 'mt_trans_domain' ); ?> \r\n<input type=\"radio\" name=\"<?php echo $data_field_name_7; ?>\" value=\"Yes\" <?php echo $change5; ?>>Yes\r\n<input type=\"radio\" name=\"<?php echo $data_field_name_7; ?>\" value=\"No\" <?php echo $change51; ?> >No\r\n</p><hr />\n\n<p><?php _e(\"Show Date of Publishing?\", 'mt_trans_domain' ); ?> \r\n<input type=\"radio\" name=\"<?php echo $data_field_name_8; ?>\" value=\"Yes\" <?php echo $change6; ?>>Yes\r\n<input type=\"radio\" name=\"<?php echo $data_field_name_8; ?>\" value=\"No\" <?php echo $change61; ?> >No\r\n</p><hr />\r\n\r\n<p><?php _e(\"Font Color:\", 'mt_trans_domain' ); ?> \r\n#<input size=\"7\" name=\"<?php echo $data_field_name_2; ?>\" value=\"<?php echo $opt_val_2; ?>\">\r\n(For help, go to <a href=\"http://html-color-codes.com/\">HTML Color Codes</a>).\r\n</p><hr />\r\n\r\n<p><?php _e(\"Support the Plugin?\", 'mt_trans_domain' ); ?> \r\n<input type=\"radio\" name=\"<?php echo $data_field_name_6; ?>\" value=\"Yes\" <?php echo $change4; ?>>Yes\r\n<input type=\"radio\" name=\"<?php echo $data_field_name_6; ?>\" value=\"No\" <?php echo $change41; ?> >No\r\n</p><hr />\r\n\r\n<p class=\"submit\">\r\n<input type=\"submit\" name=\"Submit\" value=\"<?php _e('Update Options', 'mt_trans_domain' ) ?>\" />\r\n</p><hr />\r\n\r\n</form>\r\n<?php\r\n}", "function print_hidden_settings_fields ()\n\t\t{\n\t\t\t$options = get_option('hs_settings');\n\n\t\t\t$hs_installed = ( isset($options['hs_installed']) ? $options['hs_installed'] : 1 );\n\t\t\t$hs_version = ( isset($options['hs_version']) ? $options['hs_version'] : HUBSPOT_TRACKING_CODE_PLUGIN_VERSION );\n\n\t\t\tprintf(\n\t\t\t\t\t'<input id=\"hs_installed\" type=\"hidden\" name=\"hs_settings[hs_installed]\" value=\"%d\"/>',\n\t\t\t\t\t$hs_installed\n\t\t\t);\n\n\t\t\tprintf(\n\t\t\t\t\t'<input id=\"hs_version\" type=\"hidden\" name=\"hs_settings[hs_version]\" value=\"%s\"/>',\n\t\t\t\t\t$hs_version\n\t\t\t);\n\t\t}", "function opanda_show_mymail_html() {\r\n \r\n if ( !defined('MYMAIL_VERSION') ) {\r\n ?>\r\n <div class=\"form-group\">\r\n <label class=\"col-sm-2 control-label\"></label>\r\n <div class=\"control-group controls col-sm-10\">\r\n <p><strong><?php _e('The MyMail plugin is not found on your website. Emails will not be saved.', 'opanda') ?></strong></p>\r\n </div>\r\n </div>\r\n <?php\r\n } else {\r\n ?>\r\n <div class=\"form-group\">\r\n <label class=\"col-sm-2 control-label\"></label>\r\n <div class=\"control-group controls col-sm-10\">\r\n <p><?php _e('You can set a list where the subscribers should be added in the settings of a particular locker.', 'opanda') ?></p>\r\n </div>\r\n </div>\r\n <?php\r\n }\r\n}", "protected function output() {\n\t\treturn \"<hr class=\\\"hr-text\\\" data-content=\\\"{$this->option( 'text', '' )}\\\"/>\";\n\t}", "public function render(){\n\t\t$this->clearAttribute(\"value\");\n\t\t$inner = \"\\n\";\n\t\tforeach($this->options as $value => $option){\n\t\t\tif(in_array($value, $this->selected)){\n\t\t\t\t$option->addAttribute(\"selected\", \"selected\");\n\t\t\t}\n\t\t\t$inner .= \"\\t\" . $option->render() . \"\\n\";\n\t\t}\n\t\t$this->setInnerText($inner);\n\t\treturn parent::render();\n\t}", "public function customizer_notice() {\n\t\t$notices = get_option( 'swc_activation_notice' );\n\n\t\tif ( $notices = get_option( 'swc_activation_notice' ) ) {\n\n\t\t\tforeach ( $notices as $notice ) {\n\t\t\t\techo '<div class=\"updated\">' . $notice . '</div>';\n\t\t\t}\n\n\t\t\tdelete_option( 'swc_activation_notice' );\n\t\t}\n\t}", "private function fileVotingOptions()\n {\n $content = '';\n foreach ($this->post['votingOptions'] AS $option)\n {\n $content .= \"\\$vote_option[] = '\" . addslashes($option) . \"';\\n \";\n }\n return $content;\n }" ]
[ "0.71474123", "0.6460489", "0.6338348", "0.6305787", "0.6297103", "0.62280315", "0.62206423", "0.6188461", "0.61835426", "0.614262", "0.60508436", "0.6036295", "0.5974808", "0.595958", "0.5950906", "0.59402174", "0.59213674", "0.59019834", "0.58978254", "0.5890761", "0.5825405", "0.5823454", "0.58221954", "0.5817346", "0.5774243", "0.57638866", "0.57626075", "0.57572556", "0.5745534", "0.5725543", "0.57177585", "0.56967866", "0.5690313", "0.56817406", "0.56711423", "0.5666724", "0.5615424", "0.56063944", "0.5606376", "0.5606031", "0.5601913", "0.55951226", "0.55927134", "0.5586764", "0.55823517", "0.558125", "0.55743414", "0.55735266", "0.5571445", "0.5561197", "0.5555853", "0.55553716", "0.55541867", "0.55502933", "0.553806", "0.5515683", "0.5514203", "0.54972667", "0.5495599", "0.54829395", "0.54820627", "0.54776055", "0.54733795", "0.5472816", "0.5472607", "0.5468011", "0.54514223", "0.5440144", "0.54343927", "0.54249483", "0.54197234", "0.54193866", "0.54158014", "0.5408686", "0.5396446", "0.539512", "0.5388702", "0.5387522", "0.5382433", "0.53814316", "0.53780586", "0.5374781", "0.53647643", "0.5363463", "0.53558", "0.5352895", "0.5352573", "0.53425", "0.533989", "0.5337697", "0.53314835", "0.5329517", "0.532634", "0.53255254", "0.532154", "0.53192735", "0.5316182", "0.5314337", "0.5312716", "0.53104156" ]
0.63359267
3